Changeset 149735 in webkit


Ignore:
Timestamp:
May 8, 2013 6:41:13 AM (11 years ago)
Author:
kov@webkit.org
Message:

[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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r149734 r149735  
     12013-05-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
     2
     3        [GStreamer] Does memory buffering even with preload set to none
     4        https://bugs.webkit.org/show_bug.cgi?id=115754
     5
     6        Reviewed by Philippe Normand.
     7
     8        Covered by existing tests.
     9
     10        Revision 148840 fixed on-disk buffering being done when preload is set to none,
     11        but memory buffering is still being done. That is because setting the state to
     12        paused causes GStreamer to start loading the media, to gather information. Only
     13        doing that when committing the load avoids that while maintaining the tested
     14        behaviour unchanged.
     15
     16        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     17        (WebCore::MediaPlayerPrivateGStreamer::load): move setting pause state to commitLoad.
     18        (WebCore::MediaPlayerPrivateGStreamer::commitLoad): see above.
     19
    1202013-05-08  Andreas Kling  <akling@apple.com>
    221
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r149543 r149735  
    300300    m_volumeAndMuteInitialized = false;
    301301
     302    if (!m_delayingLoad)
     303        commitLoad();
     304}
     305
     306#if ENABLE(MEDIA_SOURCE)
     307void MediaPlayerPrivateGStreamer::load(const String& url, PassRefPtr<MediaSource>)
     308{
     309    notImplemented();
     310}
     311#endif
     312
     313void MediaPlayerPrivateGStreamer::commitLoad()
     314{
     315    ASSERT(!m_delayingLoad);
     316    LOG_MEDIA_MESSAGE("Committing load.");
     317
    302318    // GStreamer needs to have the pipeline set to a paused state to
    303319    // start providing anything useful.
    304320    gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
    305321
    306     if (!m_delayingLoad)
    307         commitLoad();
    308 }
    309 
    310 #if ENABLE(MEDIA_SOURCE)
    311 void MediaPlayerPrivateGStreamer::load(const String& url, PassRefPtr<MediaSource>)
    312 {
    313     notImplemented();
    314 }
    315 #endif
    316 
    317 void MediaPlayerPrivateGStreamer::commitLoad()
    318 {
    319     ASSERT(!m_delayingLoad);
    320     LOG_MEDIA_MESSAGE("Committing load.");
    321322    updateStates();
    322323}
Note: See TracChangeset for help on using the changeset viewer.