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_VIDEO_PIPELINE_DEVICE_DEFAULT_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_DEFAULT_H_
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/threading/thread_checker.h"
13 #include "chromecast/public/media/decoder_config.h"
14 #include "chromecast/public/media/video_pipeline_device.h"
16 namespace chromecast
{
19 class MediaClockDevice
;
20 class MediaComponentDeviceDefault
;
21 struct MediaPipelineDeviceParams
;
23 class VideoPipelineDeviceDefault
: public VideoPipelineDevice
{
25 VideoPipelineDeviceDefault(const MediaPipelineDeviceParams
& params
,
26 MediaClockDevice
* media_clock_device
);
27 ~VideoPipelineDeviceDefault() override
;
29 // VideoPipelineDevice 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 void SetVideoClient(VideoClient
* client
) override
;
39 bool SetConfig(const VideoConfig
& config
) override
;
40 bool GetStatistics(Statistics
* stats
) const override
;
43 scoped_ptr
<MediaComponentDeviceDefault
> pipeline_
;
46 std::vector
<uint8_t> config_extra_data_
;
48 base::ThreadChecker thread_checker_
;
49 DISALLOW_COPY_AND_ASSIGN(VideoPipelineDeviceDefault
);
53 } // namespace chromecast
55 #endif // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_DEFAULT_H_