[Bug 779765] GstUri: add function to parse uri and set properties to object
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Mar 19 10:46:24 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=779765
Niels De Graef <nielsdegraef at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nielsdegraef at gmail.com
--- Comment #13 from Niels De Graef <nielsdegraef at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #12)
> (In reply to Nicolas Dufresne (stormer) from comment #11)
> > Review of attachment 347554 [details] [review] [review]:
> > One thing I notice, while reviewing, is that this
> > is way too generic. We need a way to filter certain properties to be binded.
>
> As you're the third to mention that, definitely ;) How about adding a
> parameter of type "const gchar *filter[]" that is NULL terminated and
> contains property names for this?
>
> Also IMHO we also need a way for transforming the query parameters to their
> respective types, i.e. a set of function pointers that do any custom
> conversion (+ validation) when the default one does not apply.
Random suggestion: maybe we can save a flag inside a GParamSpec to save that it
can be set using URI query parameters?
Say that we use for example a wrapper around g_object_class_install_property()
(e.g. gst_object_class_install_uri_compatible_property). It basically calls
g_param_spec_set_qdata() to set the flag (and possibly a default transform
function). Then it is both clear from the class_init() which properties are
supported for URI handling, and it's easily checkable from gst_parse_uri (or
whatever it will be called eventually).
(In reply to Sebastian Dröge (slomo) from comment #12)
> (In reply to Nicolas Dufresne (stormer) from comment #11)
> > Review of attachment 347554 [details] [review] [review]:
> >
> > By default, g_object_set() will assert on bad values, bad ranges. This is
> > not acceptable from an URI. You need to pre-validate all the values, and
> > their ranges, so it can warn and fail cleanly.
>
> Good catch, missed that above
>
> > ::: gst/gsturi.h
> >
> > This is just way too long.
>
> Do you have any suggestions? I suggested this new name in comment 2 because
> the previous one was just too generic. This function is doing something very
> specific, unrelated to general URI semantics but adding a specific meaning
> on top.
Maybe drop the _query_parameters suffix? i.e.
gst_object_set_properties_from_uri()
--
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