| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ | 5 #ifndef CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ |
| 6 #define CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ | 6 #define CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "chromecast/common/media/cma_ipc_common.h" | 16 #include "chromecast/common/media/cma_ipc_common.h" |
| 17 #include "chromecast/media/cma/pipeline/load_type.h" | 17 #include "chromecast/media/cma/pipeline/load_type.h" |
| 18 #include "media/base/pipeline_status.h" | 18 #include "media/base/pipeline_status.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 class SharedMemory; | 21 class SharedMemory; |
| 22 class SingleThreadTaskRunner; | 22 class SingleThreadTaskRunner; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace media { | 25 namespace media { |
| 26 class AudioDecoderConfig; | 26 class AudioDecoderConfig; |
| 27 class BrowserCdm; |
| 27 class VideoDecoderConfig; | 28 class VideoDecoderConfig; |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace chromecast { | 31 namespace chromecast { |
| 31 namespace media { | 32 namespace media { |
| 32 struct AvPipelineClient; | 33 struct AvPipelineClient; |
| 33 struct MediaPipelineClient; | 34 struct MediaPipelineClient; |
| 34 class MediaPipelineImpl; | 35 class MediaPipelineImpl; |
| 35 struct VideoPipelineClient; | 36 struct VideoPipelineClient; |
| 36 | 37 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 53 void VideoInitialize(TrackId track_id, | 54 void VideoInitialize(TrackId track_id, |
| 54 const VideoPipelineClient& client, | 55 const VideoPipelineClient& client, |
| 55 const ::media::VideoDecoderConfig& config, | 56 const ::media::VideoDecoderConfig& config, |
| 56 const ::media::PipelineStatusCB& status_cb); | 57 const ::media::PipelineStatusCB& status_cb); |
| 57 void StartPlayingFrom(base::TimeDelta time); | 58 void StartPlayingFrom(base::TimeDelta time); |
| 58 void Flush(const ::media::PipelineStatusCB& status_cb); | 59 void Flush(const ::media::PipelineStatusCB& status_cb); |
| 59 void Stop(); | 60 void Stop(); |
| 60 | 61 |
| 61 void SetPlaybackRate(float playback_rate); | 62 void SetPlaybackRate(float playback_rate); |
| 62 void SetVolume(TrackId track_id, float playback_rate); | 63 void SetVolume(TrackId track_id, float playback_rate); |
| 63 void SetCdm(int render_process_id, int render_frame_id, int cdm_id); | 64 void SetCdm(::media::BrowserCdm* cdm); |
| 64 | 65 |
| 65 void NotifyPipeWrite(TrackId track_id); | 66 void NotifyPipeWrite(TrackId track_id); |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 base::ThreadChecker thread_checker_; | 69 base::ThreadChecker thread_checker_; |
| 69 | 70 |
| 70 scoped_ptr<MediaPipelineImpl> media_pipeline_; | 71 scoped_ptr<MediaPipelineImpl> media_pipeline_; |
| 71 | 72 |
| 72 // The shared memory for a track id must be valid until Stop is invoked on | 73 // The shared memory for a track id must be valid until Stop is invoked on |
| 73 // that track id. | 74 // that track id. |
| 74 struct MediaTrackHost; | 75 struct MediaTrackHost; |
| 75 typedef std::map<TrackId, MediaTrackHost*> MediaTrackMap; | 76 typedef std::map<TrackId, MediaTrackHost*> MediaTrackMap; |
| 76 MediaTrackMap media_track_map_; | 77 MediaTrackMap media_track_map_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(MediaPipelineHost); | 79 DISALLOW_COPY_AND_ASSIGN(MediaPipelineHost); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace media | 82 } // namespace media |
| 82 } // namespace chromecast | 83 } // namespace chromecast |
| 83 | 84 |
| 84 #endif // CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ | 85 #endif // CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ |
| 85 | 86 |
| OLD | NEW |