if (!ret) \
return FALSE; \
;
+static const gchar format_RGB[] = "RGB";
+static const gchar format_BGRx[] = "BGRx";
+static const gchar interlace_progressive[] = "progressive";
+
/**
* @brief Configure tensor metadata from sink caps
*/
tensor_dim dimension;
gint dim;
gboolean ret;
- gchar format[1024];
- gchar interlace[1024];
+ const gchar *format;
+ const gchar *interlace;
const gchar *type_str;
/* This caps is coming from tensor */
if (dimension[0] == 3 || dimension[0] == 4) {
filter->format = dimension[0];
if (dimension[0] == 3)
- strcpy (format, "RGB");
+ format = format_RGB;
else
- strcpy (format, "BGRx");
+ format = format_BGRx;
} else {
return FALSE;
}
/* @TODO Need to specify of video mode */
filter->views = 1;
- strcpy (interlace, "progressive");
+ interlace = interlace_progressive;
if (!g_strcmp0 (interlace, "progressive")) {
filter->mode = _VIDEO_PROGRESSIVE;
} else {
GstTensorDec *filter = GST_TENSORDEC_CAST (trans);
gboolean AddPadding = TRUE;
int width, channel;
- char format[1024];
+ const gchar *format;
GstStructure *structure;
structure = gst_caps_get_structure (incaps, 0);
if (channel == 3 || channel == 4) {
if (channel == 3)
- strcpy (format, "RGB");
+ format = format_RGB;
else
- strcpy (format, "BGRx");
+ format = format_BGRx;
} else {
return FALSE;
}