Doxygen Book
tensor_filter_custom_easy.c File Reference

Custom tensor processing interface for simple functions. More...

#include <errno.h>
#include <glib.h>
#include <tensor_filter_custom_easy.h>
#include <nnstreamer_log.h>
#include <nnstreamer_plugin_api_util.h>
#include <nnstreamer_subplugin.h>
#include <nnstreamer_util.h>
Include dependency graph for tensor_filter_custom_easy.c:

Go to the source code of this file.

Classes

struct  runtime_data
 The easy-filter user's data. More...
 

Functions

void init_filter_custom_easy (void)
 internal_data More...
 
static void custom_free_internal_data (internal_data *data)
 Internal function to release internal data. More...
 
int NNS_custom_easy_register (const char *modelname, NNS_custom_invoke func, void *data, const GstTensorsInfo *in_info, const GstTensorsInfo *out_info)
 Register the custom-easy tensor function. More info in .h. More...
 
int NNS_custom_easy_dynamic_register (const char *modelname, NNS_custom_invoke_dynamic func, void *data, const GstTensorsInfo *in_info)
 Register the custom-easy tensor function. More info in .h. More...
 
int NNS_custom_easy_unregister (const char *modelname)
 Unregister the custom-easy tensor function. More...
 
static int custom_open (const GstTensorFilterProperties *prop, void **private_data)
 Callback required by tensor_filter subplugin. More...
 
static void custom_close (const GstTensorFilterProperties *prop, void **private_data)
 Callback required by tensor_filter subplugin. More...
 
static int custom_invoke (const GstTensorFilterFramework *self, GstTensorFilterProperties *prop, void *private_data, const GstTensorMemory *input, GstTensorMemory *output)
 Callback required by tensor_filter subplugin. More...
 
static int custom_getFrameworkInfo (const GstTensorFilterFramework *self, const GstTensorFilterProperties *prop, void *private_data, GstTensorFilterFrameworkInfo *fw_info)
 V1 tensor-filter wrapper callback function, "getFrameworkInfo". More...
 
static int custom_getModelInfo (const GstTensorFilterFramework *self, const GstTensorFilterProperties *prop, void *private_data, model_info_ops ops, GstTensorsInfo *in_info, GstTensorsInfo *out_info)
 C V1 tensor-filter wrapper callback function, "getModelInfo". More...
 
static int custom_eventHandler (const GstTensorFilterFramework *self, const GstTensorFilterProperties *prop, void *private_data, event_ops ops, GstTensorFilterFrameworkEventData *data)
 C V1 tensor-filter wrapper callback function, "eventHandler". More...
 
void fini_filter_custom_easy (void)
 Destruct the subplugin. More...
 

Variables

 internal_data
 
static GstTensorFilterFramework NNS_support_custom_easy
 

Detailed Description

Custom tensor processing interface for simple functions.

GStreamer Tensor_Filter, Customized Module, Easy Mode Copyright (C) 2019 MyungJoo Ham myung.nosp@m.joo..nosp@m.ham@s.nosp@m.amsu.nosp@m.ng.co.nosp@m.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.

Date
24 Oct 2019
See also
http://github.com/nnstreamer/nnstreamer
Author
MyungJoo Ham myung.nosp@m.joo..nosp@m.ham@s.nosp@m.amsu.nosp@m.ng.co.nosp@m.m
Bug:
No known bugs except for NYI items

Definition in file tensor_filter_custom_easy.c.

Function Documentation

◆ custom_close()

static void custom_close ( const GstTensorFilterProperties prop,
void **  private_data 
)
static

Callback required by tensor_filter subplugin.

Definition at line 230 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

◆ custom_eventHandler()

static int custom_eventHandler ( const GstTensorFilterFramework self,
const GstTensorFilterProperties prop,
void *  private_data,
event_ops  ops,
GstTensorFilterFrameworkEventData data 
)
static

C V1 tensor-filter wrapper callback function, "eventHandler".

Definition at line 319 of file tensor_filter_custom_easy.c.

◆ custom_free_internal_data()

static void custom_free_internal_data ( internal_data data)
static

Internal function to release internal data.

Definition at line 62 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ custom_getFrameworkInfo()

static int custom_getFrameworkInfo ( const GstTensorFilterFramework self,
const GstTensorFilterProperties prop,
void *  private_data,
GstTensorFilterFrameworkInfo fw_info 
)
static

V1 tensor-filter wrapper callback function, "getFrameworkInfo".

Definition at line 278 of file tensor_filter_custom_easy.c.

◆ custom_getModelInfo()

