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

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

Issue 1064963002: VideoCapture: add support for GpuMemoryBuffer allocation and lifetime mgmt in VideoCaptureBufferPool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 e5e42f87ae328c66d8bed26e9497199423c21317..5470e97f5b1e765d4ca71385a53c31d55f9f869d 100644
--- a/media/video/capture/video_capture_device.h
+++ b/media/video/capture/video_capture_device.h
@@ -23,6 +23,7 @@
#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 {
@@ -198,8 +199,9 @@ class MEDIA_EXPORT VideoCaptureDevice {
class Buffer : public base::RefCountedThreadSafe<Buffer> {
public:
virtual int id() const = 0;
- virtual void* data() const = 0;
virtual size_t size() const = 0;
+ virtual scoped_ptr<DataHandle> GetDataHandle() = 0;
miu 2015/04/15 19:12:40 Having a second level of acquiring a buffer seems
mcasas 2015/04/16 03:11:22 SG, with that assumption in mind and after double
+ virtual ClientBuffer AsClientBuffer() = 0;
protected:
friend class base::RefCountedThreadSafe<Buffer>;
@@ -247,14 +249,19 @@ class MEDIA_EXPORT VideoCaptureDevice {
media::VideoPixelFormat format,
const gfx::Size& dimensions) = 0;
- // Captured a new video frame, held in |frame|.
+ // Captured new video data, held in |frame| or |buffer|, respectively for
+ // OnIncomingCapturedVideoFrame() and OnIncomingCapturedBuffer().
//
- // As the frame is backed by a reservation returned by
+ // 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.
+ virtual void OnIncomingCapturedBuffer(
+ const scoped_refptr<Buffer>& buffer,
+ const VideoCaptureFormat& frame_format,
+ const base::TimeTicks& timestamp) = 0;
virtual void OnIncomingCapturedVideoFrame(
const scoped_refptr<Buffer>& buffer,
- const scoped_refptr<media::VideoFrame>& frame,
+ const scoped_refptr<VideoFrame>& frame,
const base::TimeTicks& timestamp) = 0;
// An error has occurred that cannot be handled and VideoCaptureDevice must

Powered by Google App Engine
This is Rietveld 408576698