vaapi: build error when GL is enabled and EGL disabled
Submitted by He Junyan
Link to original bug (#797358)
Description
When we configure gstreamer-vaapi use glx and no egl
gstreamer-vaapi configuration summary:
Installation Prefix .............. : /home/robinhe/media/build
GStreamer API version ............ : 1.15
VA-API version ................... : 1.3.0
Video encoding ................... : yes
Video outputs .................... : x11 glx
We get build error:
gstvaapipluginutil.c: In function ‘gst_vaapi_get_display_type_from_gl_env’:
gstvaapipluginutil.c:174:22: error: unused variable ‘gl_platform_type’ [-Werror=unused-variable]
const gchar *const gl_platform_type = g_getenv ("GST_GL_PLATFORM");
^
~~~~~~~~~~~~~~~
gstvaapipluginutil.c: In function ‘gst_vaapi_create_display_from_egl’:
gstvaapipluginutil.c:252:15: error: implicit declaration of function ‘gst_vaapi_display_egl_new_with_native_display’; did you mean ‘gst_vaapi_display_x11_new_with_va_display’? [-Werror=implicit-function-declaration]
display = gst_vaapi_display_egl_new_with_native_display (native_display_egl,
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gst_vaapi_display_x11_new_with_va_display
gstvaapipluginutil.c:252:15: error: nested extern declaration of ‘gst_vaapi_display_egl_new_with_native_display’ [-Werror=nested-externs]
gstvaapipluginutil.c:252:13: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
display = gst_vaapi_display_egl_new_with_native_display (native_display_egl,
^
gstvaapipluginutil.c:262:17: error: implicit declaration of function ‘gst_vaapi_display_egl_new’; did you mean ‘gst_vaapi_display_glx_new’? [-Werror=implicit-function-declaration]
display = gst_vaapi_display_egl_new (wrapped_display, gles_version);
^
~~~~~~~~~~~~~~~~~~~~~~~~
gst_vaapi_display_glx_new
gstvaapipluginutil.c:262:17: error: nested extern declaration of ‘gst_vaapi_display_egl_new’ [-Werror=nested-externs]
gstvaapipluginutil.c:262:15: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
display = gst_vaapi_display_egl_new (wrapped_display, gles_version);
^
gstvaapipluginutil.c:268:5: error: implicit declaration of function ‘gst_vaapi_display_egl_set_gl_context’; did you mean ‘gst_vaapi_plugin_base_set_gl_context’? [-Werror=implicit-function-declaration]
gst_vaapi_display_egl_set_gl_context (GST_VAAPI_DISPLAY_EGL (display),
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gst_vaapi_plugin_base_set_gl_context
gstvaapipluginutil.c:268:5: error: nested extern declaration of ‘gst_vaapi_display_egl_set_gl_context’ [-Werror=nested-externs]
gstvaapipluginutil.c:268:43: error: implicit declaration of function ‘GST_VAAPI_DISPLAY_EGL’; did you mean ‘GST_VAAPI_DISPLAY_GLX’? [-Werror=implicit-function-declaration]
gst_vaapi_display_egl_set_gl_context (GST_VAAPI_DISPLAY_EGL (display),
^
~~~~~~~~~~~~~~~~~~~~
GST_VAAPI_DISPLAY_GLX
gstvaapipluginutil.c:268:43: error: nested extern declaration of ‘GST_VAAPI_DISPLAY_EGL’ [-Werror=nested-externs]
cc1: all warnings being treated as errors