| 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; | |
| 23 class Renderer; | 22 class Renderer; |
| 24 class VideoFrame; | 23 class VideoFrame; |
| 25 | 24 |
| 26 // Metadata describing a pipeline once it has been initialized. | 25 // Metadata describing a pipeline once it has been initialized. |
| 27 struct PipelineMetadata { | 26 struct PipelineMetadata { |
| 28 PipelineMetadata() | 27 PipelineMetadata() |
| 29 : has_audio(false), has_video(false), video_rotation(VIDEO_ROTATION_0) {} | 28 : has_audio(false), has_video(false), video_rotation(VIDEO_ROTATION_0) {} |
| 30 | 29 |
| 31 bool has_audio; | 30 bool has_audio; |
| 32 bool has_video; | 31 bool has_video; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 148 |
| 150 // Return true if loading progress has been made since the last time this | 149 // Return true if loading progress has been made since the last time this |
| 151 // method was called. | 150 // method was called. |
| 152 virtual bool DidLoadingProgress() = 0; | 151 virtual bool DidLoadingProgress() = 0; |
| 153 | 152 |
| 154 // Gets the current pipeline statistics. | 153 // Gets the current pipeline statistics. |
| 155 virtual PipelineStatistics GetStatistics() const = 0; | 154 virtual PipelineStatistics GetStatistics() const = 0; |
| 156 | 155 |
| 157 virtual void SetCdm(CdmContext* cdm_context, | 156 virtual void SetCdm(CdmContext* cdm_context, |
| 158 const CdmAttachedCB& cdm_attached_cb) = 0; | 157 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) {} | |
| 168 }; | 158 }; |
| 169 | 159 |
| 170 } // namespace media | 160 } // namespace media |
| 171 | 161 |
| 172 #endif // MEDIA_BASE_PIPELINE_H_ | 162 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |