Index: media/filters/pipeline_controller.cc |
diff --git a/media/filters/pipeline_controller.cc b/media/filters/pipeline_controller.cc |
index e999d92ab39073a3b28fd0fcdd4ecb3f186f5659..dd02156758b7e61524f136270914515bcaf0dfdd 100644 |
--- a/media/filters/pipeline_controller.cc |
+++ b/media/filters/pipeline_controller.cc |
@@ -10,14 +10,14 @@ |
namespace media { |
PipelineController::PipelineController( |
- Pipeline* pipeline, |
+ std::unique_ptr<Pipeline> pipeline, |
const RendererFactoryCB& renderer_factory_cb, |
const SeekedCB& seeked_cb, |
const SuspendedCB& suspended_cb, |
const BeforeResumeCB& before_resume_cb, |
const ResumedCB& resumed_cb, |
const PipelineStatusCB& error_cb) |
- : pipeline_(pipeline), |
+ : pipeline_(std::move(pipeline)), |
renderer_factory_cb_(renderer_factory_cb), |
seeked_cb_(seeked_cb), |
suspended_cb_(suspended_cb), |
@@ -38,7 +38,7 @@ PipelineController::~PipelineController() { |
DCHECK(thread_checker_.CalledOnValidThread()); |
} |
-// TODO(sandersd): If there is a pending suspend, don't call pipeline_.Start() |
+// TODO(sandersd): If there is a pending suspend, don't call pipeline_->Start() |
// until Resume(). |
void PipelineController::Start(Demuxer* demuxer, |
Pipeline::Client* client, |
@@ -246,4 +246,63 @@ void PipelineController::Dispatch() { |
} |
} |
+void PipelineController::Stop() { |
+ pipeline_->Stop(); |
sandersd (OOO until July 31)
2017/02/23 23:11:46
Should we perhaps be resetting |state_| here?
tguilbert
2017/02/24 02:13:59
I added a comment, a TODO, and opened crbug.com/69
|
+} |
+ |
+bool PipelineController::IsPipelineRunning() const { |
+ return pipeline_->IsRunning(); |
+} |
+ |
+double PipelineController::GetPlaybackRate() const { |
+ return pipeline_->GetPlaybackRate(); |
+} |
+ |
+void PipelineController::SetPlaybackRate(double playback_rate) { |
+ pipeline_->SetPlaybackRate(playback_rate); |
+} |
+ |
+float PipelineController::GetVolume() const { |
+ return pipeline_->GetVolume(); |
+} |
+ |
+void PipelineController::SetVolume(float volume) { |
+ pipeline_->SetVolume(volume); |
+} |
+ |
+base::TimeDelta PipelineController::GetMediaTime() const { |
+ return pipeline_->GetMediaTime(); |
+} |
+ |
+Ranges<base::TimeDelta> PipelineController::GetBufferedTimeRanges() const { |
+ return pipeline_->GetBufferedTimeRanges(); |
+} |
+ |
+base::TimeDelta PipelineController::GetMediaDuration() const { |
+ return pipeline_->GetMediaDuration(); |
+} |
+ |
+bool PipelineController::DidLoadingProgress() { |
+ return pipeline_->DidLoadingProgress(); |
+} |
+ |
+PipelineStatistics PipelineController::GetStatistics() const { |
+ return pipeline_->GetStatistics(); |
+} |
+ |
+void PipelineController::SetCdm(CdmContext* cdm_context, |
+ const CdmAttachedCB& cdm_attached_cb) { |
+ pipeline_->SetCdm(cdm_context, cdm_attached_cb); |
+} |
+ |
+void PipelineController::OnEnabledAudioTracksChanged( |
+ const std::vector<MediaTrack::Id>& enabledTrackIds) { |
+ pipeline_->OnEnabledAudioTracksChanged(enabledTrackIds); |
+} |
+ |
+void PipelineController::OnSelectedVideoTrackChanged( |
+ const std::vector<MediaTrack::Id>& selectedTrackId) { |
+ pipeline_->OnSelectedVideoTrackChanged(selectedTrackId); |
+} |
+ |
} // namespace media |