1 // Copyright 2014 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_PUBLIC_MEDIA_VIDEO_PIPELINE_DEVICE_H_
6 #define CHROMECAST_PUBLIC_MEDIA_VIDEO_PIPELINE_DEVICE_H_
8 #include "media_component_device.h"
10 namespace chromecast
{
16 // Interface for platform-specific video pipeline backend.
17 // See comments on MediaComponentDevice.
20 // - Like a regular MediaComponentDevice, frames are possibly rendered only
21 // in the kRunning state.
22 // However, the first frame must be rendered regardless of the clock state:
23 // - no synchronization needed to display the first frame,
24 // - the clock rate has no impact on the presentation of the first frame.
25 class VideoPipelineDevice
: public MediaComponentDevice
{
27 // Callback interface for natural size of video changing.
30 virtual ~VideoClient() {}
31 virtual void OnNaturalSizeChanged(const Size
& size
) = 0;
34 ~VideoPipelineDevice() override
{}
36 // Registers |client| as the video specific event handler.
37 // Implementation takes ownership of |client|.
38 virtual void SetVideoClient(VideoClient
* client
) = 0;
40 // Provides the video configuration.
41 // Called before switching from |kStateUninitialized| to |kStateIdle|.
42 // Afterwards, this can be invoked any time the configuration changes.
43 // Returns true if the configuration is a supported configuration.
44 virtual bool SetConfig(const VideoConfig
& config
) = 0;
48 } // namespace chromecast
50 #endif // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_