} else {
guint gl_target = gst_gl_texture_target_to_gl (gl_mem->mem.tex_target);
+ if (!gl->EGLImageTargetTexture2D) {
+ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
+ "Required function glEGLImageTargetTexture2D() is not available for "
+ "attaching an EGLImage to a texture");
+ return FALSE;
+ }
+
gl->ActiveTexture (GL_TEXTURE0 + gl_mem->mem.plane);
gl->BindTexture (gl_target, gl_mem->mem.tex_id);
gl->EGLImageTargetTexture2D (gl_target,
#include "gl.h"
#include "gstglupload.h"
+#include "gstglfuncs.h"
#if GST_GL_HAVE_PLATFORM_EGL
#include "egl/gsteglimage.h"
GstCaps *ret;
if (context) {
+ const GstGLFuncs *gl = context->gl_vtable;
+
+ if (!gl->EGLImageTargetTexture2D)
+ return NULL;
+
/* Don't propose DMABuf caps feature unless it can be supported */
if (gst_gl_context_get_gl_platform (context) != GST_GL_PLATFORM_EGL)
return NULL;
n_mem = gst_buffer_n_memory (buffer);
meta = gst_buffer_get_video_meta (buffer);
+ if (!dmabuf->upload->context->gl_vtable->EGLImageTargetTexture2D)
+ return FALSE;
+
/* dmabuf upload is only supported with EGL contexts. */
if (gst_gl_context_get_gl_platform (dmabuf->upload->context) !=
GST_GL_PLATFORM_EGL)
GstCaps *ret;
if (context) {
+ const GstGLFuncs *gl = context->gl_vtable;
+
+ if (!gl->EGLImageTargetTexture2D)
+ return NULL;
+
/* Don't propose direct DMABuf caps feature unless it can be supported */
if (gst_gl_context_get_gl_platform (context) != GST_GL_PLATFORM_EGL)
return NULL;