mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
analytics: Move tensor meta to the analytics library
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6000>
This commit is contained in:
parent
09be1ab863
commit
03fd6fadbc
8 changed files with 17 additions and 8 deletions
|
@ -51,7 +51,6 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include <gst/analytics/analytics.h>
|
#include <gst/analytics/analytics.h>
|
||||||
#include "tensor/gsttensormeta.h"
|
|
||||||
|
|
||||||
/* Object detection tensor id strings */
|
/* Object detection tensor id strings */
|
||||||
#define GST_MODEL_OBJECT_DETECTOR_BOXES "Gst.Model.ObjectDetector.Boxes"
|
#define GST_MODEL_OBJECT_DETECTOR_BOXES "Gst.Model.ObjectDetector.Boxes"
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include "decoders/gstssdobjectdetector.h"
|
#include "decoders/gstssdobjectdetector.h"
|
||||||
#include "gstonnxinference.h"
|
#include "gstonnxinference.h"
|
||||||
#include "tensor/gsttensormeta.h"
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
#define __GST_ONNX_CLIENT_H__
|
#define __GST_ONNX_CLIENT_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
#include <gst/analytics/analytics.h>
|
||||||
#include <onnxruntime_cxx_api.h>
|
#include <onnxruntime_cxx_api.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include "gstml.h"
|
#include "gstml.h"
|
||||||
#include "tensor/gsttensormeta.h"
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_EXTERN (onnx_inference_debug);
|
GST_DEBUG_CATEGORY_EXTERN (onnx_inference_debug);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ if onnxrt_dep.found()
|
||||||
'decoders/gstssdobjectdetector.c',
|
'decoders/gstssdobjectdetector.c',
|
||||||
'gstonnxinference.cpp',
|
'gstonnxinference.cpp',
|
||||||
'gstonnxclient.cpp',
|
'gstonnxclient.cpp',
|
||||||
'tensor/gsttensormeta.c',
|
|
||||||
c_args : gst_plugins_bad_args + extra_args,
|
c_args : gst_plugins_bad_args + extra_args,
|
||||||
cpp_args : gst_plugins_bad_args + extra_args,
|
cpp_args : gst_plugins_bad_args + extra_args,
|
||||||
link_args : noseh_link_args,
|
link_args : noseh_link_args,
|
||||||
|
|
|
@ -31,5 +31,6 @@
|
||||||
#include <gst/analytics/gstanalyticsobjectdetectionmtd.h>
|
#include <gst/analytics/gstanalyticsobjectdetectionmtd.h>
|
||||||
#include <gst/analytics/gstanalyticsobjecttrackingmtd.h>
|
#include <gst/analytics/gstanalyticsobjecttrackingmtd.h>
|
||||||
#include <gst/analytics/gstanalyticssegmentationmtd.h>
|
#include <gst/analytics/gstanalyticssegmentationmtd.h>
|
||||||
|
#include <gst/analytics/gsttensormeta.h>
|
||||||
|
|
||||||
#endif /* __ANALYTICS_H__ */
|
#endif /* __ANALYTICS_H__ */
|
||||||
|
|
|
@ -19,10 +19,16 @@
|
||||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GST_TENSOR_META_H__
|
#ifndef __GST_TENSOR_META_H__
|
||||||
#define __GST_TENSOR_META_H__
|
#define __GST_TENSOR_META_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
#include <gst/analytics/analytics-meta-prelude.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstTensorDataType:
|
* GstTensorDataType:
|
||||||
|
@ -114,9 +120,13 @@ G_BEGIN_DECLS
|
||||||
#define GST_TENSOR_META_INFO \
|
#define GST_TENSOR_META_INFO \
|
||||||
(gst_tensor_meta_get_info())
|
(gst_tensor_meta_get_info())
|
||||||
|
|
||||||
|
GST_ANALYTICS_META_API
|
||||||
GType gst_tensor_meta_api_get_type (void);
|
GType gst_tensor_meta_api_get_type (void);
|
||||||
|
|
||||||
|
GST_ANALYTICS_META_API
|
||||||
const GstMetaInfo *gst_tensor_meta_get_info (void);
|
const GstMetaInfo *gst_tensor_meta_get_info (void);
|
||||||
|
|
||||||
|
GST_ANALYTICS_META_API
|
||||||
gint gst_tensor_meta_get_index_from_id(GstTensorMeta *meta, GQuark id);
|
gint gst_tensor_meta_get_index_from_id(GstTensorMeta *meta, GQuark id);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
|
@ -2,7 +2,8 @@ analytics_sources = files( 'gstanalyticsmeta.c',
|
||||||
'gstanalyticsclassificationmtd.c',
|
'gstanalyticsclassificationmtd.c',
|
||||||
'gstanalyticsobjectdetectionmtd.c',
|
'gstanalyticsobjectdetectionmtd.c',
|
||||||
'gstanalyticsobjecttrackingmtd.c',
|
'gstanalyticsobjecttrackingmtd.c',
|
||||||
'gstanalyticssegmentationmtd.c')
|
'gstanalyticssegmentationmtd.c',
|
||||||
|
'gsttensormeta.c')
|
||||||
|
|
||||||
analytics_headers = files( 'analytics.h',
|
analytics_headers = files( 'analytics.h',
|
||||||
'gstanalyticsmeta.h',
|
'gstanalyticsmeta.h',
|
||||||
|
@ -10,8 +11,8 @@ analytics_headers = files( 'analytics.h',
|
||||||
'gstanalyticsclassificationmtd.h',
|
'gstanalyticsclassificationmtd.h',
|
||||||
'gstanalyticsobjectdetectionmtd.h',
|
'gstanalyticsobjectdetectionmtd.h',
|
||||||
'gstanalyticsobjecttrackingmtd.h',
|
'gstanalyticsobjecttrackingmtd.h',
|
||||||
'gstanalyticssegmentationmtd.h')
|
'gstanalyticssegmentationmtd.h',
|
||||||
|
'gsttensormeta.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'
|
||||||
|
|
Loading…
Reference in a new issue