mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
svtav1: Integrate into the build system properly
This commit is contained in:
parent
b15efacf84
commit
7890a1f8c7
4 changed files with 19 additions and 65 deletions
|
@ -59,6 +59,7 @@ subdir('soundtouch')
|
||||||
subdir('spandsp')
|
subdir('spandsp')
|
||||||
subdir('srt')
|
subdir('srt')
|
||||||
subdir('srtp')
|
subdir('srtp')
|
||||||
|
subdir('svtav1')
|
||||||
subdir('svthevcenc')
|
subdir('svthevcenc')
|
||||||
subdir('teletextdec')
|
subdir('teletextdec')
|
||||||
subdir('ttml')
|
subdir('ttml')
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
* </refsect2>
|
* </refsect2>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include <gst/video/gstvideoencoder.h>
|
#include <gst/video/gstvideoencoder.h>
|
||||||
|
@ -963,19 +965,6 @@ static gboolean plugin_init(GstPlugin *plugin) {
|
||||||
return gst_element_register(plugin, "svtav1enc", GST_RANK_SECONDARY, GST_TYPE_SVTAV1ENC);
|
return gst_element_register(plugin, "svtav1enc", GST_RANK_SECONDARY, GST_TYPE_SVTAV1ENC);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef VERSION
|
GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR, svtav1,
|
||||||
#define VERSION "1.0"
|
"Scalable Video Technology for AV1 (SVT-AV1)", plugin_init,
|
||||||
#endif
|
|
||||||
#ifndef PACKAGE
|
|
||||||
#define PACKAGE "gstreamer-svt-av1"
|
|
||||||
#endif
|
|
||||||
#ifndef PACKAGE_NAME
|
|
||||||
#define PACKAGE_NAME "SVT-AV1 Encoder plugin for GStreamer"
|
|
||||||
#endif
|
|
||||||
#ifndef GST_PACKAGE_ORIGIN
|
|
||||||
#define GST_PACKAGE_ORIGIN "https://gitlab.com/AOMediaCodec"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE(GST_VERSION_MAJOR, GST_VERSION_MINOR, svtav1enc,
|
|
||||||
"Scalable Video Technology for AV1 Encoder (SVT-AV1 Encoder)", plugin_init,
|
|
||||||
VERSION, "LGPL", PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|
VERSION, "LGPL", PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|
||||||
|
|
|
@ -1,54 +1,17 @@
|
||||||
# standalone plugin meson configuration
|
svtav1_sources = [
|
||||||
project('gst-svt-av1', 'c',
|
'gstsvtav1enc.c',
|
||||||
version : '0.1',
|
|
||||||
meson_version : '>= 0.29',
|
|
||||||
default_options : [ 'buildtype=debugoptimized' ])
|
|
||||||
|
|
||||||
# GStreamer dependencies
|
|
||||||
gst_req = '>= 1.16'
|
|
||||||
gst_dep = dependency('gstreamer-1.0', version : gst_req,
|
|
||||||
fallback : ['gstreamer', 'gst_dep'])
|
|
||||||
gstbase_dep = dependency('gstreamer-base-1.0', version : gst_req,
|
|
||||||
fallback : ['gstreamer', 'gstbase_dep'])
|
|
||||||
gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
|
|
||||||
fallback : ['gstreamer', 'gstvideo_dep'])
|
|
||||||
plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
|
|
||||||
|
|
||||||
# common meson configuration
|
|
||||||
svtav1enc_dep = dependency('SvtAv1Enc')
|
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
|
||||||
cc_flags = [
|
|
||||||
'-O2',
|
|
||||||
'-D_FORTIFY_SOURCE=2',
|
|
||||||
'-Wformat',
|
|
||||||
'-Wformat-security',
|
|
||||||
'-fPIE',
|
|
||||||
'-fPIC',
|
|
||||||
'-fstack-protector-strong',
|
|
||||||
]
|
]
|
||||||
foreach flag: cc_flags
|
|
||||||
if cc.has_argument(flag)
|
|
||||||
add_global_arguments(flag, language: 'c')
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
|
svtav1_dep = dependency('SvtAv1Enc', version : '>= 1.1', required: get_option('svtav1'))
|
||||||
|
|
||||||
ldflags = [
|
if svtav1_dep.found()
|
||||||
'-Wl,-z,now',
|
gstsvtav1 = library('gstsvtav1',
|
||||||
'-Wl,-z,relro',
|
svtav1_sources,
|
||||||
'-Wl,-z,noexecstack',
|
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
|
||||||
]
|
include_directories : [configinc],
|
||||||
foreach lflag : ldflags
|
dependencies : [gstbase_dep, gstvideo_dep, svtav1_dep],
|
||||||
add_global_link_arguments(lflag, language : 'c')
|
install : true,
|
||||||
endforeach
|
install_dir : plugins_install_dir,
|
||||||
|
)
|
||||||
|
plugins += [gstsvtav1]
|
||||||
if svtav1enc_dep.found()
|
|
||||||
gstsvtav1enc = library('gstsvtav1enc',
|
|
||||||
'gstsvtav1enc.c',
|
|
||||||
dependencies: [gstbase_dep, gstvideo_dep, svtav1enc_dep],
|
|
||||||
install: true,
|
|
||||||
install_dir: plugins_install_dir,
|
|
||||||
)
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -158,6 +158,7 @@ option('soundtouch', type : 'feature', value : 'auto', description : 'Audio pitc
|
||||||
option('spandsp', type : 'feature', value : 'auto', description : 'Packet loss concealment audio plugin')
|
option('spandsp', type : 'feature', value : 'auto', description : 'Packet loss concealment audio plugin')
|
||||||
option('srt', type : 'feature', value : 'auto', description : 'Secure, Reliable, Transport client/server network source/sink plugin')
|
option('srt', type : 'feature', value : 'auto', description : 'Secure, Reliable, Transport client/server network source/sink plugin')
|
||||||
option('srtp', type : 'feature', value : 'auto', description : 'Secure RTP codec plugin')
|
option('srtp', type : 'feature', value : 'auto', description : 'Secure RTP codec plugin')
|
||||||
|
option('svtav1', type : 'feature', value : 'auto', description : 'Scalable Video Technology for AV1 plugin')
|
||||||
option('svthevcenc', type : 'feature', value : 'auto', description : 'Scalable Video Technology for HEVC encoder plugin')
|
option('svthevcenc', type : 'feature', value : 'auto', description : 'Scalable Video Technology for HEVC encoder plugin')
|
||||||
option('teletext', type : 'feature', value : 'auto', description : 'Teletext plugin')
|
option('teletext', type : 'feature', value : 'auto', description : 'Teletext plugin')
|
||||||
option('tinyalsa', type : 'feature', value : 'auto', description : 'TinyALSA plugin')
|
option('tinyalsa', type : 'feature', value : 'auto', description : 'TinyALSA plugin')
|
||||||
|
|
Loading…
Reference in a new issue