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

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

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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_video_device.h
diff --git a/content/common/gpu/media/v4l2_video_device.h b/content/common/gpu/media/v4l2_video_device.h
index 92bc02fac25175b13582ea64d366c2c3b2406df4..4e89e559de92d9d346dfd0f9d873ec3787692fa1 100644
--- a/content/common/gpu/media/v4l2_video_device.h
+++ b/content/common/gpu/media/v4l2_video_device.h
@@ -9,6 +9,8 @@
#ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_
#define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_
+#include "ui/gl/gl_bindings.h"
+
namespace content {
class V4L2Device {
@@ -19,7 +21,7 @@ class V4L2Device {
// Tries to create and initialize an appropriate V4L2Device object for the
// current platform and returns a scoped_ptr<V4L2Device> on success else
// returns NULL.
- static scoped_ptr<V4L2Device> Create();
+ static scoped_ptr<V4L2Device> Create(EGLContext egl_context);
// Parameters and return value are the same as for the standard ioctl() system
// call.
@@ -50,7 +52,23 @@ class V4L2Device {
int flags,
unsigned int offset) = 0;
virtual void Munmap(void* addr, unsigned int len) = 0;
+
+ // Does all the initialization of V4L2Device, returns true on success.
+ virtual bool Initialize() = 0;
+
+ // This method is used to create the EglImage since each V4L2Device
+ // may have its own format. The texture_id is used to bind the
+ // texture to the created eglImage. buffer_index can be used to associate
+ // the created EglImage by the underlying V4L2Device implementation.
+ virtual EGLImageKHR CreateEGLImage(EGLDisplay egl_display,
+ EGLint attrib[],
sheu 2014/03/06 08:51:34 Can we make this a "const EGLint*" argument instea
shivdasp 2014/03/06 11:10:09 Done.
+ unsigned int texture_id,
sheu 2014/03/06 08:51:34 texture_id should be GLuint
shivdasp 2014/03/06 11:10:09 Done.
+ unsigned int buffer_index) = 0;
+
+ // This method returns the supported texture target for the V4L2Device.
+ virtual unsigned int GetTextureTarget() = 0;
sheu 2014/03/06 08:51:34 GL texture targets are GLenum types. Also: would
shivdasp 2014/03/06 11:10:09 Done.
};
+
} // namespace content
#endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_

Powered by Google App Engine
This is Rietveld 408576698