Changeset 50872 in webkit


Ignore:
Timestamp:
Nov 12, 2009 2:32:22 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-11-12 Philippe Normand <pnormand@igalia.com>

Reviewed by Jan Alonzo.

https://bugs.webkit.org/show_bug.cgi?id=31047
[GTK] Failing test media/video-played-ranges-1.html

don't pause pipeline if already paused, same for play()

  • platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::play): (WebCore::MediaPlayerPrivate::pause):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r50871 r50872  
     12009-11-12  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Jan Alonzo.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=31047
     6        [GTK] Failing test media/video-played-ranges-1.html
     7
     8        don't pause pipeline if already paused, same for play()
     9
     10        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
     11        (WebCore::MediaPlayerPrivate::play):
     12        (WebCore::MediaPlayerPrivate::pause):
     13
    1142009-11-12  Kinuko Yasuda  <kinuko@google.com>
    215
  • trunk/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp

    r50798 r50872  
    215215void MediaPlayerPrivate::play()
    216216{
    217     LOG_VERBOSE(Media, "Play");
    218     gst_element_set_state(m_playBin, GST_STATE_PLAYING);
     217    GstState state;
     218    GstState pending;
     219
     220    gst_element_get_state(m_playBin, &state, &pending, 0);
     221    if (state != GST_STATE_PLAYING && pending != GST_STATE_PLAYING) {
     222        LOG_VERBOSE(Media, "Play");
     223        gst_element_set_state(m_playBin, GST_STATE_PLAYING);
     224    }
    219225}
    220226
    221227void MediaPlayerPrivate::pause()
    222228{
    223     LOG_VERBOSE(Media, "Pause");
    224     gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     229    GstState state;
     230    GstState pending;
     231
     232    gst_element_get_state(m_playBin, &state, &pending, 0);
     233    if (state != GST_STATE_PAUSED  && pending != GST_STATE_PAUSED) {
     234        LOG_VERBOSE(Media, "Pause");
     235        gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     236    }
    225237}
    226238
     
    285297        m_seeking = true;
    286298        m_seekTime = sec;
    287         // Wait some time for the seek to complete.
    288         gst_element_get_state(m_playBin, 0, 0, 40 * GST_MSECOND);
    289299    }
    290300}
Note: See TracChangeset for help on using the changeset viewer.