Doxygen Book
gsttensor_trainer.c File Reference

GStreamer plugin to train tensor data using NN Frameworks. More...

#include <stdlib.h>
#include <nnstreamer_subplugin.h>
#include <nnstreamer_util.h>
#include "gsttensor_trainer.h"
#include <unistd.h>
#include <math.h>
Include dependency graph for gsttensor_trainer.c:

Go to the source code of this file.

Macros

#define SINK_CAPS_STRING   GST_TENSORS_CAP_MAKE ("{ static, flexible }")
 Default caps string for sink. More...
 
#define SRC_CAPS_STRING   GST_TENSORS_CAP_MAKE ("{ static}")
 Default caps string for src. More...
 
#define GST_CAT_DEFAULT   gst_tensor_trainer_debug
 
#define gst_tensor_trainer_parent_class   parent_class
 
#define MODEL_STATS_SIZE   4
 
#define DEFAULT_PROP_INPUT_LIST   1
 Default framework property value. More...
 
#define DEFAULT_PROP_LABEL_LIST   1
 
#define DEFAULT_PROP_TRAIN_SAMPLES   0
 
#define DEFAULT_PROP_VALID_SAMPLES   0
 
#define DEFAULT_PROP_EPOCHS   1
 
#define DEFAULT_STR_PROP_VALUE   ""
 Default string property value. More...
 

Enumerations

enum  { TRAINING_LOSS, TRAINING_ACCURACY, VALIDATION_LOSS, VALIDATION_ACCURACY }
 Statistical from the model being trained An enum value indicates the value stored at the index of the output tensor. More...
 
enum  {
  PROP_0, PROP_FRAMEWORK, PROP_MODEL_CONFIG, PROP_MODEL_SAVE_PATH,
  PROP_MODEL_LOAD_PATH, PROP_NUM_INPUTS, PROP_NUM_LABELS, PROP_NUM_TRAINING_SAMPLES,
  PROP_NUM_VALIDATION_SAMPLES, PROP_EPOCHS
}
 tensor_trainer properties More...
 

Functions

 GST_DEBUG_CATEGORY_STATIC (gst_tensor_trainer_debug)
 
 G_DEFINE_TYPE (GstTensorTrainer, gst_tensor_trainer, GST_TYPE_ELEMENT)
 
static void gst_tensor_trainer_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 Setter for tensor_trainsink properties. More...
 
static void gst_tensor_trainer_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 Getter tensor_trainsink properties. More...
 
static void gst_tensor_trainer_finalize (GObject *object)
 Function to finalize instance. More...
 
static gboolean gst_tensor_trainer_sink_event (GstPad *sinkpad, GstObject *parent, GstEvent *event)
 Event handler for sink pad of tensor_trainer. More...
 
static gboolean gst_tensor_trainer_sink_query (GstPad *sinkpad, GstObject *parent, GstQuery *query)
 This function handles sink pad query. More...
 
static gboolean gst_tensor_trainer_src_query (GstPad *srcpad, GstObject *parent, GstQuery *query)
 This function handles src pad query. More...
 
static GstFlowReturn gst_tensor_trainer_chain (GstPad *sinkpad, GstObject *parent, GstBuffer *inbuf)
 Chain function, this function does the actual processing. More...
 
static GstCaps * gst_tensor_trainer_query_caps (GstTensorTrainer *trainer, GstPad *pad, GstCaps *filter)
 Get pad caps for caps negotiation. More...
 
static GstStateChangeReturn gst_tensor_trainer_change_state (GstElement *element, GstStateChange transition)
 Change state of tensor_trainsink. More...
 
static void gst_tensor_trainer_set_prop_framework (GstTensorTrainer *trainer, const GValue *value)
 Handle "PROP_FRAMEWORK" for set-property. More...
 
static void gst_tensor_trainer_set_prop_model_config_file_path (GstTensorTrainer *trainer, const GValue *value)
 Handle "PROP_MODEL_CONFIG" for set-property. More...
 
static void gst_tensor_trainer_set_model_save_path (GstTensorTrainer *trainer, const GValue *value)
 Handle "PROP_MODEL_SAVE_PATH" for set-property. More...
 
static void gst_tensor_trainer_set_model_load_path (GstTensorTrainer *trainer, const GValue *value)
 Handle "PROP_MODEL_LOAD_PATH" for set-property. More...
 
static gboolean gst_tensor_trainer_find_framework (GstTensorTrainer *trainer, const char *name)
 Find Trainer sub-plugin with the name. More...
 
