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

Unified Diff: content/common/gpu/media/v4l2_device.h

Issue 1822983002: Support external buffer import in VDA interface and add a V4L2SVDA impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/common/gpu/media/v4l2_device.h
diff --git a/content/common/gpu/media/v4l2_device.h b/content/common/gpu/media/v4l2_device.h
index 0a88d7686d0cc21b84846eea85e4a52621574330..10905f6ad899db5d7df013e8d9c39642ecd2251b 100644
--- a/content/common/gpu/media/v4l2_device.h
+++ b/content/common/gpu/media/v4l2_device.h
@@ -103,18 +103,21 @@ class CONTENT_EXPORT V4L2Device
// for the current platform.
virtual bool CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) = 0;
- // Creates an EGLImageKHR since each V4L2Device may use a different method of
- // acquiring one and associating it to the given texture. The texture_id is
- // used to bind the texture to the returned EGLImageKHR. buffer_index can be
- // used to associate the returned EGLImageKHR by the underlying V4L2Device
- // implementation.
- virtual EGLImageKHR CreateEGLImage(EGLDisplay egl_display,
- EGLContext egl_context,
- GLuint texture_id,
- gfx::Size frame_buffer_size,
- unsigned int buffer_index,
- uint32_t v4l2_pixfmt,
- size_t num_v4l2_planes) = 0;
+ // Create an EGLImage from provided |dmabuf_fds| and bind |texture_id| to it.
+ // Some implementations may also require the V4L2 |buffer_index| of the buffer
+ // for which |dmabuf_fds| have been exported.
+ // The caller may choose to close the file descriptors after this method
+ // returns, and may expect the buffers to remain valid for the lifetime of
+ // the created EGLImage.
+ // Return EGL_NO_IMAGE_KHR on failure.
+ virtual EGLImageKHR CreateEGLImage(
+ EGLDisplay egl_display,
+ EGLContext egl_context,
+ GLuint texture_id,
+ const gfx::Size& size,
+ unsigned int buffer_index,
+ uint32_t v4l2_pixfmt,
+ const std::vector<base::ScopedFD>& dmabuf_fds) = 0;
// Destroys the EGLImageKHR.
virtual EGLBoolean DestroyEGLImage(EGLDisplay egl_display,
« no previous file with comments | « content/common/gpu/media/tegra_v4l2_device.cc ('k') | content/common/gpu/media/v4l2_slice_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698