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_AUDIO_PIPELINE_DEVICE_DEFAULT_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_ |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_ | 6 #define CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chromecast/media/cma/backend/audio_pipeline_device.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/threading/thread_checker.h" |
| 13 #include "chromecast/public/media/audio_pipeline_device.h" |
12 #include "chromecast/public/media/decoder_config.h" | 14 #include "chromecast/public/media/decoder_config.h" |
13 | 15 |
14 namespace chromecast { | 16 namespace chromecast { |
15 namespace media { | 17 namespace media { |
16 | 18 |
17 class MediaClockDevice; | 19 class MediaClockDevice; |
18 class MediaComponentDeviceDefault; | 20 class MediaComponentDeviceDefault; |
| 21 struct MediaPipelineDeviceParams; |
19 | 22 |
20 class AudioPipelineDeviceDefault : public AudioPipelineDevice { | 23 class AudioPipelineDeviceDefault : public AudioPipelineDevice { |
21 public: | 24 public: |
22 explicit AudioPipelineDeviceDefault(MediaClockDevice* media_clock_device); | 25 AudioPipelineDeviceDefault(const MediaPipelineDeviceParams& params, |
| 26 MediaClockDevice* media_clock_device); |
23 ~AudioPipelineDeviceDefault() override; | 27 ~AudioPipelineDeviceDefault() override; |
24 | 28 |
25 // AudioPipelineDevice implementation. | 29 // AudioPipelineDevice implementation. |
26 void SetClient(const Client& client) override; | 30 void SetClient(Client* client) override; |
27 State GetState() const override; | 31 State GetState() const override; |
28 bool SetState(State new_state) override; | 32 bool SetState(State new_state) override; |
29 bool SetStartPts(base::TimeDelta time) override; | 33 bool SetStartPts(int64_t time_microseconds) override; |
30 FrameStatus PushFrame( | 34 FrameStatus PushFrame(DecryptContext* decrypt_context, |
31 const scoped_refptr<DecryptContext>& decrypt_context, | 35 CastDecoderBuffer* buffer, |
32 const scoped_refptr<DecoderBufferBase>& buffer, | 36 FrameStatusCB* completion_cb) override; |
33 const FrameStatusCB& completion_cb) override; | 37 RenderingDelay GetRenderingDelay() const override; |
34 base::TimeDelta GetRenderingTime() const override; | |
35 base::TimeDelta GetRenderingDelay() const override; | |
36 bool SetConfig(const AudioConfig& config) override; | 38 bool SetConfig(const AudioConfig& config) override; |
37 void SetStreamVolumeMultiplier(float multiplier) override; | 39 void SetStreamVolumeMultiplier(float multiplier) override; |
38 bool GetStatistics(Statistics* stats) const override; | 40 bool GetStatistics(Statistics* stats) const override; |
39 | 41 |
40 private: | 42 private: |
41 scoped_ptr<MediaComponentDeviceDefault> pipeline_; | 43 scoped_ptr<MediaComponentDeviceDefault> pipeline_; |
42 | 44 |
43 AudioConfig config_; | 45 AudioConfig config_; |
44 std::vector<uint8_t> config_extra_data_; | 46 std::vector<uint8_t> config_extra_data_; |
45 | 47 |
| 48 base::ThreadChecker thread_checker_; |
46 DISALLOW_COPY_AND_ASSIGN(AudioPipelineDeviceDefault); | 49 DISALLOW_COPY_AND_ASSIGN(AudioPipelineDeviceDefault); |
47 }; | 50 }; |
48 | 51 |
49 } // namespace media | 52 } // namespace media |
50 } // namespace chromecast | 53 } // namespace chromecast |
51 | 54 |
52 #endif // CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_ | 55 #endif // CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_ |
OLD | NEW |