Bug 1323847: [MSE] P1. Add extra logging. r?gerald draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 16 Dec 2016 16:04:27 +1100
changeset 450203 33e87d260166b5da5b014cd5f08222c5eb570566
parent 450185 fa2e8a962d3a465177d47e53e295dee5d0b299e9
child 450204 607537586ad9450b6e30fcc7ec3ce28764d36a9c
child 450216 32b82f5da9fa9a4f9628c7d7e20cbda384da2d03
push id38791
push userbmo:jyavenard@mozilla.com
push dateFri, 16 Dec 2016 05:53:42 +0000
reviewersgerald
bugs1323847
milestone53.0a1
Bug 1323847: [MSE] P1. Add extra logging. r?gerald MozReview-Commit-ID: FL4aScnrTY3
dom/media/mediasource/TrackBuffersManager.cpp
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -268,20 +268,20 @@ TrackBuffersManager::EvictData(const Tim
     // We're adding more data than we can hold.
     return EvictDataResult::BUFFER_FULL;
   }
   const int64_t toEvict = GetSize() + aSize - EvictionThreshold();
 
   const uint32_t canEvict =
     Evictable(HasVideo() ? TrackInfo::kVideoTrack : TrackInfo::kAudioTrack);
 
-  MSE_DEBUG(
-    "buffered=%lldkB, eviction threshold=%ukB, evict=%lldkB canevict=%ukB",
-    GetSize() / 1024, EvictionThreshold() / 1024, toEvict / 1024,
-    canEvict / 1024);
+  MSE_DEBUG("currentTime=%lld buffered=%lldkB, eviction threshold=%ukB, "
+            "evict=%lldkB canevict=%ukB",
+            aPlaybackTime.ToMicroseconds(), GetSize() / 1024,
+            EvictionThreshold() / 1024, toEvict / 1024, canEvict / 1024);
 
   if (toEvict <= 0) {
     mEvictionState = EvictionState::NO_EVICTION_NEEDED;
     return EvictDataResult::NO_DATA_EVICTED;
   }
 
   EvictDataResult result;
 
@@ -290,17 +290,19 @@ TrackBuffersManager::EvictData(const Tim
     // Our buffer is currently full. We will make another eviction attempt.
     // However, the current appendBuffer will fail as we can't know ahead of
     // time if the eviction will later succeed.
     result = EvictDataResult::BUFFER_FULL;
   } else {
     mEvictionState = EvictionState::EVICTION_NEEDED;
     result = EvictDataResult::NO_DATA_EVICTED;
   }
-  MSE_DEBUG("Reached our size limit, schedule eviction of %lld bytes", toEvict);
+  MSE_DEBUG(
+    "Reached our size limit, schedule eviction of %lld bytes (%s)", toEvict,
+    result == EvictDataResult::BUFFER_FULL ? "buffer full" : "no data evicted");
   QueueTask(new EvictDataTask(aPlaybackTime, toEvict));
 
   return result;
 }
 
 TimeIntervals
 TrackBuffersManager::Buffered() const
 {