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

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

Issue 1106563002: FakeVideoCaptureDevice: add support for capturing into Dma-Bufs using VGEM in CrOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ermircan@ comments; removed GpuMemoryBuffer modifications (go in other CL) Created 5 years, 7 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/fake_video_capture_device.h
diff --git a/media/video/capture/fake_video_capture_device.h b/media/video/capture/fake_video_capture_device.h
index f4a19f9edb9c2c6611aa8d66cc15094f905ead7f..38d9e0b2f97c2bca3dbd2a6c30cc15dc1d907c0f 100644
--- a/media/video/capture/fake_video_capture_device.h
+++ b/media/video/capture/fake_video_capture_device.h
@@ -57,6 +57,15 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
int frame_count_;
VideoCaptureFormat capture_format_;
+#if defined(OS_CHROMEOS) && defined(USE_OZONE)
+ // |client_->ReserveOutputBuffer()| might give a Buffer with null data(), in
+ // that case and for certain platforms, we can try and map the underlying
+ // Buffer::AsPlatformFile(), which is a dma-buf. This can only happen via the
+ // VGEM API. VgemWrapper encapsulates all the operations regarding it.
+ class VgemWrapper;
+ scoped_ptr<VgemWrapper> vgem_wrapper_;
+#endif
+
// FakeVideoCaptureDevice post tasks to itself for frame construction and
// needs to deal with asynchronous StopAndDeallocate().
base::WeakPtrFactory<FakeVideoCaptureDevice> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698