Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: chromecast/public/media/video_pipeline_device.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK on posted task Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 55%
rename from chromecast/media/cma/backend/video_pipeline_device.h
rename to chromecast/public/media/video_pipeline_device.h
index ee7dff4c0d1f7c1ba72eaba4520064be1411ddba..1019ec387dbef0388e5121796c5a951f7809b222 100644
--- a/chromecast/media/cma/backend/video_pipeline_device.h
+++ b/chromecast/public/media/video_pipeline_device.h
@@ -2,23 +2,19 @@
// 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 -
+// Interface for platform-specific video pipeline backend.
+// See comments on MediaComponentDevice.
//
// Notes:
// - Like a regular MediaComponentDevice, frames are possibly rendered only
@@ -26,32 +22,26 @@ struct VideoConfig;
// However, the first frame must be rendered regardless of the clock state:
// - no synchronization needed to display the first frame,
// - the clock rate has no impact on the presentation of the first frame.
-//
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() override {}
// Registers |client| as the video specific event handler.
- virtual void SetVideoClient(const VideoClient& client) = 0;
+ // Implementation takes ownership of |client|.
+ virtual void SetVideoClient(VideoClient* client) = 0;
- // Provide the video configuration.
- // Must be called before switching from |kStateUninitialized| to |kStateIdle|.
+ // Provides the video configuration.
+ // 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

Powered by Google App Engine
This is Rietveld 408576698