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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "media/base/buffering_state.h" | 12 #include "media/base/buffering_state.h" |
13 #include "media/base/cdm_context.h" | 13 #include "media/base/cdm_context.h" |
14 #include "media/base/media_export.h" | 14 #include "media/base/media_export.h" |
| 15 #include "media/base/media_track.h" |
15 #include "media/base/pipeline_metadata.h" | 16 #include "media/base/pipeline_metadata.h" |
16 #include "media/base/pipeline_status.h" | 17 #include "media/base/pipeline_status.h" |
17 #include "media/base/ranges.h" | 18 #include "media/base/ranges.h" |
18 #include "media/base/text_track.h" | 19 #include "media/base/text_track.h" |
19 #include "media/base/video_rotation.h" | 20 #include "media/base/video_rotation.h" |
20 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
21 | 22 |
22 namespace media { | 23 namespace media { |
23 | 24 |
24 class Demuxer; | 25 class Demuxer; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 69 |
69 // Build a pipeline to using the given |demuxer| and |renderer| to construct | 70 // Build a pipeline to using the given |demuxer| and |renderer| to construct |
70 // a filter chain, executing |seek_cb| when the initial seek has completed. | 71 // a filter chain, executing |seek_cb| when the initial seek has completed. |
71 // Methods on PipelineClient may be called up until Stop() has completed. | 72 // Methods on PipelineClient may be called up until Stop() has completed. |
72 // It is an error to call this method after the pipeline has already started. | 73 // It is an error to call this method after the pipeline has already started. |
73 virtual void Start(Demuxer* demuxer, | 74 virtual void Start(Demuxer* demuxer, |
74 std::unique_ptr<Renderer> renderer, | 75 std::unique_ptr<Renderer> renderer, |
75 Client* client, | 76 Client* client, |
76 const PipelineStatusCB& seek_cb) = 0; | 77 const PipelineStatusCB& seek_cb) = 0; |
77 | 78 |
| 79 // |enabledTrackIds| contains track ids of enabled audio tracks. |
| 80 virtual void OnEnabledAudioTracksChanged( |
| 81 const std::vector<MediaTrack::Id>& enabledTrackIds) = 0; |
| 82 |
| 83 // |trackId| either empty, which means no video track is selected, or contain |
| 84 // one element - the selected video track id. |
| 85 virtual void OnSelectedVideoTrackChanged( |
| 86 const std::vector<MediaTrack::Id>& selectedTrackId) = 0; |
| 87 |
78 // Stops the pipeline. This is a blocking function. | 88 // Stops the pipeline. This is a blocking function. |
79 // If the pipeline is started, it must be stopped before destroying it. | 89 // If the pipeline is started, it must be stopped before destroying it. |
80 // It it permissible to call Stop() at any point during the lifetime of the | 90 // It it permissible to call Stop() at any point during the lifetime of the |
81 // pipeline. | 91 // pipeline. |
82 // | 92 // |
83 // Once Stop is called any outstanding completion callbacks | 93 // Once Stop is called any outstanding completion callbacks |
84 // for Start/Seek/Suspend/Resume or Client methods will *not* be called. | 94 // for Start/Seek/Suspend/Resume or Client methods will *not* be called. |
85 virtual void Stop() = 0; | 95 virtual void Stop() = 0; |
86 | 96 |
87 // Attempt to seek to the position specified by time. |seek_cb| will be | 97 // Attempt to seek to the position specified by time. |seek_cb| will be |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 // Gets the current pipeline statistics. | 167 // Gets the current pipeline statistics. |
158 virtual PipelineStatistics GetStatistics() const = 0; | 168 virtual PipelineStatistics GetStatistics() const = 0; |
159 | 169 |
160 virtual void SetCdm(CdmContext* cdm_context, | 170 virtual void SetCdm(CdmContext* cdm_context, |
161 const CdmAttachedCB& cdm_attached_cb) = 0; | 171 const CdmAttachedCB& cdm_attached_cb) = 0; |
162 }; | 172 }; |
163 | 173 |
164 } // namespace media | 174 } // namespace media |
165 | 175 |
166 #endif // MEDIA_BASE_PIPELINE_H_ | 176 #endif // MEDIA_BASE_PIPELINE_H_ |
OLD | NEW |