Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
emmadrigal committed Oct 25, 2019
2 parents 9af5b40 + 54b0d09 commit c8940cd
Show file tree
Hide file tree
Showing 12 changed files with 331 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ tests/check/test-registry.reg

docs/plugins/gst-interpipe-decl-list.txt
docs/plugins/gst-interpipe-decl.txt
docs/plugins/gst-interpipe-docs.xml
docs/plugins/gst-interpipe-overrides.txt
docs/plugins/gst-interpipe-sections.new
docs/plugins/gst-interpipe-sections.txt.new
Expand All @@ -76,4 +75,4 @@ docs/plugins/sgml-build.stamp
docs/plugins/sgml.stamp
docs/plugins/xml/
docs/version.entities
docs/plugins/inspect-registry.xml
docs/plugins/inspect-registry.xml
2 changes: 1 addition & 1 deletion common
Submodule common updated from ac2f64 to 88e512
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
dnl initialize autoconf
dnl releases only do -Wall, git and prerelease does -Werror too
dnl use a three digit version number for releases, and four for git/pre
AC_INIT([GstInterpipe],[1.0.4],
AC_INIT([GstInterpipe],[1.0.5],
[http://www.github.com/RidgeRun/gst-interpipe-1.0],
[gst-interpipe],
[http://developer.ridgerun.com/wiki/index.php?title=GstInterpipe])
Expand Down
12 changes: 12 additions & 0 deletions docs/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
docconf = configuration_data()
docconf.set('GST_API_VERSION', apiversion)
docconf.set('VERSION', gst_interpipes_version)
docconf.set('PLUGINDIR', '@0@/lib/gstreamer-1.0'.format(get_option('libdir')))
version_entities = configure_file(input : 'version.entities.in',
output : 'version.entities',
configuration : docconf)

# Enter to plugins subdirectory and execute the meson.build
if get_option('enable-gtk-doc')
subdir('plugins')
endif
24 changes: 24 additions & 0 deletions docs/plugins/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copy the file provided in input: to a file in the build directory with
# the name output: in the current directory.

types = configure_file(input : 'gst-interpipe.types',
output : 'gst-interpipe.types',
copy : true)

version_conf = configuration_data()
version_conf.set('PACKAGE_VERSION', meson.project_version())
version_conf.set('GST_API_VERSION', apiversion)
version_conf.set('PACKAGE_NAME', 'GstInterpipe')
version_conf.set('PACKAGE_URL', pkg_interpipes_url)
configure_file(input : 'gst-interpipe-docs.xml.in',
output : 'gst-interpipe-docs.xml',
configuration: version_conf)

# Compiles and installs gtkdoc documentation into prefix/share/gtk-doc/html.
gnome.gtkdoc('gst-interpipes',
main_xml : '@0@/gst-interpipe-docs.xml'.format(meson.current_build_dir()),
src_dir : ['@0@/gst/interpipe/'.format(meson.source_root()), meson.current_build_dir()],
gobject_typesfile : types,
content_files : [version_entities],
dependencies : [gst_app_dep],
install : true)
10 changes: 10 additions & 0 deletions gst-interpipe.doap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ GstInterpipe is a plug-in with two elements which allow the communication betwee
</GitRepository>
</repository>

<release>
<Version>
<revision>1.0.5</revision>
<branch>master</branch>
<name></name>
<created>2019-10-25</created>
<file-release rdf:resource="" />
</Version>
</release>

<release>
<Version>
<revision>1.0.4</revision>
Expand Down
34 changes: 34 additions & 0 deletions gst/interpipe/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Define source code
gst_interpipes_sources = [
'gstinterpipe.c',
'gstinterpipeilistener.c',
'gstinterpipeinode.c',
'gstinterpipesink.c',
'gstinterpipesrc.c',
'gstplugin.c',
]

gst_interpipes_headers = [
'gstinterpipe.h',
'gstinterpipeilistener.h',
'gstinterpipeinode.h',
'gstinterpipesink.h',
'gstinterpipesrc.h',
]

# Build plugin library
gst_interpipes_lib = library('gstinterpipes-@0@'.format(apiversion),
gst_interpipes_sources,
c_args : gst_c_args,
version : apiversion,
include_directories : configinc,
install : true,
install_dir : plugin_install_dir,
dependencies : [gst_app_dep],
)

interpipe_plugin_dir = meson.current_build_dir()

# Define the library as an internal dependency to the current build
interpipes_dep = declare_dependency(link_with: gst_interpipes_lib,
dependencies : [gst_app_dep])
1 change: 1 addition & 0 deletions gst/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdir('interpipe')
176 changes: 176 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
project('gst-interpipes', 'c',
version : '1.0.4',
meson_version : '>= 0.50',)

gst_interpipes_version = meson.project_version()
version_arr = gst_interpipes_version.split('.')
gst_interpipes_version_major = version_arr[0].to_int()
gst_interpipes_version_minor = version_arr[1].to_int()
gst_interpipes_version_micro = version_arr[2].to_int()
if version_arr.length() == 4
gst_interpipes_version_nano = version_arr[3].to_int()
else
gst_interpipes_version_nano = 0
endif
gst_interpipes_version_is_dev = gst_interpipes_version_minor % 2 == 1 and gst_interpipes_version_micro < 90

# Find external dependencies
gst_app_dep = dependency('gstreamer-app-1.0', version : '>=1.0.5')
gst_check_dep = dependency('gstreamer-check-1.0', version : '>=1.0.5')

# Define compiler args and include directories
gst_c_args = ['-DHAVE_CONFIG_H']
configinc = include_directories('.')

# Define gstreamer API version
apiversion = '1.0'

# Define installation directories
prefix = get_option('prefix')
plugin_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
# Internal installation directory
interpipe_plugin_dir = []

# Get an object returns describing a compiler
cc = meson.get_compiler('c')

# Verify if the warning flags are available in the compiler
# If the flags is availale for the compiler it wiil be used in all compiler
# invocations with the exception of compile tests.
warning_flags = [
'-Wmissing-declarations',
'-Wmissing-prototypes',
'-Wredundant-decls',
'-Wundef',
'-Wwrite-strings',
'-Wformat',
'-Wformat-nonliteral',
'-Wformat-security',
'-Wold-style-definition',
'-Winit-self',
'-Wmissing-include-dirs',
'-Waddress',
'-Waggregate-return',
'-Wno-multichar',
'-Wdeclaration-after-statement',
'-Wvla',
'-Wpointer-arith',
]
foreach extra_arg : warning_flags
if cc.has_argument (extra_arg)
# Add flag to the compiler command line
add_project_arguments([extra_arg], language: 'c')
endif
endforeach

# Create an empty configuration object to set config.h information
cdata = configuration_data()

pkg_interpipes_url='http://developer.ridgerun.com/wiki/index.php?title=GstInterpipe'
# Set config.h information
cdata.set_quoted('GST_API_VERSION', apiversion)
cdata.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir')))
cdata.set_quoted('LIBDIR', join_paths(prefix, get_option('libdir')))
cdata.set_quoted('GST_API_VERSION', '1.0')
cdata.set_quoted('GST_LICENSE', 'LGPL')
cdata.set_quoted('PACKAGE', 'gst-interpipe')
cdata.set_quoted('PACKAGE_NAME', 'GstInterpipe')
cdata.set_quoted('PACKAGE_STRING', 'GstInterpipe @0@'.format(gst_interpipes_version))
cdata.set_quoted('PACKAGE_TARNAME', 'gst-interpipe')
cdata.set_quoted('PACKAGE_BUGREPORT', 'http://www.github.com/RidgeRun/gst-interpipe-1.0')
cdata.set_quoted('PACKAGE_URL', pkg_interpipes_url)
cdata.set_quoted('PACKAGE_VERSION', gst_interpipes_version)
cdata.set_quoted('PLUGINDIR', plugin_install_dir)
cdata.set_quoted('VERSION', gst_interpipes_version)

if gst_interpipes_version_nano > 0
# Have GST_ERROR message printed when running from git
cdata.set('GST_LEVEL_DEFAULT', 'GST_LEVEL_ERROR')
else
cdata.set('GST_LEVEL_DEFAULT', 'GST_LEVEL_NONE')
endif

# GStreamer package name and origin url
gst_package_name = get_option('package-name')
if gst_package_name == ''
if gst_interpipes_version_nano == 0
gst_package_name = 'GstInterpipe source release'
elif gst_interpipes_version_nano == 1
gst_package_name = 'GStreamer git'
else
gst_package_name = 'GStreamer prerelease'
endif
endif
cdata.set_quoted('GST_PACKAGE_NAME', gst_package_name)
cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))

# These are only needed/used by the ABI tests
host_defines = [
[ 'x86', 'HAVE_CPU_I386' ],
[ 'x86_64', 'HAVE_CPU_X86_64' ],
[ 'arm', 'HAVE_CPU_ARM' ],
[ 'aarch64', 'HAVE_CPU_AARCH64' ],
[ 'mips', 'HAVE_CPU_MIPS' ],
[ 'powerpc', 'HAVE_CPU_PPC' ],
[ 'powerpc64', 'HAVE_CPU_PPC64' ],
[ 'alpha', 'HAVE_CPU_ALPHA' ],
[ 'sparc', 'HAVE_CPU_SPARC' ],
[ 'ia64', 'HAVE_CPU_IA64' ],
[ 'hppa', 'HAVE_CPU_HPPA' ],
[ 'm68k', 'HAVE_CPU_M68K' ],
[ 's390', 'HAVE_CPU_S390' ],
]
foreach h : host_defines
if h.get(0) == host_machine.cpu()
cdata.set(h.get(1), 1)
else
cdata.set(h.get(1), false)
endif
endforeach

cdata.set_quoted('HOST_CPU', host_machine.cpu())

# Verify if the specified header exists
check_headers = [
'dlfcn.h',
'inttypes.h',
'memory.h',
'poll.h',
'stdint.h',
'stdlib.h',
'stdio_ext.h',
'strings.h',
'string.h',
'sys/param.h',
'sys/poll.h',
'sys/prctl.h',
'sys/socket.h',
'sys/stat.h',
'sys/times.h',
'sys/time.h',
'sys/types.h',
'sys/utsname.h',
'sys/wait.h',
'ucontext.h',
'unistd.h',
'valgrind/valgrind.h',
'sys/resource.h',
]

foreach h : check_headers
if cc.has_header(h)
define = 'HAVE_' + h.underscorify().to_upper()
cdata.set(define, 1)
endif
endforeach

# Gtk documentation
gnome = import('gnome')

# Enter to each subdirectory and execute the meson.build
subdir('gst')
subdir('tests')
subdir('docs')

# Meson will generate a header file all the entries in the configuration data object
configure_file(output : 'config.h', configuration : cdata)
9 changes: 9 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Feature options
option('tests', type : 'feature', value : 'auto', yield : true, description : 'Enable tests')
option('enable-gtk-doc', type : 'boolean', value : true, description : 'Use gtk-doc to build documentation')

# Common options
option('package-name', type : 'string', yield : true,
description : 'Package name to use in plugins')
option('package-origin', type : 'string', value : 'Unknown package origin', yield : true,
description : 'Package origin URL to use in plugins')
59 changes: 59 additions & 0 deletions tests/check/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Tests and condition when to skip the test
core_tests = [
[ 'gst/test_allow_renegotiation_property.c' ],
[ 'gst/test_anonymous_connection.c' ],
[ 'gst/test_block_switch.c' ],
[ 'gst/test_caps_renegotiation.c' ],
[ 'gst/test_enable_sync.c' ],
[ 'gst/test_get_caps.c' ],
[ 'gst/test_hot_plug.c' ],
[ 'gst/test_in_bounds_events.c' ],
[ 'gst/test_interpipe_synchronization.c' ],
[ 'gst/test_invalid_caps.c' ],
[ 'gst/test_node_name_removed.c' ],
[ 'gst/test_out_of_bounds_events.c' ],
[ 'gst/test_out_of_bounds_upstream_events.c' ],
[ 'gst/test_reconfigure_event.c' ],
[ 'gst/test_set_caps.c' ],
]

# Add C Definitions for tests
test_defines = [
'-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
]

# Define test dependencies
test_deps=[gst_app_dep, gst_check_dep, interpipes_dep]

# Define plugins path
gst_dep = dependency('gstreamer-1.0')
plugins_dir = gst_dep.get_pkgconfig_variable('pluginsdir')

# Build and run tests
foreach t : core_tests
fname = t[0]
test_name = fname.split('.')[0].underscorify()
skip_test = t.get(1, false)
link_with_libs = t.get(2, [])

if not skip_test
# Creates a new executable for each test
exe = executable(test_name, fname,
c_args : gst_c_args + test_defines,
cpp_args : gst_c_args + test_defines,
include_directories : [configinc],
link_with : link_with_libs,
dependencies : test_deps,
)
# Create enviomen object to stores information about the environment
# variables set during tests.

env = environment()
env.set('GST_PLUGIN_PATH_1_0', interpipe_plugin_dir + ':' + plugins_dir)
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('CK_DEFAULT_TIMEOUT', '120')
env.set('GST_REGISTRY', '@0@/@[email protected]'.format(meson.current_build_dir(), test_name))
# Run tests
test(test_name, exe, env: env, timeout : 60)
endif
endforeach
3 changes: 3 additions & 0 deletions tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if not get_option('tests').disabled()
subdir('check')
endif

0 comments on commit c8940cd

Please sign in to comment.