RESOLVED FIXED Bug 48824
[GStreamer] pause webkitvideosink during fullscreen video playback
https://bugs.webkit.org/show_bug.cgi?id=48824
Summary [GStreamer] pause webkitvideosink during fullscreen video playback
Philippe Normand
Reported 2010-11-02 02:19:13 PDT
Because the fullscreen video sink (autovideosink) takes the whole screen estate anyway and it doesn't make much sense to have the webkitvideosink rolling if it's not visible
Attachments
proposed patch (4.32 KB, patch)
2010-11-02 07:10 PDT, Philippe Normand
xan.lopez: review+
Sebastian Dröge (slomo)
Comment 1 2010-11-02 02:40:45 PDT
The current video sink pipeline is essentially like: ----- webkitvideosink tee --| ----- fullscreenvideosink right? So there are two possibilities here. Either you only link in the required sink when it's required or you add a "do nothing" mode to the sinks where they get the buffers but don't display them. Linking only when required is probably the cleaner and better solution but requires some work. You have to add an element before the tee (or a data/event probe on the tee's sinkpad) to keep track of the currently configured segment, running time, etc. And then when linking in the new sink you have to tell the sink about the segment and the running time via multiple newsegment events (details follow when you need them). Also you have to use pad-blocks for the re-linking, otherwise stuff will explode because the tee is not linked anywhere.
Philippe Normand
Comment 2 2010-11-02 02:46:55 PDT
I had some success adding identity before webkitvideosink and dropping the buffers when required. So the video appears paused in the webkitvideosink while autovideosink in fullscreen works fine. When I close the fullscreen window I configure identity to let buffers pass through again. I agree this is probably not the best solution though ;)
Philippe Normand
Comment 3 2010-11-02 02:56:45 PDT
(In reply to comment #1) > The current video sink pipeline is essentially like: > > ----- webkitvideosink > tee --| > ----- fullscreenvideosink > > right? > Well I add the fullscreen videosink (autovideosink) only when required (enterFullscreen) and I remove it during exitFullscreen().
Sebastian Dröge (slomo)
Comment 4 2010-11-02 03:01:08 PDT
(In reply to comment #3) > Well I add the fullscreen videosink (autovideosink) only when required (enterFullscreen) and I remove it during exitFullscreen(). And you don't get any interesting problems with QoS or A/V sync or warnings about missing newsegment events?
Philippe Normand
Comment 5 2010-11-02 03:07:36 PDT
(In reply to comment #4) > (In reply to comment #3) > > Well I add the fullscreen videosink (autovideosink) only when required (enterFullscreen) and I remove it during exitFullscreen(). > > And you don't get any interesting problems with QoS or A/V sync or warnings about missing newsegment events? In enterFullscreen() I get the current position, format, rate, start/stop values and create a new-segment event that I push to the new tee srcpad. Haven't noticed issues yet, IIRC you reviewed that code :)
Philippe Normand
Comment 6 2010-11-02 07:10:46 PDT
Created attachment 72660 [details] proposed patch
Alexis Menard (darktears)
Comment 7 2010-11-02 13:58:13 PDT
Comment on attachment 72660 [details] proposed patch I tested that patch and it works like a charm.
Xan Lopez
Comment 8 2010-11-24 05:35:06 PST
Comment on attachment 72660 [details] proposed patch Seems reasonable.
Philippe Normand
Comment 9 2010-11-24 09:50:37 PST
Philippe Normand
Comment 10 2010-11-24 09:53:59 PST
Note You need to log in before you can comment on or make changes to this bug.