Re-land "Dispatch AudioSink notifications asynchronously"

Turns out that this is needed after all.
This commit is contained in:
trav90
2017-04-15 20:56:57 -05:00
committed by roytam1
parent 3ce769dbfb
commit 6fa240db4e
4 changed files with 31 additions and 4 deletions
+5
View File
@@ -3417,6 +3417,7 @@ void MediaDecoderStateMachine::QueueMetadata(int64_t aPublishTime,
void MediaDecoderStateMachine::OnAudioEndTimeUpdate(int64_t aAudioEndTime)
{
MOZ_ASSERT(OnTaskQueue());
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
MOZ_ASSERT(aAudioEndTime >= mAudioEndTime);
mAudioEndTime = aAudioEndTime;
@@ -3424,11 +3425,15 @@ void MediaDecoderStateMachine::OnAudioEndTimeUpdate(int64_t aAudioEndTime)
void MediaDecoderStateMachine::OnPlaybackOffsetUpdate(int64_t aPlaybackOffset)
{
MOZ_ASSERT(OnTaskQueue());
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mDecoder->UpdatePlaybackOffset(aPlaybackOffset);
}
void MediaDecoderStateMachine::OnAudioSinkComplete()
{
MOZ_ASSERT(OnTaskQueue());
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
if (mAudioCaptured) {
return;
}