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

Unified Diff: content/common/gpu/media/exynos_v4l2_video_device.cc

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/exynos_v4l2_video_device.cc
diff --git a/content/common/gpu/media/exynos_v4l2_video_device.cc b/content/common/gpu/media/exynos_v4l2_video_device.cc
index ef40cf0e6854e4a7a9b90aa24d038bfb60977432..a01821f66bb23800b6fe649f792c10eac3116fd4 100644
--- a/content/common/gpu/media/exynos_v4l2_video_device.cc
+++ b/content/common/gpu/media/exynos_v4l2_video_device.cc
@@ -12,6 +12,7 @@
#include "base/debug/trace_event.h"
#include "base/posix/eintr_wrapper.h"
#include "content/common/gpu/media/exynos_v4l2_video_device.h"
+#include "ui/gl/gl_bindings.h"
namespace content {
@@ -114,4 +115,24 @@ bool ExynosV4L2Device::Initialize() {
}
return true;
}
+
+EGLImageKHR ExynosV4L2Device::CreateEGLImage(EGLDisplay egl_display,
+ EGLint attrib[],
+ unsigned int texture_id,
+ unsigned int buffer_index) {
Ami GONE FROM CHROMIUM 2014/02/07 09:09:30 Please /* comment out */ unused params.
+ EGLImageKHR egl_image = eglCreateImageKHR(
Pawel Osciak 2014/02/10 06:36:17 We need to make GL context current to be able to c
shivdasp 2014/02/14 03:06:45 make_context_current_ is already done before calli
Pawel Osciak 2014/02/14 07:36:10 Yes, I'm just saying this method should explicitly
+ egl_display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, NULL, attrib);
+ if (egl_image == EGL_NO_IMAGE_KHR) {
+ DLOG(ERROR) << "CreateEGLImage(): could not create EGLImageKHR";
+ return egl_image;
+ }
+ glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_id);
+ glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, egl_image);
+ return egl_image;
+}
+
+unsigned int ExynosV4L2Device::GetTextureTarget() {
+ return GL_TEXTURE_EXTERNAL_OES;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698