mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-06-08 17:19:25 +00:00
tensordecoders: Move decoder out of the ONNX plugin
This commit is contained in:
parent
0d3d8d2818
commit
5692f665e8
|
@ -24,16 +24,12 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "decoders/gstssdobjectdetector.h"
|
|
||||||
#include "gstonnxinference.h"
|
#include "gstonnxinference.h"
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
gboolean success = GST_ELEMENT_REGISTER (ssd_object_detector, plugin);
|
return GST_ELEMENT_REGISTER (onnx_inference, plugin);
|
||||||
success |= GST_ELEMENT_REGISTER (onnx_inference, plugin);
|
|
||||||
|
|
||||||
return success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||||
|
|
|
@ -15,7 +15,6 @@ endif
|
||||||
if onnxrt_dep.found()
|
if onnxrt_dep.found()
|
||||||
gstonnx = library('gstonnx',
|
gstonnx = library('gstonnx',
|
||||||
'gstonnx.c',
|
'gstonnx.c',
|
||||||
'decoders/gstssdobjectdetector.c',
|
|
||||||
'gstonnxinference.cpp',
|
'gstonnxinference.cpp',
|
||||||
'gstonnxclient.cpp',
|
'gstonnxclient.cpp',
|
||||||
c_args : gst_plugins_bad_args + extra_args,
|
c_args : gst_plugins_bad_args + extra_args,
|
||||||
|
@ -23,7 +22,7 @@ if onnxrt_dep.found()
|
||||||
link_args : noseh_link_args,
|
link_args : noseh_link_args,
|
||||||
include_directories : [configinc, libsinc, cuda_stubinc],
|
include_directories : [configinc, libsinc, cuda_stubinc],
|
||||||
dependencies : [gstbase_dep, gstvideo_dep, gstanalytics_dep, onnxrt_dep,
|
dependencies : [gstbase_dep, gstvideo_dep, gstanalytics_dep, onnxrt_dep,
|
||||||
libm, gio_dep] + extra_deps,
|
libm] + extra_deps,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : plugins_install_dir,
|
install_dir : plugins_install_dir,
|
||||||
)
|
)
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/analytics/analytics-meta-prelude.h>
|
#include <gst/analytics/analytics-meta-prelude.h>
|
||||||
#include <gst/analytics/gsttensor.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstTensorDataType:
|
* GstTensorDataType:
|
||||||
|
|
|
@ -10,8 +10,7 @@ analytics_headers = files( 'analytics.h',
|
||||||
'gstanalyticsclassificationmtd.h',
|
'gstanalyticsclassificationmtd.h',
|
||||||
'gstanalyticsobjectdetectionmtd.h',
|
'gstanalyticsobjectdetectionmtd.h',
|
||||||
'gstanalyticsobjecttrackingmtd.h',
|
'gstanalyticsobjecttrackingmtd.h',
|
||||||
'gsttensormeta.h',
|
'gsttensormeta.h')
|
||||||
'gsttensor.h')
|
|
||||||
install_headers(analytics_headers, subdir : 'gstreamer-1.0/gst/analytics')
|
install_headers(analytics_headers, subdir : 'gstreamer-1.0/gst/analytics')
|
||||||
|
|
||||||
pkg_name = 'gstreamer-analytics-1.0'
|
pkg_name = 'gstreamer-analytics-1.0'
|
||||||
|
|
|
@ -11,7 +11,7 @@ foreach plugin : ['accurip', 'adpcmdec', 'adpcmenc', 'aiff', 'asfmux',
|
||||||
'mse', 'mxf', 'netsim', 'onvif', 'pcapparse', 'pnm', 'proxy',
|
'mse', 'mxf', 'netsim', 'onvif', 'pcapparse', 'pnm', 'proxy',
|
||||||
'rawparse', 'removesilence', 'rist', 'rtmp2', 'rtp', 'sdp',
|
'rawparse', 'removesilence', 'rist', 'rtmp2', 'rtp', 'sdp',
|
||||||
'segmentclip', 'siren', 'smooth', 'speed', 'subenc', 'switchbin',
|
'segmentclip', 'siren', 'smooth', 'speed', 'subenc', 'switchbin',
|
||||||
'timecode', 'transcode', 'unixfd', 'videofilters',
|
'tensordecoders', 'timecode', 'transcode', 'unixfd', 'videofilters',
|
||||||
'videoframe_audiolevel', 'videoparsers', 'videosignal',
|
'videoframe_audiolevel', 'videoparsers', 'videosignal',
|
||||||
'vmnc', 'y4m']
|
'vmnc', 'y4m']
|
||||||
if not get_option(plugin).disabled()
|
if not get_option(plugin).disabled()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* GStreamer gstreamer-ssdobjectdetector
|
* GStreamer gstreamer-ssdobjectdetector
|
||||||
* Copyright (C) 2021 Collabora Ltd.
|
* Copyright (C) 2021 Collabora Ltd.
|
||||||
*
|
*
|
||||||
* gstssdobjectdetector.cpp
|
* gstssdobjectdetector.c
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
13
subprojects/gst-plugins-bad/gst/tensordecoders/meson.build
Normal file
13
subprojects/gst-plugins-bad/gst/tensordecoders/meson.build
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
tensordecoders_sources = [
|
||||||
|
'gstssdobjectdetector.c'
|
||||||
|
]
|
||||||
|
|
||||||
|
gsttensordecoders = library('gsttensordecoders',
|
||||||
|
tensordecoders_sources,
|
||||||
|
c_args : gst_plugins_bad_args,
|
||||||
|
include_directories : [configinc],
|
||||||
|
dependencies : [gstbase_dep, gstvideo_dep, gstanalytics_dep, gio_dep, libm],
|
||||||
|
install : true,
|
||||||
|
install_dir : plugins_install_dir,
|
||||||
|
)
|
||||||
|
plugins += [gsttensordecoders]
|
|
@ -65,6 +65,7 @@ option('smooth', type : 'feature', value : 'auto')
|
||||||
option('speed', type : 'feature', value : 'auto')
|
option('speed', type : 'feature', value : 'auto')
|
||||||
option('subenc', type : 'feature', value : 'auto')
|
option('subenc', type : 'feature', value : 'auto')
|
||||||
option('switchbin', type : 'feature', value : 'auto')
|
option('switchbin', type : 'feature', value : 'auto')
|
||||||
|
option('tensordecoders', type : 'feature', value : 'auto')
|
||||||
option('timecode', type : 'feature', value : 'auto')
|
option('timecode', type : 'feature', value : 'auto')
|
||||||
option('unixfd', type : 'feature', value : 'auto')
|
option('unixfd', type : 'feature', value : 'auto')
|
||||||
option('videofilters', type : 'feature', value : 'auto')
|
option('videofilters', type : 'feature', value : 'auto')
|
||||||
|
|
Loading…
Reference in a new issue