Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chromecast / media / cma / backend / audio_pipeline_device_default.h
blob814a0276a6fadecf23115040579fbd7af58c561d
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.
5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_
8 #include <vector>
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"
16 namespace chromecast {
17 namespace media {
19 class MediaClockDevice;
20 class MediaComponentDeviceDefault;
21 struct MediaPipelineDeviceParams;
23 class AudioPipelineDeviceDefault : public AudioPipelineDevice {
24 public:
25 AudioPipelineDeviceDefault(const MediaPipelineDeviceParams& params,
26 MediaClockDevice* media_clock_device);
27 ~AudioPipelineDeviceDefault() override;
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;
42 private:
43 scoped_ptr<MediaComponentDeviceDefault> pipeline_;
45 AudioConfig config_;
46 std::vector<uint8_t> config_extra_data_;
48 base::ThreadChecker thread_checker_;
49 DISALLOW_COPY_AND_ASSIGN(AudioPipelineDeviceDefault);
52 } // namespace media
53 } // namespace chromecast
55 #endif // CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_