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

Unified Diff: media/capture/video/video_capture_device.h

Issue 2378943002: Let clients interact with VideoCaptureDeviceClient instead of VideoCaptureDevice (Closed)
Patch Set: Remove method AsClientBuffer() Created 4 years, 2 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: media/capture/video/video_capture_device.h
diff --git a/media/capture/video/video_capture_device.h b/media/capture/video/video_capture_device.h
index b662f5c48b7a9d72067c50107e13f1acd663057f..85954de987e86bfb6eef0b769beca01b706a9894 100644
--- a/media/capture/video/video_capture_device.h
+++ b/media/capture/video/video_capture_device.h
@@ -59,10 +59,11 @@ class CAPTURE_EXPORT VideoCaptureDevice {
virtual size_t mapped_size() const = 0;
virtual void* data(int plane) = 0;
void* data() { return data(0); }
- virtual ClientBuffer AsClientBuffer(int plane) = 0;
#if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS))
virtual base::FileDescriptor AsPlatformFile() = 0;
#endif
+ virtual bool IsBackedByVideoFrame() const = 0;
+ virtual scoped_refptr<VideoFrame> GetVideoFrame() = 0;
};
virtual ~Client() {}
@@ -109,6 +110,8 @@ class CAPTURE_EXPORT VideoCaptureDevice {
// additional copies in the browser process.
// See OnIncomingCapturedData for details of |reference_time| and
// |timestamp|.
+ // TODO(chfremer): Consider removing one of the two in order to simplify the
+ // interface.
virtual void OnIncomingCapturedBuffer(
std::unique_ptr<Buffer> buffer,
const VideoCaptureFormat& frame_format,
« no previous file with comments | « media/capture/video/video_capture_buffer_handle.h ('k') | media/capture/video/video_capture_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698