[Bug 761225] pad: Allow multiple conversion specifiers for request pads and don't require it at the very end
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Apr 3 09:02:17 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=761225
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #324938|none |needs-work
status| |
--- Comment #19 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 324938:
--> (https://bugzilla.gnome.org/review?bug=761225&attachment=324938)
::: gst/gstelement.c
@@ -1028,3 @@
- templ->name_template);
- /* see if we find an exact match */
- if (strcmp (name, templ->name_template) == 0) {
Why did you remove the exact match case?
@@ -1035,3 @@
- /* Because of sanity checks in gst_pad_template_new(), we know that %s
- and %d and %u, occurring at the end of the name_template, are the
only
- possibilities. */
The comment would be good to take over and update accordingly to the new
situation
@@ +1078,3 @@
+ /* Because of sanity checks in gst_pad_template_new(), we know that
%s
+ and %d and %u, occurring at the end of the name_template, are the
+ only possibilities. */
That's not true anymore, right? There could be multiple, and they might also be
in the middle not only at the end. E.g. src_%u_bla would also be valid
@@ +1114,3 @@
+ templ_found = TRUE;
+ break;
+ } else if (! !str ^ ! !data) {
Instead of this with the *bitwise* XOR, check the separate cases here
::: gst/gstpadtemplate.c
@@ +256,2 @@
}
+ if ((str = g_strrstr (name, "%")) && (*(str + 2) != '\0')) {
You use strstr() elsewhere and g_strstr() here. Why?
::: tests/check/gst/gstelement.c
@@ +442,3 @@
+
+ gst_element_class_add_pad_template (element_class,
+ gst_pad_template_new ("src_%u_%u_%u", GST_PAD_SRC, GST_PAD_REQUEST,
What about templates with %d (and checking for negative! numbers)? And
templates with multiple %s? And templates like src_%u_something? I think those
should also be checked
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list