OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ | 6 #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chromecast/public/media/media_pipeline_backend.h" | 13 #include "chromecast/public/media/media_pipeline_backend.h" |
14 #include "chromecast/public/media/media_pipeline_device_params.h" | 14 #include "chromecast/public/media/media_pipeline_device_params.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace chromecast { | 20 namespace chromecast { |
21 namespace media { | 21 namespace media { |
22 class AudioDecoderAlsa; | 22 class AudioDecoderAlsa; |
23 class VideoDecoderDefault; | 23 class VideoDecoderAlsa; |
24 | 24 |
25 class MediaPipelineBackendAlsa : public MediaPipelineBackend { | 25 class MediaPipelineBackendAlsa : public MediaPipelineBackend { |
26 public: | 26 public: |
27 using RenderingDelay = AudioDecoder::RenderingDelay; | 27 using RenderingDelay = AudioDecoder::RenderingDelay; |
28 | 28 |
29 explicit MediaPipelineBackendAlsa(const MediaPipelineDeviceParams& params); | 29 explicit MediaPipelineBackendAlsa(const MediaPipelineDeviceParams& params); |
30 ~MediaPipelineBackendAlsa() override; | 30 ~MediaPipelineBackendAlsa() override; |
31 | 31 |
32 // MediaPipelineBackend implementation: | 32 // MediaPipelineBackend implementation: |
33 AudioDecoder* CreateAudioDecoder() override; | 33 AudioDecoder* CreateAudioDecoder() override; |
(...skipping 13 matching lines...) Expand all Loading... |
47 // State variable for DCHECKing caller correctness. | 47 // State variable for DCHECKing caller correctness. |
48 enum State { | 48 enum State { |
49 kStateUninitialized, | 49 kStateUninitialized, |
50 kStateInitialized, | 50 kStateInitialized, |
51 kStatePlaying, | 51 kStatePlaying, |
52 kStatePaused, | 52 kStatePaused, |
53 }; | 53 }; |
54 State state_; | 54 State state_; |
55 | 55 |
56 const MediaPipelineDeviceParams params_; | 56 const MediaPipelineDeviceParams params_; |
57 std::unique_ptr<VideoDecoderDefault> video_decoder_; | 57 std::unique_ptr<VideoDecoderAlsa> video_decoder_; |
58 std::unique_ptr<AudioDecoderAlsa> audio_decoder_; | 58 std::unique_ptr<AudioDecoderAlsa> audio_decoder_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(MediaPipelineBackendAlsa); | 60 DISALLOW_COPY_AND_ASSIGN(MediaPipelineBackendAlsa); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace media | 63 } // namespace media |
64 } // namespace chromecast | 64 } // namespace chromecast |
65 | 65 |
66 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ | 66 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ |
OLD | NEW |