tensor_decoder_sources = [
- 'tensordec.c',
- 'tensordec-plugins.c',
- 'tensordec-directvideo.c'
+ 'tensordec.c',
+ 'tensordec-plugins.c',
+ 'tensordec-directvideo.c',
+ 'tensordec-imagelabel.c',
+ 'tensordec-boundingbox.c'
]
tensor_decoderOBJ = static_library('tensor_decoder',
'tensor_filter_custom.c'
]
+c_args = []
+
+if get_option('ENABLE_TENSORFLOW_LITE')
+ tensor_filter_sources += 'tensor_filter_tensorflow_lite.c'
+ dependencies += dependency('tensorflow-lite')
+ c_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: '-Wno-sign-compare'
+ ).extract_all_objects()
+
+ objects += tensor_filter_tflitecoreOBJ
+endif
+
+if get_option('ENABLE_TENSORFLOW')
+ tensor_filter_sources += 'tensor_filter_tensorflow.c'
+ dependencies += dependency('tensorflow')
+ c_args += '-DENABLE_TENSORFLOW'
+
+ tensor_filter_tfcoreOBJ = static_library('tensor_filter_tfcore',
+ 'tensor_filter_tensorflow_core.cc',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ cpp_args: '-Wno-sign-compare'
+ ).extract_all_objects()
+
+ objects += tensor_filter_tflitecoreOBJ
+endif
+
tensor_filterOBJ = static_library('tensor_filter',
tensor_filter_sources,
dependencies: [
dependencies
],
- include_directories: inc
+ include_directories: inc,
+ c_args: c_args
).extract_all_objects()
objects += tensor_filterOBJ
)
add_project_arguments('-DVERSION="'+meson.project_version()+'"', language: 'c')
-add_project_arguments('-DSINGLE_BINARY', language: 'c')
gst_api_verision = '1.0'
gstreamer_audio = dependency('gstreamer-audio-' + gst_api_verision)
cc = meson.get_compiler('c')
+cxx = meson.get_compiler('cpp')
dependencies = [
glib,
gstreamer_audio,
# required 'false' mean is used only when needed.
cc.find_library('m', required: false), # cmath library
- cc.find_library('dl', required: false) # DL library
+ cc.find_library('dl', required: false), # DL library
+ cxx.find_library('pthread', required: false) # pthread for tensor_filter_tensorflow_lite
]
inc = include_directories('gst/nnstreamer')
subdir('gst/'+ p)
endforeach
+subdir('nnstreamer_example')
+
+if get_option('ENABLE_TEST')
+ subdir('tests')
+endif
+
nnstreamer_sources = [
'gst/nnstreamer/nnstreamer.c'
]
--- /dev/null
+option('ENABLE_TEST', type: 'boolean', value: true)
+option('ENABLE_TENSORFLOW_LITE', type: 'boolean', value: true)
+option('ENABLE_TENSORFLOW', type: 'boolean', value: false)
--- /dev/null
+dummyLSTM = shared_library('dummyLSTM',
+ 'dummy_LSTM.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
--- /dev/null
+dummyRNN = shared_library('dummyRNN',
+ 'dummy_RNN.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
--- /dev/null
+nnstreamer_customfilter_average = shared_library('nnstreamer_customfilter_average',
+ 'nnstreamer_customfilter_example_average.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
--- /dev/null
+dependencies += 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_average = shared_library('nnstreamer_customfilter_opencv_average',
+ 'nnstreamer_customfilter_opencv_average.cc',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
--- /dev/null
+nnstreamer_customfilter_passthrough = shared_library('nnstreamer_customfilter_passthrough',
+ 'nnstreamer_customfilter_example_passthrough.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
+
+nnstreamer_customfilter_passthrough_variable = shared_library('nnstreamer_customfilter_passthrough_variable',
+ 'nnstreamer_customfilter_example_passthrough_variable.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
--- /dev/null
+nnstreamer_customfilter_scaler = shared_library('nnstreamer_customfilter_scaler',
+ 'nnstreamer_customfilter_example_scaler.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
+
+nnstreamer_customfilter_scaler_allocator = shared_library('nnstreamer_customfilter_scaler_allocator',
+ 'nnstreamer_customfilter_example_scaler_allocator.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: objects
+)
--- /dev/null
+nnstreamer_example_cam = executable('nnstreamer_example_cam',
+ 'nnstreamer_example_cam.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc
+)
--- /dev/null
+nnstreamer_example_decoder_image_labelling = executable('nnstreamer_example_decoder_image_labelling',
+ 'nnstreamer_example_decoder_image_labelling.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc
+)
--- /dev/null
+nnstreamer_example_filter = executable('nnstreamer_example_filter',
+ 'nnstreamer_example_filter.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc
+)
--- /dev/null
+nnstreamer_example_filter_performance_profile = executable('nnstreamer_example_filter_performance_profile',
+ 'nnstreamer_example_filter_performance_profile.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc
+)
--- /dev/null
+dependencies += dependency('cairo')
+
+nnstreamer_example_object_detection = executable('nnstreamer_example_object_detection',
+ 'nnstreamer_example_object_detection.cc',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc
+)
--- /dev/null
+nnstreamer_sink_example = executable('nnstreamer_sink_example',
+ 'nnstreamer_sink_example.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc
+)
+
+nnstreamer_sink_example_play = executable('nnstreamer_sink_example_play',
+ 'nnstreamer_sink_example_play.c',
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc
+)
--- /dev/null
+gstreamer_app = dependency('gstreamer-app-' + gst_api_verision)
+
+dependencies += gstreamer_app
+
+subdir('custom_example_passthrough')
+subdir('custom_example_scaler')
+subdir('custom_example_average')
+subdir('custom_example_opencv')
+subdir('custom_example_RNN')
+subdir('custom_example_LSTM')
+
+subdir('example_cam')
+subdir('example_sink')
+subdir('example_filter')
+subdir('example_object_detection')
+subdir('example_decoder_image_labelling')
+subdir('example_filter_performance_profile')
--- /dev/null
+subdir('nnstreamer_tensors/tensors_test')
--- /dev/null
+testtensors_sources = [
+ 'gsttesttensors.c'
+]
+
+testtensors = shared_library('testtensors',
+ testtensors_sources,
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: tensor_commonOBJ
+)
+
+tensorscheck_sources = [
+ 'gsttensorscheck.c'
+]
+
+tensorscheckOBJ = shared_library('tensorscheck',
+ tensorscheck_sources,
+ dependencies: [
+ dependencies
+ ],
+ include_directories: inc,
+ objects: tensor_commonOBJ
+)