| 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" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // Build a pipeline to using the given |demuxer| and |renderer| to construct | 72 // Build a pipeline to using the given |demuxer| and |renderer| to construct |
| 73 // a filter chain, executing |seek_cb| when the initial seek has completed. | 73 // a filter chain, executing |seek_cb| when the initial seek has completed. |
| 74 // Methods on PipelineClient may be called up until Stop() has completed. | 74 // Methods on PipelineClient may be called up until Stop() has completed. |
| 75 // It is an error to call this method after the pipeline has already started. | 75 // It is an error to call this method after the pipeline has already started. |
| 76 virtual void Start(Demuxer* demuxer, | 76 virtual void Start(Demuxer* demuxer, |
| 77 std::unique_ptr<Renderer> renderer, | 77 std::unique_ptr<Renderer> renderer, |
| 78 Client* client, | 78 Client* client, |
| 79 const PipelineStatusCB& seek_cb) = 0; | 79 const PipelineStatusCB& seek_cb) = 0; |
| 80 | 80 |
| 81 // |enabledTrackIds| contains track ids of enabled audio tracks. | 81 // |enabled_track_ids| contains track ids of enabled audio tracks. |
| 82 virtual void OnEnabledAudioTracksChanged( | 82 virtual void OnEnabledAudioTracksChanged( |
| 83 const std::vector<MediaTrack::Id>& enabledTrackIds) = 0; | 83 const std::vector<MediaTrack::Id>& enabled_track_ids) = 0; |
| 84 | 84 |
| 85 // |trackId| either empty, which means no video track is selected, or contain | 85 // |selected_track_id| is either empty, which means no video track is |
| 86 // one element - the selected video track id. | 86 // selected, or contains the selected video track id. |
| 87 virtual void OnSelectedVideoTrackChanged( | 87 virtual void OnSelectedVideoTrackChanged( |
| 88 const std::vector<MediaTrack::Id>& selectedTrackId) = 0; | 88 base::Optional<MediaTrack::Id> selected_track_id) = 0; |
| 89 | 89 |
| 90 // Stops the pipeline. This is a blocking function. | 90 // Stops the pipeline. This is a blocking function. |
| 91 // If the pipeline is started, it must be stopped before destroying it. | 91 // If the pipeline is started, it must be stopped before destroying it. |
| 92 // It it permissible to call Stop() at any point during the lifetime of the | 92 // It it permissible to call Stop() at any point during the lifetime of the |
| 93 // pipeline. | 93 // pipeline. |
| 94 // | 94 // |
| 95 // Once Stop is called any outstanding completion callbacks | 95 // Once Stop is called any outstanding completion callbacks |
| 96 // for Start/Seek/Suspend/Resume or Client methods will *not* be called. | 96 // for Start/Seek/Suspend/Resume or Client methods will *not* be called. |
| 97 virtual void Stop() = 0; | 97 virtual void Stop() = 0; |
| 98 | 98 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Gets the current pipeline statistics. | 169 // Gets the current pipeline statistics. |
| 170 virtual PipelineStatistics GetStatistics() const = 0; | 170 virtual PipelineStatistics GetStatistics() const = 0; |
| 171 | 171 |
| 172 virtual void SetCdm(CdmContext* cdm_context, | 172 virtual void SetCdm(CdmContext* cdm_context, |
| 173 const CdmAttachedCB& cdm_attached_cb) = 0; | 173 const CdmAttachedCB& cdm_attached_cb) = 0; |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 } // namespace media | 176 } // namespace media |
| 177 | 177 |
| 178 #endif // MEDIA_BASE_PIPELINE_H_ | 178 #endif // MEDIA_BASE_PIPELINE_H_ |
| OLD | NEW |