+2005-11-10 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ patch by: Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/gststructure.c: (gst_structure_parse_field),
+ (gst_structure_from_string):
+ Forward-port a 0.8 patch to handle escaped spaces in structure string,
+ so that gst_parse_launch() can deal with spaces in filtered link
+ caps (fixes #164479)
+ * check/gst/capslist.h:
+ * check/gst/gststructure.c: (GST_START_TEST):
+ add unit tests for this change
+
2005-11-10 Wim Taymans <wim@fluendo.com>
* docs/gst/gstreamer-sections.txt:
"video/x-raw-yuv, format=(fourcc){ I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
"video/x-raw-rgb, bpp = (int) 32, depth = (int) 24, endianness = (int) BIG_ENDIAN, red_mask = (int) 0x000000FF, framerate = (double) [ 0, max ]",
"video/x-raw-rgb, bpp = (int) 32, depth = (int) 24, endianness = (int) BIG_ENDIAN, red_mask = (int) 0xFF000000, framerate = (double) [ 0, max ]",
+ "video/x-raw-rgb,\\ bpp=(int)32",
"ANY",
"EMPTY"
};
"video/x-raw-rgb, red_mask = (int) 0x7FFFFFFF",
"video/x-raw-rgb, red_mask = (int) 0x80000000",
"video/x-raw-rgb, red_mask = (int) 0xFF000000",
+ /* result from
+ * gst-launch ... ! "video/x-raw-rgb, red_mask=(int)0xFF000000" ! ... */
+ "video/x-raw-rgb,\\ red_mask=(int)0xFF000000",
};
gint results[] = {
123456,
0x7FFFFFFF,
0x80000000,
0xFF000000,
+ 0xFF000000,
};
GstStructure *structure;
int i;
s = str;
- while (g_ascii_isspace (*s))
+ while (g_ascii_isspace (*s) || (s[0] == '\\' && g_ascii_isspace (s[1])))
s++;
name = s;
if (!gst_structure_parse_simple_string (s, &name_end))
return FALSE;
s = name_end;
- while (g_ascii_isspace (*s))
+ while (g_ascii_isspace (*s) || (s[0] == '\\' && g_ascii_isspace (s[1])))
s++;
if (*s != '=')
if (!gst_structure_parse_string (r, &w, &r))
goto error;
- while (g_ascii_isspace (*r))
+ while (g_ascii_isspace (*r) || (r[0] == '\\' && g_ascii_isspace (r[1])))
r++;
if (*r != 0 && *r != ';' && *r != ',')
goto error;
if (*r != ',')
goto error;
r++;
- while (*r && g_ascii_isspace (*r))
+ while (*r && (g_ascii_isspace (*r) || (r[0] == '\\'
+ && g_ascii_isspace (r[1]))))
r++;
memset (&field, 0, sizeof (field));
if (!gst_structure_parse_field (r, &r, &field))
goto error;
gst_structure_set_field (structure, &field);
- while (*r && g_ascii_isspace (*r))
+ while (*r && (g_ascii_isspace (*r) || (r[0] == '\\'
+ && g_ascii_isspace (r[1]))))
r++;
}
"video/x-raw-yuv, format=(fourcc){ I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
"video/x-raw-rgb, bpp = (int) 32, depth = (int) 24, endianness = (int) BIG_ENDIAN, red_mask = (int) 0x000000FF, framerate = (double) [ 0, max ]",
"video/x-raw-rgb, bpp = (int) 32, depth = (int) 24, endianness = (int) BIG_ENDIAN, red_mask = (int) 0xFF000000, framerate = (double) [ 0, max ]",
+ "video/x-raw-rgb,\\ bpp=(int)32",
"ANY",
"EMPTY"
};
"video/x-raw-rgb, red_mask = (int) 0x7FFFFFFF",
"video/x-raw-rgb, red_mask = (int) 0x80000000",
"video/x-raw-rgb, red_mask = (int) 0xFF000000",
+ /* result from
+ * gst-launch ... ! "video/x-raw-rgb, red_mask=(int)0xFF000000" ! ... */
+ "video/x-raw-rgb,\\ red_mask=(int)0xFF000000",
};
gint results[] = {
123456,
0x7FFFFFFF,
0x80000000,
0xFF000000,
+ 0xFF000000,
};
GstStructure *structure;
int i;