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

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

Issue 12090109: Tab Capture: Backing store readbacks to YV12 VideoFrames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trim some trailing whitespace. Created 7 years, 10 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/video/capture/video_capture_device.h
diff --git a/media/video/capture/video_capture_device.h b/media/video/capture/video_capture_device.h
index fdfd8bea25b94fed9848241e5745323f8bdffd4a..d66c652397db96c875f2a5a3dcc73a59fd9eee38 100644
--- a/media/video/capture/video_capture_device.h
+++ b/media/video/capture/video_capture_device.h
@@ -36,15 +36,23 @@ class MEDIA_EXPORT VideoCaptureDevice {
class MEDIA_EXPORT EventHandler {
public:
- // Captured a new video frame.
+ // Captured a new video frame as a raw buffer. The size, color format, and
+ // layout are taken from the parameters specified by an earlier call to
+ // OnFrameInfo. |data| must be packed, with no padding between rows and/or
scherkus (not reviewing) 2013/02/05 22:40:44 pedantic nit: similar to using || around variable
ncarter (slow) 2013/02/06 23:54:44 Done.
+ // color planes.
virtual void OnIncomingCapturedFrame(const uint8* data,
int length,
base::Time timestamp) = 0;
+ // Captured a new video frame, held in a VideoFrame container. |frame| must
+ // be allocated as RGB32, YV12 or I420, and the size must match that
+ // specified by an earlier call to OnFrameInfo.
scherkus (not reviewing) 2013/02/05 22:40:44 s/OnFrameInfo/OnFrameInfo()/
ncarter (slow) 2013/02/06 23:54:44 Done.
+ virtual void OnIncomingCapturedVideoFrame(media::VideoFrame* frame,
scherkus (not reviewing) 2013/02/05 22:40:44 I'm firmly in the camp that likes uses const scope
ncarter (slow) 2013/02/06 23:54:44 Changing T*'s to const scoped_refptr<T>&'s would b
scherkus (not reviewing) 2013/02/07 18:25:03 SGTM
+ base::Time timestamp) = 0;
scherkus (not reviewing) 2013/02/05 22:40:44 FYI VideoFrame has a Get/SetTimestamp() field, alt
ncarter (slow) 2013/02/06 23:54:44 Yeah, I'm aware of that and I think it would be ni
scherkus (not reviewing) 2013/02/07 18:25:03 Agreed -- I believe VF (and other media buffer-ish
// An error has occurred that can not be handled
// and VideoCaptureDevice must be DeAllocated.
virtual void OnError() = 0;
// Called when VideoCaptureDevice::Allocate has been called
- // to inform of the resulting frame size and color format.
+ // to inform of the resulting frame size.
virtual void OnFrameInfo(const VideoCaptureCapability& info) = 0;
protected:

Powered by Google App Engine
This is Rietveld 408576698