GStreamer plugin to help debug tensor streams. More...
#include <string.h>
#include <nnstreamer_log.h>
#include <nnstreamer_util.h>
#include "gsttensor_debug.h"
#include "tensor_meta.h"
Go to the source code of this file.
Macros | |
#define | DBG (!self->silent) |
Macro for debug mode. More... | |
#define | GST_CAT_DEFAULT gst_tensor_debug_debug |
#define | CAPS_STRING GST_TENSORS_CAP_MAKE(GST_TENSOR_FORMAT_ALL) |
#define | C_FLAGS(v) ((guint) v) |
#define | TENSOR_DEBUG_TYPE_OUTPUT_FLAGS (tensor_debug_output_flags_get_type()) |
#define | DEFAULT_TENSOR_DEBUG_OUTPUT_FLAGS (TDBG_OUTPUT_CONSOLE_I) |
#define | TENSOR_DEBUG_TYPE_CAPS (tensor_debug_cap_get_type()) |
#define | DEFAULT_TENSOR_DEBUG_CAP (TDBG_CAP_SHOW_UPDATE_F) |
#define | TENSOR_DEBUG_TYPE_META_FLAGS (tensor_debug_meta_flags_get_type()) |
#define | DEFAULT_TENSOR_DEBUG_META_FLAGS (TDBG_META_DISABLED) |
#define | DEFAULT_SILENT TRUE |
Flag to print minimized log. More... | |
#define | gst_tensor_debug_parent_class parent_class |
Enumerations | |
enum | { PROP_0, PROP_SILENT, PROP_OUTPUT, PROP_CAP, PROP_META } |
tensor_debug properties More... | |
Functions | |
GST_DEBUG_CATEGORY_STATIC (gst_tensor_debug_debug) | |
static GType | tensor_debug_output_flags_get_type (void) |
Flags for output_mode of GstTensorDebug. More... | |
static GType | tensor_debug_cap_get_type (void) |
Enums for cap_mode of GstTensorDebug. More... | |
static GType | tensor_debug_meta_flags_get_type (void) |
Flags for meta_mode of GstTensorDebug. More... | |
G_DEFINE_TYPE (GstTensorDebug, gst_tensor_debug, GST_TYPE_BASE_TRANSFORM) | |
static void | gst_tensor_debug_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
Setter for tensor_debug properties. More... | |
static void | gst_tensor_debug_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
Getter for tensor_debug properties. More... | |
static void | gst_tensor_debug_finalize (GObject *object) |
Function to finalize instance. More... | |
static GstFlowReturn | gst_tensor_debug_transform_ip (GstBaseTransform *trans, GstBuffer *buffer) |
in-place transform More... | |
static GstCaps * | gst_tensor_debug_fixate_caps (GstBaseTransform *trans, GstPadDirection direction, GstCaps *caps, GstCaps *othercaps) |
fixate caps. required vmethod of GstBaseTransform. More... | |
static gboolean | gst_tensor_debug_set_caps (GstBaseTransform *trans, GstCaps *in_caps, GstCaps *out_caps) |
set caps. required vmethod of GstBaseTransform. More... | |
static void | gst_tensor_debug_class_init (GstTensorDebugClass *klass) |
Initialize the tensor_debug's class. More... | |
static void | gst_tensor_debug_init (GstTensorDebug *self) |
Initialize tensor_debug element. More... | |
static void | _gst_tensor_debug_output (GstTensorDebug *self, GstBuffer *buffer) |
The core function that provides debug output based on the contents. More... | |
Variables | |
static GstStaticPadTemplate | sink_factory |
The capabilities of the inputs. More... | |
static GstStaticPadTemplate | src_factory |
The capabilities of the outputs. More... | |
GStreamer plugin to help debug tensor streams.
GStreamer/NNStreamer tensor_debug Copyright (C) 2022 MyungJoo Ham myung joo. ham@s amsu ng.co m
Definition in file gsttensor_debug.c.
#define C_FLAGS | ( | v | ) | ((guint) v) |
Definition at line 88 of file gsttensor_debug.c.
#define CAPS_STRING GST_TENSORS_CAP_MAKE(GST_TENSOR_FORMAT_ALL) |
This is a new element created after the obsoletion of other/tensor. Use other/tensors if you want to use tensor_debug
Definition at line 58 of file gsttensor_debug.c.
#define DBG (!self->silent) |
Macro for debug mode.
SECTION:element-tensor_debug
A filter that generates debug messages for developer at the insertion point of the given pipeline. An application writer using an nnstreamer pipeline can use tensor_debug to debug or get profile information in their applications.
Note that this does not support other/tensor, but only supports other/tensors.
<refsect2> <title>Example launch line</title> |[ gst-launch-1.0 videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! tensor_converter ! tensor_debug output-method=console-info capability=always ! tensor_sink ]| </refsect2>
Definition at line 48 of file gsttensor_debug.c.
#define DEFAULT_SILENT TRUE |
Flag to print minimized log.
Definition at line 191 of file gsttensor_debug.c.
#define DEFAULT_TENSOR_DEBUG_CAP (TDBG_CAP_SHOW_UPDATE_F) |
Definition at line 161 of file gsttensor_debug.c.
#define DEFAULT_TENSOR_DEBUG_META_FLAGS (TDBG_META_DISABLED) |
Definition at line 186 of file gsttensor_debug.c.
#define DEFAULT_TENSOR_DEBUG_OUTPUT_FLAGS (TDBG_OUTPUT_CONSOLE_I) |
Definition at line 135 of file gsttensor_debug.c.
#define GST_CAT_DEFAULT gst_tensor_debug_debug |
Definition at line 52 of file gsttensor_debug.c.
#define gst_tensor_debug_parent_class parent_class |
Definition at line 193 of file gsttensor_debug.c.
#define TENSOR_DEBUG_TYPE_CAPS (tensor_debug_cap_get_type()) |
Definition at line 137 of file gsttensor_debug.c.
#define TENSOR_DEBUG_TYPE_META_FLAGS (tensor_debug_meta_flags_get_type()) |
Definition at line 163 of file gsttensor_debug.c.
#define TENSOR_DEBUG_TYPE_OUTPUT_FLAGS (tensor_debug_output_flags_get_type()) |
Definition at line 90 of file gsttensor_debug.c.
anonymous enum |
tensor_debug properties
Enumerator | |
---|---|
PROP_0 | |
PROP_SILENT | |
PROP_OUTPUT | |
PROP_CAP | |
PROP_META |
Definition at line 79 of file gsttensor_debug.c.
|
static |
The core function that provides debug output based on the contents.
Definition at line 397 of file gsttensor_debug.c.
G_DEFINE_TYPE | ( | GstTensorDebug | , |
gst_tensor_debug | , | ||
GST_TYPE_BASE_TRANSFORM | |||
) |
GST_DEBUG_CATEGORY_STATIC | ( | gst_tensor_debug_debug | ) |
|
static |
Initialize the tensor_debug's class.
The flag to enable/disable debugging messages.
GstTensorDebug::output:
The combination of enums configuring output methods.
GstTensorDebug::cap:
The logging preference of the stream capability (GSTCAP).
GstTensorDebug::meta:
The logging preference of in-stream metadata (GSTMETA).
This won't modify the contents!
call transform_ip although it's passthrough
Note. Without transform_caps and with passthrough_on_same_caps = TRUE, This element is not allowed to touch the contents, but can inspect the contents with transform_ip by setting transform_ip_on_passthrough.
Definition at line 215 of file gsttensor_debug.c.
|
static |
Function to finalize instance.
Definition at line 327 of file gsttensor_debug.c.
|
static |
fixate caps. required vmethod of GstBaseTransform.
Definition at line 421 of file gsttensor_debug.c.
|
static |
Getter for tensor_debug properties.
Definition at line 368 of file gsttensor_debug.c.
|
static |
|
static |
set caps. required vmethod of GstBaseTransform.
Definition at line 435 of file gsttensor_debug.c.
|
static |
Setter for tensor_debug properties.
Definition at line 336 of file gsttensor_debug.c.
|
static |
in-place transform
Definition at line 408 of file gsttensor_debug.c.
|
static |
Enums for cap_mode of GstTensorDebug.
Definition at line 142 of file gsttensor_debug.c.
|
static |
Flags for meta_mode of GstTensorDebug.
Definition at line 168 of file gsttensor_debug.c.
|
static |
Flags for output_mode of GstTensorDebug.
Definition at line 95 of file gsttensor_debug.c.
|
static |
The capabilities of the inputs.
Definition at line 63 of file gsttensor_debug.c.
|
static |
The capabilities of the outputs.
Definition at line 71 of file gsttensor_debug.c.