static gboolean gst_tensor_trainer_create_framework (GstTensorTrainer *trainer)
 Create NN framework. More...
 
static gsize gst_tensor_trainer_get_tensor_size (GstTensorTrainer *trainer, guint index, gboolean is_input)
 Calculate tensor buffer size. More...
 
static gboolean gst_tensor_trainer_create_model (GstTensorTrainer *trainer)
 Create model. More...
 
static void gst_tensor_trainer_create_event_notifier (GstTensorTrainer *trainer)
 Create a event notifier. More...
 
static void gst_tensor_trainer_start_model_training (GstTensorTrainer *trainer)
 Start model training. More...
 
static void gst_tensor_trainer_stop_model_training (GstTensorTrainer *trainer)
 Stop model training. More...
 
static void gst_tensor_trainer_set_output_meta (GstTensorTrainer *trainer)
 initialize the output tensor dimension More...
 
static void gst_tensor_trainer_class_init (GstTensorTrainerClass *klass)
 initialize the tensor_trainer's class More...
 
static void gst_tensor_trainer_init (GstTensorTrainer *trainer)
 Initialize tensor_trainer. More...
 
static gboolean gst_tensor_trainer_check_invalid_param (GstTensorTrainer *trainer)
 Check invalid param. More...
 
static gpointer gst_tensor_trainer_dummy_data_generation_func (GstTensorTrainer *trainer)
 Dummy data generation thread. More...
 
static void gst_tensor_trainer_wait_for_epoch_completion (GstTensorTrainer *trainer)
 Wait for epoch eompletion. More...
 
static gboolean gst_tensor_trainer_epochs_is_complete (GstTensorTrainer *trainer)
 Check if current epochs is complete, tensor_trainer wait for one of epochs to complete before getting the results from the subplugin. More...
 
static gboolean gst_tensor_trainer_check_buffer_drop_conditions (GstTensorTrainer *trainer)
 Check buffer drop conditions. If condition is met, drop the buffer. More...
 
static gboolean gst_tensor_trainer_check_chain_conditions (GstTensorTrainer *trainer, guint num_tensors)
 Check chain conditions. If all conditions are met, proceed to next step. More...
 
static gsize gst_tensor_trainer_convert_meta (GstTensorTrainer *trainer, GstTensorMetaInfo *meta, GstTensorInfo *info, void *data)
 Convert tensor meta and get the size of tensor header. More...
 
static gboolean gst_tensor_trainer_push_input (GstTensorTrainer *trainer, GstBuffer *inbuf, gboolean in_flexible)
 Create input tensors from the buffer and push it into trainer fw. More...
 
static gboolean gst_tensor_trainer_get_model_stats (GstTensorTrainer *trainer, double *model_stats)
 Get the model statistics from the sub-plugin. More...
 
static GstBuffer * gst_tensor_trainer_create_output (GstTensorTrainer *trainer)
 Create output tensors. More...
 
static void gst_tensor_trainer_wait_for_training_completion (GstTensorTrainer *trainer)
 Wait for training completion. More...
 
int nnstreamer_trainer_probe (GstTensorTrainerFramework *ttsp)
 Trainer's sub-plugin should call this function to register itself. More...
 
int nnstreamer_trainer_exit (GstTensorTrainerFramework *ttsp)
 Trainer's sub-plugin may call this to unregister itself. More...
 
void nnstreamer_trainer_notify_event (GstTensorTrainerEventNotifier *notifier, GstTensorTrainerEventType type, void *data)
 Trainer's sub-plugin may call this to send event. More...
 

Variables

static GstStaticPadTemplate sink_template
 The capabilities of the sink pad. More...
 
static GstStaticPadTemplate src_template
 The capabilities of the src pad. More...
 

Detailed Description

GStreamer plugin to train tensor data using NN Frameworks.

Copyright (C) 2022 Samsung Electronics Co., Ltd.

Date
20 October 2022
See also
https://github.com/nnstreamer/nnstreamer
Author
Hyunil Park hyuni.nosp@m.l46..nosp@m.park@.nosp@m.sams.nosp@m.ung.c.nosp@m.om
Bug:
No known bugs except for NYI items

//! Example launch line |[ gst-launch-1.0 datareposrc location=mnist_trainingSet.dat json=mnist.json start-sample-index=3 stop-sample-index=202 epochs=5 ! \ tensor_trainer framework=nntrainer model-config=mnist.ini model-save-path=model.bin \ num-inputs=1 num-labels=1 num-training-samples=100 num-validation-samples=100 epochs=5 ! \ tensor_sink ]|

