Title: [203924] trunk
Revision
203924
Author
[email protected]
Date
2016-07-29 16:41:54 -0700 (Fri, 29 Jul 2016)

Log Message

Do not set negative rate on AVSampleBufferRenderSynchronizer.
https://bugs.webkit.org/show_bug.cgi?id=160326
<rdar://problem/27355214>

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):

LayoutTests:

Negative rate is not supported at the moment.

* http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control-expected.txt: Added.
* http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (203923 => 203924)


--- trunk/LayoutTests/ChangeLog	2016-07-29 22:04:02 UTC (rev 203923)
+++ trunk/LayoutTests/ChangeLog	2016-07-29 23:41:54 UTC (rev 203924)
@@ -1,3 +1,16 @@
+2016-07-29  Zalan Bujtas  <[email protected]>
+
+        Do not set negative rate on AVSampleBufferRenderSynchronizer.
+        https://bugs.webkit.org/show_bug.cgi?id=160326
+        <rdar://problem/27355214>
+
+        Reviewed by Eric Carlson.
+
+        Negative rate is not supported at the moment.
+
+        * http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control-expected.txt: Added.
+        * http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html: Added.
+
 2016-07-29  Myles C. Maxfield  <[email protected]>
 
         [macOS Sierra] Test gardening after r198859

Added: trunk/LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control-expected.txt (0 => 203924)


--- trunk/LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control-expected.txt	2016-07-29 23:41:54 UTC (rev 203924)
@@ -0,0 +1,3 @@
+ 
+PASS Test playing then seeking back with remote control command.(PASS if no crash) 
+

Added: trunk/LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html (0 => 203924)


--- trunk/LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html	                        (rev 0)
+++ trunk/LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html	2016-07-29 23:41:54 UTC (rev 203924)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <script src=""
+        <script src=""
+        <script src=""
+    </head>
+    <body>
+        <div id="log"></div>
+        <script>
+
+            mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
+            {
+                mediaElement.play();
+                sourceBuffer.appendBuffer(mediaData);
+
+                function delayedPlayHandler()
+                {
+                    internals.postRemoteControlCommand('beginseekingbackward');
+                    test.done();
+                }
+
+                test.waitForExpectedEvents(function()
+                {
+                    test.waitForCurrentTimeChange(mediaElement, delayedPlayHandler);
+                });
+            }, 'Test playing then seeking back with remote control command.(PASS if no crash)');
+        </script>
+    </body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (203923 => 203924)


--- trunk/Source/WebCore/ChangeLog	2016-07-29 22:04:02 UTC (rev 203923)
+++ trunk/Source/WebCore/ChangeLog	2016-07-29 23:41:54 UTC (rev 203924)
@@ -1,3 +1,16 @@
+2016-07-29  Zalan Bujtas  <[email protected]>
+
+        Do not set negative rate on AVSampleBufferRenderSynchronizer.
+        https://bugs.webkit.org/show_bug.cgi?id=160326
+        <rdar://problem/27355214>
+
+        Reviewed by Eric Carlson.
+
+        Test: http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
+
 2016-07-29  Myles C. Maxfield  <[email protected]>
 
         Backspace key removes only the rainbow from the rainbow flag

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (203923 => 203924)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm	2016-07-29 22:04:02 UTC (rev 203923)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm	2016-07-29 23:41:54 UTC (rev 203924)
@@ -473,7 +473,8 @@
 
 void MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble(double rate)
 {
-    m_rate = rate;
+    // AVSampleBufferRenderSynchronizer does not support negative rate yet.
+    m_rate = std::max<double>(rate, 0);
     if (shouldBePlaying())
         [m_synchronizer setRate:m_rate];
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to