| Index: media/filters/pipeline_controller.cc
|
| diff --git a/media/filters/pipeline_controller.cc b/media/filters/pipeline_controller.cc
|
| index 2055afb9dc08cdd3a3879434301051a1b84167c8..6e7a14266ae043aa2e484756658d61db10ec6838 100644
|
| --- a/media/filters/pipeline_controller.cc
|
| +++ b/media/filters/pipeline_controller.cc
|
| @@ -20,6 +20,7 @@ PipelineController::PipelineController(
|
| seeked_cb_(seeked_cb),
|
| suspended_cb_(suspended_cb),
|
| error_cb_(error_cb),
|
| + remoting_controller_(new RemotingController(this)),
|
| weak_factory_(this) {
|
| DCHECK(pipeline_);
|
| DCHECK(!renderer_factory_cb_.is_null());
|
| @@ -30,6 +31,7 @@ PipelineController::PipelineController(
|
|
|
| PipelineController::~PipelineController() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + remoting_controller_.reset();
|
| }
|
|
|
| // TODO(sandersd): If there is a pending suspend, don't call pipeline_.Start()
|
| @@ -233,4 +235,38 @@ void PipelineController::Dispatch() {
|
| }
|
| }
|
|
|
| +void PipelineController::SetFullscreenMode(bool is_fullscreen) {
|
| + remoting_controller_->SetFullscreenMode(is_fullscreen);
|
| +}
|
| +
|
| +void PipelineController::SetIsEncryptedContent() {
|
| + remoting_controller_->SetIsEncryptedContent();
|
| +}
|
| +
|
| +// Switch media renderer between local playing back and remoting media renderer.
|
| +// Note: The actual switching happens when starts or resumes the pipeline.
|
| +void PipelineController::ToggleRenderer() {
|
| + if (state_ == State::PLAYING) {
|
| + Suspend();
|
| + // A new renderer will be created when pipeline resumes.
|
| + Resume();
|
| + }
|
| +}
|
| +
|
| +bool PipelineController::ShouldUseRemotingRenderer() const {
|
| + return remoting_controller_->ShouldUseRemotingRenderer();
|
| +}
|
| +
|
| +VideoDecoderConfig PipelineController::GetVideoDecoderConfig() const {
|
| + if (!pipeline_)
|
| + return VideoDecoderConfig();
|
| + return pipeline_->GetVideoDecoderConfig();
|
| +}
|
| +
|
| +AudioDecoderConfig PipelineController::GetAudioDecoderConfig() const {
|
| + if (!pipeline_)
|
| + return AudioDecoderConfig();
|
| + return pipeline_->GetAudioDecoderConfig();
|
| +}
|
| +
|
| } // namespace media
|
|
|