b=1015828 match Fake_MediaStreamListener::NotifyPull time advances to timer period and Fake_AudioStreamSource::Periodic buffer size r=rjesup
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 05 Jun 2014 10:11:51 +1200
changeset 206262 9e1590531e5c902a4ec337db0f555da2363304f9
parent 206261 3af2e9f88905ad83af5492fc210c575675386d7f
child 206263 80d207a21b88667053b456eb0c8d43ab713b8837
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrjesup
bugs1015828
milestone32.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
b=1015828 match Fake_MediaStreamListener::NotifyPull time advances to timer period and Fake_AudioStreamSource::Periodic buffer size r=rjesup Also, increment Fake_SourceMediaStream::mDesiredTime each period, instead of each listener notification.
media/webrtc/signaling/test/FakeMediaStreamsImpl.h
--- a/media/webrtc/signaling/test/FakeMediaStreamsImpl.h
+++ b/media/webrtc/signaling/test/FakeMediaStreamsImpl.h
@@ -39,19 +39,20 @@ nsresult Fake_SourceMediaStream::Stop() 
 }
 
 void Fake_SourceMediaStream::Periodic() {
   mozilla::MutexAutoLock lock(mMutex);
   // Pull more audio-samples iff pulling is enabled
   // and we are not asked by the signaling agent to stop
   //pulling data.
   if (mPullEnabled && !mStop) {
+    // 100 ms matches timer interval and AUDIO_BUFFER_SIZE @ 16000 Hz
+    mDesiredTime += 100;
     for (std::set<Fake_MediaStreamListener *>::iterator it =
              mListeners.begin(); it != mListeners.end(); ++it) {
-      mDesiredTime += 10;
       (*it)->NotifyPull(nullptr, mozilla::MillisecondsToMediaTime(mDesiredTime));
     }
   }
 }
 
 // Fake_MediaStreamBase
 nsresult Fake_MediaStreamBase::Start() {
   mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);