Commit Graph

1207 Commits

Author SHA1 Message Date
Rafał Dzięgiel
bab3d34349 clapper: Various documentation cleanups and fixes 2024-04-14 20:17:12 +02:00
Rafał Dzięgiel
e751428d6c workflows: Update to use latest versions of actions 2024-04-14 17:23:33 +02:00
Rafał Dzięgiel
a9769f9537 gst-plugin: sink: Stop preferring GL over GLES with GStreamer 1.24+
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.
2024-04-14 15:47:20 +02:00
Rafał Dzięgiel
fe6b3fcf29 clapper-app: Fix window buttons on initial state
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.
2024-04-14 15:11:18 +02:00
Rafał Dzięgiel
6447944b21 clapper-app: Handle alternative headerbar buttons placements
Handle all possible combinations of window state buttons placement.
These are "right" and "left" combined along with either LTR or RTL.

Fixes #402
2024-04-13 18:32:36 +02:00
Rafał Dzięgiel
42fa31cc4b Merge pull request #404 from Rafostar/scroll-fixes
Scroll fixes
2024-04-13 14:28:23 +02:00
Rafał Dzięgiel
4baade3b32 Merge pull request #408 from sp1ritCS/devenv
meson: Ensure clapper uses local translations within the devenv
2024-04-12 21:38:16 +02:00
Florian "sp1rit"​
bcd8e470ad po: Updated German translation
I've taken a bit of liberty with some of the translations, but I feel
like they should be fine.

