| OLD | NEW | 
|---|
|  | (Empty) | 
| 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. |  | 
| 4 |  | 
| 5 #ifndef CHROMECAST_PUBLIC_MEDIA_VIDEO_PIPELINE_DEVICE_H_ |  | 
| 6 #define CHROMECAST_PUBLIC_MEDIA_VIDEO_PIPELINE_DEVICE_H_ |  | 
| 7 |  | 
| 8 #include "media_component_device.h" |  | 
| 9 |  | 
| 10 namespace chromecast { |  | 
| 11 struct Size; |  | 
| 12 |  | 
| 13 namespace media { |  | 
| 14 struct VideoConfig; |  | 
| 15 |  | 
| 16 // Interface for platform-specific video pipeline backend. |  | 
| 17 // See comments on MediaComponentDevice. |  | 
| 18 // |  | 
| 19 // Notes: |  | 
| 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 { |  | 
| 26  public: |  | 
| 27   // Callback interface for natural size of video changing. |  | 
| 28   class VideoClient { |  | 
| 29    public: |  | 
| 30     virtual ~VideoClient() {} |  | 
| 31     virtual void OnNaturalSizeChanged(const Size& size) = 0; |  | 
| 32   }; |  | 
| 33 |  | 
| 34   ~VideoPipelineDevice() override {} |  | 
| 35 |  | 
| 36   // Registers |client| as the video specific event handler. |  | 
| 37   // Implementation takes ownership of |client|. |  | 
| 38   virtual void SetVideoClient(VideoClient* client) = 0; |  | 
| 39 |  | 
| 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; |  | 
| 45 }; |  | 
| 46 |  | 
| 47 }  // namespace media |  | 
| 48 }  // namespace chromecast |  | 
| 49 |  | 
| 50 #endif  // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ |  | 
| OLD | NEW | 
|---|