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