mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
onnx: Remove enums file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
This commit is contained in:
parent
a225755489
commit
d0b587eb15
4 changed files with 38 additions and 66 deletions
|
@ -26,9 +26,24 @@
|
||||||
#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 "gstonnxenums.h"
|
|
||||||
#include "tensor/gsttensormeta.h"
|
#include "tensor/gsttensormeta.h"
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
GST_ONNX_OPTIMIZATION_LEVEL_DISABLE_ALL,
|
||||||
|
GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_BASIC,
|
||||||
|
GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_EXTENDED,
|
||||||
|
GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_ALL,
|
||||||
|
} GstOnnxOptimizationLevel;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
GST_ONNX_EXECUTION_PROVIDER_CPU,
|
||||||
|
GST_ONNX_EXECUTION_PROVIDER_CUDA,
|
||||||
|
} GstOnnxExecutionProvider;
|
||||||
|
|
||||||
|
|
||||||
namespace GstOnnxNamespace {
|
namespace GstOnnxNamespace {
|
||||||
|
|
||||||
class GstOnnxClient {
|
class GstOnnxClient {
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* GStreamer gstreamer-onnxenums
|
|
||||||
* Copyright (C) 2021 Collabora Ltd
|
|
||||||
*
|
|
||||||
* gstonnxenums.h
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_ONNX_ENUMS_H__
|
|
||||||
#define __GST_ONNX_ENUMS_H__
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_ONNX_OPTIMIZATION_LEVEL_DISABLE_ALL,
|
|
||||||
GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_BASIC,
|
|
||||||
GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_EXTENDED,
|
|
||||||
GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_ALL,
|
|
||||||
} GstOnnxOptimizationLevel;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_ONNX_EXECUTION_PROVIDER_CPU,
|
|
||||||
GST_ONNX_EXECUTION_PROVIDER_CUDA,
|
|
||||||
} GstOnnxExecutionProvider;
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GST_ONNX_ENUMS_H__ */
|
|
|
@ -87,6 +87,28 @@
|
||||||
#include "gstonnxinference.h"
|
#include "gstonnxinference.h"
|
||||||
#include "gstonnxclient.h"
|
#include "gstonnxclient.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GstOnnxInference:
|
||||||
|
*
|
||||||
|
* @model_file model file
|
||||||
|
* @optimization_level: ONNX session optimization level
|
||||||
|
* @execution_provider: ONNX execution provider
|
||||||
|
* @onnx_client opaque pointer to ONNX client
|
||||||
|
* @onnx_disabled true if inference is disabled
|
||||||
|
* @video_info @ref GstVideoInfo of sink caps
|
||||||
|
*/
|
||||||
|
struct _GstOnnxInference
|
||||||
|
{
|
||||||
|
GstBaseTransform basetransform;
|
||||||
|
gchar *model_file;
|
||||||
|
GstOnnxOptimizationLevel optimization_level;
|
||||||
|
GstOnnxExecutionProvider execution_provider;
|
||||||
|
gpointer onnx_client;
|
||||||
|
gboolean onnx_disabled;
|
||||||
|
GstVideoInfo video_info;
|
||||||
|
};
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (onnx_inference_debug);
|
GST_DEBUG_CATEGORY_STATIC (onnx_inference_debug);
|
||||||
#define GST_CAT_DEFAULT onnx_inference_debug
|
#define GST_CAT_DEFAULT onnx_inference_debug
|
||||||
#define GST_ONNX_CLIENT_MEMBER( self ) ((GstOnnxNamespace::GstOnnxClient *) (self->onnx_client))
|
#define GST_ONNX_CLIENT_MEMBER( self ) ((GstOnnxNamespace::GstOnnxClient *) (self->onnx_client))
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include <gst/video/gstvideofilter.h>
|
#include <gst/video/gstvideofilter.h>
|
||||||
#include "gstonnxenums.h"
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -34,29 +33,6 @@ G_BEGIN_DECLS
|
||||||
G_DECLARE_FINAL_TYPE (GstOnnxInference, gst_onnx_inference, GST,
|
G_DECLARE_FINAL_TYPE (GstOnnxInference, gst_onnx_inference, GST,
|
||||||
ONNX_INFERENCE, GstBaseTransform)
|
ONNX_INFERENCE, GstBaseTransform)
|
||||||
|
|
||||||
/**
|
|
||||||
* GstOnnxInference:
|
|
||||||
*
|
|
||||||
* @model_file model file
|
|
||||||
* @optimization_level: ONNX session optimization level
|
|
||||||
* @execution_provider: ONNX execution provider
|
|
||||||
* @onnx_client opaque pointer to ONNX client
|
|
||||||
* @onnx_disabled true if inference is disabled
|
|
||||||
* @video_info @ref GstVideoInfo of sink caps
|
|
||||||
*
|
|
||||||
* Since: 1.24
|
|
||||||
*/
|
|
||||||
struct _GstOnnxInference
|
|
||||||
{
|
|
||||||
GstBaseTransform basetransform;
|
|
||||||
gchar *model_file;
|
|
||||||
GstOnnxOptimizationLevel optimization_level;
|
|
||||||
GstOnnxExecutionProvider execution_provider;
|
|
||||||
gpointer onnx_client;
|
|
||||||
gboolean onnx_disabled;
|
|
||||||
GstVideoInfo video_info;
|
|
||||||
};
|
|
||||||
|
|
||||||
GST_ELEMENT_REGISTER_DECLARE (onnx_inference)
|
GST_ELEMENT_REGISTER_DECLARE (onnx_inference)
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
Loading…
Reference in a new issue