Commit Graph

1120 Commits

Author SHA1 Message Date
Rafał Dzięgiel
2343e84a41 plugin: Use set_static_metadata in class init
Use static version of this function, so our static strings will not be copied
2022-06-06 21:04:17 +02:00
Rafał Dzięgiel
c288223321 Merge pull request #278 from Rafostar/flatpak-gvfs
flatpak: Add missing GVFS access permissions
2022-06-06 20:48:53 +02:00
Rafał Dzięgiel
2ba6645462 flatpak-nightly: Add missing GVFS access permissions
Needed to make GVFS mounted filesystems work with GVFS 1.48+.
See: https://docs.flatpak.org/en/latest/sandbox-permissions.html#gvfs-access
2022-06-06 09:32:12 +02:00
Rafał Dzięgiel
adcbb5d827 flatpak: Add missing GVFS access permissions
Needed to make GVFS mounted filesystems work with GVFS 1.48+.
See: https://docs.flatpak.org/en/latest/sandbox-permissions.html#gvfs-access
2022-06-06 09:31:55 +02:00
Rafał Dzięgiel
9885a2f424 Merge pull request #275 from Rafostar/smart-colon
Use U+003A colon character on RTL languages
2022-06-03 16:17:27 +02:00
Rafał Dzięgiel
66b2d8c7de plugin: Also use min GL version when auto selecting context
When we prefer GLES, make sure its no lower then 3.1 version, so it can color convert 10bit videos,
otherwise core GL 3.2 that GTK4 normally defaults to takes precedence.

