Commit Graph

153 Commits

Author SHA1 Message Date
Rafostar
4179176ce8 Sink: queue render on GTK settings change
We have turned off auto rendering in video widget, hence we need to manually refresh when user changes some GTK settings (theme, icons etc.)
2021-05-02 15:51:14 +02:00
Rafał Dzięgiel
de65eee106 API: simplify playbin flags detect function 2021-04-27 12:28:59 +02:00
Rafał Dzięgiel
3238270c0d Ignore duration changes below 1ms during playback 2021-04-27 10:43:13 +02:00
Rafał Dzięgiel
997e47b93c API: let client decide what to do on EOS #52 2021-04-27 09:24:13 +02:00
Rafał Dzięgiel
ec1d4619a7 API: make "state" into a property 2021-04-26 22:30:01 +02:00
Rafał Dzięgiel
f4e48c9f8c Sink: render black on READY_TO_NULL state change
Show black background when playback finishes
2021-04-26 20:42:00 +02:00
Rafał Dzięgiel
1da6b94efc API: simplify EOS handling
Do not try to play smart with EOS by seeking to beginning. This leads to various errors or crashes. Just signal it and stop afterwards.
2021-04-26 20:40:44 +02:00
Rafał Dzięgiel
45d2702e01 API: fix missing drop of signals inhibit 2021-04-26 17:36:28 +02:00
Rafał Dzięgiel
a8aca7b3c0 API: make it autoplay on the same context invoke 2021-04-26 14:47:42 +02:00
Rafał Dzięgiel
c6e8824e3b API: add toggle_play method 2021-04-26 14:21:33 +02:00
Rafał Dzięgiel
ca7b44092e API: do not lock when changing scaled size values
Those values are private and should be accessed only from GTK thread, so locking widget should not be necessary here.
2021-04-15 11:58:12 +02:00
Rafał Dzięgiel
adbcfecb5e API: unset needs_info_update when stopped 2021-04-15 11:30:55 +02:00
Rafał Dzięgiel
ab32b2dbbc API: emit media info updated signal after video info updates
This fixes problem with wrong video resolution reported in media info due to being emitted before values were updated.
2021-04-12 17:38:44 +02:00
Rafał Dzięgiel
eda80f314e API: replace source-setup with element-setup callback
Otherwise user agent is only set for source elements and not for further pipeline elements (e.g. dashdemux => souphttpsrc)
2021-04-08 18:24:49 +02:00
Rafał Dzięgiel
30a7229b33 API: add media info updated signal
Emit media info updated signal only when media info is initially created and when number/format of tracks changes later. This is needed for GUI to detect resolution change (adaptive streaming) or when user adds external subtitles to current video.
2021-04-06 18:49:08 +02:00
Rafostar
43acfddb06 Sink: inform about used OpenGL(ES) version 2021-03-31 17:34:49 +02:00
Rafostar
d54781eda7 Revert "Sink: limit GL APIs to OpenGL3+ and GLES2+"
This reverts commit 3fd30e41bf.

Some pipeline elements might still need to use (and work) on
older OpenGL versions.
2021-03-31 16:51:50 +02:00
Rafał Dzięgiel
3fd30e41bf Sink: limit GL APIs to OpenGL3+ and GLES2+
Only allow using OpenGL 3.2+ or OpenGL ES 2.0+. This is what GTK4 supports.

