mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
texture: drop support for VA/GLX interfaces.
The VA/GLX interfaces are obsolete. They used to exist for XvBA, and ease of use, but they had other caveats to deal with. It's now better to move on to legacy mode, whereby VA/GLX interop is two be provided through (i) X11 Pixmap, and (ii) other modern means of buffer sharing. https://bugzilla.gnome.org/show_bug.cgi?id=736711
This commit is contained in:
parent
0a108653f2
commit
1799b362a3
5 changed files with 4 additions and 69 deletions
18
configure.ac
18
configure.ac
|
@ -48,14 +48,12 @@ m4_define([va_api_version], [0.30.4])
|
|||
m4_define([va_api_enc_version], [0.34.0])
|
||||
m4_define([va_api_drm_version], [0.33.0])
|
||||
m4_define([va_api_x11_version], [0.31.0])
|
||||
m4_define([va_api_glx_version], [0.32.0])
|
||||
m4_define([va_api_wld_version], [0.33.0])
|
||||
|
||||
# libva package version number
|
||||
m4_define([libva_enc_package_version], [1.2.0])
|
||||
m4_define([libva_drm_package_version], [1.1.0])
|
||||
m4_define([libva_x11_package_version], [1.0.3])
|
||||
m4_define([libva_glx_package_version], [1.0.9])
|
||||
m4_define([libva_wld_package_version], [1.1.0])
|
||||
|
||||
# gtk-doc version number
|
||||
|
@ -693,22 +691,6 @@ if test $USE_X11 -eq 1; then
|
|||
fi
|
||||
AC_SUBST(LIBVA_X11_PKGNAME)
|
||||
|
||||
dnl VA/GLX API
|
||||
HAVE_VA_GLX=0
|
||||
LIBVA_GLX_PKGNAME="libva-glx"
|
||||
if test $USE_GLX -eq 1; then
|
||||
PKG_CHECK_MODULES(LIBVA_GLX, [$LIBVA_GLX_PKGNAME >= va_api_glx_version],
|
||||
[HAVE_VA_GLX=1], [LIBVA_GLX_PKGNAME="$LIBVA_X11_PKGNAME"])
|
||||
|
||||
if test $HAVE_VA_GLX -eq 1; then
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$LIBVA_GLX_CFLAGS"
|
||||
AC_CHECK_HEADERS([va/va_glx.h], [:], [HAVE_VA_GLX=0])
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LIBVA_GLX_PKGNAME)
|
||||
|
||||
dnl Check for va_dec_jpeg.h header
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
||||
|
|
|
@ -389,7 +389,7 @@ libgstvaapi_glx_@GST_API_VERSION@_la_CFLAGS = \
|
|||
$(GST_BASE_CFLAGS) \
|
||||
$(GST_VIDEO_CFLAGS) \
|
||||
$(GL_CFLAGS) \
|
||||
$(LIBVA_GLX_CFLAGS) \
|
||||
$(LIBVA_X11_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
libgstvaapi_glx_@GST_API_VERSION@_la_LIBADD = \
|
||||
|
@ -399,7 +399,7 @@ libgstvaapi_glx_@GST_API_VERSION@_la_LIBADD = \
|
|||
$(GST_VIDEO_LIBS) \
|
||||
$(X11_LIBS) \
|
||||
$(GL_LIBS) \
|
||||
$(LIBVA_GLX_LIBS) \
|
||||
$(LIBVA_X11_LIBS) \
|
||||
libgstvaapi-x11-$(GST_API_VERSION).la \
|
||||
libgstvaapi-$(GST_API_VERSION).la \
|
||||
$(DLOPEN_LIBS) \
|
||||
|
|
|
@ -27,18 +27,6 @@
|
|||
|
||||
#include <va/va.h>
|
||||
|
||||
#ifdef HAVE_VA_VA_GLX_H
|
||||
# define USE_VAAPI_GLX 1
|
||||
#else
|
||||
# define USE_VAAPI_GLX 0
|
||||
#endif
|
||||
|
||||
#if USE_VAAPI_GLX
|
||||
# include <va/va_glx.h>
|
||||
#else
|
||||
# define vaGetDisplayGLX(dpy) vaGetDisplay(dpy)
|
||||
#endif
|
||||
|
||||
/* Compatibility glue with VA-API < 0.31 */
|
||||
#if !VA_CHECK_VERSION(0,31,0)
|
||||
#undef vaSyncSurface
|
||||
|
|
|
@ -48,11 +48,10 @@ gst_vaapi_display_glx_get_display_info (GstVaapiDisplay * display,
|
|||
const GstVaapiDisplayGLXClass *const klass =
|
||||
GST_VAAPI_DISPLAY_GLX_GET_CLASS (display);
|
||||
|
||||
info->va_display = vaGetDisplayGLX (GST_VAAPI_DISPLAY_XDISPLAY (display));
|
||||
if (!info->va_display)
|
||||
if (!klass->parent_get_display (display, info))
|
||||
return FALSE;
|
||||
info->display_type = GST_VAAPI_DISPLAY_TYPE_GLX;
|
||||
return klass->parent_get_display (display, info);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -76,15 +76,6 @@ struct _GstVaapiTextureClass
|
|||
static void
|
||||
_gst_vaapi_texture_destroy_objects (GstVaapiTexture * texture)
|
||||
{
|
||||
#if USE_VAAPI_GLX
|
||||
GST_VAAPI_OBJECT_LOCK_DISPLAY (texture);
|
||||
if (texture->gl_surface) {
|
||||
vaDestroySurfaceGLX (GST_VAAPI_OBJECT_VADISPLAY (texture),
|
||||
texture->gl_surface);
|
||||
texture->gl_surface = NULL;
|
||||
}
|
||||
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (texture);
|
||||
#else
|
||||
GLContextState old_cs;
|
||||
|
||||
GST_VAAPI_OBJECT_LOCK_DISPLAY (texture);
|
||||
|
@ -107,7 +98,6 @@ _gst_vaapi_texture_destroy_objects (GstVaapiTexture * texture)
|
|||
texture->gl_context = NULL;
|
||||
}
|
||||
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (texture);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -128,16 +118,6 @@ static gboolean
|
|||
_gst_vaapi_texture_create_objects (GstVaapiTexture * texture, GLuint texture_id)
|
||||
{
|
||||
gboolean success = FALSE;
|
||||
|
||||
#if USE_VAAPI_GLX
|
||||
VAStatus status;
|
||||
|
||||
GST_VAAPI_OBJECT_LOCK_DISPLAY (texture);
|
||||
status = vaCreateSurfaceGLX (GST_VAAPI_OBJECT_VADISPLAY (texture),
|
||||
texture->target, texture_id, &texture->gl_surface);
|
||||
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (texture);
|
||||
success = vaapi_check_status (status, "vaCreateSurfaceGLX()");
|
||||
#else
|
||||
GLContextState old_cs;
|
||||
|
||||
GST_VAAPI_OBJECT_LOCK_DISPLAY (texture);
|
||||
|
@ -160,7 +140,6 @@ _gst_vaapi_texture_create_objects (GstVaapiTexture * texture, GLuint texture_id)
|
|||
end:
|
||||
gl_set_current_context (&old_cs, NULL);
|
||||
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (texture);
|
||||
#endif
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -471,17 +450,6 @@ _gst_vaapi_texture_put_surface (GstVaapiTexture * texture,
|
|||
GstVaapiSurface * surface, const GstVaapiRectangle * crop_rect, guint flags)
|
||||
{
|
||||
VAStatus status;
|
||||
|
||||
#if USE_VAAPI_GLX
|
||||
GST_VAAPI_OBJECT_LOCK_DISPLAY (texture);
|
||||
status = vaCopySurfaceGLX (GST_VAAPI_OBJECT_VADISPLAY (texture),
|
||||
texture->gl_surface,
|
||||
GST_VAAPI_OBJECT_ID (surface), from_GstVaapiSurfaceRenderFlags (flags)
|
||||
);
|
||||
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (texture);
|
||||
if (!vaapi_check_status (status, "vaCopySurfaceGLX()"))
|
||||
return FALSE;
|
||||
#else
|
||||
GstVaapiRectangle rect;
|
||||
GLContextState old_cs;
|
||||
gboolean success = FALSE;
|
||||
|
@ -561,8 +529,6 @@ out_reset_context:
|
|||
end:
|
||||
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (texture);
|
||||
return success;
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
Loading…
Reference in a new issue