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 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "chromecast/public/media/media_pipeline_backend.h" | 14 #include "chromecast/public/media/media_pipeline_backend.h" |
15 #include "chromecast/public/media/media_pipeline_device_params.h" | 15 #include "chromecast/public/media/media_pipeline_device_params.h" |
| 16 #include "chromecast/public/volume_control.h" |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
19 } // namespace base | 20 } // namespace base |
20 | 21 |
21 namespace chromecast { | 22 namespace chromecast { |
22 namespace media { | 23 namespace media { |
23 class AudioDecoderAlsa; | 24 class AudioDecoderAlsa; |
24 class VideoDecoderNull; | 25 class VideoDecoderNull; |
25 | 26 |
(...skipping 10 matching lines...) Expand all Loading... |
36 bool Initialize() override; | 37 bool Initialize() override; |
37 bool Start(int64_t start_pts) override; | 38 bool Start(int64_t start_pts) override; |
38 void Stop() override; | 39 void Stop() override; |
39 bool Pause() override; | 40 bool Pause() override; |
40 bool Resume() override; | 41 bool Resume() override; |
41 bool SetPlaybackRate(float rate) override; | 42 bool SetPlaybackRate(float rate) override; |
42 int64_t GetCurrentPts() override; | 43 int64_t GetCurrentPts() override; |
43 | 44 |
44 bool Primary() const; | 45 bool Primary() const; |
45 std::string DeviceId() const; | 46 std::string DeviceId() const; |
| 47 AudioContentType ContentType() const; |
46 const scoped_refptr<base::SingleThreadTaskRunner>& GetTaskRunner() const; | 48 const scoped_refptr<base::SingleThreadTaskRunner>& GetTaskRunner() const; |
47 | 49 |
48 private: | 50 private: |
49 // State variable for DCHECKing caller correctness. | 51 // State variable for DCHECKing caller correctness. |
50 enum State { | 52 enum State { |
51 kStateUninitialized, | 53 kStateUninitialized, |
52 kStateInitialized, | 54 kStateInitialized, |
53 kStatePlaying, | 55 kStatePlaying, |
54 kStatePaused, | 56 kStatePaused, |
55 }; | 57 }; |
56 State state_; | 58 State state_; |
57 | 59 |
58 const MediaPipelineDeviceParams params_; | 60 const MediaPipelineDeviceParams params_; |
59 std::unique_ptr<VideoDecoderNull> video_decoder_; | 61 std::unique_ptr<VideoDecoderNull> video_decoder_; |
60 std::unique_ptr<AudioDecoderAlsa> audio_decoder_; | 62 std::unique_ptr<AudioDecoderAlsa> audio_decoder_; |
61 | 63 |
62 DISALLOW_COPY_AND_ASSIGN(MediaPipelineBackendAlsa); | 64 DISALLOW_COPY_AND_ASSIGN(MediaPipelineBackendAlsa); |
63 }; | 65 }; |
64 | 66 |
65 } // namespace media | 67 } // namespace media |
66 } // namespace chromecast | 68 } // namespace chromecast |
67 | 69 |
68 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ | 70 #endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_MEDIA_PIPELINE_BACKEND_ALSA_H_ |
OLD | NEW |