Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: chromecast/browser/media/cast_renderer.h

Issue 1841273002: [chromecast] Fix build with enable_mojo_media=true. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/media/media_pipeline_backend_factory.h"
5 #include "media/base/renderer.h" 6 #include "media/base/renderer.h"
6 7
7 namespace base { 8 namespace base {
8 class SingleThreadTaskRunner; 9 class SingleThreadTaskRunner;
9 } // namespace base 10 } // namespace base
10 11
11 namespace media { 12 namespace media {
12 class MediaLog; 13 class MediaLog;
13 } // namespace media 14 } // namespace media
14 15
15 namespace chromecast { 16 namespace chromecast {
16 class TaskRunnerImpl; 17 class TaskRunnerImpl;
17 18
18 namespace media { 19 namespace media {
19 class BalancedMediaTaskRunnerFactory; 20 class BalancedMediaTaskRunnerFactory;
20 class CmaMediaPipelineClient;
21 class MediaPipelineImpl; 21 class MediaPipelineImpl;
22 22
23 class CastRenderer : public ::media::Renderer { 23 class CastRenderer : public ::media::Renderer {
24 public: 24 public:
25 CastRenderer(const scoped_refptr<CmaMediaPipelineClient> pipeline_client, 25 CastRenderer(const CreateMediaPipelineBackendCB& create_backend_cb,
26 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); 26 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
27 ~CastRenderer() final; 27 ~CastRenderer() final;
28 28
29 // ::media::Renderer implementation. 29 // ::media::Renderer implementation.
30 void Initialize(::media::DemuxerStreamProvider* demuxer_stream_provider, 30 void Initialize(::media::DemuxerStreamProvider* demuxer_stream_provider,
31 const ::media::PipelineStatusCB& init_cb, 31 const ::media::PipelineStatusCB& init_cb,
32 const ::media::StatisticsCB& statistics_cb, 32 const ::media::StatisticsCB& statistics_cb,
33 const ::media::BufferingStateCB& buffering_state_cb, 33 const ::media::BufferingStateCB& buffering_state_cb,
34 const base::Closure& ended_cb, 34 const base::Closure& ended_cb,
35 const ::media::PipelineStatusCB& error_cb, 35 const ::media::PipelineStatusCB& error_cb,
36 const base::Closure& waiting_for_decryption_key_cb) final; 36 const base::Closure& waiting_for_decryption_key_cb) final;
37 void SetCdm(::media::CdmContext* cdm_context, 37 void SetCdm(::media::CdmContext* cdm_context,
38 const ::media::CdmAttachedCB& cdm_attached_cb) final; 38 const ::media::CdmAttachedCB& cdm_attached_cb) final;
39 void Flush(const base::Closure& flush_cb) final; 39 void Flush(const base::Closure& flush_cb) final;
40 void StartPlayingFrom(base::TimeDelta time) final; 40 void StartPlayingFrom(base::TimeDelta time) final;
41 void SetPlaybackRate(double playback_rate) final; 41 void SetPlaybackRate(double playback_rate) final;
42 void SetVolume(float volume) final; 42 void SetVolume(float volume) final;
43 base::TimeDelta GetMediaTime() final; 43 base::TimeDelta GetMediaTime() final;
44 bool HasAudio() final; 44 bool HasAudio() final;
45 bool HasVideo() final; 45 bool HasVideo() final;
46 46
47 private: 47 private:
48 enum Stream { STREAM_AUDIO, STREAM_VIDEO }; 48 enum Stream { STREAM_AUDIO, STREAM_VIDEO };
49 void OnEos(Stream stream); 49 void OnEos(Stream stream);
50 50
51 scoped_refptr<CmaMediaPipelineClient> pipeline_client_; 51 const CreateMediaPipelineBackendCB create_backend_cb_;
52 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 52 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
53 scoped_refptr<BalancedMediaTaskRunnerFactory> media_task_runner_factory_; 53 scoped_refptr<BalancedMediaTaskRunnerFactory> media_task_runner_factory_;
54 scoped_ptr<TaskRunnerImpl> backend_task_runner_; 54 scoped_ptr<TaskRunnerImpl> backend_task_runner_;
55 scoped_ptr<MediaPipelineImpl> pipeline_; 55 scoped_ptr<MediaPipelineImpl> pipeline_;
56 bool eos_[2]; 56 bool eos_[2];
57 base::Closure ended_cb_; 57 base::Closure ended_cb_;
58 DISALLOW_COPY_AND_ASSIGN(CastRenderer); 58 DISALLOW_COPY_AND_ASSIGN(CastRenderer);
59 }; 59 };
60 60
61 } // namespace media 61 } // namespace media
62 } // namespace chromecast 62 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/media/cast_mojo_media_client.cc ('k') | chromecast/browser/media/cast_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698