meson: build h264 fei encoder if possible

This commit is contained in:
Haihao Xiang 2018-12-26 14:36:23 +08:00 committed by Víctor Manuel Jáquez Leal
parent 77bb3424dc
commit 5b447753da
4 changed files with 34 additions and 0 deletions

View file

@ -109,6 +109,23 @@ if USE_VP9_ENCODER
gstlibvaapi_headers += 'gstvaapiencoder_vp9.h' gstlibvaapi_headers += 'gstvaapiencoder_vp9.h'
endif endif
if USE_H264_FEI_ENCODER
gstlibvaapi_sources += [
'gstvaapifeiutils_h264.c',
'gstvaapifei_objects.c',
'gstvaapifeienc_h264.c',
'gstvaapifeipak_h264.c',
'gstvaapiencoder_h264_fei.c',
]
gstlibvaapi_headers += [
'gstvaapifeiutils_h264.h',
'gstvaapifei_objects.h',
'gstvaapifeienc_h264.h',
'gstvaapifeipak_h264.h',
'gstvaapiencoder_h264_fei.h',
]
endif
if USE_DRM if USE_DRM
gstlibvaapi_sources += [ gstlibvaapi_sources += [
'gstvaapidisplay_drm.c', 'gstvaapidisplay_drm.c',

View file

@ -32,6 +32,13 @@ if USE_VP9_ENCODER
vaapi_sources += 'gstvaapiencode_vp9.c' vaapi_sources += 'gstvaapiencode_vp9.c'
endif endif
if USE_H264_FEI_ENCODER
vaapi_sources += [
'gstvaapifeivideometa.c',
'gstvaapiencode_h264_fei.c',
]
endif
gstvaapi = library('gstvaapi', gstvaapi = library('gstvaapi',
vaapi_sources, vaapi_sources,
c_args : gstreamer_vaapi_args + ['-DGST_USE_UNSTABLE_API'], c_args : gstreamer_vaapi_args + ['-DGST_USE_UNSTABLE_API'],

View file

@ -86,6 +86,7 @@ endif
USE_ENCODERS = get_option('with_encoders') != 'no' USE_ENCODERS = get_option('with_encoders') != 'no'
USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>') USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_H264_FEI_ENCODER = USE_ENCODERS and cc.has_header('va/va_fei_h264.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no' USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no'
USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no' USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no'
@ -112,6 +113,7 @@ cdata.set10('USE_EGL', USE_EGL)
cdata.set10('USE_ENCODERS', USE_ENCODERS) cdata.set10('USE_ENCODERS', USE_ENCODERS)
cdata.set10('USE_GLX', USE_GLX) cdata.set10('USE_GLX', USE_GLX)
cdata.set10('USE_VP9_ENCODER', USE_VP9_ENCODER) cdata.set10('USE_VP9_ENCODER', USE_VP9_ENCODER)
cdata.set10('USE_H264_FEI_ENCODER', USE_H264_FEI_ENCODER)
cdata.set10('USE_WAYLAND', USE_WAYLAND) cdata.set10('USE_WAYLAND', USE_WAYLAND)
cdata.set10('USE_X11', USE_X11) cdata.set10('USE_X11', USE_X11)
cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep)) cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep))

View file

@ -45,6 +45,14 @@ test_examples = [
if USE_ENCODERS if USE_ENCODERS
test_examples += [ 'simple-encoder' ] test_examples += [ 'simple-encoder' ]
endif endif
if USE_H264_FEI_ENCODER
test_examples += [
'test-fei-enc-out',
'test-fei-enc-in',
]
endif
if USE_GLX if USE_GLX
test_examples += [ 'test-textures' ] test_examples += [ 'test-textures' ]
endif endif