Index: media/base/pipeline_impl.cc |
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc |
index 5f4705b5d2639c6b4b2dd65bceacc72178d26d9c..7971a2ae5af2be205a2351bd772214eed30a8927 100644 |
--- a/media/base/pipeline_impl.cc |
+++ b/media/base/pipeline_impl.cc |
@@ -204,6 +204,36 @@ void PipelineImpl::SetCdm(CdmContext* cdm_context, |
cdm_attached_cb)); |
} |
+void PipelineImpl::OnEnabledAudioStreamsChanged( |
+ const std::vector<const DemuxerStream*>& enabledAudioStreams) { |
+ if (!task_runner_->BelongsToCurrentThread()) { |
+ task_runner_->PostTask( |
+ FROM_HERE, base::Bind(&PipelineImpl::OnEnabledAudioStreamsChanged, |
+ weak_factory_.GetWeakPtr(), enabledAudioStreams)); |
+ return; |
+ } |
+ base::AutoLock auto_lock(lock_); |
+ DCHECK(task_runner_->BelongsToCurrentThread()); |
+ if (renderer_) { |
+ renderer_->OnEnabledAudioStreamsChanged(enabledAudioStreams); |
+ } |
+} |
+ |
+void PipelineImpl::OnSelectedVideoStreamChanged( |
+ const DemuxerStream* selectedVideoStream) { |
+ if (!task_runner_->BelongsToCurrentThread()) { |
+ task_runner_->PostTask( |
+ FROM_HERE, base::Bind(&PipelineImpl::OnSelectedVideoStreamChanged, |
+ weak_factory_.GetWeakPtr(), selectedVideoStream)); |
+ return; |
+ } |
+ base::AutoLock auto_lock(lock_); |
+ DCHECK(task_runner_->BelongsToCurrentThread()); |
+ if (renderer_) { |
+ renderer_->OnSelectedVideoStreamChanged(selectedVideoStream); |
+ } |
+} |
+ |
void PipelineImpl::SetErrorForTesting(PipelineStatus status) { |
OnError(status); |
} |