| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_IMPL_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ |
| 6 #define MEDIA_BASE_PIPELINE_IMPL_H_ | 6 #define MEDIA_BASE_PIPELINE_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 float GetVolume() const override; | 88 float GetVolume() const override; |
| 89 void SetVolume(float volume) override; | 89 void SetVolume(float volume) override; |
| 90 base::TimeDelta GetMediaTime() const override; | 90 base::TimeDelta GetMediaTime() const override; |
| 91 Ranges<base::TimeDelta> GetBufferedTimeRanges() const override; | 91 Ranges<base::TimeDelta> GetBufferedTimeRanges() const override; |
| 92 base::TimeDelta GetMediaDuration() const override; | 92 base::TimeDelta GetMediaDuration() const override; |
| 93 bool DidLoadingProgress() override; | 93 bool DidLoadingProgress() override; |
| 94 PipelineStatistics GetStatistics() const override; | 94 PipelineStatistics GetStatistics() const override; |
| 95 void SetCdm(CdmContext* cdm_context, | 95 void SetCdm(CdmContext* cdm_context, |
| 96 const CdmAttachedCB& cdm_attached_cb) override; | 96 const CdmAttachedCB& cdm_attached_cb) override; |
| 97 | 97 |
| 98 // |enabledTrackIds| contains track ids of enabled audio tracks. | 98 // |enabled_track_ids| contains track ids of enabled audio tracks. |
| 99 void OnEnabledAudioTracksChanged( | 99 void OnEnabledAudioTracksChanged( |
| 100 const std::vector<MediaTrack::Id>& enabledTrackIds) override; | 100 const std::vector<MediaTrack::Id>& enabled_track_ids) override; |
| 101 | 101 |
| 102 // |trackId| either empty, which means no video track is selected, or contain | 102 // |selected_track_id| is either empty, which means no video track is |
| 103 // one element - the selected video track id. | 103 // selected, or contains the selected video track id. |
| 104 void OnSelectedVideoTrackChanged( | 104 void OnSelectedVideoTrackChanged( |
| 105 const std::vector<MediaTrack::Id>& selectedTrackId) override; | 105 base::Optional<MediaTrack::Id> selected_track_id) override; |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 friend class MediaLog; | 108 friend class MediaLog; |
| 109 class RendererWrapper; | 109 class RendererWrapper; |
| 110 | 110 |
| 111 // Pipeline states, as described above. | 111 // Pipeline states, as described above. |
| 112 // TODO(alokp): Move this to RendererWrapper after removing the references | 112 // TODO(alokp): Move this to RendererWrapper after removing the references |
| 113 // from MediaLog. | 113 // from MediaLog. |
| 114 enum State { | 114 enum State { |
| 115 kCreated, | 115 kCreated, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 base::ThreadChecker thread_checker_; | 182 base::ThreadChecker thread_checker_; |
| 183 base::WeakPtrFactory<PipelineImpl> weak_factory_; | 183 base::WeakPtrFactory<PipelineImpl> weak_factory_; |
| 184 | 184 |
| 185 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); | 185 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 } // namespace media | 188 } // namespace media |
| 189 | 189 |
| 190 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ | 190 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ |
| OLD | NEW |