tensor_common_sources = [
- 'tensor_common.c',
- 'tensor_repo.c'
+ 'tensor_common.c',
+ 'tensor_repo.c'
]
tensor_commonOBJ = static_library('tensor_common',
- tensor_common_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_common_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_commonOBJ
tensor_aggregator_sources = [
- 'tensor_aggregator.c'
+ 'tensor_aggregator.c'
]
tensor_aggregatorOBJ = static_library('tensor_aggregator',
- tensor_aggregator_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_aggregator_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_aggregatorOBJ
tensor_converter_sources = [
- 'tensor_converter.c'
+ 'tensor_converter.c'
]
tensor_converterOBJ = static_library('tensor_converter',
- tensor_converter_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_converter_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_converterOBJ
tensor_decoder_sources = [
- 'tensordec.c',
- 'tensordec-plugins.c',
- 'tensordec-directvideo.c',
- 'tensordec-imagelabel.c',
- 'tensordec-boundingbox.c'
+ 'tensordec.c',
+ 'tensordec-plugins.c',
+ 'tensordec-directvideo.c',
+ 'tensordec-imagelabel.c',
+ 'tensordec-boundingbox.c'
]
tensor_decoderOBJ = static_library('tensor_decoder',
- tensor_decoder_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_decoder_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_decoderOBJ
tensor_demux_sources = [
- 'gsttensordemux.c'
+ 'gsttensordemux.c'
]
tensor_demuxOBJ = static_library('tensor_demux',
- tensor_demux_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_demux_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_demuxOBJ
-tensor_filter_sources = [
- 'tensor_filter.c',
- 'tensor_filter_custom.c'
-]
-
tensor_filter_args = [nnstreamer_base_args]
+tensor_filterOBJ = []
if get_option('ENABLE_TENSORFLOW_LITE')
- tensor_filter_sources += 'tensor_filter_tensorflow_lite.c'
- dependencies += dependency('tensorflow-lite')
- tensor_filter_args += ['-DENABLE_TENSORFLOW_LITE']
-
- tensor_filter_tflitecoreOBJ = static_library('tensor_filter_tflitecore',
- 'tensor_filter_tensorflow_lite_core.cc',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- cpp_args: tensor_filter_args + ['-Wno-sign-compare']
- ).extract_all_objects()
-
- objects += tensor_filter_tflitecoreOBJ
+ nnstreamer_deps += [dependency('tensorflow-lite')]
+ tensor_filter_args += ['-DENABLE_TENSORFLOW_LITE']
+
+ tensor_filter_tflitecoreOBJ = static_library('tensor_filter_tflitecore',
+ ['tensor_filter_tensorflow_lite.c', 'tensor_filter_tensorflow_lite_core.cc'],
+ c_args: tensor_filter_args,
+ cpp_args: tensor_filter_args + ['-Wno-sign-compare'],
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
+ ).extract_all_objects()
+
+ tensor_filterOBJ += tensor_filter_tflitecoreOBJ
endif
if get_option('ENABLE_TENSORFLOW')
- tensor_filter_sources += 'tensor_filter_tensorflow.c'
- dependencies += dependency('tensorflow')
- dependencies += dependency('protobuf')
- tensor_filter_args += ['-DENABLE_TENSORFLOW']
-
- tensor_filter_tfcoreOBJ = static_library('tensor_filter_tfcore',
- 'tensor_filter_tensorflow_core.cc',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- cpp_args: tensor_filter_args + ['-Wno-sign-compare']
- ).extract_all_objects()
-
- objects += tensor_filter_tflitecoreOBJ
+ nnstreamer_deps += [dependency('tensorflow'), dependency('protobuf')]
+ tensor_filter_args += ['-DENABLE_TENSORFLOW']
+
+ tensor_filter_tfcoreOBJ = static_library('tensor_filter_tfcore',
+ ['tensor_filter_tensorflow.c', 'tensor_filter_tensorflow_core.cc'],
+ c_args: tensor_filter_args,
+ cpp_args: tensor_filter_args + ['-Wno-sign-compare'],
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
+ ).extract_all_objects()
+
+ tensor_filterOBJ += tensor_filter_tfcoreOBJ
endif
-tensor_filterOBJ = static_library('tensor_filter',
- tensor_filter_sources,
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- c_args: tensor_filter_args
+tensor_filter_mainOBJ = static_library('tensor_filter',
+ ['tensor_filter.c', 'tensor_filter_custom.c'],
+ c_args: tensor_filter_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
+tensor_filterOBJ += tensor_filter_mainOBJ
+
objects += tensor_filterOBJ
tensor_merge_sources = [
- 'gsttensormerge.c'
+ 'gsttensormerge.c'
]
tensor_mergeOBJ = static_library('tensor_merge',
- tensor_merge_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_merge_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_mergeOBJ
tensor_mux_sources = [
- 'gsttensormux.c'
+ 'gsttensormux.c'
]
tensor_muxOBJ = static_library('tensor_mux',
- tensor_mux_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_mux_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_muxOBJ
tensor_reposink_sources = [
- 'tensor_reposink.c'
+ 'tensor_reposink.c'
]
tensor_reposinkOBJ = static_library('tensor_reposink',
- tensor_reposink_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_reposink_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_reposinkOBJ
tensor_reposrc_sources = [
- 'tensor_reposrc.c'
+ 'tensor_reposrc.c'
]
tensor_reposrcOBJ = static_library('tensor_reposrc',
- tensor_reposrc_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_reposrc_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_reposrcOBJ
tensor_saveload_sources = [
- 'tensor_load.c'
+ 'tensor_load.c'
]
tensor_saveloadOBJ = static_library('tensor_saveload',
- tensor_saveload_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_saveload_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_saveloadOBJ
tensor_sink_sources = [
- 'tensor_sink.c'
+ 'tensor_sink.c'
]
tensor_sinkOBJ = static_library('tensor_sink',
- tensor_sink_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_sink_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_sinkOBJ
tensor_split_sources = [
- 'gsttensorsplit.c'
+ 'gsttensorsplit.c'
]
tensor_splitOBJ = static_library('tensor_split',
- tensor_split_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_split_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_splitOBJ
tensor_transform_sources = [
- 'tensor_transform.c'
+ 'tensor_transform.c'
]
orcsrc = 'transform-orc'
endif
tensor_transformOBJ = static_library('tensor_transform',
- tensor_transform_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc
+ tensor_transform_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
).extract_all_objects()
objects += tensor_transformOBJ
# If you are using Tizen 5.0+ or Ubuntu/Bionix+, you don't need to mind meson version.
project('nnstreamer', 'c', 'cpp',
- version: '0.1.0',
- license: ['LGPL'],
- meson_version: '>=0.40.0',
- default_options: [
- 'warning_level=1',
- 'c_std=c89',
- 'cpp_std=c++11'
- ]
+ version: '0.1.0',
+ license: ['LGPL'],
+ meson_version: '>=0.40.0',
+ default_options: [
+ 'warning_level=1',
+ 'c_std=c89',
+ 'cpp_std=c++11'
+ ]
)
add_project_arguments('-DVERSION="'+meson.project_version()+'"', language: 'c')
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
-dependencies = [
- glib_dep,
- gst_dep,
- gst_base_dep,
- gst_controller_dep,
- gst_video_dep,
- gst_audio_dep,
- # required 'false' mean is used only when needed.
- cc.find_library('m', required: false), # cmath library
- cc.find_library('dl', required: false), # DL library
- cxx.find_library('pthread', required: false) # pthread for tensor_filter_tensorflow_lite
+nnstreamer_deps = [
+ glib_dep,
+ gst_dep,
+ gst_base_dep,
+ gst_controller_dep,
+ gst_video_dep,
+ gst_audio_dep,
+ # required 'false' mean is used only when needed.
+ cc.find_library('m', required: false), # cmath library
+ cc.find_library('dl', required: false), # DL library
+ cxx.find_library('pthread', required: false) # pthread for tensor_filter_tensorflow_lite
]
+nnstreamer_inc = include_directories('gst/nnstreamer')
nnstreamer_base_args = []
-inc = include_directories('gst/nnstreamer')
-
# Orc
have_orcc = false
orcc_args = []
-orc_dep = dependency('orc-0.4', version : '>= 0.4.24', required : true)
-orcc = find_program('orcc', required : true)
+orc_dep = dependency('orc-0.4', version: '>= 0.4.24', required: true)
+orcc = find_program('orcc', required: true)
if orc_dep.found() and orcc.found()
have_orcc = true
orcc_args = [orcc, '--include', 'glib.h']
- dependencies += [orc_dep]
+ nnstreamer_deps += [orc_dep]
nnstreamer_base_args += ['-DHAVE_ORC=1']
else
message('Cannot find orc library')
endif
projects = [
- 'nnstreamer',
- 'tensor_aggregator',
- 'tensor_converter',
- 'tensor_decoder',
- 'tensor_demux',
- 'tensor_merge',
- 'tensor_mux',
- 'tensor_saveload',
- 'tensor_sink',
- 'tensor_split',
- 'tensor_transform',
- 'tensor_filter',
- 'tensor_reposrc',
- 'tensor_reposink'
+ 'nnstreamer',
+ 'tensor_aggregator',
+ 'tensor_converter',
+ 'tensor_decoder',
+ 'tensor_demux',
+ 'tensor_merge',
+ 'tensor_mux',
+ 'tensor_saveload',
+ 'tensor_sink',
+ 'tensor_split',
+ 'tensor_transform',
+ 'tensor_filter',
+ 'tensor_reposrc',
+ 'tensor_reposink'
]
objects = []
foreach p : projects
- subdir('gst/'+ p)
+ subdir('gst/'+ p)
endforeach
subdir('nnstreamer_example')
if get_option('ENABLE_TEST')
- subdir('tests')
+ subdir('tests')
endif
nnstreamer_sources = [
- 'gst/nnstreamer/nnstreamer.c'
+ 'gst/nnstreamer/nnstreamer.c'
]
# "both_libraries" are supported from 0.46.
nnstreamer = shared_library('nnstreamer',
- nnstreamer_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ nnstreamer_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: objects
)
nnstreamer = static_library('nnstreamer',
- nnstreamer_sources,
- c_args: nnstreamer_base_args,
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ nnstreamer_sources,
+ c_args: nnstreamer_base_args,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: objects
)
dummyLSTM = shared_library('dummyLSTM',
- 'dummy_LSTM.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'dummy_LSTM.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
dummyRNN = shared_library('dummyRNN',
- 'dummy_RNN.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'dummy_RNN.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
nnstreamer_customfilter_average = shared_library('nnstreamer_customfilter_average',
- 'nnstreamer_customfilter_example_average.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'nnstreamer_customfilter_example_average.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
-dependencies += dependency('opencv')
+opencv_dep = dependency('opencv')
nnstreamer_customfilter_opencv_scaler = shared_library('nnstreamer_customfilter_opencv_scaler',
- 'nnstreamer_customfilter_opencv_scaler.cc',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'nnstreamer_customfilter_opencv_scaler.cc',
+ dependencies: [nnstreamer_deps, opencv_dep],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
nnstreamer_customfilter_opencv_average = shared_library('nnstreamer_customfilter_opencv_average',
- 'nnstreamer_customfilter_opencv_average.cc',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'nnstreamer_customfilter_opencv_average.cc',
+ dependencies: [nnstreamer_deps, opencv_dep],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
nnstreamer_customfilter_passthrough = shared_library('nnstreamer_customfilter_passthrough',
- 'nnstreamer_customfilter_example_passthrough.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'nnstreamer_customfilter_example_passthrough.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
nnstreamer_customfilter_passthrough_variable = shared_library('nnstreamer_customfilter_passthrough_variable',
- 'nnstreamer_customfilter_example_passthrough_variable.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'nnstreamer_customfilter_example_passthrough_variable.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
nnstreamer_customfilter_scaler = shared_library('nnstreamer_customfilter_scaler',
- 'nnstreamer_customfilter_example_scaler.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'nnstreamer_customfilter_example_scaler.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
nnstreamer_customfilter_scaler_allocator = shared_library('nnstreamer_customfilter_scaler_allocator',
- 'nnstreamer_customfilter_example_scaler_allocator.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: objects
+ 'nnstreamer_customfilter_example_scaler_allocator.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: [tensor_commonOBJ, tensor_filterOBJ]
)
-nnstreamer_example_cam = executable('nnstreamer_example_cam',
- 'nnstreamer_example_cam.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc
+nnstreamer_example_cam = executable('nnstreamer_example_cam',
+ 'nnstreamer_example_cam.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
)
-nnstreamer_example_decoder_image_labelling = executable('nnstreamer_example_decoder_image_labelling',
- 'nnstreamer_example_decoder_image_labelling.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc
+nnstreamer_example_decoder_image_labelling = executable('nnstreamer_example_decoder_image_labelling',
+ 'nnstreamer_example_decoder_image_labelling.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
)
-nnstreamer_example_filter = executable('nnstreamer_example_filter',
- 'nnstreamer_example_filter.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc
+nnstreamer_example_filter = executable('nnstreamer_example_filter',
+ 'nnstreamer_example_filter.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
)
-nnstreamer_example_filter_performance_profile = executable('nnstreamer_example_filter_performance_profile',
- 'nnstreamer_example_filter_performance_profile.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc
+nnstreamer_example_filter_performance_profile = executable('nnstreamer_example_filter_performance_profile',
+ 'nnstreamer_example_filter_performance_profile.c',
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc
)
-dependencies += dependency('cairo')
+cairo_dep = dependency('cairo')
-nnstreamer_example_object_detection = executable('nnstreamer_example_object_detection',
- 'nnstreamer_example_object_detection.cc',
- dependencies: [
- dependencies
- ],
- include_directories: inc
+nnstreamer_example_object_detection = executable('nnstreamer_example_object_detection',
+ 'nnstreamer_example_object_detection.cc',
+ dependencies: [nnstreamer_deps, cairo_dep],
+ include_directories: nnstreamer_inc
)
-nnstreamer_sink_example = executable('nnstreamer_sink_example',
- 'nnstreamer_sink_example.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc
+nnstreamer_sink_example = executable('nnstreamer_sink_example',
+ 'nnstreamer_sink_example.c',
+ dependencies: [nnstreamer_deps, gst_app_dep],
+ include_directories: nnstreamer_inc
)
-nnstreamer_sink_example_play = executable('nnstreamer_sink_example_play',
- 'nnstreamer_sink_example_play.c',
- dependencies: [
- dependencies
- ],
- include_directories: inc
+nnstreamer_sink_example_play = executable('nnstreamer_sink_example_play',
+ 'nnstreamer_sink_example_play.c',
+ dependencies: [nnstreamer_deps, gst_app_dep],
+ include_directories: nnstreamer_inc
)
-gstreamer_app = dependency('gstreamer-app-' + gst_api_verision)
-
-dependencies += gstreamer_app
-
subdir('custom_example_passthrough')
subdir('custom_example_scaler')
subdir('custom_example_average')
testtensors_sources = [
- 'gsttesttensors.c'
+ 'gsttesttensors.c'
]
-testtensors = shared_library('testtensors',
- testtensors_sources,
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: tensor_commonOBJ
+testtensorsOBJ = shared_library('testtensors',
+ testtensors_sources,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: tensor_commonOBJ
)
tensorscheck_sources = [
]
tensorscheckOBJ = shared_library('tensorscheck',
- tensorscheck_sources,
- dependencies: [
- dependencies
- ],
- include_directories: inc,
- objects: tensor_commonOBJ
+ tensorscheck_sources,
+ dependencies: [nnstreamer_deps],
+ include_directories: nnstreamer_inc,
+ objects: tensor_commonOBJ
)