GNOME Bugzilla – Bug 333779
New API: add gst_uri_has_protocol
Last modified: 2006-03-09 12:09:35 UTC
I'd like to add the following API: gboolean gst_uri_has_protocol (const gchar * uri, const gchar * protocol); Almost all GstUriHandler implementations have overly complicated code blocks like gchar *proto; proto = gst_uri_get_protocol (uri); if (!proto || strcmp (proto, "myproto") != 0) { g_free (proto); return FALSE; } g_free (proto); Would be much nicer to have just a simple if (!gst_uri_has_protocol (uri, "myproto")) return FASLE;
Created attachment 60853 [details] [review] proposed addition
Patch looks good, API looks useful. Go ahead.
Thanks, committed: 2006-03-09 Tim-Philipp Müller <tim at centricular dot net> * docs/gst/gstreamer-sections.txt: * gst/gsturi.c: (gst_uri_has_protocol): * gst/gsturi.h: Add new API: gst_uri_has_protocol() (#333779).