RESOLVED FIXED 116642
[Gstreamer] cleanup buffering and state updates
https://bugs.webkit.org/show_bug.cgi?id=116642
Summary [Gstreamer] cleanup buffering and state updates
Balazs Kelemen
Reported 2013-05-22 15:50:22 PDT
Plans: - always do download buffering - some logic cleanup
Attachments
Patch (10.11 KB, patch)
2013-05-22 16:29 PDT, Balazs Kelemen
no flags
better to init members (10.14 KB, patch)
2013-05-22 17:15 PDT, Balazs Kelemen
no flags
Patch (18.15 KB, patch)
2013-05-24 09:50 PDT, Balazs Kelemen
no flags
Patch (17.08 KB, patch)
2013-05-27 06:03 PDT, Balazs Kelemen
no flags
Patch (16.77 KB, patch)
2013-05-27 06:10 PDT, Balazs Kelemen
no flags
Balazs Kelemen
Comment 1 2013-05-22 16:29:42 PDT
Balazs Kelemen
Comment 2 2013-05-22 17:15:47 PDT
Created attachment 202633 [details] better to init members
Balazs Kelemen
Comment 3 2013-05-24 02:05:19 PDT
Comment on attachment 202633 [details] better to init members This needs some more work.
Philippe Normand
Comment 4 2013-05-24 02:22:40 PDT
Please obsolete and clear the r flag instead of marking r- if you're not a reviewer yet.
Balazs Kelemen
Comment 5 2013-05-24 09:50:50 PDT
Philippe Normand
Comment 6 2013-05-27 04:19:54 PDT
Comment on attachment 202831 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202831&action=review It's odd that patch fixes http media tests for EFL, those seem to pass already in GTK at least. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1182 > + // Live pipelines go in PAUSED without prerolling. > + m_isStreaming = true; > + setDownloadBuffering(); Why moving this out of the test below? > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1521 > + bool shouldDownload = !isLiveStream(); > + if (shouldDownload) { No need for a local variable here.
Balazs Kelemen
Comment 7 2013-05-27 05:28:04 PDT
(In reply to comment #6) > (From update of attachment 202831 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=202831&action=review > > It's odd that patch fixes http media tests for EFL, those seem to pass already in GTK at least. Indeed, that's strange. Event loop is different on EFL (that integrates the glib loop with it's own). I guess the difference is timing related. > > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1182 > > + // Live pipelines go in PAUSED without prerolling. > > + m_isStreaming = true; > > + setDownloadBuffering(); > > Why moving this out of the test below? To execute it ASAP. Btw GST_STATE_CHANGE_NO_PREROLL should only be returned in GST_STATE_PAUSED state, no? Actually I need something to test live streams, could you give me a link or smg? > > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1521 > > + bool shouldDownload = !isLiveStream(); > > + if (shouldDownload) { > > No need for a local variable here.
Balazs Kelemen
Comment 8 2013-05-27 06:03:52 PDT
Balazs Kelemen
Comment 9 2013-05-27 06:10:13 PDT
Balazs Kelemen
Comment 10 2013-05-27 06:10:58 PDT
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1182 > > > + // Live pipelines go in PAUSED without prerolling. > > > + m_isStreaming = true; > > > + setDownloadBuffering(); > > > > Why moving this out of the test below? > > To execute it ASAP. Btw GST_STATE_CHANGE_NO_PREROLL should only be returned in GST_STATE_PAUSED state, no? Actually I need something to test live streams, could you give me a link or smg? > I removed this change. We can handle that separately.
Balazs Kelemen
Comment 11 2013-05-27 06:11:49 PDT
> > I removed this change. We can handle that separately. Err, I mean all the change I introduced for live streams.
Philippe Normand
Comment 12 2013-05-28 02:56:34 PDT
Comment on attachment 202979 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202979&action=review > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:419 > + GstState currentState, pendingState; > + gst_element_get_state(m_playBin.get(), &currentState, &pendingState, 0); > + if (currentState < GST_STATE_PAUSED && pendingState <= GST_STATE_PAUSED) Move this to ::changePipelineState() perhaps?
Balazs Kelemen
Comment 13 2013-05-31 03:28:41 PDT
(In reply to comment #12) > (From update of attachment 202979 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=202979&action=review > > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:419 > > + GstState currentState, pendingState; > > + gst_element_get_state(m_playBin.get(), &currentState, &pendingState, 0); > > + if (currentState < GST_STATE_PAUSED && pendingState <= GST_STATE_PAUSED) > > Move this to ::changePipelineState() perhaps? It won't work, in seek we use changePipelineState for reseting the pipeline. Also I was thinking of using it more consistently at every place where we change pipeline state (thus not using gst_element_set_state anywhere outside of this function) and update state variables in it accordingly to make sure they are valid all the time.
Balazs Kelemen
Comment 14 2013-06-06 09:13:13 PDT
Can we go on with this?
Philippe Normand
Comment 15 2013-06-06 09:45:07 PDT
Comment on attachment 202979 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202979&action=review Sorry I don't have time now for a full review but I'll try to do it tomorrow > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:-860 > - gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED); Where is this done now?
Balazs Kelemen
Comment 16 2013-06-06 14:43:54 PDT
Comment on attachment 202979 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202979&action=review >> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:-860 >> - gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED); > > Where is this done now? updateStates also takes care of this, I think it is redundant (independently from the patch)
Philippe Normand
Comment 17 2013-06-19 05:58:30 PDT
Comment on attachment 202979 [details] Patch Ok, sorry for the delay :/
Balazs Kelemen
Comment 18 2013-06-20 14:06:35 PDT
Note You need to log in before you can comment on or make changes to this bug.