[Bug 642967] [performance] Create variants of _ref/_unref for buffers

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Feb 22 09:41:13 PST 2011


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

--- Comment #3 from Wim Taymans <wim.taymans at gmail.com> 2011-02-22 17:41:07 UTC ---
in gst_buffer_unref() (which you presumably only can call with something that
is a buffer) you would do:

gst_buffer_unref(buffer)
{
  return_if_fail (buffer->type == GST_TYPE_BUFFER || g_type_check_instance_is_a
(miniobjecttype, buffer))

  gst_mini_object_unref_unchecked (buffer);
}

Same for events and queries (do a quick check for the exact type but fallback
to the heavy type check in case someone subclassed).

In the miniobject2 branch I've been experimenting with that (it helps that
miniobject can't be subclassed so that there is only one and only one simple
int check (and the buffer type is in a globally exported variable to avoid the
method call))

-- 
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