| 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 d3dfe7289fd76eee835375d17279f4b23e75c906..e5e42f87ae328c66d8bed26e9497199423c21317 100644
|
| --- a/media/video/capture/video_capture_device.h
|
| +++ b/media/video/capture/video_capture_device.h
|
| @@ -23,7 +23,6 @@
|
| #include "media/base/media_export.h"
|
| #include "media/base/video_capture_types.h"
|
| #include "media/base/video_frame.h"
|
| -#include "ui/gfx/gpu_memory_buffer.h"
|
|
|
| namespace media {
|
|
|
| @@ -196,13 +195,15 @@
|
| class MEDIA_EXPORT Client {
|
| public:
|
| // Memory buffer returned by Client::ReserveOutputBuffer().
|
| - class MEDIA_EXPORT Buffer {
|
| + class Buffer : public base::RefCountedThreadSafe<Buffer> {
|
| public:
|
| - virtual ~Buffer() = 0;
|
| virtual int id() const = 0;
|
| + virtual void* data() const = 0;
|
| virtual size_t size() const = 0;
|
| - virtual void* data() = 0;
|
| - virtual ClientBuffer AsClientBuffer() = 0;
|
| +
|
| + protected:
|
| + friend class base::RefCountedThreadSafe<Buffer>;
|
| + virtual ~Buffer() {}
|
| };
|
|
|
| virtual ~Client() {}
|
| @@ -240,25 +241,20 @@
|
| // backing, but functions as a reservation for external input for the
|
| // purposes of buffer throttling.
|
| //
|
| - // The output buffer stays reserved and mapped for use until the Buffer
|
| - // object is destroyed or returned.
|
| - virtual scoped_ptr<Buffer> ReserveOutputBuffer(
|
| + // The output buffer stays reserved for use until the Buffer object is
|
| + // destroyed.
|
| + virtual scoped_refptr<Buffer> ReserveOutputBuffer(
|
| media::VideoPixelFormat format,
|
| const gfx::Size& dimensions) = 0;
|
|
|
| - // Captured new video data, held in |frame| or |buffer|, respectively for
|
| - // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer().
|
| + // Captured a new video frame, held in |frame|.
|
| //
|
| - // In both cases, as the frame is backed by a reservation returned by
|
| + // As the frame is backed by a reservation returned by
|
| // ReserveOutputBuffer(), delivery is guaranteed and will require no
|
| // additional copies in the browser process.
|
| - virtual void OnIncomingCapturedBuffer(
|
| - scoped_ptr<Buffer> buffer,
|
| - const VideoCaptureFormat& frame_format,
|
| - const base::TimeTicks& timestamp) = 0;
|
| virtual void OnIncomingCapturedVideoFrame(
|
| - scoped_ptr<Buffer> buffer,
|
| - const scoped_refptr<VideoFrame>& frame,
|
| + const scoped_refptr<Buffer>& buffer,
|
| + const scoped_refptr<media::VideoFrame>& frame,
|
| const base::TimeTicks& timestamp) = 0;
|
|
|
| // An error has occurred that cannot be handled and VideoCaptureDevice must
|
|
|