OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ |
6 #define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ | 6 #define CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 MediaPipelineClient client_; | 92 MediaPipelineClient client_; |
93 std::unique_ptr<BufferingController> buffering_controller_; | 93 std::unique_ptr<BufferingController> buffering_controller_; |
94 CastCdmContext* cdm_context_; | 94 CastCdmContext* cdm_context_; |
95 | 95 |
96 // Interface with the underlying hardware media pipeline. | 96 // Interface with the underlying hardware media pipeline. |
97 BackendState backend_state_; | 97 BackendState backend_state_; |
98 // Playback rate set by the upper layer. | 98 // Playback rate set by the upper layer. |
99 // Cached here because CMA pipeline backend does not support rate == 0, | 99 // Cached here because CMA pipeline backend does not support rate == 0, |
100 // which is emulated by pausing the backend. | 100 // which is emulated by pausing the backend. |
101 float playback_rate_; | 101 float playback_rate_; |
| 102 |
| 103 // Since av pipeline still need to access device components in their |
| 104 // destructor, it's important to delete them first. |
102 std::unique_ptr<MediaPipelineBackend> media_pipeline_backend_; | 105 std::unique_ptr<MediaPipelineBackend> media_pipeline_backend_; |
103 std::unique_ptr<AudioDecoderSoftwareWrapper> audio_decoder_; | 106 std::unique_ptr<AudioDecoderSoftwareWrapper> audio_decoder_; |
104 MediaPipelineBackend::VideoDecoder* video_decoder_; | 107 MediaPipelineBackend::VideoDecoder* video_decoder_; |
105 | |
106 std::unique_ptr<AudioPipelineImpl> audio_pipeline_; | 108 std::unique_ptr<AudioPipelineImpl> audio_pipeline_; |
107 std::unique_ptr<VideoPipelineImpl> video_pipeline_; | 109 std::unique_ptr<VideoPipelineImpl> video_pipeline_; |
108 std::unique_ptr<FlushTask> pending_flush_task_; | 110 std::unique_ptr<FlushTask> pending_flush_task_; |
109 | 111 |
110 // The media time is retrieved at regular intervals. | 112 // The media time is retrieved at regular intervals. |
111 bool pending_time_update_task_; | 113 bool pending_time_update_task_; |
112 base::TimeDelta last_media_time_; | 114 base::TimeDelta last_media_time_; |
113 | 115 |
114 // Used to make the statistics update period a multiplier of the time update | 116 // Used to make the statistics update period a multiplier of the time update |
115 // period. | 117 // period. |
(...skipping 11 matching lines...) Expand all Loading... |
127 base::WeakPtr<MediaPipelineImpl> weak_this_; | 129 base::WeakPtr<MediaPipelineImpl> weak_this_; |
128 base::WeakPtrFactory<MediaPipelineImpl> weak_factory_; | 130 base::WeakPtrFactory<MediaPipelineImpl> weak_factory_; |
129 | 131 |
130 DISALLOW_COPY_AND_ASSIGN(MediaPipelineImpl); | 132 DISALLOW_COPY_AND_ASSIGN(MediaPipelineImpl); |
131 }; | 133 }; |
132 | 134 |
133 } // namespace media | 135 } // namespace media |
134 } // namespace chromecast | 136 } // namespace chromecast |
135 | 137 |
136 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ | 138 #endif // CHROMECAST_MEDIA_CMA_PIPELINE_MEDIA_PIPELINE_IMPL_H_ |
OLD | NEW |