With auto behavior we should select the best one, both performance and support wise.
Otherwise user can request one or another with GST_GL_API env that works best
with his specific HW.
2022-06-03 14:36:34 +02:00
Rafał Dzięgiel
2c5d65d0b3 flatpak: Sync with Flathub 2022-06-02 14:08:17 +02:00
Rafał Dzięgiel
e37f2a0a30 Use U+003A colon character on RTL languages
Unfortunately U+2236 seems to break time labels on RTL languages. Check text direction at startup and select best one that works.
2022-06-01 17:09:39 +02:00
Rafał Dzięgiel
387bc7a2f3 Update LINGUAS file 2022-06-01 16:44:05 +02:00
Rafał Dzięgiel
495a59a07a New Crowdin updates (#274)
* New translations com.github.rafostar.Clapper.pot (Hebrew)
2022-06-01 16:41:59 +02:00
Rafał Dzięgiel
e5723cd25a 0.5.1 0.5.1 2022-05-29 14:17:25 +02:00
Rafostar
e7808df7cc plugin: paintable: Fix widget size calculations on non-100% display scaling
Unlike legacy sink that used GLArea, GdkPaintable snapshots without pre-multiplying
sizes with scale factor. Remove scaling multiply of our widget dimensions,
so both video and widget width/height will be calculated correctly.

This fixes both image and black borders displaying issues on displays with
non-100% scaling applied.
2022-05-29 10:19:48 +02:00
Rafał Dzięgiel
8f22b36045 0.5.0 0.5.0 2022-05-28 19:19:05 +02:00
Rafał Dzięgiel
dc257846ce New Crowdin updates (#268)
* New translations com.github.rafostar.Clapper.pot (Romanian)

* New translations com.github.rafostar.Clapper.pot (Korean)

* New translations com.github.rafostar.Clapper.pot (Vietnamese)

* New translations com.github.rafostar.Clapper.pot (Chinese Traditional)

* New translations com.github.rafostar.Clapper.pot (Chinese Simplified)

* New translations com.github.rafostar.Clapper.pot (Ukrainian)

* New translations com.github.rafostar.Clapper.pot (Turkish)

* New translations com.github.rafostar.Clapper.pot (Swedish)

* New translations com.github.rafostar.Clapper.pot (Serbian (Cyrillic))

* New translations com.github.rafostar.Clapper.pot (Russian)

* New translations com.github.rafostar.Clapper.pot (Portuguese)

* New translations com.github.rafostar.Clapper.pot (Polish)

* New translations com.github.rafostar.Clapper.pot (Norwegian)

* New translations com.github.rafostar.Clapper.pot (Dutch)

* New translations com.github.rafostar.Clapper.pot (Japanese)

* New translations com.github.rafostar.Clapper.pot (French)

* New translations com.github.rafostar.Clapper.pot (Italian)

* New translations com.github.rafostar.Clapper.pot (Hungarian)

* New translations com.github.rafostar.Clapper.pot (Hebrew)

* New translations com.github.rafostar.Clapper.pot (Finnish)

* New translations com.github.rafostar.Clapper.pot (Basque)

* New translations com.github.rafostar.Clapper.pot (Greek)

* New translations com.github.rafostar.Clapper.pot (German)

* New translations com.github.rafostar.Clapper.pot (Danish)

* New translations com.github.rafostar.Clapper.pot (Czech)

* New translations com.github.rafostar.Clapper.pot (Catalan)

* New translations com.github.rafostar.Clapper.pot (Arabic)

* New translations com.github.rafostar.Clapper.pot (Afrikaans)

* New translations com.github.rafostar.Clapper.pot (Spanish)

* New translations com.github.rafostar.Clapper.pot (Portuguese, Brazilian)

* New translations com.github.rafostar.Clapper.pot (Italian)

* New translations com.github.rafostar.Clapper.pot (German)
2022-05-27 19:48:48 +02:00
Rafał Dzięgiel
af77873205 plugin: paintable: Remove unused value 2022-05-27 19:46:54 +02:00
Rafał Dzięgiel
5289b2f0a4 plugin: Fix scaled subtitles position on anamorph video
GStreamer does not take pixel aspect ratio into account for overlay rectangles.
If we do so, we end up with subtitles that are displayed off-center.
Behave like any other GStreamer sink on this matter.
2022-05-27 19:38:10 +02:00
Rafał Dzięgiel
87b3fbc15a Update POT file 2022-05-26 18:43:34 +02:00
Rafał Dzięgiel
59ff5bc006 Merge pull request #267 from Rafostar/fix-glx
Fix caps negotiation on GLX
2022-05-26 11:51:11 +02:00
Rafał Dzięgiel
91efc4ecdb plugin: gluploader: Use GLUpload provided propose_allocation method
Instead figuring out what kind of pool we should make just use the upstream provided
functionality that comes as part of GLUpload API.

Fixes uploads with GstVideoGLTextureUploadMeta, which legacy VAAPI plugin uses on GLX.
2022-05-26 10:21:11 +02:00
Rafał Dzięgiel
713449b4ab plugin: sink: Only add pool to query if there is one 2022-05-26 10:17:36 +02:00
Rafał Dzięgiel
3f7ba0674f plugin: importers: Support different template and actual caps
Make a template caps during class_init. It will be used for e.g. gst-inspect-1.0, while do and use an actual caps that current HW can handle.
2022-05-25 20:37:18 +02:00
Rafał Dzięgiel
5b89879031 plugin: gluploader: Remove DMABuf caps features on GLX
GLX cannot do DMABufs. Do not advertise its support in caps, so upstream elements will never try using this kind of memory on GLX.
2022-05-25 15:46:04 +02:00
Rafał Dzięgiel
2385af9b94 Merge pull request #265 from Rafostar/devel
Merge devel branch changes
2022-05-25 10:42:35 +02:00
Rafał Dzięgiel
54e4644236 app: Call window_present without timestamp
GTK4 now handles this internally via xdg-activation. To make it work correctly we should stop using custom timestamp so default handlers will be used.
2022-05-24 18:23:15 +02:00
Rafał Dzięgiel
3c248250f3 plugin: Always make sure we have Gdk display
Give up creating GL context in an unlikely situation that there is no default display
2022-05-24 16:48:00 +02:00
Rafał Dzięgiel
51619cbd2a plugin: Temporarily try to avoid direct DMABuf import on desktop
This tries to avoid "scrambled" image on Linux with Intel GPUs that are mostly used
together with x86 CPUs at the expense of using slightly slower non-direct DMABuf import,
by not going with GLES by default on EGL.

The "GST_GL_API" env can still be used to force one or another context type.

We need for GStreamer to be aware of currently used DRM modifier first. On the other
hand forcing GL everywhere would break most embedded systems that only work with GLES,
so do it for x86 processors only... and pray for it to work.

See: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1236
2022-05-24 16:36:43 +02:00
Rafał Dzięgiel
f9e84ac99b plugin: Improve GL context realization code
We only want GLES on EGL display, so check for it one by one instead of always trying to realize GLES with everything that is not a macOS
2022-05-24 16:36:32 +02:00
Rafał Dzięgiel
1bd371dabd app: Always activate before opening files
Make sure app window was created and bring it on top when started with file(s) as args
2022-05-23 15:32:32 +02:00
Rafał Dzięgiel
5f6c0922c0 plugin: Clear paintable importer in dispose
Remove our ref on importer a little earlier, with a lock taken
2022-05-23 15:02:25 +02:00
Rafał Dzięgiel
041deb559c headerbar: Merge code into single subclass
We no longer ship the web app that was reusing parts of this code.
Combine it into single file without additional subclass.
2022-05-23 14:19:37 +02:00
Rafał Dzięgiel
fce8ec59b8 app: Merge code into single subclass
We no longer ship the web app that was reusing parts of this code.
Combine it into single file without additional subclass.

Also put window creation inside first activate code instead of startup
in order to fix running app as a gapplication service.
2022-05-23 14:18:00 +02:00
Rafał Dzięgiel
306505dc4d data: Add missing desktop file options
Mark as DBusActivatable and enable StartupNotify
2022-05-23 11:55:15 +02:00
Rafał Dzięgiel
60234419c2 data: Add DBus service file 2022-05-23 11:54:50 +02:00
Rafał Dzięgiel
c395c6b9be Merge pull request #262 from Rafostar/reloaded
plugin: Make modules management separate per instance
2022-05-20 11:28:27 +02:00
Rafał Dzięgiel
8301cded2f plugin: Make modules management separate per instance
There were various problems with importer loader code. One defect was that
it kept managing a single global list of available importers and marking
which one is currently used on it. This made it not work correctly for
multiple sink instances in single process and was not thread safe.

This commit changes importer loader code into a GstObject subclass, which
keeps its own list of importers per instance and unlike before makes it
possible to free this data from memory when destroyed.

Now only open modules are kept always in memory until process finishes
since we cannot unload them once loaded anyway.
2022-05-20 10:13:14 +02:00
Rafał Dzięgiel
34386bc96c plugin: Use different lock for importer within paintable
This way we can avoid an additional importer ref + unref for every frame draw
2022-05-18 19:25:00 +02:00
Rafał Dzięgiel
2b85afc03e plugin: Do not use weak ref on importer
There is no good reason to keep using weak ref on importer within paintable object. Change that to a gst_object_ref which is faster.
2022-05-18 18:28:20 +02:00
Rafał Dzięgiel
bb56efa705 Merge pull request #261 from Rafostar/adw-fixes
libadwaita CSS fixes
2022-05-18 12:26:52 +02:00
Rafał Dzięgiel
82922e51f9 flatpak: Update GTK4 to 4.6.4
With latest GTK 4.6.4 the issues with opening popovers are finally fixed. Stop patching older version and just build the latest one.
2022-05-18 11:39:07 +02:00
Rafał Dzięgiel
ca64d9d2ee flatpak: Build recent libadwaita version
With updated CSS we use some variables intoduced in stable versions of libadwaita. To make it work properly, stop using alpha.2 and build recent stable version.
2022-05-18 11:39:04 +02:00
Rafostar
2a18c6a374 css: Misc fixes for recent Adwaita theme
Fixes for recent libadwaita provided theme, mainly needed to workaround:
https://gitlab.gnome.org/GNOME/libadwaita/-/issues/454

Devs rejected my idea of fixing it upstream. They said to override it
in my own app. So here it is.
2022-05-18 11:38:56 +02:00
Rafał Dzięgiel
af6cf01c98 player: Remove hardcoded ring buffer value
We should aim to have this as a configurable option.
Until then lets use the default value.
2022-05-17 22:07:21 +02:00
Rafał Dzięgiel
85bdbb1132 plugin: Prefer GL over GLES on macOS
Apple decoder uses rectangle texture-target, which GLES does not support
2022-05-16 19:16:36 +02:00
Rafał Dzięgiel
8e89b0d8ca gschema: Make resume video option disabled by default
A resume video question dialog that keeps poping confuses new Clapper users.
Looks like some spam. Change default option value to be disabled, so people
that are interested in this feature can enable it in preferences.
2022-05-16 09:45:36 +02:00
Rafostar
4e3cc3e23f plugin: Set initial display resolution to 1x1
We do not support zero width/height (described in our caps). Set initial video
dimensions to 1x1. They are going to be updated on first buffer after video info is set.

This avoids running into https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1139
and makes sure we do not do any divisions by zero here either.
2022-05-15 20:02:01 +02:00
Rafostar
c6c43346fa lib: Replace usage of "g_str_equal" with "g_strcmp0"
The first one is meant for hash tables comparisons and does not guard against NULL values (#259).
2022-05-15 14:45:49 +02:00
Rafał Dzięgiel
be58af2256 Merge pull request #256 from Rafostar/gl-win
plugin: Add GL support for Windows OS
2022-05-13 16:34:26 +02:00
Rafał Dzięgiel
343eef5894 plugin: Add GL support for Windows OS
Add support for both WGL and EGL on Win32
2022-05-13 15:17:53 +02:00
Rafał Dzięgiel
04657017f9 Merge pull request #257 from Rafostar/gl-macos
plugin: Add GL support for macOS
2022-05-13 14:12:09 +02:00
Rafał Dzięgiel
1cdaa36559 plugin: Add GL support for macOS 2022-05-13 13:53:35 +02:00