tensor-converter converts all media stream to tensor type.
moves all functions to parse media info into tensor-converter.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
}
/**
- * @brief Parse structure and set tensor config info (internal static function)
+ * @brief Parse structure and set tensor config info
* @param config tensor config structure to be filled
* @param structure structure to be interpreted
* @return TRUE if ok
*/
-static gboolean
-gst_tensor_config_from_tensor_info (GstTensorConfig * config,
+gboolean
+gst_tensor_config_from_structure (GstTensorConfig * config,
const GstStructure * structure)
{
GstTensorInfo *info;
}
/**
- * @brief Set the tensor config structure from video info (internal static function)
- * @param config tensor config structure to be filled
- * @param structure caps structure
- * @note Change dimention if tensor contains N frames.
- * @return TRUE if supported type
- */
-static gboolean
-gst_tensor_config_from_video_info (GstTensorConfig * config,
- const GstStructure * structure)
-{
- /**
- * Refer: https://www.tensorflow.org/api_docs/python/tf/summary/image
- * A 4-D uint8 or float32 Tensor of shape [batch_size, height, width, channels]
- * where channels is 1, 3, or 4.
- */
- const gchar *format_string;
- GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
- gint width = 0;
- gint height = 0;
-
- g_return_val_if_fail (config != NULL, FALSE);
- gst_tensor_config_init (config);
-
- g_return_val_if_fail (structure != NULL, FALSE);
-
- format_string = gst_structure_get_string (structure, "format");
- if (format_string) {
- format = gst_video_format_from_string (format_string);
- }
-
- gst_structure_get_int (structure, "width", &width);
- gst_structure_get_int (structure, "height", &height);
- gst_structure_get_fraction (structure, "framerate", &config->rate_n,
- &config->rate_d);
-
- /* [color-space][width][height][frames] */
- switch (format) {
- case GST_VIDEO_FORMAT_GRAY8:
- config->info.type = _NNS_UINT8;
- config->info.dimension[0] = 1;
- break;
- case GST_VIDEO_FORMAT_RGB:
- case GST_VIDEO_FORMAT_BGR:
- config->info.type = _NNS_UINT8;
- config->info.dimension[0] = 3;
- break;
- case GST_VIDEO_FORMAT_RGBx:
- case GST_VIDEO_FORMAT_BGRx:
- case GST_VIDEO_FORMAT_xRGB:
- case GST_VIDEO_FORMAT_xBGR:
- case GST_VIDEO_FORMAT_RGBA:
- case GST_VIDEO_FORMAT_BGRA:
- case GST_VIDEO_FORMAT_ARGB:
- case GST_VIDEO_FORMAT_ABGR:
- config->info.type = _NNS_UINT8;
- config->info.dimension[0] = 4;
- break;
- default:
- /* unsupported format */
- GST_WARNING ("Unsupported format = %s\n",
- format_string ? format_string : "Unknown");
- break;
- }
-
- config->info.dimension[1] = width;
- config->info.dimension[2] = height;
- /* Supposed 1 frame in tensor, change this if tensor contains N frames. */
- config->info.dimension[3] = 1;
-#if 0
- /**
- * @todo To fix coverity issue, now block these lines.
- * If NNS_TENSOR_RANK_LIMIT is larger than 4, unblock these to initialize the tensor dimension.
- */
- for (i = 4; i < NNS_TENSOR_RANK_LIMIT; i++) {
- config->info.dimension[i] = 1;
- }
-#endif
- return (config->info.type != _NNS_END);
-}
-
-/**
- * @brief Set the tensor config structure from audio info (internal static function)
- * @param config tensor config structure to be filled
- * @param structure caps structure
- * @note Change dimention if tensor contains N frames.
- * @return TRUE if supported type
- */
-
-__attribute__ ((unused))
- static gboolean
- _gst_tensor_config_from_audio_info (GstTensorConfig * config,
- const GstStructure * structure)
-{
- /**
- * Refer: https://www.tensorflow.org/api_docs/python/tf/summary/audio
- * A 3-D float32 Tensor of shape [batch_size, frames, channels]
- * or a 2-D float32 Tensor of shape [batch_size, frames].
- */
- const gchar *format_string;
- GstAudioFormat format = GST_AUDIO_FORMAT_UNKNOWN;
- gint channels = 0;
- gint rate = 0;
- guint i;
-
- g_return_val_if_fail (config != NULL, FALSE);
- gst_tensor_config_init (config);
-
- g_return_val_if_fail (structure != NULL, FALSE);
-
- format_string = gst_structure_get_string (structure, "format");
- if (format_string) {
- format = gst_audio_format_from_string (format_string);
- }
-
- gst_structure_get_int (structure, "channels", &channels);
- gst_structure_get_int (structure, "rate", &rate);
-
- /* [channels][frames] */
- switch (format) {
- case GST_AUDIO_FORMAT_S8:
- config->info.type = _NNS_INT8;
- break;
- case GST_AUDIO_FORMAT_U8:
- config->info.type = _NNS_UINT8;
- break;
- case GST_AUDIO_FORMAT_S16:
- config->info.type = _NNS_INT16;
- break;
- case GST_AUDIO_FORMAT_U16:
- config->info.type = _NNS_UINT16;
- break;
- case GST_AUDIO_FORMAT_S32:
- config->info.type = _NNS_INT32;
- break;
- case GST_AUDIO_FORMAT_U32:
- config->info.type = _NNS_UINT32;
- break;
- case GST_AUDIO_FORMAT_F32:
- config->info.type = _NNS_FLOAT32;
- break;
- case GST_AUDIO_FORMAT_F64:
- config->info.type = _NNS_FLOAT64;
- break;
- default:
- /* unsupported format */
- GST_WARNING ("Unsupported format = %s\n",
- format_string ? format_string : "Unknown");
- break;
- }
-
- config->info.dimension[0] = channels;
- /* Supposed 1 frame in tensor, change this if tensor contains N frames. */
- config->info.dimension[1] = 1;
-
- for (i = 2; i < NNS_TENSOR_RANK_LIMIT; i++) {
- config->info.dimension[i] = 1;
- }
-
- if (rate > 0) {
- config->rate_n = rate;
- config->rate_d = 1;
- }
-
- return (config->info.type != _NNS_END);
-}
-
-/**
- * @brief Set the tensor config structure from text info (internal static function)
- * @param config tensor config structure to be filled
- * @param structure caps structure
- * @note Change dimention if tensor contains N frames.
- * @return TRUE if supported type
- */
-static gboolean
-gst_tensor_config_from_text_info (GstTensorConfig * config,
- const GstStructure * structure)
-{
- /**
- * Refer: https://www.tensorflow.org/api_docs/python/tf/summary/text
- * A string-type Tensor
- */
- const gchar *format_string;
- guint i;
-
- g_return_val_if_fail (config != NULL, FALSE);
- gst_tensor_config_init (config);
-
- g_return_val_if_fail (structure != NULL, FALSE);
-
- format_string = gst_structure_get_string (structure, "format");
- if (format_string) {
- if (g_str_equal (format_string, "utf8")) {
- config->info.type = _NNS_UINT8;
- } else {
- /* unsupported format */
- GST_WARNING ("Unsupported format = %s\n", format_string);
- }
- }
-
- /* [size][frames] */
- /* Fixed size of string, we cannot get the size from caps. */
- config->info.dimension[0] = 0;
- /* Supposed 1 frame in tensor, change this if tensor contains N frames. */
- config->info.dimension[1] = 1;
-
- for (i = 2; i < NNS_TENSOR_RANK_LIMIT; i++) {
- config->info.dimension[i] = 1;
- }
-
- if (gst_structure_has_field (structure, "framerate")) {
- gst_structure_get_fraction (structure, "framerate", &config->rate_n,
- &config->rate_d);
- } else {
- /* cannot get the framerate for text type */
- config->rate_n = 0;
- config->rate_d = 1;
- }
-
- return (config->info.type != _NNS_END);
-}
-
-/**
- * @brief Set the tensor config structure from octet stream (internal static function)
- * @param config tensor config structure to be filled
- * @param structure caps structure
- * @note Change tensor dimention and type.
- * @return TRUE if supported type
- */
-static gboolean
-gst_tensor_config_from_octet_stream_info (GstTensorConfig * config,
- const GstStructure * structure)
-{
- g_return_val_if_fail (config != NULL, FALSE);
- gst_tensor_config_init (config);
-
- g_return_val_if_fail (structure != NULL, FALSE);
-
- /**
- * Raw byte-stream (application/octet-stream)
- * We cannot get the exact tensor info from caps.
- * All tensor info should be updated.
- */
- config->info.type = _NNS_UINT8;
-
- if (gst_structure_has_field (structure, "framerate")) {
- gst_structure_get_fraction (structure, "framerate", &config->rate_n,
- &config->rate_d);
- } else {
- /* cannot get the framerate */
- config->rate_n = 0;
- config->rate_d = 1;
- }
-
- return (config->info.type != _NNS_END);
-}
-
-/**
- * @brief Parse structure and set tensor config info
- * @param config tensor config structure to be filled
- * @param structure structure to be interpreted
- * @note Change dimention if tensor contains N frames.
- * @return TRUE if no error
- */
-gboolean
-gst_tensor_config_from_structure (GstTensorConfig * config,
- const GstStructure * structure)
-{
- media_type m_type;
- gboolean ret;
-
- g_return_val_if_fail (config != NULL, FALSE);
- g_return_val_if_fail (structure != NULL, FALSE);
-
- /* update config from tensor stream */
- if (gst_structure_has_name (structure, "other/tensor")) {
- return gst_tensor_config_from_tensor_info (config, structure);
- }
-
- /* update config from media stream */
- m_type = gst_tensor_media_type_from_structure (structure);
-
- switch (m_type) {
- case _NNS_VIDEO:
- ret = gst_tensor_config_from_video_info (config, structure);
- break;
- case _NNS_AUDIO:
- ret = gst_tensor_config_from_audio_info (config, structure);
- break;
- case _NNS_TEXT:
- ret = gst_tensor_config_from_text_info (config, structure);
- break;
- case _NNS_OCTET:
- ret = gst_tensor_config_from_octet_stream_info (config, structure);
- break;
- default:
- gst_tensor_config_init (config);
- GST_WARNING ("Unsupported type %d\n", m_type);
- ret = FALSE;
- }
-
- return ret;
-}
-
-/**
* @brief Get tensor caps from tensor config
* @param config tensor config info
* @return caps for given config
if (g_str_equal (name, "other/tensor")) {
GstTensorConfig c;
- gst_tensor_config_from_tensor_info (&c, structure);
+ gst_tensor_config_from_structure (&c, structure);
config->info.num_tensors = 1;
config->info.info[0] = c.info;
#include <string.h>
#include "tensor_converter.h"
+#include <gst/video/video-info.h>
+#ifndef NO_AUDIO
+#include <gst/audio/audio-info.h>
+#endif
/**
* @brief Macro for debug mode.
self->set_timestamp = DEFAULT_SET_TIMESTAMP;
self->frames_per_tensor = DEFAULT_FRAMES_PER_TENSOR;
self->in_media_type = _NNS_MEDIA_END;
+ self->frame_size = 0;
self->remove_padding = FALSE;
gst_tensor_info_init (&self->tensor_info);
frame_size = color * width * height * type;
/** supposed 1 frame in buffer */
- g_assert ((buf_size / GST_VIDEO_INFO_SIZE (&self->in_info.video)) == 1);
+ g_assert ((buf_size / self->frame_size) == 1);
frames_in = 1;
if (self->remove_padding) {
}
break;
}
+#ifndef NO_AUDIO
case _NNS_AUDIO:
- frame_size = GST_AUDIO_INFO_BPF (&self->in_info.audio);
+ /* number of bytes for one frame */
+ frame_size = self->frame_size;
frames_in = buf_size / frame_size;
break;
-
+#endif
case _NNS_TEXT:
/* supposed 1 frame in buffer */
- frame_size = gst_tensor_info_get_size (&config->info) / frames_out;
+ frame_size = self->frame_size;
frames_in = 1;
if (buf_size != frame_size) {
gst_buffer_unref (buf);
}
break;
-
case _NNS_OCTET:
/** get frame size from the properties */
- frame_size = gst_tensor_info_get_size (&config->info);
+ frame_size = self->frame_size;
g_assert (frame_size > 0);
g_assert ((buf_size % frame_size) == 0);
frames_in = buf_size / frame_size;
break;
-
default:
GST_ERROR_OBJECT (self, "Unsupported type %d\n", self->in_media_type);
g_assert (0);
}
/**
+ * @brief Set the tensor config structure from video info (internal static function)
+ * @param self this pointer to GstTensorConverter
+ * @param config tensor config structure to be filled
+ * @param info video info structure
+ * @note Change dimention if tensor contains N frames.
+ * @return TRUE if supported type
+ */
+static gboolean
+gst_tensor_converter_parse_video (GstTensorConverter * self,
+ GstTensorConfig * config, const GstVideoInfo * info)
+{
+ /**
+ * Refer: https://www.tensorflow.org/api_docs/python/tf/summary/image
+ * A 4-D uint8 or float32 Tensor of shape [batch_size, height, width, channels]
+ * where channels is 1, 3, or 4.
+ */
+ GstVideoFormat format;
+ guint i;
+
+ g_return_val_if_fail (config != NULL, FALSE);
+ gst_tensor_config_init (config);
+
+ g_return_val_if_fail (info != NULL, FALSE);
+
+ format = GST_VIDEO_INFO_FORMAT (info);
+
+ /* [color-space][width][height][frames] */
+ switch (format) {
+ case GST_VIDEO_FORMAT_GRAY8:
+ config->info.type = _NNS_UINT8;
+ config->info.dimension[0] = 1;
+ break;
+ case GST_VIDEO_FORMAT_RGB:
+ case GST_VIDEO_FORMAT_BGR:
+ config->info.type = _NNS_UINT8;
+ config->info.dimension[0] = 3;
+ break;
+ case GST_VIDEO_FORMAT_RGBx:
+ case GST_VIDEO_FORMAT_BGRx:
+ case GST_VIDEO_FORMAT_xRGB:
+ case GST_VIDEO_FORMAT_xBGR:
+ case GST_VIDEO_FORMAT_RGBA:
+ case GST_VIDEO_FORMAT_BGRA:
+ case GST_VIDEO_FORMAT_ARGB:
+ case GST_VIDEO_FORMAT_ABGR:
+ config->info.type = _NNS_UINT8;
+ config->info.dimension[0] = 4;
+ break;
+ default:
+ /* unsupported format */
+ GST_WARNING_OBJECT (self, "Unsupported format = %s\n",
+ GST_STR_NULL (gst_video_format_to_string (format)));
+ break;
+ }
+
+ config->info.dimension[1] = GST_VIDEO_INFO_WIDTH (info);
+ config->info.dimension[2] = GST_VIDEO_INFO_HEIGHT (info);
+
+ /* Supposed 1 frame in tensor, change dimension[3] if tensor contains N frames. */
+ for (i = 3; i < NNS_TENSOR_RANK_LIMIT; i++) {
+ config->info.dimension[i] = 1;
+ }
+
+ config->rate_n = GST_VIDEO_INFO_FPS_N (info);
+ config->rate_d = GST_VIDEO_INFO_FPS_D (info);
+
+ return (config->info.type != _NNS_END);
+}
+
+#ifndef NO_AUDIO
+/**
+ * @brief Set the tensor config structure from audio info (internal static function)
+ * @param self this pointer to GstTensorConverter
+ * @param config tensor config structure to be filled
+ * @param info audio info structure
+ * @note Change dimention if tensor contains N frames.
+ * @return TRUE if supported type
+ */
+static gboolean
+gst_tensor_converter_parse_audio (GstTensorConverter * self,
+ GstTensorConfig * config, const GstAudioInfo * info)
+{
+ /**
+ * Refer: https://www.tensorflow.org/api_docs/python/tf/summary/audio
+ * A 3-D float32 Tensor of shape [batch_size, frames, channels]
+ * or a 2-D float32 Tensor of shape [batch_size, frames].
+ */
+ GstAudioFormat format;
+ guint i;
+
+ g_return_val_if_fail (config != NULL, FALSE);
+ gst_tensor_config_init (config);
+
+ g_return_val_if_fail (info != NULL, FALSE);
+
+ format = GST_AUDIO_INFO_FORMAT (info);
+
+ /* [channels][frames] */
+ switch (format) {
+ case GST_AUDIO_FORMAT_S8:
+ config->info.type = _NNS_INT8;
+ break;
+ case GST_AUDIO_FORMAT_U8:
+ config->info.type = _NNS_UINT8;
+ break;
+ case GST_AUDIO_FORMAT_S16:
+ config->info.type = _NNS_INT16;
+ break;
+ case GST_AUDIO_FORMAT_U16:
+ config->info.type = _NNS_UINT16;
+ break;
+ case GST_AUDIO_FORMAT_S32:
+ config->info.type = _NNS_INT32;
+ break;
+ case GST_AUDIO_FORMAT_U32:
+ config->info.type = _NNS_UINT32;
+ break;
+ case GST_AUDIO_FORMAT_F32:
+ config->info.type = _NNS_FLOAT32;
+ break;
+ case GST_AUDIO_FORMAT_F64:
+ config->info.type = _NNS_FLOAT64;
+ break;
+ default:
+ /* unsupported format */
+ GST_WARNING_OBJECT (self, "Unsupported format = %s\n",
+ GST_STR_NULL (gst_audio_format_to_string (format)));
+ break;
+ }
+
+ config->info.dimension[0] = GST_AUDIO_INFO_CHANNELS (info);
+
+ /* Supposed 1 frame in tensor, change dimension[1] if tensor contains N frames. */
+ for (i = 1; i < NNS_TENSOR_RANK_LIMIT; i++) {
+ config->info.dimension[i] = 1;
+ }
+
+ config->rate_n = GST_AUDIO_INFO_RATE (info);
+ config->rate_d = 1;
+
+ return (config->info.type != _NNS_END);
+}
+#endif
+
+/**
+ * @brief Set the tensor config structure from text info (internal static function)
+ * @param self this pointer to GstTensorConverter
+ * @param config tensor config structure to be filled
+ * @param structure caps structure
+ * @note Change dimention if tensor contains N frames.
+ * @return TRUE if supported type
+ */
+static gboolean
+gst_tensor_converter_parse_text (GstTensorConverter * self,
+ GstTensorConfig * config, const GstStructure * structure)
+{
+ /**
+ * Refer: https://www.tensorflow.org/api_docs/python/tf/summary/text
+ * A string-type Tensor
+ */
+ const gchar *format_string;
+ guint i;
+
+ g_return_val_if_fail (config != NULL, FALSE);
+ gst_tensor_config_init (config);
+
+ g_return_val_if_fail (structure != NULL, FALSE);
+
+ format_string = gst_structure_get_string (structure, "format");
+ if (format_string) {
+ if (g_str_equal (format_string, "utf8")) {
+ config->info.type = _NNS_UINT8;
+ } else {
+ /* unsupported format */
+ GST_WARNING_OBJECT (self, "Unsupported format = %s\n", format_string);
+ }
+ }
+
+ /* [size][frames] */
+ /* Fixed size of string, we cannot get the size from caps. */
+ config->info.dimension[0] = 0;
+
+ /* Supposed 1 frame in tensor, change dimension[1] if tensor contains N frames. */
+ for (i = 1; i < NNS_TENSOR_RANK_LIMIT; i++) {
+ config->info.dimension[i] = 1;
+ }
+
+ if (gst_structure_has_field (structure, "framerate")) {
+ gst_structure_get_fraction (structure, "framerate", &config->rate_n,
+ &config->rate_d);
+ } else {
+ /* cannot get the framerate for text type */
+ config->rate_n = 0;
+ config->rate_d = 1;
+ }
+
+ return (config->info.type != _NNS_END);
+}
+
+/**
+ * @brief Set the tensor config structure from octet stream (internal static function)
+ * @param self this pointer to GstTensorConverter
+ * @param config tensor config structure to be filled
+ * @param structure caps structure
+ * @note Change tensor dimention and type.
+ * @return TRUE if supported type
+ */
+static gboolean
+gst_tensor_converter_parse_octet (GstTensorConverter * self,
+ GstTensorConfig * config, const GstStructure * structure)
+{
+ g_return_val_if_fail (config != NULL, FALSE);
+ gst_tensor_config_init (config);
+
+ g_return_val_if_fail (structure != NULL, FALSE);
+
+ /**
+ * Raw byte-stream (application/octet-stream)
+ * We cannot get the exact tensor info from caps.
+ * All tensor info should be updated.
+ */
+ config->info.type = _NNS_UINT8;
+
+ if (gst_structure_has_field (structure, "framerate")) {
+ gst_structure_get_fraction (structure, "framerate", &config->rate_n,
+ &config->rate_d);
+ } else {
+ /* cannot get the framerate */
+ config->rate_n = 0;
+ config->rate_d = 1;
+ }
+
+ return (config->info.type != _NNS_END);
+}
+
+/**
* @brief Get supported format list.
*/
static void
}
}
break;
+#ifndef NO_AUDIO
case _NNS_AUDIO:
/* audio caps from tensor info */
if (config.info.type != _NNS_END) {
}
}
break;
+#endif
default:
/* do nothing for text and octet stream */
break;
structure = gst_caps_get_structure (caps, 0);
in_type = gst_tensor_media_type_from_structure (structure);
- if (!gst_tensor_config_from_structure (&config, structure)) {
- /** cannot configure tensor */
- return FALSE;
- }
-
switch (in_type) {
case _NNS_VIDEO:
{
return FALSE;
}
+ if (!gst_tensor_converter_parse_video (self, &config, &info)) {
+ GST_ERROR_OBJECT (self, "Failed to configure tensor from video info.");
+ return FALSE;
+ }
+
/**
* Emit Warning if RSTRIDE = RU4 (3BPP) && Width % 4 > 0
* @todo Add more conditions!
}
frames_dim = 3;
- self->in_info.video = info;
+ self->frame_size = GST_VIDEO_INFO_SIZE (&info);
break;
}
+#ifndef NO_AUDIO
case _NNS_AUDIO:
{
GstAudioInfo info;
return FALSE;
}
+ if (!gst_tensor_converter_parse_audio (self, &config, &info)) {
+ GST_ERROR_OBJECT (self, "Failed to configure tensor from audio info.");
+ return FALSE;
+ }
+
frames_dim = 1;
- self->in_info.audio = info;
+ self->frame_size = GST_AUDIO_INFO_BPF (&info);
break;
}
+#endif
case _NNS_TEXT:
+ {
+ if (!gst_tensor_converter_parse_text (self, &config, structure)) {
+ GST_ERROR_OBJECT (self, "Failed to configure tensor from text info.");
+ return FALSE;
+ }
+
/* get fixed size of text string from property */
if (!gst_tensor_dimension_is_valid (self->tensor_info.dimension)) {
GST_ERROR_OBJECT (self,
config.info.dimension[0] = self->tensor_info.dimension[0];
frames_dim = 1;
+ self->frame_size = gst_tensor_info_get_size (&config.info);
break;
+ }
case _NNS_OCTET:
+ {
+ if (!gst_tensor_converter_parse_octet (self, &config, structure)) {
+ GST_ERROR_OBJECT (self, "Failed to configure tensor from octet info.");
+ return FALSE;
+ }
+
/* update tensor info from properties */
if (!gst_tensor_info_validate (&self->tensor_info)) {
GST_ERROR_OBJECT (self,
}
config.info = self->tensor_info;
+ self->frame_size = gst_tensor_info_get_size (&config.info);
break;
+ }
default:
GST_ERROR_OBJECT (self, "Unsupported type %d\n", in_type);
return FALSE;
#define __GST_TENSOR_CONVERTER_H__
#include <gst/gst.h>
-#include <gst/video/video-info.h>
+#include <gst/base/gstadapter.h>
#include <tensor_common.h>
G_BEGIN_DECLS
GstAdapter *adapter; /**< adapt incoming media stream */
media_type in_media_type; /**< incoming media type */
- union
- {
- GstVideoInfo video; /**< video-info of the input media stream */
- GstAudioInfo audio; /**< audio-info of the input media stream */
- } in_info; /**< media input stream info union. will support audio/text later */
-
+ gsize frame_size; /**< size of one frame */
gboolean remove_padding; /**< If true, zero-padding must be removed */
gboolean tensor_configured; /**< True if already successfully configured tensor metadata */
GstTensorConfig tensor_config; /**< output tensor info */
fi
convertBMP2PNG
-gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=testcase01_RGB_640x480.png ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,width=640,height=480,framerate=0/1 ! testtensors silent=TRUE ! tensorscheck silent=TRUE ! filesink location=\"testcase01_RGB_640x480.nonip.log\" sync=true" 1 0 0 $PERFORMANCE
+gstTest "--gst-plugin-path=${PATH_TO_PLUGIN} filesrc location=testcase01_RGB_640x480.png ! pngdec ! videoscale ! imagefreeze ! videoconvert ! video/x-raw,format=RGB,width=640,height=480,framerate=0/1 ! tensor_converter ! testtensors ! tensorscheck ! filesink location=\"testcase01_RGB_640x480.nonip.log\" sync=true" 1 0 0 $PERFORMANCE
callCompareTest testcase01_RGB_640x480.golden testcase01_RGB_640x480.nonip.log 1 "Compare 1" 1 0
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS
- ("video/x-raw, format = (string) {RGB, BGRx}, views = (int)1, interlace-mode = (string)progressive, framerate = (fraction)[ 0/1, 2147483647/1 ]")
+ GST_STATIC_CAPS (GST_TENSOR_CAP_DEFAULT)
);
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",