How to operate on GstMapInfo

Nicolas Dufresne nicolas at ndufresne.ca
Thu Mar 16 12:30:06 UTC 2017


Le 16 mars 2017 5:45 AM, "dingoegret" <sephvelut at gmail.com> a écrit :

with gst_adapter_available i can get the size (gsize) of bytesof char data
in
the adapter.

with gst_adapter_map i can get the actual data as const void*
(gconstpointer).

now if i cast the gconstpointer to an unsigned *char, does that mean i get
back an array of pointers to char bytes where the size of the array of
pointers is the returned gsize? as in i could access data[0], data[1],
data[2] ... data[returned_gsize]? and get back pointers to the actual
singular bytes of supposed unsigned chars? this is what im trying to
understand. What is the data?


Yes, the size is in bytes. And by indexing it you get the value, not the
pointer. Also, index starts at 0, so the max is data[size - 1]




--
View this message in context: http://gstreamer-devel.966125.
n4.nabble.com/How-to-operate-on-GstMapInfo-tp4682202p4682252.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170316/d76926cc/attachment.html>


More information about the gstreamer-devel mailing list