Decoder definitions for different semantics of tensors This allows developers to create their own decoders. More...
#include <nnstreamer_plugin_api_decoder.h>
Public Attributes | |
char * | modename |
int(* | init )(void **private_data) |
void(* | exit )(void **private_data) |
int(* | setOption )(void **private_data, int opNum, const char *param) |
GstCaps *(* | getOutCaps )(void **private_data, const GstTensorsConfig *config) |
GstFlowReturn(* | decode )(void **private_data, const GstTensorsConfig *config, const GstTensorMemory *input, GstBuffer *outbuf) |
size_t(* | getTransformSize )(void **private_data, const GstTensorsConfig *config, GstCaps *caps, size_t size, GstCaps *othercaps, GstPadDirection direction) |
Decoder definitions for different semantics of tensors This allows developers to create their own decoders.
Definition at line 38 of file nnstreamer_plugin_api_decoder.h.
GstFlowReturn(* _GstTensorDecoderDef::decode) (void **private_data, const GstTensorsConfig *config, const GstTensorMemory *input, GstBuffer *outbuf) |
The function to be called when the input tensor incomes into tensor_decoder. The sub-plugin should update the output buffer. outbuf must be allocated but empty (gst_buffer_get_size (outbuf) == 0).
[in/out] | private_data A sub-plugin may save its internal private data here. The sub-plugin is responsible for alloc/free of this pointer. | |
[in] | config | The structure of input tensor info. |
[in] | input | The array of input tensor data. The maximum array size of input data is NNS_TENSOR_SIZE_LIMIT. |
[out] | outbuf | A sub-plugin should update or append proper memory for the negotiated media type. |
Definition at line 71 of file nnstreamer_plugin_api_decoder.h.
void(* _GstTensorDecoderDef::exit) (void **private_data) |
Object destruction for the decoder.
[in/out] | private_data A sub-plugin may save its internal private data here. The sub-plugin is responsible for alloc/free of this pointer. Normally, the sub-plugin may free the private_data with this function. |
Definition at line 48 of file nnstreamer_plugin_api_decoder.h.
GstCaps*(* _GstTensorDecoderDef::getOutCaps) (void **private_data, const GstTensorsConfig *config) |
The caller should unref the returned GstCaps using gst_caps_unref(). The sub-plugin should validate the information of input tensor and return proper media type. Note that the information of input tensor is not a fixed value and the pipeline may try different values during the cap negotiations. Do NOT allocate or fix internal data structure until decode is called.
[in/out] | private_data A sub-plugin may save its internal private data here. The sub-plugin is responsible for alloc/free of this pointer. | |
[in] | config | The structure of input tensor info. |
Definition at line 61 of file nnstreamer_plugin_api_decoder.h.
size_t(* _GstTensorDecoderDef::getTransformSize) (void **private_data, const GstTensorsConfig *config, GstCaps *caps, size_t size, GstCaps *othercaps, GstPadDirection direction) |
Optional. The sub-plugin may calculate the size in bytes of a buffer. If this is NULL, tensor_decoder will pass the empty buffer and the sub-plugin should append the memory block when called decode. See GstBaseTransformClass::transform_size for the details.
[in/out] | private_data A sub-plugin may save its internal private data here. The sub-plugin is responsible for alloc/free of this pointer. | |
[in] | config | The structure of input tensor info. |
[in] | caps | GstCaps object for the given direction. |
[in] | size | The size of a buffer for the given direction. |
[in] | othercaps | GstCaps object on the other pad for the given direction. |
[in] | direction | The direction of a pad. Normally this is GST_PAD_SINK. |
Definition at line 82 of file nnstreamer_plugin_api_decoder.h.
int(* _GstTensorDecoderDef::init) (void **private_data) |
Object initialization for the decoder.
[in/out] | private_data A sub-plugin may save its internal private data here. The sub-plugin is responsible for alloc/free of this pointer. Normally, the sub-plugin may allocate the private_data with this function. |
Definition at line 42 of file nnstreamer_plugin_api_decoder.h.
char* _GstTensorDecoderDef::modename |
Unique decoder name. GST users choose decoders with mode="modename".
Definition at line 40 of file nnstreamer_plugin_api_decoder.h.
int(* _GstTensorDecoderDef::setOption) (void **private_data, int opNum, const char *param) |
Process with the given options. It can be called repeatedly.
[in/out] | private_data A sub-plugin may save its internal private data here. The sub-plugin is responsible for alloc/free of this pointer. | |
[in] | opNum | The index of the given options. |
[in] | param | The option string. A sub-plugin should parse the string to get the proper value. |
Definition at line 53 of file nnstreamer_plugin_api_decoder.h.