Total number of data to be received is 1000((num-training-samples + num-validation-samples) * epochs)

output tensors : dimensions=1:1:4, types=float64. values are training loss, training accuracy, validation loss and validation accuracy. -INFINITY value is stored if the value fetched from the sub-plugin is not greater than 0.

Definition in file gsttensor_trainer.c.

Macro Definition Documentation

◆ DEFAULT_PROP_EPOCHS

#define DEFAULT_PROP_EPOCHS   1

Definition at line 88 of file gsttensor_trainer.c.

◆ DEFAULT_PROP_INPUT_LIST

#define DEFAULT_PROP_INPUT_LIST   1

Default framework property value.

Definition at line 84 of file gsttensor_trainer.c.

◆ DEFAULT_PROP_LABEL_LIST

#define DEFAULT_PROP_LABEL_LIST   1

Definition at line 85 of file gsttensor_trainer.c.

◆ DEFAULT_PROP_TRAIN_SAMPLES

#define DEFAULT_PROP_TRAIN_SAMPLES   0

Definition at line 86 of file gsttensor_trainer.c.

◆ DEFAULT_PROP_VALID_SAMPLES

#define DEFAULT_PROP_VALID_SAMPLES   0

Definition at line 87 of file gsttensor_trainer.c.

◆ DEFAULT_STR_PROP_VALUE

#define DEFAULT_STR_PROP_VALUE   ""

Default string property value.

Definition at line 92 of file gsttensor_trainer.c.

◆ GST_CAT_DEFAULT

#define GST_CAT_DEFAULT   gst_tensor_trainer_debug

Definition at line 64 of file gsttensor_trainer.c.

◆ gst_tensor_trainer_parent_class

#define gst_tensor_trainer_parent_class   parent_class

Definition at line 65 of file gsttensor_trainer.c.

◆ MODEL_STATS_SIZE

#define MODEL_STATS_SIZE   4

Definition at line 79 of file gsttensor_trainer.c.

◆ SINK_CAPS_STRING

#define SINK_CAPS_STRING   GST_TENSORS_CAP_MAKE ("{ static, flexible }")

Default caps string for sink.

Definition at line 40 of file gsttensor_trainer.c.

◆ SRC_CAPS_STRING

#define SRC_CAPS_STRING   GST_TENSORS_CAP_MAKE ("{ static}")

Default caps string for src.

Definition at line 45 of file gsttensor_trainer.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Statistical from the model being trained An enum value indicates the value stored at the index of the output tensor.

Enumerator
TRAINING_LOSS 
TRAINING_ACCURACY 
VALIDATION_LOSS 
VALIDATION_ACCURACY 

Definition at line 72 of file gsttensor_trainer.c.

◆ anonymous enum

anonymous enum

tensor_trainer properties

Enumerator
PROP_0 
PROP_FRAMEWORK 
PROP_MODEL_CONFIG 
PROP_MODEL_SAVE_PATH 
PROP_MODEL_LOAD_PATH 
PROP_NUM_INPUTS 
PROP_NUM_LABELS 
PROP_NUM_TRAINING_SAMPLES 
PROP_NUM_VALIDATION_SAMPLES 
PROP_EPOCHS 

Definition at line 97 of file gsttensor_trainer.c.

Function Documentation

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( GstTensorTrainer  ,
gst_tensor_trainer  ,
GST_TYPE_ELEMENT   
)

◆ GST_DEBUG_CATEGORY_STATIC()

GST_DEBUG_CATEGORY_STATIC ( gst_tensor_trainer_debug  )

◆ gst_tensor_trainer_chain()

static GstFlowReturn gst_tensor_trainer_chain ( GstPad *  sinkpad,
GstObject *  parent,
GstBuffer *  inbuf 
)
static

Chain function, this function does the actual processing.

Update result if one of epochs is complete, push one outbuf is necessary to change pipeline state. Scheduling with subplugin does not work.

Definition at line 868 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_change_state()

static GstStateChangeReturn gst_tensor_trainer_change_state ( GstElement *  element,
GstStateChange  transition 
)
static

Change state of tensor_trainsink.

Definition at line 513 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_check_buffer_drop_conditions()

static gboolean gst_tensor_trainer_check_buffer_drop_conditions ( GstTensorTrainer trainer)
static

Check buffer drop conditions. If condition is met, drop the buffer.

