gl/egl: remove use of texture orientation

This commit is contained in:
Matthew Waters 2016-11-17 18:00:39 +11:00 committed by Tim-Philipp Müller
parent db34024172
commit e80337e374
4 changed files with 6 additions and 49 deletions

View file

@ -115,21 +115,6 @@ gst_egl_image_get_image (GstEGLImage * image)
return image->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 static void
_gst_egl_image_free_thread (GstGLContext * context, GstEGLImage * image) _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) * @context: a #GstGLContext (must be an EGL context)
* @image: the image to wrap * @image: the image to wrap
* @type: the #GstVideoGLTextureType * @type: the #GstVideoGLTextureType
* @orientation: the #GstVideoGLTextureOrientation
* @user_data: user data * @user_data: user data
* @user_data_destroy: called when @user_data is no longer needed * @user_data_destroy: called when @user_data is no longer needed
* *
@ -168,8 +152,8 @@ _gst_egl_image_copy (GstMiniObject * obj)
*/ */
GstEGLImage * GstEGLImage *
gst_egl_image_new_wrapped (GstGLContext * context, EGLImageKHR image, gst_egl_image_new_wrapped (GstGLContext * context, EGLImageKHR image,
GstVideoGLTextureType type, GstVideoGLTextureOrientation orientation, GstVideoGLTextureType type, gpointer user_data,
gpointer user_data, GstEGLImageDestroyNotify user_data_destroy) GstEGLImageDestroyNotify user_data_destroy)
{ {
GstEGLImage *img = NULL; GstEGLImage *img = NULL;
@ -186,7 +170,6 @@ gst_egl_image_new_wrapped (GstGLContext * context, EGLImageKHR image,
img->context = gst_object_ref (context); img->context = gst_object_ref (context);
img->image = image; img->image = image;
img->type = type; img->type = type;
img->orientation = orientation;
img->destroy_data = user_data; img->destroy_data = user_data;
img->destroy_notify = user_data_destroy; img->destroy_notify = user_data_destroy;
@ -346,9 +329,8 @@ gst_egl_image_from_texture (GstGLContext * context, GstGLMemory * gl_mem,
if (!img) if (!img)
return NULL; return NULL;
return gst_egl_image_new_wrapped (context, img, gl_mem->tex_type, return gst_egl_image_new_wrapped (context, img, gl_mem->tex_type, NULL,
GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL, (GstEGLImageDestroyNotify) _destroy_egl_image);
NULL, (GstEGLImageDestroyNotify) _destroy_egl_image);
} }
#if GST_GL_HAVE_DMABUF #if GST_GL_HAVE_DMABUF
@ -479,8 +461,7 @@ gst_egl_image_from_dmabuf (GstGLContext * context,
return NULL; return NULL;
} }
return gst_egl_image_new_wrapped (context, img, type, return gst_egl_image_new_wrapped (context, img, type, NULL,
GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL, (GstEGLImageDestroyNotify) _destroy_egl_image);
NULL, (GstEGLImageDestroyNotify) _destroy_egl_image);
} }
#endif /* GST_GL_HAVE_DMABUF */ #endif /* GST_GL_HAVE_DMABUF */

View file

@ -54,8 +54,6 @@ struct _GstEGLImage
GstGLContext *context; GstGLContext *context;
EGLImageKHR image; EGLImageKHR image;
GstVideoGLTextureType type; GstVideoGLTextureType type;
/* FIXME: remove this and use the affine transformation meta instead */
GstVideoGLTextureOrientation orientation;
/* <private> */ /* <private> */
gpointer destroy_data; gpointer destroy_data;
@ -67,11 +65,9 @@ struct _GstEGLImage
GstEGLImage * gst_egl_image_new_wrapped (GstGLContext * context, GstEGLImage * gst_egl_image_new_wrapped (GstGLContext * context,
EGLImageKHR image, EGLImageKHR image,
GstVideoGLTextureType type, GstVideoGLTextureType type,
GstVideoGLTextureOrientation orientation,
gpointer user_data, gpointer user_data,
GstEGLImageDestroyNotify user_data_destroy); GstEGLImageDestroyNotify user_data_destroy);
EGLImageKHR gst_egl_image_get_image (GstEGLImage * image); EGLImageKHR gst_egl_image_get_image (GstEGLImage * image);
GstVideoGLTextureOrientation gst_egl_image_get_orientation (GstEGLImage * image);
GstEGLImage * gst_egl_image_from_texture (GstGLContext * context, GstEGLImage * gst_egl_image_from_texture (GstGLContext * context,
GstGLMemory * gl_mem, GstGLMemory * gl_mem,

View file

@ -104,23 +104,6 @@ gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem)
context)->egl_display; 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 * static GstMemory *
_gl_mem_alloc (GstAllocator * allocator, gsize size, _gl_mem_alloc (GstAllocator * allocator, gsize size,
GstAllocationParams * params) GstAllocationParams * params)

View file

@ -73,9 +73,6 @@ gboolean gst_is_gl_memory_egl (GstMemory * mem);
EGLImageKHR gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem); EGLImageKHR gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem);
EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem); EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem);
GstVideoGLTextureOrientation gst_gl_memory_egl_get_orientation
(GstGLMemoryEGL * mem);
/** /**
* GstGLMemoryEGLAllocator * GstGLMemoryEGLAllocator
* *