analytics: Move tensor meta to the analytics library

This commit is contained in:
Olivier Crête 2024-01-24 21:12:17 -05:00
parent 2bcbbe0d0a
commit 0d3d8d2818
8 changed files with 19 additions and 7 deletions

View file

@ -51,7 +51,6 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/analytics/analytics.h>
#include "tensor/gsttensormeta.h"
/* Object detection tensor id strings */
#define GST_MODEL_OBJECT_DETECTOR_BOXES "Gst.Model.ObjectDetector.Boxes"

View file

@ -26,7 +26,6 @@
#include "decoders/gstssdobjectdetector.h"
#include "gstonnxinference.h"
#include "tensor/gsttensormeta.h"
static gboolean
plugin_init (GstPlugin * plugin)

View file

@ -23,10 +23,10 @@
#define __GST_ONNX_CLIENT_H__
#include <gst/gst.h>
#include <gst/analytics/analytics.h>
#include <onnxruntime_cxx_api.h>
#include <gst/video/video.h>
#include "gstml.h"
#include "tensor/gsttensormeta.h"
GST_DEBUG_CATEGORY_EXTERN (onnx_inference_debug);

View file

@ -18,7 +18,6 @@ if onnxrt_dep.found()
'decoders/gstssdobjectdetector.c',
'gstonnxinference.cpp',
'gstonnxclient.cpp',
'tensor/gsttensormeta.c',
c_args : gst_plugins_bad_args + extra_args,
cpp_args : gst_plugins_bad_args + extra_args,
link_args : noseh_link_args,

View file

@ -30,5 +30,6 @@
#include <gst/analytics/gstanalyticsclassificationmtd.h>
#include <gst/analytics/gstanalyticsobjectdetectionmtd.h>
#include <gst/analytics/gstanalyticsobjecttrackingmtd.h>
#include <gst/analytics/gsttensormeta.h>
#endif /* __ANALYTICS_H__ */

View file

@ -19,10 +19,17 @@
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef __GST_TENSOR_META_H__
#define __GST_TENSOR_META_H__
#include <gst/gst.h>
#include <gst/analytics/analytics-meta-prelude.h>
#include <gst/analytics/gsttensor.h>
/**
* GstTensorDataType:
@ -114,9 +121,13 @@ G_BEGIN_DECLS
#define GST_TENSOR_META_INFO \
(gst_tensor_meta_get_info())
GST_ANALYTICS_META_API
GType gst_tensor_meta_api_get_type (void);
GST_ANALYTICS_META_API
const GstMetaInfo *gst_tensor_meta_get_info (void);
GST_ANALYTICS_META_API
gint gst_tensor_meta_get_index_from_id(GstTensorMeta *meta, GQuark id);
G_END_DECLS

View file

@ -1,14 +1,17 @@
analytics_sources = files( 'gstanalyticsmeta.c',
'gstanalyticsclassificationmtd.c',
'gstanalyticsobjectdetectionmtd.c',
'gstanalyticsobjecttrackingmtd.c')
'gstanalyticsobjecttrackingmtd.c',
'gsttensormeta.c')
analytics_headers = files( 'analytics.h',
'gstanalyticsmeta.h',
'analytics-meta-prelude.h',
'gstanalyticsclassificationmtd.h',
'gstanalyticsobjectdetectionmtd.h',
'gstanalyticsobjecttrackingmtd.h')
'gstanalyticsobjecttrackingmtd.h',
'gsttensormeta.h',
'gsttensor.h')
install_headers(analytics_headers, subdir : 'gstreamer-1.0/gst/analytics')
pkg_name = 'gstreamer-analytics-1.0'