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

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

Issue 2618173002: Revert of Reland [Mojo Video Capture] Replace method OnIncomingCapturedVideoFrame() with OnIncomingCapturedBuf (Closed)
Patch Set: Created 3 years, 11 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 0ac1c3b94b25083d33e3013f4c738d7660979192..e5612673aa8901422ef242e9db9cbd1336e8e9ff 100644
--- a/media/capture/video/video_capture_device.h
+++ b/media/capture/video/video_capture_device.h
@@ -147,30 +147,28 @@
VideoPixelStorage storage,
int frame_feedback_id) = 0;
- // Provides VCD::Client with a populated Buffer containing the content of
- // the next video frame. The |buffer| must originate from an earlier call to
- // ReserveOutputBuffer().
+ // Captured new video data, held in |frame| or |buffer|, respectively for
+ // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer().
+ //
+ // In both cases, as the frame is backed by a reservation returned by
+ // ReserveOutputBuffer(), delivery is guaranteed and will require no
+ // 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& format,
base::TimeTicks reference_time,
base::TimeDelta timestamp) = 0;
-
- // Extended version of OnIncomingCapturedBuffer() allowing clients to
- // pass a custom |visible_rect| and |additional_metadata|.
- virtual void OnIncomingCapturedBufferExt(
+ virtual void OnIncomingCapturedVideoFrame(
std::unique_ptr<Buffer> buffer,
- const VideoCaptureFormat& format,
- base::TimeTicks reference_time,
- base::TimeDelta timestamp,
- gfx::Rect visible_rect,
- const VideoFrameMetadata& additional_metadata) = 0;
+ scoped_refptr<VideoFrame> frame) = 0;
// Attempts to reserve the same Buffer provided in the last call to one of
- // the OnIncomingCapturedBufferXXX() methods. This will fail if the content
- // of the Buffer has not been preserved, or if the |dimensions|, |format|,
- // or |storage| disagree with how it was reserved via ReserveOutputBuffer().
+ // the OnIncomingCapturedXXX() methods. This will fail if the content of the
+ // Buffer has not been preserved, or if the |dimensions|, |format|, or
+ // |storage| disagree with how it was reserved via ReserveOutputBuffer().
// When this operation fails, nullptr will be returned.
virtual std::unique_ptr<Buffer> ResurrectLastOutputBuffer(
const gfx::Size& dimensions,
« no previous file with comments | « media/capture/video/linux/v4l2_capture_delegate_unittest.cc ('k') | media/capture/video/video_capture_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698