gstva_dep = dependency('', required : false)
-have_va = false
va_option = get_option('va')
if va_option.disabled() or host_system != 'linux'
subdir_done()
libgudev_dep = dependency('gudev-1.0', required: va_option)
libdrm_dep = dependency('libdrm', required: false, fallback: ['libdrm', 'ext_libdrm'])
-have_va = libva_dep.found() and libva_drm_dep.found()
-if not (have_va and libgudev_dep.found())
+if not (libva_dep.found() and libva_drm_dep.found() and libgudev_dep.found())
if va_option.enabled()
error('The va lib was enabled explicity, but required dependencies were not found.')
endif
#include <gst/gst.h>
#include <gst/app/gstappsink.h>
#include <gst/video/video.h>
+#include <gst/va/gstvadisplay.h>
#include <va/va_x11.h>
gst_println ("got need context %s", context_type);
- if (g_strcmp0 (context_type, "gst.va.display.handle") == 0) {
+ if (g_strcmp0 (context_type, GST_VA_DISPLAY_HANDLE_CONTEXT_TYPE_STR) == 0) {
GstContext *context;
GstStructure *s;
- context = gst_context_new ("gst.va.display.handle", TRUE);
+ context = gst_context_new (GST_VA_DISPLAY_HANDLE_CONTEXT_TYPE_STR, TRUE);
s = gst_context_writable_structure (context);
gst_structure_set (s, "va-display", G_TYPE_POINTER, app->va_dpy, NULL);
gst_element_set_context (GST_ELEMENT (msg->src), context);
-if not have_va
+if not gstva_dep.found()
subdir_done()
endif
x11_dep = dependency('x11', required : get_option('examples'))
libva_x11_dep = dependency('libva-x11', version: libva_req, required: get_option('examples'))
-if have_va and gtk_dep.found() and gtk_x11_dep.found() and x11_dep.found() and libva_x11_dep.found()
+if gtk_dep.found() and gtk_x11_dep.found() and x11_dep.found() and libva_x11_dep.found()
executable('va-x11-render',
'main.c',
install: false,
include_directories : [configinc],
- dependencies : [gtk_dep, gtk_x11_dep, x11_dep, gst_dep, gstapp_dep, gstvideo_dep, libva_dep, libva_x11_dep],
+ dependencies : [gtk_dep, gtk_x11_dep, x11_dep, gst_dep, gstapp_dep, gstvideo_dep, gstva_dep, libva_x11_dep],
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
)
endif
'multiple-vpp.c',
install: false,
include_directories : [configinc],
- dependencies : [gst_dep, gstvideo_dep, gstcontroller_dep],
+ dependencies : [gst_dep, gstvideo_dep, gstva_dep, gstcontroller_dep],
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
)
#include <gst/video/video.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
#include <gst/controller/gstdirectcontrolbinding.h>
+#include <gst/va/gstvadisplay.h>
#define CHANGE_DIR_WITH_EVENT 0
if (context) {
context_type = gst_context_get_context_type (context);
- if (g_strcmp0 (context_type, "gst.va.display.handle") == 0) {
+ if (g_strcmp0 (context_type,
+ GST_VA_DISPLAY_HANDLE_CONTEXT_TYPE_STR) == 0) {
const GstStructure *s = gst_context_get_structure (context);
GstObject *display = NULL;
case GST_MESSAGE_NEED_CONTEXT:
gst_message_parse_context_type (msg, &context_type);
- if (g_strcmp0 (context_type, "gst.va.display.handle") == 0) {
+ if (g_strcmp0 (context_type, GST_VA_DISPLAY_HANDLE_CONTEXT_TYPE_STR) == 0) {
GstContext *context;
GstStructure *s;
return GST_BUS_DROP;
}
- context = gst_context_new ("gst.va.display.handle", TRUE);
+ context =
+ gst_context_new (GST_VA_DISPLAY_HANDLE_CONTEXT_TYPE_STR, TRUE);
s = gst_context_writable_structure (context);
gst_structure_set (s, "gst-display", GST_TYPE_OBJECT, app->display,
NULL);