Bug 1323847: [MSE] P1. Add extra logging. r?gerald
MozReview-Commit-ID: FL4aScnrTY3
--- 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
{