Index: chromecast/public/media/video_pipeline_device.h |
diff --git a/chromecast/media/cma/backend/video_pipeline_device.h b/chromecast/public/media/video_pipeline_device.h |
similarity index 62% |
rename from chromecast/media/cma/backend/video_pipeline_device.h |
rename to chromecast/public/media/video_pipeline_device.h |
index ee7dff4c0d1f7c1ba72eaba4520064be1411ddba..aa08d7faacca7b5a3828c0dab14d63c7ab27cbeb 100644 |
--- a/chromecast/media/cma/backend/video_pipeline_device.h |
+++ b/chromecast/public/media/video_pipeline_device.h |
@@ -2,20 +2,15 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ |
-#define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_ |
+#ifndef CHROMECAST_PUBLIC_MEDIA_VIDEO_PIPELINE_DEVICE_H_ |
+#define CHROMECAST_PUBLIC_MEDIA_VIDEO_PIPELINE_DEVICE_H_ |
-#include "base/callback.h" |
-#include "base/macros.h" |
-#include "chromecast/media/cma/backend/media_component_device.h" |
- |
-namespace gfx { |
-class Size; |
-} |
+#include "media_component_device.h" |
namespace chromecast { |
+struct Size; |
+ |
namespace media { |
-class DecoderBufferBase; |
struct VideoConfig; |
// VideoPipelineDevice - |
@@ -29,29 +24,25 @@ struct VideoConfig; |
// |
class VideoPipelineDevice : public MediaComponentDevice { |
public: |
- struct VideoClient { |
- VideoClient(); |
- ~VideoClient(); |
- |
- // Invoked each time the natural size is updated. |
- base::Callback<void(const gfx::Size& natural_size)> |
- natural_size_changed_cb; |
+ // Callback interface for natural size of video changing. |
+ class VideoClient { |
+ public: |
+ virtual ~VideoClient() {} |
+ virtual void OnNaturalSizeChanged(const Size& size) = 0; |
}; |
- VideoPipelineDevice(); |
- ~VideoPipelineDevice() override; |
+ VideoPipelineDevice() {} |
byungchul
2015/07/27 18:22:23
not necessary
halliwell
2015/07/28 02:19:36
removed.
|
+ ~VideoPipelineDevice() override {} |
// Registers |client| as the video specific event handler. |
- virtual void SetVideoClient(const VideoClient& client) = 0; |
+ // Implementation takes ownership of |client|. |
gunsch
2015/07/27 17:14:49
Is there guidance on when |client| should be delet
halliwell
2015/07/28 02:19:36
Indeed, pipeline now owns, simplifies this for OEM
byungchul
2015/07/28 18:05:43
It would be confusing for vendros if we mix the ow
halliwell
2015/07/28 23:26:06
Yeah I'm considering going back to vendor ownershi
gunsch
2015/07/29 17:04:20
I like the idea of a conformance test guaranteeing
halliwell
2015/07/29 19:58:19
Don't think it would be too hard, but would prefer
|
+ virtual void SetVideoClient(VideoClient* client) = 0; |
// Provide the video configuration. |
// Must be called before switching from |kStateUninitialized| to |kStateIdle|. |
// Afterwards, this can be invoked any time the configuration changes. |
// Returns true if the configuration is a supported configuration. |
virtual bool SetConfig(const VideoConfig& config) = 0; |
- |
- private: |
- DISALLOW_COPY_AND_ASSIGN(VideoPipelineDevice); |
}; |
} // namespace media |