Custom tensor post-processing interface for NNStreamer suite for post-processing code developers. More...
Go to the source code of this file.
Classes | |
struct | _NNStreamer_custom_class |
Custom Filter Class. More... | |
Typedefs | |
typedef void *(* | NNS_custom_init_func) (const GstTensorFilterProperties *prop) |
A function that is called before calling other functions. More... | |
typedef void(* | NNS_custom_exit_func) (void *private_data, const GstTensorFilterProperties *prop) |
A function that is called after calling other functions, when it's ready to close. More... | |
typedef int(* | NNS_custom_get_input_dimension) (void *private_data, const GstTensorFilterProperties *prop, GstTensorsInfo *info) |
Get input tensor type. More... | |
typedef int(* | NNS_custom_get_output_dimension) (void *private_data, const GstTensorFilterProperties *prop, GstTensorsInfo *info) |
Get output tensor type. More... | |
typedef int(* | NNS_custom_set_input_dimension) (void *private_data, const GstTensorFilterProperties *prop, const GstTensorsInfo *in_info, GstTensorsInfo *out_info) |
Set input dim by framework. Let custom plugin set output dim accordingly. More... | |
typedef int(* | NNS_custom_invoke) (void *private_data, const GstTensorFilterProperties *prop, const GstTensorMemory *input, GstTensorMemory *output) |
Invoke the "main function". Without allocating output buffer. (fill in the given output buffer) More... | |
typedef int(* | NNS_custom_allocate_invoke) (void *private_data, const GstTensorFilterProperties *prop, const GstTensorMemory *input, GstTensorMemory *output) |
Invoke the "main function". Without allocating output buffer. (fill in the given output buffer) More... | |
typedef void(* | NNS_custom_destroy_notify) (void *data) |
It's a post-processing method about the used data pointer if it has been allocated at custom filter. More... | |
typedef struct _NNStreamer_custom_class | NNStreamer_custom_class |
Variables | |
NNStreamer_custom_class * | NNStreamer_custom |
A custom filter MUST define NNStreamer_custom. This object represents the custom filter itself. More... | |
Custom tensor post-processing interface for NNStreamer suite for post-processing code developers.
GStreamer Tensor_Filter, Customized Module Copyright (C) 2018 MyungJoo Ham myung joo. ham@s amsu ng.co m
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; version 2.1 of the License.
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.
How To for NNdevelopers:
To Packagers:
This file is to be packaged as "devel" package for NN developers.
Definition in file tensor_filter_custom.h.
typedef int(* NNS_custom_allocate_invoke) (void *private_data, const GstTensorFilterProperties *prop, const GstTensorMemory *input, GstTensorMemory *output) |
Invoke the "main function". Without allocating output buffer. (fill in the given output buffer)
[in] | private_data | The pointer returned by NNStreamer_custom_init. |
[in] | prop | GstTensorFilter's property values. Do not change its values. |
[in] | input | The array of input tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, allocated by caller |
[out] | output | The array of output tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, the memory block for output tensor should be allocated. (data in GstTensorMemory) |
Definition at line 111 of file tensor_filter_custom.h.
typedef void(* NNS_custom_destroy_notify) (void *data) |
It's a post-processing method about the used data pointer if it has been allocated at custom filter.
[in] | data | the data element. |
Definition at line 118 of file tensor_filter_custom.h.
typedef void(* NNS_custom_exit_func) (void *private_data, const GstTensorFilterProperties *prop) |
A function that is called after calling other functions, when it's ready to close.
[in] | private_data | If you have allocated *private_data at init, free it here. |
[in] | prop | GstTensorFilter's property values. Do not change its values. |
Definition at line 53 of file tensor_filter_custom.h.
typedef int(* NNS_custom_get_input_dimension) (void *private_data, const GstTensorFilterProperties *prop, GstTensorsInfo *info) |
Get input tensor type.
[in] | private_data | The pointer returned by NNStreamer_custom_init. |
[in] | prop | GstTensorFilter's property values. Do not change its values. |
[out] | info | Structure for tensor info. |
Definition at line 63 of file tensor_filter_custom.h.
typedef int(* NNS_custom_get_output_dimension) (void *private_data, const GstTensorFilterProperties *prop, GstTensorsInfo *info) |
Get output tensor type.
[in] | private_data | The pointer returned by NNStreamer_custom_init. |
[in] | prop | GstTensorFilter's property values. Do not change its values. |
[out] | info | Structure for tensor info. |
Definition at line 73 of file tensor_filter_custom.h.
typedef void*(* NNS_custom_init_func) (const GstTensorFilterProperties *prop) |
A function that is called before calling other functions.
[in] | prop | GstTensorFilter's property values. Do not change its values. |
Definition at line 46 of file tensor_filter_custom.h.
typedef int(* NNS_custom_invoke) (void *private_data, const GstTensorFilterProperties *prop, const GstTensorMemory *input, GstTensorMemory *output) |
Invoke the "main function". Without allocating output buffer. (fill in the given output buffer)
[in] | private_data | The pointer returned by NNStreamer_custom_init. |
[in] | prop | GstTensorFilter's property values. Do not change its values. |
[in] | input | The array of input tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, allocated by caller |
[out] | output | The array of output tensors, each tensor size = dim_1 x dim_2 x .. x dim_n x typesize, allocated by caller |
Definition at line 99 of file tensor_filter_custom.h.
typedef int(* NNS_custom_set_input_dimension) (void *private_data, const GstTensorFilterProperties *prop, const GstTensorsInfo *in_info, GstTensorsInfo *out_info) |
Set input dim by framework. Let custom plugin set output dim accordingly.
[in] | private_data | The pointer returned by NNStreamer_custom_init. |
[in] | prop | GstTensorFilter's property values. Do not change its values. |
[in] | in_info | Input tensor info designated by the GStreamer framework. Note that this is not a fixed value and GStreamer may try different values during pad-cap negotiations. |
[out] | out_info | Output tensor info according to the input tensor info. |
@caution Do not fix internal values based on this call. GStreamer may call this function repeatedly with different values during pad-cap negotiations. Fix values when invoke is finally called.
Definition at line 87 of file tensor_filter_custom.h.
typedef struct _NNStreamer_custom_class NNStreamer_custom_class |
Definition at line 136 of file tensor_filter_custom.h.
NNStreamer_custom_class* NNStreamer_custom |
A custom filter MUST define NNStreamer_custom. This object represents the custom filter itself.