| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ | 5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ |
| 6 #define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ | 6 #define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chromecast/media/cma/backend/media_component_device.h" | 10 #include "chromecast/media/cma/backend/media_component_device.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 class Size; | 13 class Size; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace media { | |
| 17 class VideoDecoderConfig; | |
| 18 } | |
| 19 | |
| 20 namespace chromecast { | 16 namespace chromecast { |
| 21 namespace media { | 17 namespace media { |
| 22 class DecoderBufferBase; | 18 class DecoderBufferBase; |
| 19 class DecoderConfig; |
| 23 | 20 |
| 24 // VideoPipelineDevice - | 21 // VideoPipelineDevice - |
| 25 // | 22 // |
| 26 // Notes: | 23 // Notes: |
| 27 // - Like a regular MediaComponentDevice, frames are possibly rendered only | 24 // - Like a regular MediaComponentDevice, frames are possibly rendered only |
| 28 // in the kRunning state. | 25 // in the kRunning state. |
| 29 // However, the first frame must be rendered regardless of the clock state: | 26 // However, the first frame must be rendered regardless of the clock state: |
| 30 // - no synchronization needed to display the first frame, | 27 // - no synchronization needed to display the first frame, |
| 31 // - the clock rate has no impact on the presentation of the first frame. | 28 // - the clock rate has no impact on the presentation of the first frame. |
| 32 // | 29 // |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 VideoPipelineDevice(); | 41 VideoPipelineDevice(); |
| 45 ~VideoPipelineDevice() override; | 42 ~VideoPipelineDevice() override; |
| 46 | 43 |
| 47 // Registers |client| as the video specific event handler. | 44 // Registers |client| as the video specific event handler. |
| 48 virtual void SetVideoClient(const VideoClient& client) = 0; | 45 virtual void SetVideoClient(const VideoClient& client) = 0; |
| 49 | 46 |
| 50 // Provide the video configuration. | 47 // Provide the video configuration. |
| 51 // Must be called before switching from |kStateUninitialized| to |kStateIdle|. | 48 // Must be called before switching from |kStateUninitialized| to |kStateIdle|. |
| 52 // Afterwards, this can be invoked any time the configuration changes. | 49 // Afterwards, this can be invoked any time the configuration changes. |
| 53 // Returns true if the configuration is a supported configuration. | 50 // Returns true if the configuration is a supported configuration. |
| 54 virtual bool SetConfig(const ::media::VideoDecoderConfig& config) = 0; | 51 virtual bool SetConfig(const DecoderConfig& config) = 0; |
| 55 | 52 |
| 56 private: | 53 private: |
| 57 DISALLOW_COPY_AND_ASSIGN(VideoPipelineDevice); | 54 DISALLOW_COPY_AND_ASSIGN(VideoPipelineDevice); |
| 58 }; | 55 }; |
| 59 | 56 |
| 60 } // namespace media | 57 } // namespace media |
| 61 } // namespace chromecast | 58 } // namespace chromecast |
| 62 | 59 |
| 63 #endif // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ | 60 #endif // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ |
| OLD | NEW |