Bug 1183883 - Switch graph thread slowdown warning to log message. r=padenot
authorEric Rahm <erahm@mozilla.com>
Thu, 16 Jul 2015 09:17:31 -0700
changeset 253419 e15709852fab130dc0dcbdfbd3c3070f0616124e
parent 253418 54baffe77456374158bab118569940d284544439
child 253420 c281b91bf5f854499806f45c38ca03b6baf126e8
push id29065
push userryanvm@gmail.com
push dateFri, 17 Jul 2015 14:26:32 +0000
treeherdermozilla-central@911935404233 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1183883
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1183883 - Switch graph thread slowdown warning to log message. r=padenot The graph thread slowdown warning is switched over to a STREAM_LOG message in an #ifdef DEBUG block to preserve the debug only semantics of NS_WARN_IF_FALSE. The message will still be emitted if the STREAM_LOG is enabled.
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1185,18 +1185,21 @@ MediaStreamGraphImpl::PlayVideo(MediaStr
     return;
 
   // Display the next frame a bit early. This is better than letting the current
   // frame be displayed for too long. Because depending on the GraphDriver in
   // use, we can't really estimate the graph interval duration, we clamp it to
   // the current state computed time.
   GraphTime framePosition = IterationEnd() + MillisecondsToMediaTime(CurrentDriver()->IterationDuration());
   if (framePosition > CurrentDriver()->StateComputedTime()) {
-    NS_WARN_IF_FALSE(std::abs(framePosition - CurrentDriver()->StateComputedTime()) <
-                     MillisecondsToMediaTime(5), "Graph thread slowdown?");
+#ifdef DEBUG
+    if (std::abs(framePosition - CurrentDriver()->StateComputedTime()) >= MillisecondsToMediaTime(5)) {
+      STREAM_LOG(LogLevel::Debug, ("Graph thread slowdown?"));
+    }
+#endif
     framePosition = CurrentDriver()->StateComputedTime();
   }
   MOZ_ASSERT(framePosition >= aStream->mBufferStartTime, "frame position before buffer?");
   StreamTime frameBufferTime = GraphTimeToStreamTime(aStream, framePosition);
 
   StreamTime start;
   const VideoFrame* frame = nullptr;
   for (StreamBuffer::TrackIter tracks(aStream->GetStreamBuffer(), MediaSegment::VIDEO);