g_assert (attrib_index < G_N_ELEMENTS (attribs));
switch (cip->usage) {
-#if USE_ENCODERS
+#if GST_VAAPI_USE_ENCODERS
case GST_VAAPI_CONTEXT_USAGE_ENCODE:
{
const GstVaapiConfigInfoEncoder *const config = &cip->config.encoder;
static const GEnumValue display_types[] = {
{GST_VAAPI_DISPLAY_TYPE_ANY,
"Auto detection", "any"},
-#if USE_X11
+#if GST_VAAPI_USE_X11
{GST_VAAPI_DISPLAY_TYPE_X11,
"VA/X11 display", "x11"},
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
{GST_VAAPI_DISPLAY_TYPE_GLX,
"VA/GLX display", "glx"},
#endif
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
{GST_VAAPI_DISPLAY_TYPE_EGL,
"VA/EGL display", "egl"},
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
{GST_VAAPI_DISPLAY_TYPE_WAYLAND,
"VA/Wayland display", "wayland"},
#endif
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
{GST_VAAPI_DISPLAY_TYPE_DRM,
"VA/DRM display", "drm"},
#endif
get_render_mode_default (GstVaapiDisplay * display, GstVaapiRenderMode * pmode)
{
switch (GST_VAAPI_DISPLAY_VADISPLAY_TYPE (display)) {
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
case GST_VAAPI_DISPLAY_TYPE_WAYLAND:
/* wl_buffer mapped from VA surface through vaGetSurfaceBufferWl() */
*pmode = GST_VAAPI_RENDER_MODE_OVERLAY;
break;
#endif
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
case GST_VAAPI_DISPLAY_TYPE_DRM:
/* vaGetSurfaceBufferDRM() returns the underlying DRM buffer handle */
*pmode = GST_VAAPI_RENDER_MODE_OVERLAY;
#include "gstvaapiwindow_priv.h"
#include "gstvaapitexture_egl.h"
-#if USE_X11
+#if GST_VAAPI_USE_X11
#include "gstvaapidisplay_x11.h"
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
#include "gstvaapidisplay_wayland.h"
#endif
native_egl_display = params->gl_display;
if (!native_vaapi_display) {
-#if USE_X11
+#if GST_VAAPI_USE_X11
if (params->display_type == GST_VAAPI_DISPLAY_TYPE_ANY
|| params->display_type == GST_VAAPI_DISPLAY_TYPE_X11
|| params->display_type == GST_VAAPI_DISPLAY_TYPE_EGL)
native_vaapi_display = gst_vaapi_display_x11_new (NULL);
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
if (!native_vaapi_display)
native_vaapi_display = gst_vaapi_display_wayland_new (NULL);
#endif
#include "gstvaapisurface_drm.h"
#include "gstvaapisurface_priv.h"
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
#include <drm_fourcc.h>
#else
#define DRM_FORMAT_MOD_LINEAR 0ULL
#define DEBUG 1
#include "gst/vaapi/gstvaapidebug.h"
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
#include <drm_fourcc.h>
#endif
#define VA_BYTE_ORDER_NOT_CARE 0
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
#define MAKE_DRM_FORMAT(DRM_FORMAT) G_PASTE(DRM_FORMAT_,DRM_FORMAT)
#else
#define MAKE_DRM_FORMAT(DRM_FORMAT) 0
guint
gst_vaapi_drm_format_from_va_fourcc (guint32 fourcc)
{
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
const GArray *map = gst_vaapi_video_formats_map;
const GstVideoFormatMap *m;
guint i;
GstVideoFormat
gst_vaapi_video_format_from_drm_format (guint drm_format)
{
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
const GArray *map = gst_vaapi_video_formats_map;
const GstVideoFormatMap *m;
guint i;
#include "gstvaapisink.h"
#include "gstvaapidecodebin.h"
-#if USE_ENCODERS
+#if GST_VAAPI_USE_ENCODERS
#include "gstvaapiencode_h264.h"
#include "gstvaapiencode_mpeg2.h"
#include "gstvaapiencode_jpeg.h"
#include "gstvaapiencode_vp8.h"
#include "gstvaapiencode_h265.h"
-#if USE_VP9_ENCODER
+#if GST_VAAPI_USE_VP9_ENCODER
#include "gstvaapiencode_vp9.h"
#endif
#endif
return codecs;
}
-#if USE_ENCODERS
+#if GST_VAAPI_USE_ENCODERS
static GArray *
display_get_encoder_codecs (GstVaapiDisplay * display)
{
DEF_ENC (MPEG2, mpeg2),
DEF_ENC (JPEG, jpeg),
DEF_ENC (VP8, vp8),
-#if USE_VP9_ENCODER
+#if GST_VAAPI_USE_VP9_ENCODER
DEF_ENC (VP9, vp9),
#endif
DEF_ENC (H265, h265),
rank = GST_RANK_MARGINAL;
gst_element_register (plugin, "vaapisink", rank, GST_TYPE_VAAPISINK);
-#if USE_ENCODERS
+#if GST_VAAPI_USE_ENCODERS
gst_vaapiencode_register (plugin, display);
#endif
#include "gstvaapidecode_props.h"
#include "gstvaapipluginutil.h"
#include "gstvaapivideobuffer.h"
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
#include "gstvaapivideometa_texture.h"
#endif
#include "gstvaapivideobufferpool.h"
#include <gst/vaapi/gstvaapidecoder_vp8.h>
#include <gst/vaapi/gstvaapidecoder_h265.h>
#include <gst/vaapi/gstvaapidecoder_vp9.h>
-#if USE_AV1_DECODER
+#if GST_VAAPI_USE_AV1_DECODER
#include <gst/vaapi/gstvaapidecoder_av1.h>
#endif
static const char gst_vaapidecode_src_caps_str[] =
GST_VAAPI_MAKE_SURFACE_CAPS "; "
GST_VIDEO_CAPS_MAKE_WITH_FEATURES(GST_CAPS_FEATURE_MEMORY_DMABUF, GST_VAAPI_FORMATS_ALL) " ;"
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS "; "
#endif
GST_VIDEO_CAPS_MAKE(GST_VAAPI_FORMATS_ALL);
gst_caps_set_features_simple (dma_caps,
gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF));
}
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode)
&& gst_vaapi_display_has_opengl (GST_VAAPI_PLUGIN_BASE_DISPLAY (decode))) {
gltexup_caps = gst_caps_from_string (GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS);
if (feature == GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED)
return FALSE;
-#if (!USE_GLX && !USE_EGL)
+#if (!GST_VAAPI_USE_GLX && !GST_VAAPI_USE_EGL)
/* This is a very pathological situation. Should not happen. */
if (feature == GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META)
return FALSE;
GST_BUFFER_FLAG_SET (out_frame->output_buffer,
GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE);
}
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
if (decode->has_texture_upload_meta)
gst_buffer_ensure_texture_upload_meta (out_frame->output_buffer);
#endif
decode->has_texture_upload_meta = FALSE;
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
decode->has_texture_upload_meta =
gst_query_find_allocation_meta (query,
GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, NULL) &&
case GST_VAAPI_CODEC_VP9:
decode->decoder = gst_vaapi_decoder_vp9_new (dpy, caps);
break;
-#if USE_AV1_DECODER
+#if GST_VAAPI_USE_AV1_DECODER
case GST_VAAPI_CODEC_AV1:
decode->decoder = gst_vaapi_decoder_av1_new (dpy, caps);
break;
static const char gst_vaapi_decode_bin_src_caps_str[] =
GST_VAAPI_MAKE_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
#endif
gst_buffer_pool_config_add_option (config,
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT);
}
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
if (options & GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_GL_TEXTURE_UPLOAD) {
gst_buffer_pool_config_add_option (config,
GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META);
guint i, size, min, max, pool_options, num_allocators;
gint index_allocator;
gboolean update_pool = FALSE;
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
guint idx;
#endif
if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL))
pool_options |= GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META;
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
if (gst_query_find_allocation_meta (query,
GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, &idx) &&
gst_vaapi_caps_feature_contains (caps,
gst_object_replace (&plugin->gl_context, object);
switch (gst_gl_context_get_gl_platform (gl_context)) {
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
case GST_GL_PLATFORM_GLX:
display_type = GST_VAAPI_DISPLAY_TYPE_GLX;
break;
#endif
case GST_GL_PLATFORM_EGL:
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
display_type = GST_VAAPI_DISPLAY_TYPE_EGL;
break;
#endif
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (GstVaapiPluginBase * plugin,
GstObject * object)
{
-#if USE_EGL && USE_GST_GL_HELPERS
+#if GST_VAAPI_USE_EGL && USE_GST_GL_HELPERS
GstVaapiPadPrivate *srcpriv = GST_VAAPI_PAD_PRIVATE (plugin->srcpad);
GstGLContext *const gl_context = GST_GL_CONTEXT (object);
#include "gstvaapivideocontext.h"
#include <gst/vaapi/gstvaapiprofilecaps.h>
#include <gst/vaapi/gstvaapiutils.h>
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
# include <gst/vaapi/gstvaapidisplay_drm.h>
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
# include <gst/vaapi/gstvaapidisplay_x11.h>
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
# include <gst/vaapi/gstvaapidisplay_glx.h>
#endif
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
# include <gst/vaapi/gstvaapidisplay_egl.h>
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
# include <gst/vaapi/gstvaapidisplay_wayland.h>
#endif
#if USE_GST_GL_HELPERS
# include <gst/gl/gl.h>
-#if USE_EGL && GST_GL_HAVE_PLATFORM_EGL
+#if GST_VAAPI_USE_EGL && GST_GL_HAVE_PLATFORM_EGL
# include <gst/gl/egl/gstgldisplay_egl.h>
#endif
#endif
/* *INDENT-OFF* */
static const DisplayMap g_display_map[] = {
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
{"wayland",
GST_VAAPI_DISPLAY_TYPE_WAYLAND,
gst_vaapi_display_wayland_new,
(GstVaapiDisplayCreateFromHandleFunc)
gst_vaapi_display_wayland_new_with_display},
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
{"glx",
GST_VAAPI_DISPLAY_TYPE_GLX,
gst_vaapi_display_glx_new,
(GstVaapiDisplayCreateFromHandleFunc)
gst_vaapi_display_glx_new_with_display},
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
{"x11",
GST_VAAPI_DISPLAY_TYPE_X11,
gst_vaapi_display_x11_new,
(GstVaapiDisplayCreateFromHandleFunc)
gst_vaapi_display_x11_new_with_display},
#endif
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
{"drm",
GST_VAAPI_DISPLAY_TYPE_DRM,
gst_vaapi_display_drm_new},
GstGLPlatform gl_platform)
{
switch (gl_display_type) {
-#if USE_X11
+#if GST_VAAPI_USE_X11
case GST_GL_DISPLAY_TYPE_X11:{
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
if (gl_platform == GST_GL_PLATFORM_GLX)
return GST_VAAPI_DISPLAY_TYPE_GLX;
#endif
return GST_VAAPI_DISPLAY_TYPE_X11;
}
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
case GST_GL_DISPLAY_TYPE_WAYLAND:{
return GST_VAAPI_DISPLAY_TYPE_WAYLAND;
}
#endif
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
case GST_GL_DISPLAY_TYPE_EGL:{
return GST_VAAPI_DISPLAY_TYPE_EGL;
}
#endif
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
case GST_GL_DISPLAY_TYPE_GBM:{
return GST_VAAPI_DISPLAY_TYPE_DRM;
}
const gchar *const gl_window_type = g_getenv ("GST_GL_WINDOW");
if (!gl_window_type) {
-#if USE_X11 && GST_GL_HAVE_WINDOW_X11
+#if GST_VAAPI_USE_X11 && GST_GL_HAVE_WINDOW_X11
return GST_VAAPI_DISPLAY_TYPE_X11;
-#elif USE_WAYLAND && GST_GL_HAVE_WINDOW_WAYLAND
+#elif GST_VAAPI_USE_WAYLAND && GST_GL_HAVE_WINDOW_WAYLAND
return GST_VAAPI_DISPLAY_TYPE_WAYLAND;
-#elif USE_EGL && GST_GL_HAVE_PLATFORM_EGL
+#elif GST_VAAPI_USE_EGL && GST_GL_HAVE_PLATFORM_EGL
return GST_VAAPI_DISPLAY_TYPE_EGL;
#endif
}
-#if USE_X11
+#if GST_VAAPI_USE_X11
if (g_strcmp0 (gl_window_type, "x11") == 0)
return GST_VAAPI_DISPLAY_TYPE_X11;
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
if (g_strcmp0 (gl_window_type, "wayland") == 0)
return GST_VAAPI_DISPLAY_TYPE_WAYLAND;
#endif
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
{
const gchar *const gl_platform_type = g_getenv ("GST_GL_PLATFORM");
if (g_strcmp0 (gl_platform_type, "egl") == 0)
return GST_VAAPI_DISPLAY_TYPE_ANY;
}
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
static gint
gst_vaapi_get_gles_version_from_gl_api (GstGLAPI gl_api)
{
}
return egl_handle;
}
-#endif /* USE_EGL */
+#endif /* GST_VAAPI_USE_EGL */
static GstVaapiDisplay *
gst_vaapi_create_display_from_egl (GstGLDisplay * gl_display,
gpointer native_display)
{
GstVaapiDisplay *display = NULL;
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
GstGLAPI gl_api;
gint gles_version;
guintptr egl_handler;
guint i;
GstVaapiDisplay *display = NULL;
const GstVaapiDisplayType test_display_map[] = {
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
GST_VAAPI_DISPLAY_TYPE_DRM,
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
GST_VAAPI_DISPLAY_TYPE_X11,
#endif
};
static const char gst_vaapipostproc_src_caps_str[] =
GST_VAAPI_MAKE_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS "; "
#endif
GST_VIDEO_CAPS_MAKE (GST_VAAPI_FORMATS_ALL) ", "
/* --- DRM Backend --- */
/* ------------------------------------------------------------------------ */
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
#include <gst/vaapi/gstvaapidisplay_drm.h>
static gboolean
/* --- X11 Backend --- */
/* ------------------------------------------------------------------------ */
-#if USE_X11
+#if GST_VAAPI_USE_X11
#include <gst/vaapi/gstvaapidisplay_x11.h>
#include <gst/vaapi/gstvaapiwindow_x11.h>
/* --- Wayland Backend --- */
/* ------------------------------------------------------------------------ */
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
#include <gst/vaapi/gstvaapidisplay_wayland.h>
#include <gst/vaapi/gstvaapiwindow_wayland.h>
gst_vaapisink_ensure_backend (GstVaapiSink * sink)
{
switch (GST_VAAPI_PLUGIN_BASE_DISPLAY_TYPE (sink)) {
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
case GST_VAAPI_DISPLAY_TYPE_DRM:
sink->backend = gst_vaapisink_backend_drm ();
break;
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
case GST_VAAPI_DISPLAY_TYPE_X11:
sink->backend = gst_vaapisink_backend_x11 ();
break;
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
case GST_VAAPI_DISPLAY_TYPE_GLX:
sink->backend = gst_vaapisink_backend_x11 ();
break;
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
case GST_VAAPI_DISPLAY_TYPE_WAYLAND:
sink->backend = gst_vaapisink_backend_wayland ();
break;
#include "gstvaapivideobuffer.h"
#include "gstvaapivideomemory.h"
#include "gstvaapipluginutil.h"
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
#include "gstvaapivideometa_texture.h"
#endif
GST_META_FLAG_SET (vmeta, GST_META_FLAG_POOLED);
}
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
if (priv->options & GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_GL_TEXTURE_UPLOAD) {
GstMeta *tex_meta = gst_buffer_add_texture_upload_meta (buffer);
if (tex_meta)
#if USE_GST_GL_HELPERS
# include <gst/gl/gl.h>
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
#include <gst/vaapi/gstvaapidisplay_x11.h>
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
#include <gst/vaapi/gstvaapidisplay_wayland.h>
#endif
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
#include <gst/vaapi/gstvaapidisplay_drm.h>
#endif
if (gst_structure_get (structure, "va-display", G_TYPE_POINTER, &va_display,
NULL)) {
-#if USE_X11
+#if GST_VAAPI_USE_X11
Display *x11_display = NULL;
if (gst_structure_get (structure, "x11-display", G_TYPE_POINTER,
&x11_display, NULL)) {
gst_vaapi_display_x11_new_with_va_display (va_display, x11_display);
}
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
if (!display) {
struct wl_display *wl_display = NULL;
if (gst_structure_get (structure, "wl-display", G_TYPE_POINTER,
}
}
#endif
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
if (!display) {
gint fd = -1;
if (gst_structure_get (structure, "drm-device-fd", G_TYPE_INT, &fd,
#include "gstvaapivideometa_texture.h"
#include "gstvaapipluginutil.h"
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
#include <gst/vaapi/gstvaapitexture_glx.h>
#endif
#define DEFAULT_FORMAT GST_VIDEO_FORMAT_RGBA
-#if (USE_GLX || USE_EGL)
+#if (GST_VAAPI_USE_GLX || GST_VAAPI_USE_EGL)
struct _GstVaapiVideoMetaTexture
{
GstVaapiTexture *texture;
cdata.set_quoted('PACKAGE_STRING', 'GStreamer VA-API Plug-ins @0@'.format(gst_version))
cdata.set_quoted('PACKAGE_BUGREPORT', get_option('package-origin'))
cdata.set_quoted('VA_DRIVERS_PATH', '@0@'.format(driverdir))
-cdata.set10('USE_DRM', USE_DRM)
-cdata.set10('USE_EGL', USE_EGL)
-cdata.set10('USE_ENCODERS', USE_ENCODERS)
-cdata.set10('USE_GLX', USE_GLX)
-cdata.set10('USE_VP9_ENCODER', USE_VP9_ENCODER)
-cdata.set10('USE_AV1_DECODER', USE_AV1_DECODER)
-cdata.set10('USE_WAYLAND', USE_WAYLAND)
-cdata.set10('USE_X11', USE_X11)
+cdata.set10('GST_VAAPI_USE_DRM', USE_DRM)
+cdata.set10('GST_VAAPI_USE_EGL', USE_EGL)
+cdata.set10('GST_VAAPI_USE_ENCODERS', USE_ENCODERS)
+cdata.set10('GST_VAAPI_USE_GLX', USE_GLX)
+cdata.set10('GST_VAAPI_USE_VP9_ENCODER', USE_VP9_ENCODER)
+cdata.set10('GST_VAAPI_USE_AV1_DECODER', USE_AV1_DECODER)
+cdata.set10('GST_VAAPI_USE_WAYLAND', USE_WAYLAND)
+cdata.set10('GST_VAAPI_USE_X11', USE_X11)
cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep))
cdata.set10('HAVE_XRANDR', xrandr_dep.found())
cdata.set10('USE_GST_GL_HELPERS', gstgl_dep.found())
#include "gst/vaapi/sysdeps.h"
#include <gst/gst.h>
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
# include <gst/vaapi/gstvaapidisplay_drm.h>
# include <gst/vaapi/gstvaapiwindow_drm.h>
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
# include <gst/vaapi/gstvaapidisplay_x11.h>
# include <gst/vaapi/gstvaapiwindow_x11.h>
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
# include <gst/vaapi/gstvaapidisplay_glx.h>
# include <gst/vaapi/gstvaapiwindow_glx.h>
#endif
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
# include <gst/vaapi/gstvaapidisplay_egl.h>
# include <gst/vaapi/gstvaapiwindow_egl.h>
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
# include <gst/vaapi/gstvaapidisplay_wayland.h>
# include <gst/vaapi/gstvaapiwindow_wayland.h>
#endif
static const VideoOutputInfo *g_video_output;
static const VideoOutputInfo g_video_outputs[] = {
/* Video outputs are sorted in test order for automatic characterisation */
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
{"wayland",
gst_vaapi_display_wayland_new,
gst_vaapi_window_wayland_new},
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
{"x11",
gst_vaapi_display_x11_new,
gst_vaapi_window_x11_new},
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
{"glx",
gst_vaapi_display_glx_new,
gst_vaapi_window_glx_new},
#endif
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
{"drm",
gst_vaapi_display_drm_new,
gst_vaapi_window_drm_new},
display = o->create_display (display_name);
if (g_egl_mode) {
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
egl_display = gst_vaapi_display_egl_new (display, g_gles_version);
#else
egl_display = NULL;
if (!g_video_output)
return NULL;
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
if (g_egl_mode)
window = gst_vaapi_window_egl_new (display, width, height);
else
#define _GNU_SOURCE
#include "gst/vaapi/sysdeps.h"
#include <gst/video/video.h>
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
# include <gst/vaapi/gstvaapidisplay_drm.h>
# include <va/va_drm.h>
# include <fcntl.h>
# define DRM_DEVICE_PATH "/dev/dri/card0"
# endif
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
# include <gst/vaapi/gstvaapidisplay_x11.h>
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
# include <gst/vaapi/gstvaapidisplay_glx.h>
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
# include <gst/vaapi/gstvaapidisplay_wayland.h>
#endif
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
# include <gst/vaapi/gstvaapidisplay_egl.h>
#endif
main (int argc, char *argv[])
{
GstVaapiDisplay *display;
-#if USE_GLX || USE_WAYLAND
+#if GST_VAAPI_USE_GLX || GST_VAAPI_USE_WAYLAND
guint width, height;
guint par_n, par_d;
#endif
gst_init (&argc, &argv);
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
g_print ("#\n");
g_print ("# Create display with gst_vaapi_display_drm_new()\n");
g_print ("#\n");
g_print ("\n");
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
g_print ("#\n");
g_print ("# Create display with gst_vaapi_display_x11_new()\n");
g_print ("#\n");
g_print ("\n");
#endif
-#if USE_GLX
+#if GST_VAAPI_USE_GLX
g_print ("#\n");
g_print ("# Create display with gst_vaapi_display_glx_new()\n");
g_print ("#\n");
#endif
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
g_print ("#\n");
g_print ("# Create display with gst_vaapi_display_wayland_new()\n");
g_print ("#\n");
#include "gst/vaapi/sysdeps.h"
#include <gst/vaapi/gstvaapisurface.h>
#include <gst/vaapi/gstvaapiimage.h>
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
# include <gst/vaapi/gstvaapidisplay_drm.h>
# include <gst/vaapi/gstvaapiwindow_drm.h>
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
# include <gst/vaapi/gstvaapidisplay_x11.h>
# include <gst/vaapi/gstvaapiwindow_x11.h>
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
# include <gst/vaapi/gstvaapidisplay_wayland.h>
# include <gst/vaapi/gstvaapiwindow_wayland.h>
#endif
-#if USE_EGL
+#if GST_VAAPI_USE_EGL
# include <gst/vaapi/gstvaapidisplay_egl.h>
# include <gst/vaapi/gstvaapiwindow_egl.h>
#endif
gst_init (&argc, &argv);
-#if USE_DRM
+#if GST_VAAPI_USE_DRM
display = gst_vaapi_display_drm_new (NULL);
if (!display)
g_error ("could not create Gst/VA (DRM) display");
gst_object_unref (display);
#endif
-#if USE_X11
+#if GST_VAAPI_USE_X11
display = gst_vaapi_display_x11_new (NULL);
if (!display)
g_error ("could not create Gst/VA display");
gst_object_unref (display);
#endif
-#if USE_WAYLAND
+#if GST_VAAPI_USE_WAYLAND
display = gst_vaapi_display_wayland_new (NULL);
if (!display)
g_error ("could not create Gst/VA (Wayland) display");