зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1397793 - Remove mRate from MediaEngineDefault and use GraphRate(). r=pehrsons
MozReview-Commit-ID: D9x3wICAMNA --HG-- extra : rebase_source : 1b83343c8a459d8720a6445efbd0d390824325e4 extra : source : ea8d6efcf3efbadab838c3f720d4ad73e7afed2e
This commit is contained in:
Родитель
4c63f88aa9
Коммит
0866864396
|
@ -417,7 +417,7 @@ MediaEngineDefaultAudioSource::Start(SourceMediaStream* aStream, TrackID aID,
|
|||
|
||||
// AddTrack will take ownership of segment
|
||||
AudioSegment* segment = new AudioSegment();
|
||||
aStream->AddAudioTrack(aID, mRate, 0, segment, SourceMediaStream::ADDTRACK_QUEUED);
|
||||
aStream->AddAudioTrack(aID, aStream->GraphRate(), 0, segment, SourceMediaStream::ADDTRACK_QUEUED);
|
||||
|
||||
// Remember TrackID so we can finish later
|
||||
mTrackID = aID;
|
||||
|
@ -473,7 +473,7 @@ MediaEngineDefaultAudioSource::NotifyPull(MediaStreamGraph* aGraph,
|
|||
MOZ_ASSERT(aID == mTrackID);
|
||||
AudioSegment segment;
|
||||
// avoid accumulating rounding errors
|
||||
TrackTicks desired = aSource->TimeToTicksRoundUp(mRate, aDesiredTime);
|
||||
TrackTicks desired = aSource->TimeToTicksRoundUp(aGraph->GraphRate(), aDesiredTime);
|
||||
TrackTicks delta = desired - mLastNotify;
|
||||
mLastNotify += delta;
|
||||
AppendToSegment(segment, delta, aPrincipalHandle);
|
||||
|
|
|
@ -188,7 +188,6 @@ protected:
|
|||
TrackID mTrackID;
|
||||
|
||||
TrackTicks mLastNotify; // Accessed in ::Start(), then on NotifyPull (from MSG thread)
|
||||
TrackRate mRate; // ditto
|
||||
uint32_t mFreq; // ditto
|
||||
|
||||
// Created on Start, then accessed from NotifyPull (MSG thread)
|
||||
|
|
Загрузка…
Ссылка в новой задаче