#59
2021-03-29 14:38:19 +02:00
Rafał Dzięgiel
7a75c6d4ff Merge pull request #55 from Rafostar/gl-mods
Simplify GL Sink code
2021-03-22 08:55:04 +01:00
Rafostar
4e85f6b749 API: set some common user agent
Some internet sites might prevent us from access unless some sort of a user agent is set
2021-03-07 21:37:01 +01:00
Rafostar
0cd82b1b8a API: remove video sink plugin selection
Clapper only has and supports one video sink. I would rather replace it than forcing support for multiple plugins.
2021-03-06 22:09:27 +01:00
Rafostar
39da52dd62 Sink: unlock widget before setting queue
Let GTK handle setting queue resize/render on the widget. We are not accessing widget values at this time, so it can be unlocked. It will be locked back during the render.
2021-03-06 19:16:28 +01:00
Rafał Dzięgiel
9c12afbf80 Sink: rename into GstClapperGLSink
The customized GTK4 sink version has few differences from the one shipped as part of GStreamer. Rename custom sink to GstClapperGLSink to avoid confusion.
2021-03-06 00:24:31 +01:00
Rafał Dzięgiel
e3c9b112e2 Sink: remove gtkconfig header
Remove another leftover meant for GTK3 compatibility
2021-03-05 23:27:08 +01:00
Rafał Dzięgiel
13d675beff Sink: merge gtkwidget into single class
Same as with video sink. Clapper uses only one so no need for subclassing.
2021-03-05 23:23:34 +01:00
Rafał Dzięgiel
95c3845398 Sink: merge gstsink into single class
Clapper only uses single video sink. No need for subclassing it.
2021-03-05 21:06:03 +01:00
Rafał Dzięgiel
93549a67af Sink: remove ignore_alpha property
GTK4 no longer supports ignoring alpha
2021-03-05 19:26:29 +01:00
Rafał Dzięgiel
07fb0a9a46 Sink: remove GTK4 if-defs
Clapper works with GTK4, so reduce codebase by removing GTK3 leftovers
2021-03-05 19:02:14 +01:00
Rafał Dzięgiel
fe3fd32932 Sink: keep track of widget allocation size
Instead of obtaining allocation size on each frame draw, keep track of its current size and update value on its change.
2021-03-05 18:41:26 +01:00
Rafał Dzięgiel
637212f7e8 Sink: move GL drawing logic into single function
No need having it in another function with additional call if it is used only from single place.
2021-03-05 18:10:35 +01:00
Rafał Dzięgiel
68bd65c225 API: snap at nearest keyframe when doing fast seek
GStreamer needs to perform a seek when changing playback rate. Snapping at next keyframe causes viewer to lose few seconds of video when changing playback speed (and ugly fast forward effect when dragging speed slider). Prevent all those issues by seeking to the nearest keyframe instead.
2021-02-24 11:41:40 +01:00
Rafał Dzięgiel
775ec8a780 API: fix volume functions descriptions 2021-02-24 10:44:26 +01:00
Rafał Dzięgiel
86d365872a API: operate on cubic volume scale
Instead converting volume inside GJS, simplify things by making API operate on cubic volume scale.
2021-02-24 08:42:27 +01:00
Rafał Dzięgiel
6130ffa6c0 API: limit max linear volume to 3.375 (150% in cubic)
Clapper UI does not support volume overamp higher than 150%. Anything higher can lead to audio distortion or damaging your audio equipment.
2021-02-23 13:27:42 +01:00
Rafał Dzięgiel
68faeca918 API: Disallow pause on very short streams (< 1 sec)
Fixes crash when trying to pause on DVD navigation
2021-02-10 17:03:11 +01:00
Rafostar
65b4df13a8 Install gstclapper libs to app named subdirectory 2021-02-07 12:35:41 +01:00
Rafał Dzięgiel
c32bb269d7 GStreamer meson build script cleanup 2021-02-05 09:58:54 +01:00
Rafał Dzięgiel
bf04af23fe Do a lock on a gtk_sink
Same object is unlocked here. Keep consistency.
2021-02-02 13:55:55 +01:00
Rafał Dzięgiel
08cde45bad Gtk4Plugin: add drawing black fixes from Flatpak patch 2021-01-29 18:18:41 +01:00
Rafał Dzięgiel
b487d1f2c1 Gtk4Plugin: remove subtitles scaling
Causes jitter (even crashes on i965) when resizing video and honestly I think that subtitles rendered at video size look better.
2021-01-29 17:52:27 +01:00
Rafał Dzięgiel
2ce44d4e63 Combine GStreamer GTK4 plugin with API
Ship custom gtk4glsink plugin as part of API insead of normal gstreamer plugin. This avoids gstreamer plugin registry conflicts with gtk3 plugin and allows more customization.
2021-01-29 17:27:39 +01:00
Rafał Dzięgiel
fcf9426892 API: remove unused seek-done signal 2021-01-28 18:26:37 +01:00
Rafał Dzięgiel
dea77cc39f API: notify about speed value reset on STOP 2021-01-28 17:39:52 +01:00
Rafał Dzięgiel
f7a24b20c6 API: remove media info updated signal
A signal telling that "something somewhere changed" that is emitted multiple times per second (when bitrate changes). Not useful at all and a disaster performance-wise.
2021-01-28 16:26:20 +01:00
Rafał Dzięgiel
f2971371e1 API: remove clapper config structure
Not useful anymore since the player does 1s interval by default and now supports changing seek mode without stopping playback (unlike config which worked only when stopped).
2021-01-28 16:26:20 +01:00
Rafał Dzięgiel
15302a4b62 API: use 1s update position interval by default 2021-01-28 16:26:20 +01:00
Rafał Dzięgiel
e731842b08 API: remove "volume-changed" signal in favor of "notify::volume"
We do not need both and notify is better here cause it allows binding volume scale value to the volume prop
2021-01-28 16:26:20 +01:00
Rafał Dzięgiel
90697d81a7 API: fix debug category init with bindings 2021-01-28 16:26:09 +01:00
Rafał Dzięgiel
bbcba3ccc6 API: disable notify on props where it is unused
Notify signal is a little problematic here as we already post a signal from player while jumping between APP and API contexts. Limit and disable it where not needed.
2021-01-28 09:10:43 +01:00
Rafał Dzięgiel
5785204c28 API: prevent "notify::caps" from being reconnected on each start 2021-01-28 08:32:49 +01:00