From e80337e374b18ffd4d100301b2f691dbf545ca31 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 17 Nov 2016 18:00:39 +1100 Subject: [PATCH] gl/egl: remove use of texture orientation --- gst-libs/gst/gl/egl/gsteglimage.c | 31 ++++++---------------------- gst-libs/gst/gl/egl/gsteglimage.h | 4 ---- gst-libs/gst/gl/egl/gstglmemoryegl.c | 17 --------------- gst-libs/gst/gl/egl/gstglmemoryegl.h | 3 --- 4 files changed, 6 insertions(+), 49 deletions(-) diff --git a/gst-libs/gst/gl/egl/gsteglimage.c b/gst-libs/gst/gl/egl/gsteglimage.c index ed1292a434..c87adf3b95 100644 --- a/gst-libs/gst/gl/egl/gsteglimage.c +++ b/gst-libs/gst/gl/egl/gsteglimage.c @@ -115,21 +115,6 @@ gst_egl_image_get_image (GstEGLImage * image) return image->image; } -/** - * gst_egl_image_get_orientation: - * @image: a #GstEGLImage - * - * Returns: the orientation of @image - */ -GstVideoGLTextureOrientation -gst_egl_image_get_orientation (GstEGLImage * image) -{ - g_return_val_if_fail (GST_IS_EGL_IMAGE (image), - GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL); - - return image->orientation; -} - static void _gst_egl_image_free_thread (GstGLContext * context, GstEGLImage * image) { @@ -160,7 +145,6 @@ _gst_egl_image_copy (GstMiniObject * obj) * @context: a #GstGLContext (must be an EGL context) * @image: the image to wrap * @type: the #GstVideoGLTextureType - * @orientation: the #GstVideoGLTextureOrientation * @user_data: user data * @user_data_destroy: called when @user_data is no longer needed * @@ -168,8 +152,8 @@ _gst_egl_image_copy (GstMiniObject * obj) */ GstEGLImage * gst_egl_image_new_wrapped (GstGLContext * context, EGLImageKHR image, - GstVideoGLTextureType type, GstVideoGLTextureOrientation orientation, - gpointer user_data, GstEGLImageDestroyNotify user_data_destroy) + GstVideoGLTextureType type, gpointer user_data, + GstEGLImageDestroyNotify user_data_destroy) { GstEGLImage *img = NULL; @@ -186,7 +170,6 @@ gst_egl_image_new_wrapped (GstGLContext * context, EGLImageKHR image, img->context = gst_object_ref (context); img->image = image; img->type = type; - img->orientation = orientation; img->destroy_data = user_data; img->destroy_notify = user_data_destroy; @@ -346,9 +329,8 @@ gst_egl_image_from_texture (GstGLContext * context, GstGLMemory * gl_mem, if (!img) return NULL; - return gst_egl_image_new_wrapped (context, img, gl_mem->tex_type, - GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL, - NULL, (GstEGLImageDestroyNotify) _destroy_egl_image); + return gst_egl_image_new_wrapped (context, img, gl_mem->tex_type, NULL, + (GstEGLImageDestroyNotify) _destroy_egl_image); } #if GST_GL_HAVE_DMABUF @@ -479,8 +461,7 @@ gst_egl_image_from_dmabuf (GstGLContext * context, return NULL; } - return gst_egl_image_new_wrapped (context, img, type, - GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL, - NULL, (GstEGLImageDestroyNotify) _destroy_egl_image); + return gst_egl_image_new_wrapped (context, img, type, NULL, + (GstEGLImageDestroyNotify) _destroy_egl_image); } #endif /* GST_GL_HAVE_DMABUF */ diff --git a/gst-libs/gst/gl/egl/gsteglimage.h b/gst-libs/gst/gl/egl/gsteglimage.h index 0b93e1007f..9499952fc9 100644 --- a/gst-libs/gst/gl/egl/gsteglimage.h +++ b/gst-libs/gst/gl/egl/gsteglimage.h @@ -54,8 +54,6 @@ struct _GstEGLImage GstGLContext *context; EGLImageKHR image; GstVideoGLTextureType type; - /* FIXME: remove this and use the affine transformation meta instead */ - GstVideoGLTextureOrientation orientation; /* */ gpointer destroy_data; @@ -67,11 +65,9 @@ struct _GstEGLImage GstEGLImage * gst_egl_image_new_wrapped (GstGLContext * context, EGLImageKHR image, GstVideoGLTextureType type, - GstVideoGLTextureOrientation orientation, gpointer user_data, GstEGLImageDestroyNotify user_data_destroy); EGLImageKHR gst_egl_image_get_image (GstEGLImage * image); -GstVideoGLTextureOrientation gst_egl_image_get_orientation (GstEGLImage * image); GstEGLImage * gst_egl_image_from_texture (GstGLContext * context, GstGLMemory * gl_mem, diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c index 8c23122bf8..8ce752317f 100644 --- a/gst-libs/gst/gl/egl/gstglmemoryegl.c +++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c @@ -104,23 +104,6 @@ gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem) context)->egl_display; } -/** - * gst_gl_memory_egl_get_orientation: - * @mem: a #GstGLMemoryEGL - * - * Returns: The orientation of @mem - * - * Since: 1.10 - */ -GstVideoGLTextureOrientation -gst_gl_memory_egl_get_orientation (GstGLMemoryEGL * mem) -{ - g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)), - GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL); - - return gst_egl_image_get_orientation (_gl_mem_get_parent (mem)->image); -} - static GstMemory * _gl_mem_alloc (GstAllocator * allocator, gsize size, GstAllocationParams * params) diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.h b/gst-libs/gst/gl/egl/gstglmemoryegl.h index 78f962a788..587955226f 100644 --- a/gst-libs/gst/gl/egl/gstglmemoryegl.h +++ b/gst-libs/gst/gl/egl/gstglmemoryegl.h @@ -73,9 +73,6 @@ gboolean gst_is_gl_memory_egl (GstMemory * mem); EGLImageKHR gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem); EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem); -GstVideoGLTextureOrientation gst_gl_memory_egl_get_orientation - (GstGLMemoryEGL * mem); - /** * GstGLMemoryEGLAllocator *