GStreamer plugin to handle tensor stream. More...
#include "gsttensor_sink.h"
Go to the source code of this file.
Macros | |
#define | DBG (!self->silent) |
Macro for debug mode. More... | |
#define | silent_debug_timestamp(self, buf) |
#define | GST_CAT_DEFAULT gst_tensor_sink_debug |
#define | DEFAULT_EMIT_SIGNAL TRUE |
Flag to emit signals. More... | |
#define | DEFAULT_SIGNAL_RATE 0 |
New data signals per second. More... | |
#define | DEFAULT_SILENT TRUE |
Flag to print minimized log. More... | |
#define | DEFAULT_QOS TRUE |
Flag for qos event. More... | |
#define | DEFAULT_SYNC FALSE |
Flag to synchronize on the clock (Default FALSE). It may be delayed with tensor_filter element, to invoke neural network model. See GstBaseSink::sync property for more details. More... | |
#define | gst_tensor_sink_parent_class parent_class |
Enumerations | |
enum | { SIGNAL_NEW_DATA, SIGNAL_STREAM_START, SIGNAL_EOS, LAST_SIGNAL } |
tensor_sink signals. More... | |
enum | { PROP_0, PROP_SIGNAL_RATE, PROP_EMIT_SIGNAL, PROP_SILENT } |
tensor_sink properties. More... | |
Functions | |
GST_DEBUG_CATEGORY_STATIC (gst_tensor_sink_debug) | |
static void | gst_tensor_sink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
Setter for tensor_sink properties. More... | |
static void | gst_tensor_sink_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
Getter for tensor_sink properties. More... | |
static void | gst_tensor_sink_finalize (GObject *object) |
Function to finalize instance. More... | |
static gboolean | gst_tensor_sink_event (GstBaseSink *sink, GstEvent *event) |
Handle events. More... | |
static gboolean | gst_tensor_sink_query (GstBaseSink *sink, GstQuery *query) |
Handle queries. More... | |
static GstFlowReturn | gst_tensor_sink_render (GstBaseSink *sink, GstBuffer *buffer) |
Handle buffer. More... | |
static GstFlowReturn | gst_tensor_sink_render_list (GstBaseSink *sink, GstBufferList *buffer_list) |
Handle list of buffers. More... | |
static void | gst_tensor_sink_render_buffer (GstTensorSink *self, GstBuffer *buffer) |
Handle buffer data. More... | |
static void | gst_tensor_sink_set_last_render_time (GstTensorSink *self, GstClockTime now) |
Setter for value last_render_time. More... | |
static GstClockTime | gst_tensor_sink_get_last_render_time (GstTensorSink *self) |
Getter for value last_render_time. More... | |
static void | gst_tensor_sink_set_signal_rate (GstTensorSink *self, guint rate) |
Setter for value signal_rate. More... | |
static guint | gst_tensor_sink_get_signal_rate (GstTensorSink *self) |
Getter for value signal_rate. More... | |
static void | gst_tensor_sink_set_emit_signal (GstTensorSink *self, gboolean emit) |
Setter for flag emit_signal. More... | |
static gboolean | gst_tensor_sink_get_emit_signal (GstTensorSink *self) |
Getter for flag emit_signal. More... | |
static void | gst_tensor_sink_set_silent (GstTensorSink *self, gboolean silent) |
Setter for flag silent. More... | |
static gboolean | gst_tensor_sink_get_silent (GstTensorSink *self) |
Getter for flag silent. More... | |
G_DEFINE_TYPE (GstTensorSink, gst_tensor_sink, GST_TYPE_BASE_SINK) | |
static void | gst_tensor_sink_class_init (GstTensorSinkClass *klass) |
Initialize tensor_sink class. More... | |
static void | gst_tensor_sink_init (GstTensorSink *self) |
Initialize tensor_sink element. More... | |
Variables | |
static guint | _tensor_sink_signals [LAST_SIGNAL] = { 0 } |
Variable for signal ids. More... | |
GStreamer plugin to handle tensor stream.
GStreamer Copyright (C) 2005 Thomas Vander Stichele thoma Copyright (C) 2005 Ronald S. Bultje s@ap estaa rt.o rgrbult Copyright (C) 2018 Samsung Electronics Co., Ltd. je@r onald .bit freak .net
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. SECTION:element-tensor_sink
Sink element to handle tensor stream
Definition in file gsttensor_sink.c.
#define DBG (!self->silent) |
Macro for debug mode.
Definition at line 41 of file gsttensor_sink.c.
#define DEFAULT_EMIT_SIGNAL TRUE |
Flag to emit signals.
Definition at line 80 of file gsttensor_sink.c.
#define DEFAULT_QOS TRUE |
Flag for qos event.
See GstBaseSink::qos property for more details.
Definition at line 97 of file gsttensor_sink.c.
#define DEFAULT_SIGNAL_RATE 0 |
New data signals per second.
Definition at line 85 of file gsttensor_sink.c.
#define DEFAULT_SILENT TRUE |
Flag to print minimized log.
Definition at line 90 of file gsttensor_sink.c.
#define DEFAULT_SYNC FALSE |
Flag to synchronize on the clock (Default FALSE). It may be delayed with tensor_filter element, to invoke neural network model. See GstBaseSink::sync property for more details.
Definition at line 104 of file gsttensor_sink.c.
#define GST_CAT_DEFAULT gst_tensor_sink_debug |
Definition at line 53 of file gsttensor_sink.c.
#define gst_tensor_sink_parent_class parent_class |
Definition at line 140 of file gsttensor_sink.c.
#define silent_debug_timestamp | ( | self, | |
buf | |||
) |
Definition at line 44 of file gsttensor_sink.c.
anonymous enum |
tensor_sink signals.
Enumerator | |
---|---|
SIGNAL_NEW_DATA | |
SIGNAL_STREAM_START | |
SIGNAL_EOS | |
LAST_SIGNAL |
Definition at line 58 of file gsttensor_sink.c.
anonymous enum |
tensor_sink properties.
Enumerator | |
---|---|
PROP_0 | |
PROP_SIGNAL_RATE | |
PROP_EMIT_SIGNAL | |
PROP_SILENT |
Definition at line 69 of file gsttensor_sink.c.
G_DEFINE_TYPE | ( | GstTensorSink | , |
gst_tensor_sink | , | ||
GST_TYPE_BASE_SINK | |||
) |
GST_DEBUG_CATEGORY_STATIC | ( | gst_tensor_sink_debug | ) |
|
static |
Initialize tensor_sink class.
GObject methods
GstTensorSink::signal-rate:
The number of new data signals per second (Default 0 for unlimited, MAX 500) If signal-rate is larger than 0, GstTensorSink calculates the time to emit a signal with this property. If set 0 (default value), all the received buffers will be passed to the application.
Please note that this property does not guarantee the periodic signals. This means if GstTensorSink cannot get the buffers in time, it will pass all the buffers. (working like default 0)
GstTensorSink::emit-signal:
The flag to emit the signals for new data, stream start, and eos.
The flag to enable/disable debugging messages.
GstTensorSink::new-data:
Signal to get the buffer from GstTensorSink.
GstTensorSink::stream-start:
Signal to indicate the start of a new stream. Optional. An application can use this signal to detect the start of a new stream, instead of the message GST_MESSAGE_STREAM_START from pipeline.
GstTensorSink::eos:
Signal to indicate the end-of-stream. Optional. An application can use this signal to detect the EOS (end-of-stream), instead of the message GST_MESSAGE_EOS from pipeline.
pad template
GstBaseSink methods
Definition at line 147 of file gsttensor_sink.c.
|
static |
Handle events.
GstBaseSink method implementation
GstBaseSink method implementation.
Definition at line 365 of file gsttensor_sink.c.
|
static |
Function to finalize instance.
GObject method implementation.
Definition at line 348 of file gsttensor_sink.c.
|
static |
Getter for flag emit_signal.
Definition at line 610 of file gsttensor_sink.c.
|
static |
Getter for value last_render_time.
Definition at line 548 of file gsttensor_sink.c.
|
static |
Getter for tensor_sink properties.
GObject method implementation.
Definition at line 316 of file gsttensor_sink.c.
|
static |
Getter for value signal_rate.
Definition at line 579 of file gsttensor_sink.c.
|
static |
Getter for flag silent.
Definition at line 639 of file gsttensor_sink.c.
|
static |
Initialize tensor_sink element.
init properties
enable qos
Definition at line 257 of file gsttensor_sink.c.
|
static |
Handle queries.
GstBaseSink method implementation.
tensor sink does not support seeking
Definition at line 406 of file gsttensor_sink.c.
|
static |
Handle buffer.
GstBaseSink method implementation.
Definition at line 438 of file gsttensor_sink.c.
|
static |
Handle buffer data.
internal functions
self | pointer to GstTensorSink |
buffer | pointer to GstBuffer to be handled |
time for next signal
send data after render time, or firstly received buffer
send data if signal rate is 0
Definition at line 479 of file gsttensor_sink.c.
|
static |
Handle list of buffers.
GstBaseSink method implementation.
Definition at line 454 of file gsttensor_sink.c.
|
static |
Setter for flag emit_signal.
Definition at line 596 of file gsttensor_sink.c.
|
static |
Setter for value last_render_time.
Definition at line 535 of file gsttensor_sink.c.
|
static |
Setter for tensor_sink properties.
GObject method implementation
GObject method implementation.
Definition at line 284 of file gsttensor_sink.c.
|
static |
Setter for value signal_rate.
Definition at line 565 of file gsttensor_sink.c.
|
static |
Setter for flag silent.
Definition at line 627 of file gsttensor_sink.c.
|
static |
Variable for signal ids.
Definition at line 109 of file gsttensor_sink.c.