diff options
author | Julien Isorce <julien.isorce@collabora.co.uk> | 2014-04-15 17:11:08 +0100 |
---|---|---|
committer | Julien Isorce <julien.isorce@collabora.co.uk> | 2014-04-15 18:32:12 +0100 |
commit | 499fb23e9c9979d3afc525534159ea7e5ae14206 (patch) | |
tree | 28d327b389ad8ecf8c55a7c2d16f7131f523088f | |
parent | d4bb7cb4c74e8d455e1c53d32c9a1106cd8c2d27 (diff) | |
download | gst-omx-499fb23e9c9979d3afc525534159ea7e5ae14206.tar.gz |
omxvideodec: use new libgstgl API since libgstegl has been removed
There is no point to retrieve a ref/unref type
instead of an EGLDisplay directly. It's like for EGLImage.
https://bugzilla.gnome.org/show_bug.cgi?id=703343
-rw-r--r-- | omx/gstomxvideodec.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 5483a89..79ed1f6 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -37,7 +37,8 @@ #endif #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) -#include <gst/egl/egl.h> +#include <gst/gl/gl.h> +#include <gst/gl/egl/gsteglimagememory.h> #endif #if defined (USE_OMX_TARGET_RPI) && defined(__GNUC__) @@ -611,7 +612,7 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) GList *images = NULL; gint i; GstBufferPoolAcquireParams params = { 0, }; - GstEGLDisplay *display = NULL; + EGLDisplay egl_display = EGL_NO_DISPLAY; GST_DEBUG_OBJECT (self, "Trying to allocate %d EGLImages", min); @@ -629,9 +630,6 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) g_list_free (images); buffers = NULL; images = NULL; - if (display) - gst_egl_display_unref (display); - display = NULL; /* TODO: For non-RPi targets we want to use the normal memory code below */ /* Retry without EGLImage */ err = OMX_ErrorUndefined; @@ -642,8 +640,8 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) gst_egl_image_memory_set_orientation (mem, GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_FLIP); images = g_list_append (images, gst_egl_image_memory_get_image (mem)); - if (!display) - display = gst_egl_image_memory_get_display (mem); + if (egl_display == EGL_NO_DISPLAY) + egl_display = gst_egl_image_memory_get_display (mem); } GST_DEBUG_OBJECT (self, "Allocated %d EGLImages successfully", min); @@ -651,14 +649,10 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self) /* Everything went fine? */ if (eglimage) { GST_DEBUG_OBJECT (self, "Setting EGLDisplay"); - self->egl_out_port->port_def.format.video.pNativeWindow = - gst_egl_display_get (display); + self->egl_out_port->port_def.format.video.pNativeWindow = egl_display; err = gst_omx_port_update_port_definition (self->egl_out_port, &self->egl_out_port->port_def); - if (display) - gst_egl_display_unref (display); - display = NULL; if (err != OMX_ErrorNone) { GST_INFO_OBJECT (self, "Failed to set EGLDisplay on port: %s (0x%08x)", |