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" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 void SetAvPipe(TrackId track_id, | 49 void SetAvPipe(TrackId track_id, |
50 scoped_ptr<base::SharedMemory> shared_mem, | 50 scoped_ptr<base::SharedMemory> shared_mem, |
51 const base::Closure& pipe_read_activity_cb, | 51 const base::Closure& pipe_read_activity_cb, |
52 const base::Closure& av_pipe_set_cb); | 52 const base::Closure& av_pipe_set_cb); |
53 void AudioInitialize(TrackId track_id, | 53 void AudioInitialize(TrackId track_id, |
54 const AvPipelineClient& client, | 54 const AvPipelineClient& client, |
55 const ::media::AudioDecoderConfig& config, | 55 const ::media::AudioDecoderConfig& config, |
56 const ::media::PipelineStatusCB& status_cb); | 56 const ::media::PipelineStatusCB& status_cb); |
57 void VideoInitialize(TrackId track_id, | 57 void VideoInitialize(TrackId track_id, |
58 const VideoPipelineClient& client, | 58 const VideoPipelineClient& client, |
59 const ::media::VideoDecoderConfig& config, | 59 const std::vector<::media::VideoDecoderConfig>& configs, |
60 const ::media::PipelineStatusCB& status_cb); | 60 const ::media::PipelineStatusCB& status_cb); |
61 void StartPlayingFrom(base::TimeDelta time); | 61 void StartPlayingFrom(base::TimeDelta time); |
62 void Flush(const ::media::PipelineStatusCB& status_cb); | 62 void Flush(const ::media::PipelineStatusCB& status_cb); |
63 void Stop(); | 63 void Stop(); |
64 | 64 |
65 void SetPlaybackRate(double playback_rate); | 65 void SetPlaybackRate(double playback_rate); |
66 void SetVolume(TrackId track_id, float playback_rate); | 66 void SetVolume(TrackId track_id, float playback_rate); |
67 void SetCdm(BrowserCdmCast* cdm); | 67 void SetCdm(BrowserCdmCast* cdm); |
68 | 68 |
69 void NotifyPipeWrite(TrackId track_id); | 69 void NotifyPipeWrite(TrackId track_id); |
70 | 70 |
71 private: | 71 private: |
72 base::ThreadChecker thread_checker_; | 72 base::ThreadChecker thread_checker_; |
73 | 73 |
74 scoped_ptr<MediaPipelineImpl> media_pipeline_; | 74 scoped_ptr<MediaPipelineImpl> media_pipeline_; |
75 | 75 |
76 // The shared memory for a track id must be valid until Stop is invoked on | 76 // The shared memory for a track id must be valid until Stop is invoked on |
77 // that track id. | 77 // that track id. |
78 struct MediaTrackHost; | 78 struct MediaTrackHost; |
79 typedef std::map<TrackId, MediaTrackHost*> MediaTrackMap; | 79 typedef std::map<TrackId, MediaTrackHost*> MediaTrackMap; |
80 MediaTrackMap media_track_map_; | 80 MediaTrackMap media_track_map_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(MediaPipelineHost); | 82 DISALLOW_COPY_AND_ASSIGN(MediaPipelineHost); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace media | 85 } // namespace media |
86 } // namespace chromecast | 86 } // namespace chromecast |
87 | 87 |
88 #endif // CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ | 88 #endif // CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ |
OLD | NEW |