Title: [172806] trunk/Source/WebCore
Revision
172806
Author
[email protected]
Date
2014-08-20 13:19:50 -0700 (Wed, 20 Aug 2014)

Log Message

[MSE] add additional SourceBuffer and MediaSource logging
https://bugs.webkit.org/show_bug.cgi?id=136114

Reviewed by Brent Fulgham.

No new tests, this adds debug-only logging.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setReadyState): Fix a typo.
(WebCore::MediaSource::streamEndedWithError): Log the error.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Log when parsing fails.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Log error.
(WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Log.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Log error.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (172805 => 172806)


--- trunk/Source/WebCore/ChangeLog	2014-08-20 19:46:07 UTC (rev 172805)
+++ trunk/Source/WebCore/ChangeLog	2014-08-20 20:19:50 UTC (rev 172806)
@@ -1,3 +1,23 @@
+2014-08-20  Eric Carlson  <[email protected]>
+
+        [MSE] add additional SourceBuffer and MediaSource logging
+        https://bugs.webkit.org/show_bug.cgi?id=136114
+
+        Reviewed by Brent Fulgham.
+
+        No new tests, this adds debug-only logging.
+
+        * Modules/mediasource/MediaSource.cpp:
+        (WebCore::MediaSource::setReadyState): Fix a typo.
+        (WebCore::MediaSource::streamEndedWithError): Log the error.
+
+        * Modules/mediasource/SourceBuffer.cpp:
+        (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Log when parsing fails.
+        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Log error.
+        (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Ditto.
+        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Log.
+        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Log error.
+
 2014-08-20  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r172798.

Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (172805 => 172806)


--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp	2014-08-20 19:46:07 UTC (rev 172805)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp	2014-08-20 20:19:50 UTC (rev 172806)
@@ -385,7 +385,7 @@
     ASSERT(state == openKeyword() || state == closedKeyword() || state == endedKeyword());
 
     AtomicString oldState = readyState();
-    LOG(MediaSource, "MediaSource::setReadyState() %p : %s -> %s", this, oldState.string().ascii().data(), state.string().ascii().data());
+    LOG(MediaSource, "MediaSource::setReadyState(%p) : %s -> %s", this, oldState.string().ascii().data(), state.string().ascii().data());
 
     if (state == closedKeyword()) {
         m_private.clear();
@@ -437,6 +437,8 @@
     DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, network, ("network", AtomicString::ConstructFromLiteral));
     DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode", AtomicString::ConstructFromLiteral));
 
+    LOG(MediaSource, "MediaSource::streamEndedWithError(%p) : %s", this, error.string().ascii().data());
+
     // 2.4.7 https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#end-of-stream-algorithm
 
     // 3.

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (172805 => 172806)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2014-08-20 19:46:07 UTC (rev 172805)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2014-08-20 20:19:50 UTC (rev 172806)
@@ -486,6 +486,7 @@
     // 2. If the input buffer contains bytes that violate the SourceBuffer byte stream format specification,
     // 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);
         m_source->streamEndedWithError(decodeError(), IgnorableExceptionCode());
         return;
     }
@@ -531,8 +532,14 @@
     LOG(Media, "SourceBuffer::sourceBufferPrivateAppendComplete(%p) - buffered = %s", this, toString(m_buffered->ranges()).utf8().data());
 }
 
-void SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(SourceBufferPrivate*, int)
+void SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(SourceBufferPrivate*, int error)
 {
+#if LOG_DISABLED
+    UNUSED_PARAM(error)
+#endif
+
+    LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(%p) - result = %i", this, error);
+
     if (!isRemoved())
         m_source->streamEndedWithError(decodeError(), IgnorableExceptionCode());
 }
@@ -845,6 +852,8 @@
 
 void SourceBuffer::sourceBufferPrivateDidEndStream(SourceBufferPrivate*, const WTF::AtomicString& error)
 {
+    LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidEndStream(%p) - result = %s", this, String(error).utf8().data());
+
     if (!isRemoved())
         m_source->streamEndedWithError(error, IgnorableExceptionCode());
 }
@@ -854,6 +863,8 @@
     if (isRemoved())
         return;
 
+    LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment(%p)", this);
+
     // 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:
@@ -1187,6 +1198,9 @@
             // abort these steps.
             MediaTime presentationStartTime = MediaTime::zeroTime();
             if (presentationTimestamp < presentationStartTime || decodeTimestamp < presentationStartTime) {
+#if !LOG_DISABLED
+                LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidReceiveSample(%p) - failing because %s", this, presentationTimestamp < presentationStartTime ? "presentationTimestamp < presentationStartTime" : "decodeTimestamp < presentationStartTime");
+#endif
                 m_source->streamEndedWithError(decodeError(), IgnorableExceptionCode());
                 return;
             }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to