Bug 1513973 - Log NotifyPull per track instead of per stream. r=jib, a=RyanVM
authorAndreas Pehrson <apehrson@mozilla.com>
Fri, 04 Jan 2019 06:39:58 +0000
changeset 506549 7fcc850b0e9ee55583626e9a40ea830bfdb72307
parent 506548 1a2283b8f8c9cc85c8d3ba4e5624b76bb365cb26
child 506550 61fc844e1f4848cdc47c8056f8d9e76795cecaca
push id10457
push userryanvm@gmail.com
push dateMon, 07 Jan 2019 15:23:57 +0000
treeherdermozilla-beta@dac16eb67fd6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, RyanVM
bugs1513973
milestone65.0
Bug 1513973 - Log NotifyPull per track instead of per stream. r=jib, a=RyanVM This better reflects the actual pulling that we do. Differential Revision: https://phabricator.services.mozilla.com/D15195
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -2539,31 +2539,31 @@ bool SourceMediaStream::PullNewData(Grap
   MutexAutoLock lock(mMutex);
   if (mFinished) {
     return false;
   }
   // Compute how much stream time we'll need assuming we don't block
   // the stream at all.
   StreamTime t = GraphTimeToStreamTime(aDesiredUpToTime);
   StreamTime current = mTracks.GetEarliestTrackEnd();
-  LOG(LogLevel::Verbose,
-      ("%p: Calling NotifyPull aStream=%p t=%f current end=%f", GraphImpl(),
-       this, GraphImpl()->MediaTimeToSeconds(t),
-       GraphImpl()->MediaTimeToSeconds(current)));
   for (const TrackData& track : mUpdateTracks) {
     if (!track.mPullingEnabled) {
       continue;
     }
     if (track.mCommands & TrackEventCommand::TRACK_EVENT_ENDED) {
       continue;
     }
     current = track.mEndOfFlushedData + track.mData->GetDuration();
     if (t <= current) {
       continue;
     }
+    LOG(LogLevel::Verbose,
+        ("%p: Calling NotifyPull stream=%p track=%d t=%f current end=%f",
+         GraphImpl(), this, track.mID, GraphImpl()->MediaTimeToSeconds(t),
+         GraphImpl()->MediaTimeToSeconds(current)));
     MutexAutoUnlock unlock(mMutex);
     for (TrackBound<MediaStreamTrackListener>& l : mTrackListeners) {
       if (l.mTrackID == track.mID) {
         l.mListener->NotifyPull(Graph(), current, t);
       }
     }
   }
   return true;