Title: [179738] trunk
Revision
179738
Author
[email protected]
Date
2015-02-05 19:55:10 -0800 (Thu, 05 Feb 2015)

Log Message

Unreviewed, rolling out r179725.
https://bugs.webkit.org/show_bug.cgi?id=141320

caused 2 layout tests to fail (Requested by zalan on #webkit).

Reverted changeset:

"[MSE] Implement Append Error algorithm."
https://bugs.webkit.org/show_bug.cgi?id=139439
http://trac.webkit.org/changeset/179725

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (179737 => 179738)


--- trunk/LayoutTests/ChangeLog	2015-02-06 03:14:22 UTC (rev 179737)
+++ trunk/LayoutTests/ChangeLog	2015-02-06 03:55:10 UTC (rev 179738)
@@ -1,3 +1,16 @@
+2015-02-05  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r179725.
+        https://bugs.webkit.org/show_bug.cgi?id=141320
+
+        caused 2 layout tests to fail (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "[MSE] Implement Append Error algorithm."
+        https://bugs.webkit.org/show_bug.cgi?id=139439
+        http://trac.webkit.org/changeset/179725
+
 2015-02-05  Gyuyoung Kim  <[email protected]>
 
         Unreviewed, EFL gardening. Unskip 4 passing tests regarding webgl.

Deleted: trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init-expected.txt (179737 => 179738)


--- trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init-expected.txt	2015-02-06 03:14:22 UTC (rev 179737)
+++ trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init-expected.txt	2015-02-06 03:55:10 UTC (rev 179738)
@@ -1,8 +0,0 @@
-
-RUN(video.src = ""
-EVENT(sourceopen)
-RUN(sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock"))
-RUN(sourceBuffer.appendBuffer(samples))
-EVENT(error)
-END OF TEST
-

Deleted: trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init.html (179737 => 179738)


--- trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init.html	2015-02-06 03:14:22 UTC (rev 179737)
+++ trunk/LayoutTests/media/media-source/media-source-append-media-segment-without-init.html	2015-02-06 03:55:10 UTC (rev 179738)
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>mock-media-source</title>
-    <script src=""
-    <script src=""
-    <script>
-    var source;
-    var sourceBuffer;
-    var initSegment;
-    var wasError = false;
-
-    if (window.internals)
-        internals.initializeMockMediaSource();
-
-    function runTest() {
-        findMediaElement();
-
-        source = new MediaSource();
-        waitForEventOn(source, 'sourceopen', sourceOpen, false, true);
-        run('video.src = ""
-    }
-
-    function sourceOpen() {
-        run('sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock")');
-
-        // Note: In normal usage we should send this line, but this checks what happens if we don't.
-        // initSegment = makeAInit(0, [makeATrack(1, 'mock', TRACK_KIND.VIDEO)]);
-
-        samples = concatenateSamples([
-            makeASample(0, 0, 1, 1, SAMPLE_FLAG.SYNC),
-            makeASample(1, 1, 1, 1, SAMPLE_FLAG.NONE),
-        ]);
-
-        // Note: if code correctly handles sample without init, it will go through Segment Parser Loop
-        // if not, we will receive update event as part of Coded Frame Processing
-        waitForEventOn(sourceBuffer, 'error', null, true, true);
-        failTestIn(2000);
-
-        run('sourceBuffer.appendBuffer(samples)');
-    }
-
-    </script>
-</head>
-<body _onload_="runTest()">
-    <video></video>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (179737 => 179738)


--- trunk/Source/WebCore/ChangeLog	2015-02-06 03:14:22 UTC (rev 179737)
+++ trunk/Source/WebCore/ChangeLog	2015-02-06 03:55:10 UTC (rev 179738)
@@ -1,3 +1,16 @@
+2015-02-05  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r179725.
+        https://bugs.webkit.org/show_bug.cgi?id=141320
+
+        caused 2 layout tests to fail (Requested by zalan on #webkit).
+
+        Reverted changeset:
+
+        "[MSE] Implement Append Error algorithm."
+        https://bugs.webkit.org/show_bug.cgi?id=139439
+        http://trac.webkit.org/changeset/179725
+
 2015-02-05  Andreas Kling  <[email protected]>
 
         [iOS] Run a full garbage collection on memory warning.

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (179737 => 179738)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2015-02-06 03:14:22 UTC (rev 179737)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2015-02-06 03:55:10 UTC (rev 179738)
@@ -616,10 +616,10 @@
     // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#sourcebuffer-buffer-append
 
     // 2. If the input buffer contains bytes that violate the SourceBuffer byte stream format specification,
-    // then run the append error algorithm with the decode error parameter set to true and abort this algorithm.
+    // then run the end of stream algorithm with the error parameter set to "decode" and abort this algorithm.
     if (result == ParsingFailed) {
         LOG(MediaSource, "SourceBuffer::sourceBufferPrivateAppendComplete(%p) - result = ParsingFailed", this);
-        appendError(true);
+        m_source->streamEndedWithError(decodeError(), IgnorableExceptionCode());
         return;
     }
 
@@ -997,9 +997,8 @@
 
     LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment(%p)", this);
 
-    // 3.5.8 Initialization Segment Received (ctd)
-    // https://rawgit.com/w3c/media-source/c3ad59c7a370d04430969ba73d18dc9bcde57a33/index.html#sourcebuffer-init-segment-received [Editor's Draft 09 January 2015]
-
+    // 3.5.7 Initialization Segment Received
+    // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#sourcebuffer-init-segment-received
     // 1. Update the duration attribute if it currently equals NaN:
     if (m_source->duration().isInvalid()) {
         // ↳ If the initialization segment contains a duration:
@@ -1010,18 +1009,16 @@
         m_source->setDurationInternal(newDuration);
     }
 
-    // 2. If the initialization segment has no audio, video, or text tracks, then run the append error algorithm
-    // with the decode error parameter set to true and abort these steps.
+    // 2. If the initialization segment has no audio, video, or text tracks, then run the end of stream
+    // algorithm with the error parameter set to "decode" and abort these steps.
     if (!segment.audioTracks.size() && !segment.videoTracks.size() && !segment.textTracks.size())
-        appendError(true);
+        m_source->streamEndedWithError(decodeError(), IgnorableExceptionCode());
 
+
     // 3. If the first initialization segment flag is true, then run the following steps:
     if (m_receivedFirstInitializationSegment) {
-
-        // 3.1. Verify the following properties. If any of the checks fail then run the append error algorithm
-        // with the decode error parameter set to true and abort these steps.
         if (!validateInitializationSegment(segment)) {
-            appendError(true);
+            m_source->streamEndedWithError(decodeError(), IgnorableExceptionCode());
             return;
         }
         // 3.2 Add the appropriate track descriptions from this initialization segment to each of the track buffers.
@@ -1061,7 +1058,6 @@
             downcast<InbandTextTrack>(*textTrack).setPrivate(textTrackInfo.track);
         }
 
-        // 3.3 Set the need random access point flag on all track buffers to true.
         for (auto& trackBuffer : m_trackBufferMap.values())
             trackBuffer.needRandomAccessFlag = true;
     }
@@ -1072,14 +1068,13 @@
     // 5. If the first initialization segment flag is false, then run the following steps:
     if (!m_receivedFirstInitializationSegment) {
         // 5.1 If the initialization segment contains tracks with codecs the user agent does not support,
-        // then run the append error algorithm with the decode error parameter set to true and abort these steps.
+        // then run the end of stream algorithm with the error parameter set to "decode" and abort these steps.
         // NOTE: This check is the responsibility of the SourceBufferPrivate.
 
         // 5.2 For each audio track in the initialization segment, run following steps:
         for (auto& audioTrackInfo : segment.audioTracks) {
             AudioTrackPrivate* audioTrackPrivate = audioTrackInfo.track.get();
 
-            // FIXME: Implement steps 5.2.1-5.2.8.1 as per Editor's Draft 09 January 2015, and reorder this
             // 5.2.1 Let new audio track be a new AudioTrack object.
             // 5.2.2 Generate a unique ID and assign it to the id property on new video track.
             RefPtr<AudioTrack> newAudioTrack = AudioTrack::create(this, audioTrackPrivate);
@@ -1120,7 +1115,6 @@
         for (auto& videoTrackInfo : segment.videoTracks) {
             VideoTrackPrivate* videoTrackPrivate = videoTrackInfo.track.get();
 
-            // FIXME: Implement steps 5.3.1-5.3.8.1 as per Editor's Draft 09 January 2015, and reorder this
             // 5.3.1 Let new video track be a new VideoTrack object.
             // 5.3.2 Generate a unique ID and assign it to the id property on new video track.
             RefPtr<VideoTrack> newVideoTrack = VideoTrack::create(this, videoTrackPrivate);
@@ -1161,7 +1155,6 @@
         for (auto& textTrackInfo : segment.textTracks) {
             InbandTextTrackPrivate* textTrackPrivate = textTrackInfo.track.get();
 
-            // FIXME: Implement steps 5.4.1-5.4.8.1 as per Editor's Draft 09 January 2015, and reorder this
             // 5.4.1 Let new text track be a new TextTrack object with its properties populated with the
             // appropriate information from the initialization segment.
             RefPtr<InbandTextTrack> newTextTrack = InbandTextTrack::create(scriptExecutionContext(), this, textTrackPrivate);
@@ -1196,7 +1189,6 @@
         // 5.5 If active track flag equals true, then run the following steps:
         if (activeTrackFlag) {
             // 5.5.1 Add this SourceBuffer to activeSourceBuffers.
-            // 5.5.2 Queue a task to fire a simple event named addsourcebuffer at activeSourceBuffers
             setActive(true);
         }
 
@@ -1226,11 +1218,11 @@
 
 bool SourceBuffer::validateInitializationSegment(const InitializationSegment& segment)
 {
-    // FIXME: ordering of all 3.5.X (X>=7) functions needs to be updated to post-[24 July 2014 Editor's Draft] version
-    // 3.5.8 Initialization Segment Received (ctd)
-    // https://rawgit.com/w3c/media-source/c3ad59c7a370d04430969ba73d18dc9bcde57a33/index.html#sourcebuffer-init-segment-received [Editor's Draft 09 January 2015]
+    // 3.5.7 Initialization Segment Received (ctd)
+    // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#sourcebuffer-init-segment-received
 
-    // Note: those are checks from step 3.1
+    // 3.1. Verify the following properties. If any of the checks fail then run the end of stream
+    // algorithm with the error parameter set to "decode" and abort these steps.
     //   * The number of audio, video, and text tracks match what was in the first initialization segment.
     if (segment.audioTracks.size() != audioTracks()->length()
         || segment.videoTracks.size() != videoTracks()->length()
@@ -1297,45 +1289,11 @@
     }
 };
 
-void SourceBuffer::appendError(bool decodeErrorParam)
-{
-    // 3.5.3 Append Error Algorithm
-    // https://rawgit.com/w3c/media-source/c3ad59c7a370d04430969ba73d18dc9bcde57a33/index.html#sourcebuffer-append-error [Editor's Draft 09 January 2015]
-
-    ASSERT(m_updating);
-    // 1. Run the reset parser state algorithm.
-    resetParserState();
-
-    // 2. Set the updating attribute to false.
-    m_updating = false;
-
-    // 3. Queue a task to fire a simple event named error at this SourceBuffer object.
-    scheduleEvent(eventNames().errorEvent);
-
-    // 4. Queue a task to fire a simple event named updateend at this SourceBuffer object.
-    scheduleEvent(eventNames().updateendEvent);
-
-    // 5. If decode error is true, then run the end of stream algorithm with the error parameter set to "decode".
-    if (decodeErrorParam)
-        m_source->streamEndedWithError(decodeError(), IgnorableExceptionCode());
-}
-
 void SourceBuffer::sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, PassRefPtr<MediaSample> prpSample)
 {
     if (isRemoved())
         return;
 
-    // 3.5.1 Segment Parser Loop
-    // 6.1 If the first initialization segment received flag is false, then run the append error algorithm
-    //     with the decode error parameter set to true and abort this algorithm.
-    // Note: current design makes SourceBuffer somehow ignorant of append state - it's more a thing
-    //  of SourceBufferPrivate. That's why this check can't really be done in appendInternal.
-    //  unless we force some kind of design with state machine switching.
-    if (!m_receivedFirstInitializationSegment) {
-        appendError(true);
-        return;
-    }
-
     RefPtr<MediaSample> sample = prpSample;
 
     // 3.5.8 Coded Frame Processing

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h (179737 => 179738)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2015-02-06 03:14:22 UTC (rev 179737)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h	2015-02-06 03:55:10 UTC (rev 179738)
@@ -92,7 +92,6 @@
     void remove(double start, double end, ExceptionCode&);
     void remove(const MediaTime&, const MediaTime&, ExceptionCode&);
 
-    void appendError(bool);
     void abortIfUpdating();
     void removedFromMediaSource();
     void seekToTime(const MediaTime&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to