Signed-off-by: Florian "sp1rit"​ <sp1rit@disroot.org>
2024-04-12 20:57:04 +02:00
Florian "sp1rit"​
3841a906fd meson: Ensure clapper uses local translations within the devenv
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>
2024-04-12 20:38:46 +02:00
Rafał Dzięgiel
5e7305516e clapper-gtk: Update POT file 2024-04-12 20:29:30 +02:00
Rafał Dzięgiel
f1ef299c10 clapper-gtk: status: Fix missing translations 2024-04-12 20:28:23 +02:00
Rafał Dzięgiel
1606a165e4 clapper-gtk: extra-menu-button: Use "Show Subtitles" text
As pointed in #410, the word "Enabled" and a checkmark next to it is a bad UX.
Change this text to "Show Subtitles" instead.
2024-04-12 20:25:49 +02:00
Rafał Dzięgiel
87f51c6755 clapper: Also update decoders after preroll
Sometimes decoders might not be active yet until media starts playing, to fix that being racy also try to update them after preroll
2024-04-12 20:22:48 +02:00
Rafał Dzięgiel
ca73b3a3ef clapper-gtk: extra-menu-button: Make text->number conversion more forgiving
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.
2024-04-11 20:49:36 +02:00
Rafał Dzięgiel
6f1277a2e6 server: Fix invalid JSON caused by locale decimal conversion
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.
2024-04-11 20:20:37 +02:00
Rafał Dzięgiel
76f830fa6e Merge pull request #409 from sp1ritCS/fix_pbspeed
clapper-gtk/extra-menu: Fixed speed being forced to the lowest value
2024-04-11 20:07:44 +02:00
Florian "sp1rit"​
a63d92601f clapper-gtk/extra-menu: Fixed speed being forced to the lowest value
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>
2024-04-10 12:26:50 +02:00
Rafał Dzięgiel
0c9973ef85 Add .flatpak-builder to .gitignore 2024-04-09 20:02:31 +02:00
Rafał Dzięgiel
65c974d539 Merge pull request #407 from sp1ritCS/devenv
Allow clapper to be ran within the meson devenv
2024-04-09 17:21:54 +02:00
Florian "sp1rit"​
43e2e88a4c meson: Use gnome.compile_schemas()
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>
2024-04-09 11:39:32 +02:00
Rafał Dzięgiel
c327734ca6 clapper-app: Do not trigger default scroll handler on GtkRange
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.
2024-04-08 20:37:32 +02:00
Rafał Dzięgiel
48b5a7c12a Remove TODO.md
Most of it was implemented and what is left already has an open issue which is easier to track progress
2024-04-08 19:07:21 +02:00
Rafał Dzięgiel
1dd47ad2a9 Remove old translation files
They are no longer used and translated strings from them were moved to new files
2024-04-08 19:04:35 +02:00
Rafał Dzięgiel
fbeafbccd1 crowdin: Remove legacy app translations
Now that old translated strings are moved to new .po files, remove what is left unused.
2024-04-08 18:34:12 +02:00
Rafał Dzięgiel
f391e2ea87 New Crowdin updates (#405)
* New translations clapper-gtk.pot (Romanian)

* New translations clapper-gtk.pot (French)

* New translations clapper-gtk.pot (Spanish)

* New translations clapper-gtk.pot (Afrikaans)

* New translations clapper-gtk.pot (Arabic)

* New translations clapper-gtk.pot (Catalan)

* New translations clapper-gtk.pot (Czech)

* New translations clapper-gtk.pot (Danish)

* New translations clapper-gtk.pot (German)

* New translations clapper-gtk.pot (Greek)

* New translations clapper-gtk.pot (Basque)

* New translations clapper-gtk.pot (Finnish)

* New translations clapper-gtk.pot (Hebrew)

* New translations clapper-gtk.pot (Hungarian)

* New translations clapper-gtk.pot (Italian)

* New translations clapper-gtk.pot (Japanese)

* New translations clapper-gtk.pot (Korean)

* New translations clapper-gtk.pot (Lithuanian)

* New translations clapper-gtk.pot (Dutch)

* New translations clapper-gtk.pot (Norwegian)

* New translations clapper-gtk.pot (Polish)

* New translations clapper-gtk.pot (Portuguese)

* New translations clapper-gtk.pot (Russian)

* New translations clapper-gtk.pot (Slovak)

* New translations clapper-gtk.pot (Serbian (Cyrillic))

* New translations clapper-gtk.pot (Swedish)

* New translations clapper-gtk.pot (Turkish)

* New translations clapper-gtk.pot (Ukrainian)

* New translations clapper-gtk.pot (Chinese Simplified)

* New translations clapper-gtk.pot (Chinese Traditional)

* New translations clapper-gtk.pot (Vietnamese)

* New translations clapper-gtk.pot (Portuguese, Brazilian)

* New translations clapper-gtk.pot (Persian)

* New translations clapper-gtk.pot (Croatian)

* New translations clapper-gtk.pot (Asturian)

* New translations clapper-app.pot (Romanian)

* New translations clapper-app.pot (French)

* New translations clapper-app.pot (Spanish)

* New translations clapper-app.pot (Afrikaans)

* New translations clapper-app.pot (Arabic)

* New translations clapper-app.pot (Catalan)

* New translations clapper-app.pot (Czech)

* New translations clapper-app.pot (Danish)

* New translations clapper-app.pot (German)

* New translations clapper-app.pot (Greek)

* New translations clapper-app.pot (Basque)

* New translations clapper-app.pot (Finnish)

* New translations clapper-app.pot (Hebrew)

* New translations clapper-app.pot (Hungarian)

* New translations clapper-app.pot (Italian)

* New translations clapper-app.pot (Japanese)

* New translations clapper-app.pot (Korean)

* New translations clapper-app.pot (Lithuanian)

* New translations clapper-app.pot (Dutch)

* New translations clapper-app.pot (Norwegian)

* New translations clapper-app.pot (Polish)

* New translations clapper-app.pot (Portuguese)

* New translations clapper-app.pot (Russian)

* New translations clapper-app.pot (Slovak)

* New translations clapper-app.pot (Serbian (Cyrillic))

* New translations clapper-app.pot (Swedish)

* New translations clapper-app.pot (Turkish)

* New translations clapper-app.pot (Ukrainian)

* New translations clapper-app.pot (Chinese Simplified)

* New translations clapper-app.pot (Chinese Traditional)

* New translations clapper-app.pot (Vietnamese)

* New translations clapper-app.pot (Portuguese, Brazilian)

* New translations clapper-app.pot (Persian)

* New translations clapper-app.pot (Croatian)

* New translations clapper-app.pot (Asturian)
2024-04-08 18:22:06 +02:00
Rafał Dzięgiel
37bf374283 crowdin: Add new translation paths to config 2024-04-08 17:33:41 +02:00
Rafał Dzięgiel
1327dc23e4 clapper-gtk: Fix seek bar touchpad scrolling
Since we only do seek on scale drop, handle scrubbing using touchpad
the same way by marking it as "dragging" after scrubbing starts and
doing seek after it ends.
2024-04-07 20:08:53 +02:00
Rafał Dzięgiel
6e17996691 clapper-app: Fix wrong direction of touchpad scrolling
We should not invert axis. Otherwise its opposite compared to the same gesture performed on GtkScale.
2024-04-07 20:05:20 +02:00
Rafał Dzięgiel
606b9c5170 Update README.md 2024-04-06 18:17:38 +02:00
Rafał Dzięgiel
e4814877de Merge pull request #374 from Rafostar/libclapper
Introduce Clapper libraries
2024-04-05 22:30:55 +02:00
Rafał Dzięgiel
6b135d51f3 flatpak: Switch to using Adelie Linux a52dec
Original repo is removed, change to maintained fork.
Others are doing the same e.g. FreeBSD
2024-04-05 21:18:46 +02:00
Rafał Dzięgiel
1a52576be3 flatpak: Update Flatpak manifests
Update GitHub Flatpak builds to latest runtime version, add new libs
that we need and remove the ones that are not needed anymore.
2024-04-05 21:18:42 +02:00
Rafał Dzięgiel
cc004a8144 bin: Rewrite Clapper player binary
A rewritten Clapper video player made using "Clapper" and "ClapperGtk" libraries.

Since both libraries from this repo are in C, newly rewritten Clapper binary is also in C to
avoid mixing different programming languages in a single repo, thus making maintenance easier.
Not depending on GJS gives us also an additional benefit of supporting different operating
systems or linux shells without pulling GJS as dependency.

Licensed under GPL-3.0-or-later.
2024-04-05 21:18:39 +02:00
Rafał Dzięgiel
675ddc85a1 lib: Introduce Clapper GTK integration library
An easy to use GTK integration library. Meant as a GtkVideo alternative.

While GtkVideo is more of a simple example of video playback under GTK4, this
acts as a full-fledged video player in the form of a GtkWidget that can be placed
anywhere within application.

The widget offers customization options for both top header and bottom playback
controls panels. The Clapper playback API is exposed under widget "player" property
making it easy for the programmer to set media and control playback programically.

The new library will be distributed with Clapper player. This includes public headers
and GObject Introspection support.

Licensed under LGPL-2.1-or-later.
2024-04-05 21:18:35 +02:00
Rafał Dzięgiel
d7f069d6c3 lib: Introduce Clapper playback library
An easy to use media playback library (libclapper) as a GstPlayer replacement.

Previously we tried to use upstream `gstplayer` library to control playback and
pass all events from multiple threads GStreamer uses into an app main thread.
Since this caused some thread racy problems and we needed additional ABI breaking
changes to better suit our needs, we ended up with a modified fork of said library
renamed to `gstclapper` as a temporary solution.

This new library simply named `clapper` replaces our previous `gstclapper` solution
and is written completely from scratch by myself. The aim here is to have an easy to
use playback library better suited to work with (but not limited to) GTK and GObject
properties bindings by relying on "notify" signals.

Major differences include:
* Operates on a playback queue (inherits `GListModel` interface) instead of a single URI
* Uses "notify" signals for property changes always dispatched to app thread
* Time is passed/read as decimal number in seconds instead of int64 in nanoseconds
* Integrates `GstDiscoverer` to figure out media info (such as title) before playback
* Easy to use MPRIS support as part of library
* Optional playback remote controls with WebSocket messages

The new library will be distributed with Clapper player. This includes public headers
and GObject Introspection support.

Licensed under LGPL-2.1-or-later.

Enjoy
2024-04-05 21:18:08 +02:00
Rafał Dzięgiel
edaba00658 Merge pull request #378 from TriVoxel/master
Add standard shortcut for preferences
2023-10-31 21:19:30 +01:00
Rafał Dzięgiel
8cf3e57d51 Merge pull request #385 from Rafostar/nightly-fix
flatpak-nightly: Update to 23.08 runtime
2023-10-31 18:49:37 +01:00
Rafał Dzięgiel
32723c49ad flatpak-nightly: Update to 23.08 runtime 2023-10-30 23:08:37 +01:00
cadenmitchell
058844c010 Add standard shortcut for preferences 2023-09-06 12:53:01 -06:00
Rafał Dzięgiel
b4aaea1940 Merge pull request #364 from Rafostar/ws-fix
webServer: Listen on all interfaces
2023-06-27 19:58:49 +02:00
Rafał Dzięgiel
2dd08b7b33 webServer: Listen on all interfaces
Listen on all network interfaces for incoming connections.

Previous soup_server_listen_local() only listens on local
loopback device preventing access from network, so use
listen_all() instead to allow access through any interface.

Fixes #362
2023-06-27 18:44:59 +02:00
Rafał Dzięgiel
086b134483 flatpak: Sync with Flathub 2023-06-05 21:25:05 +02:00
Rafał Dzięgiel
9da04c549b Update LINGUAS file 2023-06-05 21:22:40 +02:00
Rafał Dzięgiel
ac7ec5fc12 New Crowdin updates (#355)
* New translations com.github.rafostar.Clapper.pot (Croatian)

* New translations com.github.rafostar.Clapper.pot (Swedish)
2023-06-05 21:17:45 +02:00
Rafał Dzięgiel
6e705485f5 Merge pull request #354 from milotype/Croatian-translation
Croatian translation
2023-05-06 20:31:30 +02:00
Rafał Dzięgiel
18caee32d7 New Crowdin updates (#348)
* New translations com.github.rafostar.Clapper.pot (Lithuanian)

* New translations com.github.rafostar.Clapper.pot (Finnish)
2023-05-05 13:51:08 +02:00
Milo Ivir
c7590b653b Add Croatian translation 2023-05-03 19:05:52 +02:00
Milo Ivir
dce74148a7 Add hr for Croatian 2023-05-03 19:05:17 +02:00
Rafał Dzięgiel
5ed9861530 Merge pull request #349 from g7/rotation
Allow detecting and setting media rotation
2023-05-02 20:47:58 +02:00
Rafał Dzięgiel
3f86b236d9 flatpak: Sync with Flathub 2023-04-29 16:38:58 +02:00