2017-02-06 23:46:20 +00:00
|
|
|
gstlibvaapi_sources = [
|
2019-11-14 20:02:19 +00:00
|
|
|
'gstvaapiblend.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapibufferproxy.c',
|
|
|
|
'gstvaapicodec_objects.c',
|
|
|
|
'gstvaapicontext.c',
|
|
|
|
'gstvaapidecoder.c',
|
|
|
|
'gstvaapidecoder_dpb.c',
|
|
|
|
'gstvaapidecoder_h264.c',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapidecoder_h265.c',
|
|
|
|
'gstvaapidecoder_jpeg.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapidecoder_mpeg2.c',
|
|
|
|
'gstvaapidecoder_mpeg4.c',
|
|
|
|
'gstvaapidecoder_objects.c',
|
|
|
|
'gstvaapidecoder_unit.c',
|
|
|
|
'gstvaapidecoder_vc1.c',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapidecoder_vp8.c',
|
|
|
|
'gstvaapidecoder_vp9.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapidisplay.c',
|
|
|
|
'gstvaapifilter.c',
|
|
|
|
'gstvaapiimage.c',
|
|
|
|
'gstvaapiimagepool.c',
|
|
|
|
'gstvaapiminiobject.c',
|
|
|
|
'gstvaapiparser_frame.c',
|
|
|
|
'gstvaapiprofile.c',
|
2019-08-05 17:47:30 +00:00
|
|
|
'gstvaapiprofilecaps.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapisubpicture.c',
|
|
|
|
'gstvaapisurface.c',
|
|
|
|
'gstvaapisurface_drm.c',
|
|
|
|
'gstvaapisurfacepool.c',
|
|
|
|
'gstvaapisurfaceproxy.c',
|
|
|
|
'gstvaapitexture.c',
|
|
|
|
'gstvaapitexturemap.c',
|
|
|
|
'gstvaapiutils.c',
|
|
|
|
'gstvaapiutils_core.c',
|
|
|
|
'gstvaapiutils_h264.c',
|
|
|
|
'gstvaapiutils_h265.c',
|
2017-03-17 07:49:41 +00:00
|
|
|
'gstvaapiutils_h26x.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapiutils_mpeg2.c',
|
2020-07-06 15:35:12 +00:00
|
|
|
'gstvaapiutils_vpx.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapivalue.c',
|
|
|
|
'gstvaapivideopool.c',
|
|
|
|
'gstvaapiwindow.c',
|
|
|
|
'video-format.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
gstlibvaapi_headers = [
|
2019-11-14 20:02:19 +00:00
|
|
|
'gstvaapiblend.h',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapibufferproxy.h',
|
|
|
|
'gstvaapidecoder.h',
|
|
|
|
'gstvaapidecoder_h264.h',
|
|
|
|
'gstvaapidecoder_h265.h',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapidecoder_jpeg.h',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapidecoder_mpeg2.h',
|
|
|
|
'gstvaapidecoder_mpeg4.h',
|
|
|
|
'gstvaapidecoder_vc1.h',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapidecoder_vp8.h',
|
|
|
|
'gstvaapidecoder_vp9.h',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapidisplay.h',
|
|
|
|
'gstvaapifilter.h',
|
|
|
|
'gstvaapiimage.h',
|
|
|
|
'gstvaapiimagepool.h',
|
|
|
|
'gstvaapiprofile.h',
|
2019-08-05 17:47:30 +00:00
|
|
|
'gstvaapiprofilecaps.h',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapisubpicture.h',
|
|
|
|
'gstvaapisurface.h',
|
|
|
|
'gstvaapisurface_drm.h',
|
|
|
|
'gstvaapisurfacepool.h',
|
|
|
|
'gstvaapisurfaceproxy.h',
|
|
|
|
'gstvaapitexture.h',
|
|
|
|
'gstvaapitexturemap.h',
|
|
|
|
'gstvaapitypes.h',
|
|
|
|
'gstvaapiutils_h264.h',
|
|
|
|
'gstvaapiutils_h265.h',
|
|
|
|
'gstvaapiutils_mpeg2.h',
|
2020-07-06 15:35:12 +00:00
|
|
|
'gstvaapiutils_vpx.h',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapivalue.h',
|
|
|
|
'gstvaapivideopool.h',
|
|
|
|
'gstvaapiwindow.h',
|
|
|
|
'video-format.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
if USE_ENCODERS
|
|
|
|
gstlibvaapi_sources += [
|
|
|
|
'gstvaapicodedbuffer.c',
|
|
|
|
'gstvaapicodedbufferpool.c',
|
|
|
|
'gstvaapicodedbufferproxy.c',
|
|
|
|
'gstvaapiencoder.c',
|
|
|
|
'gstvaapiencoder_h264.c',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapiencoder_h265.c',
|
|
|
|
'gstvaapiencoder_jpeg.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapiencoder_mpeg2.c',
|
|
|
|
'gstvaapiencoder_objects.c',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapiencoder_vp8.c',
|
2017-02-06 23:46:20 +00:00
|
|
|
]
|
|
|
|
gstlibvaapi_headers += [
|
|
|
|
'gstvaapicodedbuffer.h',
|
|
|
|
'gstvaapicodedbufferpool.h',
|
|
|
|
'gstvaapicodedbufferproxy.h',
|
|
|
|
'gstvaapiencoder.h',
|
|
|
|
'gstvaapiencoder_h264.h',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapiencoder_h265.h',
|
|
|
|
'gstvaapiencoder_jpeg.h',
|
2017-02-06 23:46:20 +00:00
|
|
|
'gstvaapiencoder_mpeg2.h',
|
2018-12-24 04:58:53 +00:00
|
|
|
'gstvaapiencoder_vp8.h',
|
2017-02-06 23:46:20 +00:00
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
if USE_VP9_ENCODER
|
|
|
|
gstlibvaapi_sources += 'gstvaapiencoder_vp9.c'
|
|
|
|
gstlibvaapi_headers += 'gstvaapiencoder_vp9.h'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if USE_DRM
|
|
|
|
gstlibvaapi_sources += [
|
|
|
|
'gstvaapidisplay_drm.c',
|
|
|
|
'gstvaapiwindow_drm.c',
|
|
|
|
]
|
|
|
|
gstlibvaapi_headers += [
|
|
|
|
'gstvaapidisplay_drm.h',
|
|
|
|
'gstvaapiwindow_drm.h',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
if USE_X11
|
|
|
|
gstlibvaapi_sources += [
|
|
|
|
'gstvaapidisplay_x11.c',
|
|
|
|
'gstvaapiutils_x11.c',
|
|
|
|
'gstvaapiwindow_x11.c',
|
|
|
|
]
|
|
|
|
gstlibvaapi_headers += [
|
|
|
|
'gstvaapidisplay_x11.h',
|
|
|
|
'gstvaapiwindow_x11.h',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
if USE_GLX
|
|
|
|
gstlibvaapi_sources += [
|
|
|
|
'gstvaapidisplay_glx.c',
|
|
|
|
'gstvaapitexture_glx.c',
|
|
|
|
'gstvaapiutils_glx.c',
|
|
|
|
'gstvaapiwindow_glx.c',
|
|
|
|
]
|
|
|
|
gstlibvaapi_headers += [
|
|
|
|
'gstvaapidisplay_glx.h',
|
|
|
|
'gstvaapitexture.h',
|
|
|
|
'gstvaapitexture_glx.h',
|
|
|
|
'gstvaapiwindow_glx.h',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
if USE_EGL
|
|
|
|
gstlibvaapi_sources += [
|
|
|
|
'gstvaapidisplay_egl.c',
|
|
|
|
'gstvaapisurface_egl.c',
|
|
|
|
'gstvaapitexture_egl.c',
|
|
|
|
'gstvaapiutils_egl.c',
|
|
|
|
'gstvaapiwindow_egl.c',
|
|
|
|
]
|
|
|
|
gstlibvaapi_headers += [
|
|
|
|
'gstvaapidisplay_egl.h',
|
|
|
|
'gstvaapisurface_egl.h',
|
|
|
|
'gstvaapitexture_egl.h',
|
|
|
|
'gstvaapiwindow_egl.h',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
|
|
|
if USE_WAYLAND
|
2019-01-14 10:30:48 +00:00
|
|
|
# The XDG shell interface needs to be generated first
|
|
|
|
wayland_protocols_basedir = wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir')
|
|
|
|
xdg_shell_xml_spec = join_paths(wayland_protocols_basedir, 'stable', 'xdg-shell', 'xdg-shell.xml')
|
|
|
|
xdg_shell_header = custom_target('vaapi-xdg-shell-client-header',
|
|
|
|
command: [ wayland_scanner_bin, 'client-header', '@INPUT@', '@OUTPUT@' ],
|
|
|
|
input: xdg_shell_xml_spec,
|
|
|
|
output: 'xdg-shell-client-protocol.h')
|
|
|
|
xdg_shell_code = custom_target('vaapi-xdg-shell-client-code',
|
|
|
|
command: [ wayland_scanner_bin, 'private-code', '@INPUT@', '@OUTPUT@' ],
|
|
|
|
input: xdg_shell_xml_spec,
|
|
|
|
output: 'xdg-shell-client-protocol.c')
|
2020-07-22 07:36:18 +00:00
|
|
|
dmabuf_xml_spec = join_paths(wayland_protocols_basedir, 'unstable', 'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml')
|
|
|
|
dmabuf_header = custom_target('vaapi-dmabuf-client-header',
|
|
|
|
command: [ wayland_scanner_bin, 'client-header', '@INPUT@', '@OUTPUT@' ],
|
|
|
|
input: dmabuf_xml_spec,
|
|
|
|
output: 'linux-dmabuf-unstable-v1-client-protocol.h')
|
|
|
|
dmabuf_code = custom_target('vaapi-dmabuf-client-code',
|
|
|
|
command: [ wayland_scanner_bin, 'private-code', '@INPUT@', '@OUTPUT@' ],
|
|
|
|
input: dmabuf_xml_spec,
|
|
|
|
output: 'linux-dmabuf-unstable-v1-client-protocol.c')
|
2019-01-14 10:30:48 +00:00
|
|
|
|
2017-02-06 23:46:20 +00:00
|
|
|
gstlibvaapi_sources += [
|
|
|
|
'gstvaapidisplay_wayland.c',
|
|
|
|
'gstvaapiwindow_wayland.c',
|
2019-01-14 10:30:48 +00:00
|
|
|
xdg_shell_header,
|
|
|
|
xdg_shell_code,
|
2020-07-22 07:36:18 +00:00
|
|
|
dmabuf_header,
|
|
|
|
dmabuf_code,
|
2019-01-14 10:30:48 +00:00
|
|
|
]
|
2017-02-06 23:46:20 +00:00
|
|
|
gstlibvaapi_headers += [
|
|
|
|
'gstvaapidisplay_wayland.h',
|
|
|
|
'gstvaapiwindow_wayland.h',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2018-01-17 11:42:12 +00:00
|
|
|
gstlibvaapi_deps = [ gstbase_dep,
|
|
|
|
gstvideo_dep,
|
|
|
|
gstgl_dep,
|
2020-08-07 14:41:49 +00:00
|
|
|
gstglproto_dep,
|
2018-01-17 11:42:12 +00:00
|
|
|
gstcodecparsers_dep,
|
2018-11-09 23:55:05 +00:00
|
|
|
libva_dep,
|
|
|
|
libm ]
|
2017-02-06 23:46:20 +00:00
|
|
|
if USE_DRM
|
|
|
|
gstlibvaapi_deps += [libva_drm_dep, libdrm_dep, libudev_dep]
|
|
|
|
endif
|
|
|
|
if USE_EGL
|
2020-08-07 14:41:49 +00:00
|
|
|
gstlibvaapi_deps += [egl_dep, gmodule_dep, gstglegl_dep]
|
2017-02-06 23:46:20 +00:00
|
|
|
endif
|
|
|
|
if USE_GLX
|
|
|
|
gstlibvaapi_deps += [libva_x11_dep, x11_dep, gl_dep, libdl_dep]
|
|
|
|
endif
|
|
|
|
if USE_WAYLAND
|
2020-08-07 14:41:49 +00:00
|
|
|
gstlibvaapi_deps += [libva_wayland_dep, gstglwayland_dep, wayland_client_dep, wayland_protocols_dep]
|
2017-02-06 23:46:20 +00:00
|
|
|
endif
|
|
|
|
if USE_X11
|
2020-08-07 14:41:49 +00:00
|
|
|
gstlibvaapi_deps += [libva_x11_dep, x11_dep, xrandr_dep, gstglx11_dep]
|
2017-02-06 23:46:20 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
gstlibvaapi = static_library('gstlibvaapi-@0@'.format(api_version),
|
2018-11-02 15:50:00 +00:00
|
|
|
gstlibvaapi_sources + gstlibvaapi_headers,
|
2018-09-13 10:22:42 +00:00
|
|
|
c_args : gstreamer_vaapi_args + [ '-DGST_USE_UNSTABLE_API', '-DGST_VAAPI_VERSION_ID="@0@"'.format(gst_version)],
|
2017-02-06 23:46:20 +00:00
|
|
|
include_directories: [configinc, libsinc],
|
|
|
|
dependencies : gstlibvaapi_deps,
|
|
|
|
)
|
|
|
|
|
|
|
|
gstlibvaapi_dep = declare_dependency(link_with: gstlibvaapi,
|
|
|
|
include_directories : [libsinc],
|
|
|
|
dependencies : gstlibvaapi_deps)
|