1 /* 2 * GStreamer gstreamer-onnxelement 3 * Copyright (C) 2021 Collabora Ltd 4 * 5 * gstonnxelement.h 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library; if not, write to the 19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef __GST_ONNX_ELEMENT_H__ 24 #define __GST_ONNX_ELEMENT_H__ 25 26 #include <gst/gst.h> 27 28 typedef enum 29 { 30 GST_ONNX_OPTIMIZATION_LEVEL_DISABLE_ALL, 31 GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_BASIC, 32 GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_EXTENDED, 33 GST_ONNX_OPTIMIZATION_LEVEL_ENABLE_ALL, 34 } GstOnnxOptimizationLevel; 35 36 typedef enum 37 { 38 GST_ONNX_EXECUTION_PROVIDER_CPU, 39 GST_ONNX_EXECUTION_PROVIDER_CUDA, 40 } GstOnnxExecutionProvider; 41 42 typedef enum { 43 /* Height Width Channel (a.k.a. interleaved) format */ 44 GST_ML_MODEL_INPUT_IMAGE_FORMAT_HWC, 45 46 /* Channel Height Width (a.k.a. planar) format */ 47 GST_ML_MODEL_INPUT_IMAGE_FORMAT_CHW, 48 } GstMlModelInputImageFormat; 49 50 51 G_BEGIN_DECLS 52 53 GType gst_onnx_optimization_level_get_type (void); 54 #define GST_TYPE_ONNX_OPTIMIZATION_LEVEL (gst_onnx_optimization_level_get_type ()) 55 56 GType gst_onnx_execution_provider_get_type (void); 57 #define GST_TYPE_ONNX_EXECUTION_PROVIDER (gst_onnx_execution_provider_get_type ()) 58 59 GType gst_ml_model_input_image_format_get_type (void); 60 #define GST_TYPE_ML_MODEL_INPUT_IMAGE_FORMAT (gst_ml_model_input_image_format_get_type ()) 61 62 G_END_DECLS 63 64 #endif 65