OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_BASE_PIPELINE_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_H_ |
6 #define MEDIA_BASE_PIPELINE_H_ | 6 #define MEDIA_BASE_PIPELINE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "media/base/buffering_state.h" | 10 #include "media/base/buffering_state.h" |
11 #include "media/base/cdm_context.h" | 11 #include "media/base/cdm_context.h" |
12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
13 #include "media/base/pipeline_status.h" | 13 #include "media/base/pipeline_status.h" |
14 #include "media/base/ranges.h" | 14 #include "media/base/ranges.h" |
15 #include "media/base/text_track.h" | 15 #include "media/base/text_track.h" |
16 #include "media/base/video_rotation.h" | 16 #include "media/base/video_rotation.h" |
17 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
18 | 18 |
19 namespace media { | 19 namespace media { |
20 | 20 |
21 class Demuxer; | 21 class Demuxer; |
| 22 class DemuxerStream; |
22 class Renderer; | 23 class Renderer; |
23 class VideoFrame; | 24 class VideoFrame; |
24 | 25 |
25 // Metadata describing a pipeline once it has been initialized. | 26 // Metadata describing a pipeline once it has been initialized. |
26 struct PipelineMetadata { | 27 struct PipelineMetadata { |
27 PipelineMetadata() | 28 PipelineMetadata() |
28 : has_audio(false), has_video(false), video_rotation(VIDEO_ROTATION_0) {} | 29 : has_audio(false), has_video(false), video_rotation(VIDEO_ROTATION_0) {} |
29 | 30 |
30 bool has_audio; | 31 bool has_audio; |
31 bool has_video; | 32 bool has_video; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 149 |
149 // Return true if loading progress has been made since the last time this | 150 // Return true if loading progress has been made since the last time this |
150 // method was called. | 151 // method was called. |
151 virtual bool DidLoadingProgress() = 0; | 152 virtual bool DidLoadingProgress() = 0; |
152 | 153 |
153 // Gets the current pipeline statistics. | 154 // Gets the current pipeline statistics. |
154 virtual PipelineStatistics GetStatistics() const = 0; | 155 virtual PipelineStatistics GetStatistics() const = 0; |
155 | 156 |
156 virtual void SetCdm(CdmContext* cdm_context, | 157 virtual void SetCdm(CdmContext* cdm_context, |
157 const CdmAttachedCB& cdm_attached_cb) = 0; | 158 const CdmAttachedCB& cdm_attached_cb) = 0; |
| 159 |
| 160 // Notifies pipeline that the set of enabled audio streams/tracks has changed. |
| 161 virtual void OnEnabledAudioStreamsChanged( |
| 162 const std::vector<const DemuxerStream*>& enabledAudioStreams) {} |
| 163 |
| 164 // Notifies pipeline that the selected video stream has changed. The input |
| 165 // parameter |selectedVideoStream| can be null, which means video is disabled. |
| 166 virtual void OnSelectedVideoStreamChanged( |
| 167 const DemuxerStream* selectedVideoStream) {} |
158 }; | 168 }; |
159 | 169 |
160 } // namespace media | 170 } // namespace media |
161 | 171 |
162 #endif // MEDIA_BASE_PIPELINE_H_ | 172 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |