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

Unified Diff: content/browser/renderer_host/media/video_capture_device_client.h

Issue 1090273006: Revert of 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: content/browser/renderer_host/media/video_capture_device_client.h
diff --git a/content/browser/renderer_host/media/video_capture_device_client.h b/content/browser/renderer_host/media/video_capture_device_client.h
index afb695487133751f82a0019fc02937a629812b68..7da95da8e75174d4440a68122547119bed32c8d0 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.h
+++ b/content/browser/renderer_host/media/video_capture_device_client.h
@@ -24,18 +24,12 @@
// often be called on some auxiliary thread depending on the platform and the
// device type; including, for example, the DirectShow thread on Windows, the
// v4l2_thread on Linux, and the UI thread for tab capture.
-//
-// It has an internal ref counted TextureWrapHelper class used to wrap incoming
-// GpuMemoryBuffers into Texture backed VideoFrames. This class creates and
-// manages the necessary entities to interact with the GPU process, notably an
-// offscreen Context to avoid janking the UI thread.
class CONTENT_EXPORT VideoCaptureDeviceClient
: public media::VideoCaptureDevice::Client {
public:
VideoCaptureDeviceClient(
const base::WeakPtr<VideoCaptureController>& controller,
- const scoped_refptr<VideoCaptureBufferPool>& buffer_pool,
- const scoped_refptr<base::SingleThreadTaskRunner>& capture_task_runner);
+ const scoped_refptr<VideoCaptureBufferPool>& buffer_pool);
~VideoCaptureDeviceClient() override;
// VideoCaptureDevice::Client implementation.
@@ -53,13 +47,11 @@
const media::VideoCaptureFormat& frame_format,
int clockwise_rotation,
const base::TimeTicks& timestamp) override;
- scoped_ptr<Buffer> ReserveOutputBuffer(media::VideoPixelFormat format,
- const gfx::Size& dimensions) override;
- void OnIncomingCapturedBuffer(scoped_ptr<Buffer> buffer,
- const media::VideoCaptureFormat& frame_format,
- const base::TimeTicks& timestamp) override;
+ scoped_refptr<Buffer> ReserveOutputBuffer(
+ media::VideoPixelFormat format,
+ const gfx::Size& dimensions) override;
void OnIncomingCapturedVideoFrame(
- scoped_ptr<Buffer> buffer,
+ const scoped_refptr<Buffer>& buffer,
const scoped_refptr<media::VideoFrame>& frame,
const base::TimeTicks& timestamp) override;
void OnError(const std::string& reason) override;
@@ -72,13 +64,6 @@
// The pool of shared-memory buffers used for capturing.
const scoped_refptr<VideoCaptureBufferPool> buffer_pool_;
- // Internal delegate for GpuMemoryBuffer-into-VideoFrame wrapping.
- class TextureWrapHelper;
- scoped_refptr<TextureWrapHelper> texture_wrap_helper_;
- // Reference to Capture Thread task runner, where |texture_wrap_helper_|
- // lives.
- const scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
-
media::VideoPixelFormat last_captured_pixel_format_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceClient);

Powered by Google App Engine
This is Rietveld 408576698