Bug 1280023: [MSE] P2. Drop audio size threshold to 10MB. r?gerald draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 08 Sep 2016 21:16:14 +1000
changeset 411664 d624b6f069de38d975a2e7a220df3dc907e5419c
parent 411663 f61c1fb7bf1e3884a5d44b5dccadcefb2340e637
child 530778 b1dd5df1c9fc60ff5401101639e8c873506575cf
push id28946
push userbmo:jyavenard@mozilla.com
push dateThu, 08 Sep 2016 11:17:37 +0000
reviewersgerald
bugs1280023, 1301307
milestone51.0a1
Bug 1280023: [MSE] P2. Drop audio size threshold to 10MB. r?gerald Following bug 1301307, exception is properly thrown when buffer is full, giving the opportunity to the JS player to adjust accordingly. Confirmed to work with YouTube with an audio threshold of only 1MB. MozReview-Commit-ID: 77K8UPhb9zj
dom/media/mediasource/TrackBuffersManager.cpp
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -97,17 +97,17 @@ TrackBuffersManager::TrackBuffersManager
   , mParser(ContainerParser::CreateForMIMEType(aType))
   , mProcessedInput(0)
   , mTaskQueue(aParentDecoder->GetDemuxer()->GetTaskQueue())
   , mParentDecoder(new nsMainThreadPtrHolder<MediaSourceDecoder>(aParentDecoder, false /* strict */))
   , mEnded(false)
   , mVideoEvictionThreshold(Preferences::GetUint("media.mediasource.eviction_threshold.video",
                                                  100 * 1024 * 1024))
   , mAudioEvictionThreshold(Preferences::GetUint("media.mediasource.eviction_threshold.audio",
-                                                 30 * 1024 * 1024))
+                                                 10 * 1024 * 1024))
   , mEvictionState(EvictionState::NO_EVICTION_NEEDED)
   , mMonitor("TrackBuffersManager")
 {
   MOZ_ASSERT(NS_IsMainThread(), "Must be instanciated on the main thread");
 }
 
 TrackBuffersManager::~TrackBuffersManager()
 {