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

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: fixed a small issue Created 6 years, 9 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..da7cf6dfdecc911f85edeccc08bdbb111df8aa1c 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
Pawel Osciak 2014/03/25 08:21:08 s/the EglImage/an EGLImage/
shivdasp 2014/03/25 10:36:40 Done.
+ // may have its own format. The texture_id is used to bind the
Pawel Osciak 2014/03/25 08:21:08 s/format/may use a different method of acquiring o
shivdasp 2014/03/25 10:36:40 Done.
Pawel Osciak 2014/03/27 05:18:06 If I may suggest please, it is an agreed practice
shivdasp 2014/03/27 05:40:37 Apologies. I missed it. Will make a note of this.
+ // 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,
+ const EGLint* attrib,
+ GLuint texture_id,
+ unsigned int buffer_index) = 0;
+
+ // This method returns the supported texture target for the V4L2Device.
+ virtual GLenum GetTextureTarget() = 0;
};
+
} // namespace content
#endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DEVICE_H_

Powered by Google App Engine
This is Rietveld 408576698