Commit 90b020fe authored by kov@webkit.org's avatar kov@webkit.org

[GStreamer] Does memory buffering even with preload set to none

https://bugs.webkit.org/show_bug.cgi?id=115754

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-05-08
Reviewed by Philippe Normand.

Covered by existing tests.

Revision 148840 fixed on-disk buffering being done when preload is set to none,
but memory buffering is still being done. That is because setting the state to
paused causes GStreamer to start loading the media, to gather information. Only
doing that when committing the load avoids that while maintaining the tested
behaviour unchanged.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): move setting pause state to commitLoad.
(WebCore::MediaPlayerPrivateGStreamer::commitLoad): see above.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 912f12d6
2013-05-08 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GStreamer] Does memory buffering even with preload set to none
https://bugs.webkit.org/show_bug.cgi?id=115754
Reviewed by Philippe Normand.
Covered by existing tests.
Revision 148840 fixed on-disk buffering being done when preload is set to none,
but memory buffering is still being done. That is because setting the state to
paused causes GStreamer to start loading the media, to gather information. Only
doing that when committing the load avoids that while maintaining the tested
behaviour unchanged.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): move setting pause state to commitLoad.
(WebCore::MediaPlayerPrivateGStreamer::commitLoad): see above.
2013-05-08 Andreas Kling <akling@apple.com>
SVGStyledElement::getPresentationAttribute() does not need to be virtual.
......
......@@ -299,10 +299,6 @@ void MediaPlayerPrivateGStreamer::load(const String& url)
m_player->readyStateChanged();
m_volumeAndMuteInitialized = false;
// GStreamer needs to have the pipeline set to a paused state to
// start providing anything useful.
gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
if (!m_delayingLoad)
commitLoad();
}
......@@ -318,6 +314,11 @@ void MediaPlayerPrivateGStreamer::commitLoad()
{
ASSERT(!m_delayingLoad);
LOG_MEDIA_MESSAGE("Committing load.");
// GStreamer needs to have the pipeline set to a paused state to
// start providing anything useful.
gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
updateStates();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment