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_
10 #include "base/macros.h"
11 #include "chromecast/media/cma/backend/audio_pipeline_device.h"
12 #include "chromecast/public/media/decoder_config.h"
14 namespace chromecast
{
17 class MediaClockDevice
;
18 class MediaComponentDeviceDefault
;
20 class AudioPipelineDeviceDefault
: public AudioPipelineDevice
{
22 explicit AudioPipelineDeviceDefault(MediaClockDevice
* media_clock_device
);
23 ~AudioPipelineDeviceDefault() override
;
25 // AudioPipelineDevice implementation.
26 void SetClient(const Client
& client
) override
;
27 State
GetState() const override
;
28 bool SetState(State new_state
) override
;
29 bool SetStartPts(base::TimeDelta time
) override
;
30 FrameStatus
PushFrame(
31 const scoped_refptr
<DecryptContext
>& decrypt_context
,
32 const scoped_refptr
<DecoderBufferBase
>& buffer
,
33 const FrameStatusCB
& completion_cb
) override
;
34 base::TimeDelta
GetRenderingTime() const override
;
35 base::TimeDelta
GetRenderingDelay() const override
;
36 bool SetConfig(const AudioConfig
& config
) override
;
37 void SetStreamVolumeMultiplier(float multiplier
) override
;
38 bool GetStatistics(Statistics
* stats
) const override
;
41 scoped_ptr
<MediaComponentDeviceDefault
> pipeline_
;
44 std::vector
<uint8_t> config_extra_data_
;
46 DISALLOW_COPY_AND_ASSIGN(AudioPipelineDeviceDefault
);
50 } // namespace chromecast
52 #endif // CHROMECAST_MEDIA_CMA_BACKEND_AUDIO_PIPELINE_DEVICE_DEFAULT_H_