app need to send gst_element_send_event(tensor_trainer, gst_event_new_eos()) after training_complete or set eos to datareposrc

Definition at line 629 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_check_chain_conditions()

static gboolean gst_tensor_trainer_check_chain_conditions ( GstTensorTrainer trainer,
guint  num_tensors 
)
static

Check chain conditions. If all conditions are met, proceed to next step.

Definition at line 645 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_check_invalid_param()

static gboolean gst_tensor_trainer_check_invalid_param ( GstTensorTrainer trainer)
static

Check invalid param.

Definition at line 440 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_class_init()

static void gst_tensor_trainer_class_init ( GstTensorTrainerClass klass)
static

initialize the tensor_trainer's class

Definition at line 155 of file gsttensor_trainer.c.

Here is the call graph for this function:

◆ gst_tensor_trainer_convert_meta()

static gsize gst_tensor_trainer_convert_meta ( GstTensorTrainer trainer,
GstTensorMetaInfo meta,
GstTensorInfo info,
void *  data 
)
static

Convert tensor meta and get the size of tensor header.

Definition at line 665 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_create_event_notifier()

static void gst_tensor_trainer_create_event_notifier ( GstTensorTrainer trainer)
static

Create a event notifier.

Definition at line 1296 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_create_framework()

static gboolean gst_tensor_trainer_create_framework ( GstTensorTrainer trainer)
static

Create NN framework.

Definition at line 1221 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_create_model()

static gboolean gst_tensor_trainer_create_model ( GstTensorTrainer trainer)
static

Create model.

Definition at line 1273 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_create_output()

static GstBuffer* gst_tensor_trainer_create_output ( GstTensorTrainer trainer)
static

Create output tensors.

Definition at line 805 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_dummy_data_generation_func()

static gpointer gst_tensor_trainer_dummy_data_generation_func ( GstTensorTrainer trainer)
static

Dummy data generation thread.

Definition at line 471 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_epochs_is_complete()

static gboolean gst_tensor_trainer_epochs_is_complete ( GstTensorTrainer trainer)
static

Check if current epochs is complete, tensor_trainer wait for one of epochs to complete before getting the results from the subplugin.

Definition at line 609 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_finalize()

static void gst_tensor_trainer_finalize ( GObject *  object)
static

Function to finalize instance.

Definition at line 316 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_find_framework()

static gboolean gst_tensor_trainer_find_framework ( GstTensorTrainer trainer,
const char *  name 
)
static

Find Trainer sub-plugin with the name.

Definition at line 1196 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_get_model_stats()

static gboolean gst_tensor_trainer_get_model_stats ( GstTensorTrainer trainer,
double *  model_stats 
)
static

Get the model statistics from the sub-plugin.

Definition at line 769 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_get_property()

static void gst_tensor_trainer_get_property ( GObject *  object,
guint  prop_id,
GValue *  value,
GParamSpec *  pspec 
)
static

Getter tensor_trainsink properties.

Definition at line 395 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_get_tensor_size()

gsize gst_tensor_trainer_get_tensor_size ( GstTensorTrainer trainer,
guint  index,
gboolean  is_input 
)
static

Calculate tensor buffer size.

Definition at line 1250 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_init()

static void gst_tensor_trainer_init ( GstTensorTrainer trainer)
static

Initialize tensor_trainer.

setup sink pad

setup src pad

init properties

Definition at line 262 of file gsttensor_trainer.c.

Here is the call graph for this function:

◆ gst_tensor_trainer_push_input()

static gboolean gst_tensor_trainer_push_input ( GstTensorTrainer trainer,
GstBuffer *  inbuf,
gboolean  in_flexible 
)
static

Create input tensors from the buffer and push it into trainer fw.

Definition at line 687 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_query_caps()

static GstCaps * gst_tensor_trainer_query_caps ( GstTensorTrainer trainer,
GstPad *  pad,
GstCaps *  filter 
)
static

Get pad caps for caps negotiation.

Definition at line 919 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_set_model_load_path()

static void gst_tensor_trainer_set_model_load_path ( GstTensorTrainer trainer,
const GValue *  value 
)
static

Handle "PROP_MODEL_LOAD_PATH" for set-property.

Definition at line 1183 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_set_model_save_path()

static void gst_tensor_trainer_set_model_save_path ( GstTensorTrainer trainer,
const GValue *  value 
)
static

Handle "PROP_MODEL_SAVE_PATH" for set-property.

Definition at line 1170 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_set_output_meta()

