The aim here is to stream an online video/audio while also at the
same time download/cache it to disk (excluding adaptive content).
After download is complete, further playback and seeking are done using the
locally cached file. This functionality uses GStreamer "downloadbuffer" element.
Player will emit a signal with a local download location after it completes,
so application will know where downloaded file for media item is stored in
case it wants to reuse it in the future.
It is up to application to set download dir and later manage downloaded
content in it, removing files its not going to use on next application
run and any incomplete downloads.
Billboard does not post automatic volume/speed announcements. It did at
some point during development, but it was scrapped in favour of letting
app use callbacks of "notify" signals to call announce speed/volume.
It seems GTK continues using created contexts, so we cannot unref it here.
Looking at GTK sink implementation for GtkVideo, I see that they do not
unref it either, but since we use surfaceless context it would be probably
better to have a static GstDisplay and reuse the same context in future.
Some media files have custom/proprietary metadata.
It should be safe to simply ignore these, since we do
not map metadata to any sort of Clapper stream anyway.
Fixes#441
Since during development we do not put new release tag into metainfo
which about window uses to know app version, set it manually to the
library version since they are the same.
Flathub validation no longer allows words for "display_length" - should be 360.
Also all "Purism" keys are nowadays invalid. They cause problems as metainfo is
parsed into hash table, thus there cannot be multiple keys with the same name.
We allow just "p" key (including any combination with it) for changing
progression mode. Fix its description in help overlay to be just "p" then.
Fixes#417
GStreamer 1.24 have implemented DRM modifiers negotiation that its lack of we were
working around with using GL on unpatched GStreamer (non-Flatpak builds).
Since GStreamer 1.24 does this and moreover it has disabled DMABuf codepath for
non-GLES we should start preferring GLES with this version always.
Also handle different buttons placements on initial state, similarly as we do now in headerbar.
With this commit, application menu is replicated in initial state UI, but its actually a good thing,
since this will allow us to have more current video related items in it only in main window.
This patch modifies the initialization routines of clapper to check for
CLAPPER_GTK_OVERRIDE_LOCALEDIR and
CLAPPER_APP_OVERRIDE_LOCALEDIR
and uses that instead of the LOCALEDIR specified in the config.h.
It also fixes the bug where libclapper-gtk loads the translations for
the clapper application and the clapper application loads the
translations for the libclapper-gtk. (It took me shockingly long to
figure out why the translations weren't working 🙃)
Co-authored-by: Rafał Dzięgiel <rafostar.github@gmail.com>
Signed-off-by: Florian "sp1rit" <sp1rit@disroot.org>
Try to parse into a number as much of the string as possible, without caring
about a sign suffix. This way input will be more forgiving instead of resetting
itself to lowest allowed number.
Also when a number exceeds allowed range, set it to maximal allowed value
instead of once again resetting to minimum.
When creating JSON data, we must ensure that our decimal numbers are converted
to a string with a "." as separator, otherwise it would be an invalid JSON.
As the SpinButton input callback attempted to parse the value inserted
as a string by printf using g_ascii_strtod, only if the language also
used . (full stop / u002E) as decimal seperator worked correctly.
Otherwise, parsing would fail and result (after a few iterations) in the
lowest value being set.
The usually correct approach is to use g_ascii_dtostr / g_ascii_formatd
instead of printf to format a decimal number, but given that this number
is actually presented to the user, going with g_strtod seems like a
better choice (I've decided against just using the stdlib strtod as to
allow the SpinButton to also recognize manual user input containing the
full stop instead of their languages native decimal seperator (not
that that'll ever happen, given the user can't focus the SpinButton
entry while media is running).
I've also fixed this for the volume SpinButton too, but it wasn't really
affected in the first place as it appearently always gets rounded up to
a number without decimal places.
Signed-off-by: Florian "sp1rit" <sp1rit@disroot.org>
This causes meson to automatically build the clapper gsettings schemas
and set GSETTINGS_SCHEMA_DIR to the correct location within the devenv.
This means that can now be ran without needing to install it somewhere
using:
meson devenv -C <builddir>
clapper
exit
More devenv overrides should be investigated (such as automatically
adopting the correct directory for translated locales etc.)
Signed-off-by: Florian "sp1rit" <sp1rit@disroot.org>
In addition to GtkScrolledWindow, when also hovering over GtkRange
subclassing widgets like GtkScale, do not trigger accidentally
default app window scroll handler.
We want the hovered upon widget and only that widget to handle scroll
events in such case.