[gstreamer-bugs] [Bug 545501] Unable to get the parent of a GstSubBuffer

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Mar 4 07:05:58 PST 2010


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

--- Comment #13 from Wim Taymans <wim.taymans at gmail.com> 2010-03-04 15:05:52 UTC ---
I'm not quite sure what kind of semantics are needed. 

I guess you essentially want to know what the original type of the (parent)
buffer is and if the data is still the same range in the subbuffer.

You would usually use this to get to the parent buffer and then cast that
buffer to the right subclassed type and get your custom buffer fields from
there.

something like

 GstBuffer * gst_buffer_cast (GstBuffer *buffer, GType type, guint
*start_offset, guint *end_offset);

it takes a buffer, tries to cast it (or the parent) to @type and then fills in
the start_offset and end_offset (when a subbuffer) and return a GstBuffer that
you can then cast to GType or NULL. 

It doesn't quite look good but it would allow you to get a handle to a buffer
of GType and fill in the offsets according to the parent. (0, 0) would mean
that there are no offsets...

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