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