Commit Graph

118 Commits

Author SHA1 Message Date
Rafał Dzięgiel
06d9f302c2 Revert "sink: Use g_main_context_invoke_full for drawing"
Not much benefit from using this function and unlike g_idle_add_full it
does not allow to skip a frame when previous one was not finished (slow HW).

This reverts commit f8a7abe195.
2021-05-31 18:07:37 +02:00
Rafostar
1f781716d7 Add env variable to display FPS 2021-05-30 11:14:51 +02:00
Rafał Dzięgiel
0d7ef22c88 Merge pull request #77 from Rafostar/mpris
Add MPRIS
2021-05-26 22:01:49 +02:00
Rafał Dzięgiel
57664f32da sink: Do not send the same cursor coords on each GUI redraw 2021-05-26 21:15:58 +02:00
Rafał Dzięgiel
f8a7abe195 sink: Use g_main_context_invoke_full for drawing
Queue draws to application (and GTK) main context using g_main_context_invoke_full method
2021-05-26 20:59:50 +02:00
Rafostar
5f259b28fe mpris: Add "SupportedUriSchemes" and handle "OpenUri" method 2021-05-26 15:14:28 +02:00
Rafostar
9f776e9ecb mpris: Support changing volume 2021-05-26 15:13:30 +02:00
Rafał Dzięgiel
edb799bafa API: Parse title from URI when no title in tags 2021-05-24 15:35:04 +02:00
Rafał Dzięgiel
7535c4e598 mpris: Support position reporting and seeking 2021-05-24 15:34:47 +02:00
Rafał Dzięgiel
f0475ee055 API: Support seeking by offset 2021-05-24 15:33:52 +02:00
Rafał Dzięgiel
68d7205ead mpris: Support metadata url, title and length 2021-05-24 15:33:38 +02:00
Rafał Dzięgiel
f08ffad178 Initial MPRIS support
Implement a working MPRIS DBus connection with a separate API to control it. Right now only player playback state is reflected and Play/Pause/PlayPause calls work.
2021-05-24 15:33:15 +02:00
Rafał Dzięgiel
a2bbd2708d sink: Support EGL under x11 with GTK 4.4+ 2021-05-14 18:11:58 +02:00
Rafostar
2f5d6d60ed API: add debug messages about dropped buffers 2021-05-06 14:34:08 +02:00
Rafostar
970b1487ac Restore manual play call
Autoplay was causing some racy conditions when loaded with subtitle uri. Make it play after uri loaded signal, but still prevent going from stopped to play 2nd time.
2021-05-04 18:46:22 +02:00
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