| 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,
|
|
|