static int custom_getModelInfo ( const GstTensorFilterFramework self,
const GstTensorFilterProperties prop,
void *  private_data,
model_info_ops  ops,
GstTensorsInfo in_info,
GstTensorsInfo out_info 
)
static

C V1 tensor-filter wrapper callback function, "getModelInfo".

Definition at line 300 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

◆ custom_invoke()

static int custom_invoke ( const GstTensorFilterFramework self,
GstTensorFilterProperties prop,
void *  private_data,
const GstTensorMemory input,
GstTensorMemory output 
)
static

Callback required by tensor_filter subplugin.

Definition at line 243 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

◆ custom_open()

static int custom_open ( const GstTensorFilterProperties prop,
void **  private_data 
)
static

Callback required by tensor_filter subplugin.

Definition at line 165 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

◆ fini_filter_custom_easy()

void fini_filter_custom_easy ( void  )

Destruct the subplugin.

Definition at line 352 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

◆ init_filter_custom_easy()

void init_filter_custom_easy ( void  )

internal_data

Initialize this object for tensor_filter subplugin runtime register.

< The easy-filter writer's data

Definition at line 33 of file tensor_filter_custom_easy.c.

◆ NNS_custom_easy_dynamic_register()

int NNS_custom_easy_dynamic_register ( const char *  modelname,
NNS_custom_invoke_dynamic  func,
void *  data,
const GstTensorsInfo in_info 
)

Register the custom-easy tensor function. More info in .h.

Register the custom-easy tensor function for dynamic invoke.

Returns
0 if success. -ERRNO if error.

Definition at line 112 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

◆ NNS_custom_easy_register()

int NNS_custom_easy_register ( const char *  modelname,
NNS_custom_invoke  func,
void *  data,
const GstTensorsInfo in_info,
const GstTensorsInfo out_info 
)

Register the custom-easy tensor function. More info in .h.

Register the custom-easy tensor function.

Returns
0 if success. -ERRNO if error.

Definition at line 76 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

◆ NNS_custom_easy_unregister()

int NNS_custom_easy_unregister ( const char *  modelname)

Unregister the custom-easy tensor function.

Returns
0 if success. -EINVAL if invalid model name.

Definition at line 144 of file tensor_filter_custom_easy.c.

Here is the call graph for this function:

Variable Documentation

◆ internal_data

Definition at line 48 of file tensor_filter_custom_easy.c.

◆ NNS_support_custom_easy

GstTensorFilterFramework NNS_support_custom_easy
static
Initial value:
= {
.open = custom_open,
.close = custom_close,
.invoke = custom_invoke,
.getFrameworkInfo = custom_getFrameworkInfo,
.getModelInfo = custom_getModelInfo,
.eventHandler = custom_eventHandler,
.subplugin_data = NULL,
}

Definition at line 332 of file tensor_filter_custom_easy.c.

custom_close
static void custom_close(const GstTensorFilterProperties *prop, void **private_data)
Callback required by tensor_filter subplugin.
Definition: tensor_filter_custom_easy.c:230
GST_TENSOR_FILTER_FRAMEWORK_V1
#define GST_TENSOR_FILTER_FRAMEWORK_V1
Definition: nnstreamer_plugin_api_filter.h:38
custom_getModelInfo
static int custom_getModelInfo(const GstTensorFilterFramework *self, const GstTensorFilterProperties *prop, void *private_data, model_info_ops ops, GstTensorsInfo *in_info, GstTensorsInfo *out_info)
C V1 tensor-filter wrapper callback function, "getModelInfo".
Definition: tensor_filter_custom_easy.c:300
custom_getFrameworkInfo
static int custom_getFrameworkInfo(const GstTensorFilterFramework *self, const GstTensorFilterProperties *prop, void *private_data, GstTensorFilterFrameworkInfo *fw_info)
V1 tensor-filter wrapper callback function, "getFrameworkInfo".
Definition: tensor_filter_custom_easy.c:278
custom_open
static int custom_open(const GstTensorFilterProperties *prop, void **private_data)
Callback required by tensor_filter subplugin.
Definition: tensor_filter_custom_easy.c:165
custom_eventHandler
static int custom_eventHandler(const GstTensorFilterFramework *self, const GstTensorFilterProperties *prop, void *private_data, event_ops ops, GstTensorFilterFrameworkEventData *data)
C V1 tensor-filter wrapper callback function, "eventHandler".
Definition: tensor_filter_custom_easy.c:319
custom_invoke
static int custom_invoke(const GstTensorFilterFramework *self, GstTensorFilterProperties *prop, void *private_data, const GstTensorMemory *input, GstTensorMemory *output)
Callback required by tensor_filter subplugin.
Definition: tensor_filter_custom_easy.c:243