Changeset 95799 in webkit


Ignore:
Timestamp:
Sep 23, 2011 7:03:46 AM (13 years ago)
Author:
yael.aharon@nokia.com
Message:

[Qt][Gtk] Wrong state when pausing a video in the "playing" event handler
https://bugs.webkit.org/show_bug.cgi?id=68589

Reviewed by Philippe Normand.

Source/WebCore:

Test: media/video-playing-and-pause.html

As suggested by Alexis Menard on IRC, query gstreamer's state instead of using a cached value
in MediaPlayerGstreamerPrivate::paused().

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::paused):

LayoutTests:

  • media/video-playing-and-pause.html: Added.
  • media/video-paint-test.js:
  • platform/qt/media/video-playing-and-pause-expected.txt: Added.
  • platform/qt/media/video-playing-and-pause-expected.png: Added.
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r95798 r95799  
     12011-09-23  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        [Qt][Gtk] Wrong state when pausing a video in the "playing" event handler
     4        https://bugs.webkit.org/show_bug.cgi?id=68589
     5
     6        Reviewed by Philippe Normand.
     7
     8        * media/video-playing-and-pause.html: Added.
     9        * media/video-paint-test.js:
     10        * platform/qt/media/video-playing-and-pause-expected.txt: Added.
     11        * platform/qt/media/video-playing-and-pause-expected.png: Added.
     12
    1132011-09-23  Marcus Bulach  <bulach@chromium.org>
    214
  • trunk/LayoutTests/media/video-paint-test.js

    r85475 r95799  
    2828    } , 8000);
    2929}
     30
     31function initAndPause()
     32{
     33    var totalCount = document.getElementsByTagName('video').length;
     34    var count = totalCount;
     35    document.addEventListener("canplaythrough", function () {
     36        if (!--count) {
     37            var video = document.getElementsByTagName('video')[0];
     38            video.play();
     39            video.addEventListener("playing", function() {
     40                video.pause();
     41                video.addEventListener("pause", function() {
     42                    if (window.layoutTestController)
     43                        layoutTestController.notifyDone();
     44                });
     45            });
     46        }
     47    }, true);
     48}
     49
  • trunk/Source/WebCore/ChangeLog

    r95797 r95799  
     12011-09-23  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        [Qt][Gtk] Wrong state when pausing a video in the "playing" event handler
     4        https://bugs.webkit.org/show_bug.cgi?id=68589
     5
     6        Reviewed by Philippe Normand.
     7
     8        Test: media/video-playing-and-pause.html
     9
     10        As suggested by Alexis Menard on IRC, query gstreamer's state instead of using a cached value
     11        in MediaPlayerGstreamerPrivate::paused().
     12
     13        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     14        (WebCore::MediaPlayerPrivateGStreamer::paused):
     15
    1162011-09-15  Pavel Podivilov  <podivilov@chromium.org>
    217
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r94155 r95799  
    456456bool MediaPlayerPrivateGStreamer::paused() const
    457457{
    458     return m_paused;
     458    GstState state;
     459    gst_element_get_state(m_playBin, &state, 0, 0);
     460    return state == GST_STATE_PAUSED;
    459461}
    460462
Note: See TracChangeset for help on using the changeset viewer.