tensordecoders: Move decoder out of the ONNX plugin

This commit is contained in:
Olivier Crête 2024-01-25 01:09:13 -05:00
parent 0d3d8d2818
commit 5692f665e8
9 changed files with 19 additions and 12 deletions

View file

@ -24,16 +24,12 @@
#include "config.h"
#endif
#include "decoders/gstssdobjectdetector.h"
#include "gstonnxinference.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
gboolean success = GST_ELEMENT_REGISTER (ssd_object_detector, plugin);
success |= GST_ELEMENT_REGISTER (onnx_inference, plugin);
return success;
return GST_ELEMENT_REGISTER (onnx_inference, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -15,7 +15,6 @@ endif
if onnxrt_dep.found()
gstonnx = library('gstonnx',
'gstonnx.c',
'decoders/gstssdobjectdetector.c',
'gstonnxinference.cpp',
'gstonnxclient.cpp',
c_args : gst_plugins_bad_args + extra_args,
@ -23,7 +22,7 @@ if onnxrt_dep.found()
link_args : noseh_link_args,
include_directories : [configinc, libsinc, cuda_stubinc],
dependencies : [gstbase_dep, gstvideo_dep, gstanalytics_dep, onnxrt_dep,
libm, gio_dep] + extra_deps,
libm] + extra_deps,
install : true,
install_dir : plugins_install_dir,
)

View file

@ -29,7 +29,6 @@
#include <gst/gst.h>
#include <gst/analytics/analytics-meta-prelude.h>
#include <gst/analytics/gsttensor.h>
/**
* GstTensorDataType:

View file

@ -10,8 +10,7 @@ analytics_headers = files( 'analytics.h',
'gstanalyticsclassificationmtd.h',
'gstanalyticsobjectdetectionmtd.h',
'gstanalyticsobjecttrackingmtd.h',
'gsttensormeta.h',
'gsttensor.h')
'gsttensormeta.h')
install_headers(analytics_headers, subdir : 'gstreamer-1.0/gst/analytics')
pkg_name = 'gstreamer-analytics-1.0'

View file

@ -11,7 +11,7 @@ foreach plugin : ['accurip', 'adpcmdec', 'adpcmenc', 'aiff', 'asfmux',
'mse', 'mxf', 'netsim', 'onvif', 'pcapparse', 'pnm', 'proxy',
'rawparse', 'removesilence', 'rist', 'rtmp2', 'rtp', 'sdp',
'segmentclip', 'siren', 'smooth', 'speed', 'subenc', 'switchbin',
'timecode', 'transcode', 'unixfd', 'videofilters',
'tensordecoders', 'timecode', 'transcode', 'unixfd', 'videofilters',
'videoframe_audiolevel', 'videoparsers', 'videosignal',
'vmnc', 'y4m']
if not get_option(plugin).disabled()

View file

@ -2,7 +2,7 @@
* GStreamer gstreamer-ssdobjectdetector
* Copyright (C) 2021 Collabora Ltd.
*
* gstssdobjectdetector.cpp
* gstssdobjectdetector.c
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View 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]

View file

@ -65,6 +65,7 @@ option('smooth', type : 'feature', value : 'auto')
option('speed', type : 'feature', value : 'auto')
option('subenc', type : 'feature', value : 'auto')
option('switchbin', type : 'feature', value : 'auto')
option('tensordecoders', type : 'feature', value : 'auto')
option('timecode', type : 'feature', value : 'auto')
option('unixfd', type : 'feature', value : 'auto')
option('videofilters', type : 'feature', value : 'auto')