[Bug 339744] [API 0.11] use the const keyword more often

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Apr 9 04:25:00 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=339744
  GStreamer | gstreamer (core) | git

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |t.i.m at zen.co.uk
         Resolution|                            |OBSOLETE

--- Comment #4 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2012-04-09 11:24:54 UTC ---
 > gst_static_pad_template_get (GstStaticPadTemplate * pad_template)
> should be 
> gst_static_pad_template_get (const GstStaticPadTemplate * pad_template)

That's a bit tricky, because the static caps which are part of the static pad
template structure are ref'ed here, so the structure is actually changed (also,
the static caps may be created/inited on demand).

> gst_type_find_register (..., gchar ** extensions, ...)
> should be
> gst_type_find_register (..., const gchar ** extensions, ...)

This is a simple const gchar * extensions now.


> in gstquery.h
> struct _GstQueryTypeDefinition

This is gone now afaict.

> and in gstformat.h
> struct _GstFormatDefinition
> make fields except the GQuark const

Done, I think.

> we could save quite a bit of memory if we didn't g_strdup()
> all those element detail strings in
>   gst_element_class_set_details (GstElementClass * klass,
>       const GstElementDetails * details);
> which are almost always const strings anyway

We can add _{set,add}_static_metadata() functions later for this.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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