static void gst_tensor_trainer_set_output_meta ( GstTensorTrainer trainer)
static

initialize the output tensor dimension

loss, accuracy, val_loss, val_accuracy

Definition at line 1347 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_set_prop_framework()

static void gst_tensor_trainer_set_prop_framework ( GstTensorTrainer trainer,
const GValue *  value 
)
static

Handle "PROP_FRAMEWORK" for set-property.

Todo:
Check valid framework

Definition at line 1143 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_set_prop_model_config_file_path()

static void gst_tensor_trainer_set_prop_model_config_file_path ( GstTensorTrainer trainer,
const GValue *  value 
)
static

Handle "PROP_MODEL_CONFIG" for set-property.

Definition at line 1157 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_set_property()

static void gst_tensor_trainer_set_property ( GObject *  object,
guint  prop_id,
const GValue *  value,
GParamSpec *  pspec 
)
static

Setter for tensor_trainsink properties.

Definition at line 350 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_sink_event()

static gboolean gst_tensor_trainer_sink_event ( GstPad *  sinkpad,
GstObject *  parent,
GstEvent *  event 
)
static

Event handler for sink pad of tensor_trainer.

Definition at line 977 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_sink_query()

static gboolean gst_tensor_trainer_sink_query ( GstPad *  sinkpad,
GstObject *  parent,
GstQuery *  query 
)
static

This function handles sink pad query.

Definition at line 1046 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_src_query()

static gboolean gst_tensor_trainer_src_query ( GstPad *  srcpad,
GstObject *  parent,
GstQuery *  query 
)
static

This function handles src pad query.

Definition at line 1109 of file gsttensor_trainer.c.

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

◆ gst_tensor_trainer_start_model_training()

static void gst_tensor_trainer_start_model_training ( GstTensorTrainer trainer)
static

Start model training.

Definition at line 1308 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_stop_model_training()

static void gst_tensor_trainer_stop_model_training ( GstTensorTrainer trainer)
static

Stop model training.

Definition at line 1328 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_wait_for_epoch_completion()

static void gst_tensor_trainer_wait_for_epoch_completion ( GstTensorTrainer trainer)
static

Wait for epoch eompletion.

Definition at line 590 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ gst_tensor_trainer_wait_for_training_completion()

static void gst_tensor_trainer_wait_for_training_completion ( GstTensorTrainer trainer)
static

Wait for training completion.

Definition at line 955 of file gsttensor_trainer.c.

Here is the caller graph for this function:

◆ nnstreamer_trainer_exit()

int nnstreamer_trainer_exit ( GstTensorTrainerFramework ttsp)

Trainer's sub-plugin may call this to unregister itself.

Parameters
[in]ttsptensor_trainer sub-plugin to be unregistered.
Returns
TRUE if unregistered. FALSE is failed.

Definition at line 1398 of file gsttensor_trainer.c.

Here is the call graph for this function:

◆ nnstreamer_trainer_notify_event()

void nnstreamer_trainer_notify_event ( GstTensorTrainerEventNotifier notifier,
GstTensorTrainerEventType  type,
void *  data 
)

Trainer's sub-plugin may call this to send event.

Trainer's sub-plugin call this to notify event.

Parameters
[in]notifierevent notifier, sub-plugin must send events with this.
[in]typeevent type

Definition at line 1425 of file gsttensor_trainer.c.

◆ nnstreamer_trainer_probe()

int nnstreamer_trainer_probe ( GstTensorTrainerFramework ttsp)

Trainer's sub-plugin should call this function to register itself.

Parameters
[in]ttsptensor_trainer sub-plugin to be registered.
Returns
TRUE if registered. FALSE is failed or duplicated.

Definition at line 1371 of file gsttensor_trainer.c.

Here is the call graph for this function:

Variable Documentation

◆ sink_template

GstStaticPadTemplate sink_template
static
Initial value:
= GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (SINK_CAPS_STRING))

The capabilities of the sink pad.

Definition at line 50 of file gsttensor_trainer.c.

◆ src_template

GstStaticPadTemplate src_template
static
Initial value:
= GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (SRC_CAPS_STRING))

The capabilities of the src pad.

Definition at line 58 of file gsttensor_trainer.c.

SINK_CAPS_STRING
#define SINK_CAPS_STRING
Default caps string for sink.
Definition: gsttensor_trainer.c:40
SRC_CAPS_STRING
#define SRC_CAPS_STRING
Default caps string for src.
Definition: gsttensor_trainer.c:45