| Index: media/gpu/v4l2_image_processor.h
|
| diff --git a/media/gpu/v4l2_image_processor.h b/media/gpu/v4l2_image_processor.h
|
| index 3e456b9c32158683e323854eaf268fae5f0485f2..61bf1055a006713ad7beee77cb3b1c8ca13b682d 100644
|
| --- a/media/gpu/v4l2_image_processor.h
|
| +++ b/media/gpu/v4l2_image_processor.h
|
| @@ -41,6 +41,7 @@ class MEDIA_GPU_EXPORT V4L2ImageProcessor {
|
| bool Initialize(VideoPixelFormat input_format,
|
| VideoPixelFormat output_format,
|
| v4l2_memory input_memory_type,
|
| + v4l2_memory output_memory_type,
|
| gfx::Size input_visible_size,
|
| gfx::Size input_allocated_size,
|
| gfx::Size output_visible_size,
|
| @@ -84,9 +85,12 @@ class MEDIA_GPU_EXPORT V4L2ImageProcessor {
|
| // Called by client to process |frame|. The resulting processed frame will be
|
| // stored in |output_buffer_index| output buffer and notified via |cb|. The
|
| // processor will drop all its references to |frame| after it finishes
|
| - // accessing it.
|
| + // accessing it. If |output_memory_type_| is V4L2_MEMORY_DMABUF, the caller
|
| + // should pass non-empty |output_dmabuf_fds| and the processed frame will be
|
| + // stored in those buffers.
|
| void Process(const scoped_refptr<VideoFrame>& frame,
|
| int output_buffer_index,
|
| + std::vector<base::ScopedFD> output_dmabuf_fds,
|
| const FrameReadyCB& cb);
|
|
|
| // Stop all processing and clean up. After this method returns no more
|
| @@ -106,8 +110,10 @@ class MEDIA_GPU_EXPORT V4L2ImageProcessor {
|
| // Record for output buffers.
|
| struct OutputRecord {
|
| OutputRecord();
|
| + OutputRecord(OutputRecord&&) = default;
|
| ~OutputRecord();
|
| bool at_device;
|
| + std::vector<base::ScopedFD> dmabuf_fds;
|
| };
|
|
|
| // Job record. Jobs are processed in a FIFO order. This is separate from
|
| @@ -119,6 +125,7 @@ class MEDIA_GPU_EXPORT V4L2ImageProcessor {
|
| ~JobRecord();
|
| scoped_refptr<VideoFrame> frame;
|
| int output_buffer_index;
|
| + std::vector<base::ScopedFD> output_dmabuf_fds;
|
| FrameReadyCB ready_cb;
|
| };
|
|
|
| @@ -161,6 +168,7 @@ class MEDIA_GPU_EXPORT V4L2ImageProcessor {
|
| VideoPixelFormat input_format_;
|
| VideoPixelFormat output_format_;
|
| v4l2_memory input_memory_type_;
|
| + v4l2_memory output_memory_type_;
|
| uint32_t input_format_fourcc_;
|
| uint32_t output_format_fourcc_;
|
|
|
|
|