Commit Graph

1143 Commits

Author SHA1 Message Date
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
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
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
Eugenio Paolantonio (g7)
e275c3017a plugin: sink: allow detecting and/or setting media rotation. Fixes #310
GstClapperSink now allows to specify the media rotation via the `rotation`
property, which should be of type GstVideoOrientationMethod.

The default behaviour is to detect the media rotation automatically.

Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
2023-04-23 22:43:22 +02:00
Eugenio Paolantonio (g7)
4e250c8f2a plugin: paintable: Support setting media rotation. Contributes to #310
Rotation can be set by passing a GstVideoOrientationMethod to the
gst_clapper_paintable_set_rotation() function.

The actual rotation is done through GskTransforms directly on the
Snapshot.

Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
2023-04-23 22:24:29 +02:00
Eugenio Paolantonio (g7)
7fc93fbebc plugin: Add helper to get the actual width and height for a specific rotation
Signed-off-by: Eugenio Paolantonio (g7) <me@medesimo.eu>
2023-04-23 22:24:29 +02:00
Rafał Dzięgiel
bf52197896 plugin: Present fallback window right after assembled UI
When started from gst-play/launch-1.0 show window right after it was created.
No need to idle dispatch window present when changing state, since we are
already on correct thread when opening resources using start() method.
2023-02-12 13:53:51 +01:00
Rafał Dzięgiel
9556ec4da2 plugin: Ensure allocation using the same importer
Instead of locking mutex twice and praying that importer will not change in between, just ref it to ensure that
2023-02-12 13:16:18 +01:00
Rafał Dzięgiel
bd8f0280e2 plugin: Check importer presence before proposing allocation
In some cases importer might not be determined here yet.
Check if we have it to avoid a crash.
2023-02-09 11:38:36 +01:00
Rafał Dzięgiel
40b6f4c724 Update LINGUAS file 2023-01-08 19:00:16 +01:00
Rafał Dzięgiel
456d621ee3 New Crowdin updates (#332)
* New translations com.github.rafostar.Clapper.pot (Slovak)
2023-01-08 18:57:28 +01:00
Rafał Dzięgiel
263d3f8196 Merge pull request #324 from Rafostar/flatpak-translated
flatpak: Build with translations included
2023-01-08 18:54:20 +01:00
Rafał Dzięgiel
44db8c0d3b flatpak: Sync with Flathub 2023-01-07 18:55:01 +01:00
Rafał Dzięgiel
272e3a036c flatpak-nightly: Build with translations included
Flatpak git action does not support uploading a separate .Locale runtime.
Build it as part of the main app then.
2022-11-18 22:51:20 +01:00
Rafał Dzięgiel
540c294b2a flatpak: Build with translations included
Flatpak git action does not support uploading a separate .Locale runtime.
Build it as part of the main app then.
2022-11-18 22:50:54 +01:00
Rafał Dzięgiel
6c5753db53 Merge pull request #317 from Rafostar/gnome43
flatpak: Update to GNOME 43
2022-10-14 08:13:17 +02:00
Rafał Dzięgiel
a25bfa5418 flatpak: Update to GNOME 43
Update git actions builds to GNOME 43 runtime. #315
2022-10-13 20:54:26 +02:00