<div dir="ltr"><div><div>I forgot to ask another related question.   When reading Ancillary data embedded in the frame for a Decklink source, there can be multiple VANC packets in a a single frame.  Do I need to combine those into a single GstMeta object, or can I have several _VANCMeta objects attached to a video frame buffer?  If I can have several, do I need to do anything special to maintain serialization, so they are parsed in the correct order?<br><br></div>Thanks,<br><br></div>John<br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 29, 2016 at 4:21 PM John P Poet <<a href="mailto:jppoet@gmail.com">jppoet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>In the example for creating a new meta info type:<br><br><a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-allocation-meta.html" target="_blank">https://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-allocation-meta.html</a><br><br></div>It says<br><br><span style="font-family:monospace">> Lastly, you implement a gst_buffer_add_*_meta() that adds the metadata implementation to a buffer and sets the values of the metadata.</span><br><br></div>And the example just show assigning values to local variables in the structure.  It does not show any memory allocation, so I assume that is not necessary.  In that structure I would like it to hold a c++ class:<br><br></div><span style="font-family:monospace">struct _VANCMeta {<br>  GstMeta       meta;<br>  AncillaryPacket packet;<br>};</span><br><br></div>AncillaryPacket would have various methods as well as data.  Will that work, or do I need to use more "base" types in my metadata structure?  There are only a few data elements in there, so just having those elements in the VANCMeta struct would be easy, but it would be nice to have the methods automatically available by whatever reads the metadata.<br><br></div>If I do need to just have 'simple' data types, and one of those types is an array of uint16_t, is there a preferred way of allocating the memory for it?  I assume I would use a GArray rather than a GstBuffer, right?   Or would I just use a basic C style array of uint16_t?<br><br><span style="font-family:monospace">struct _VANCMeta {<br>  GstMeta       meta;<br><br>  // primary data id.<br>  int data_id;<br>  // data block number (type 1), or secondary data id (type 2).<br>  int dbn_sdid;<br>  // number of words of data.<br>  int data_count;<br>  // actual data.<br>  uint16_t* buf;<br></span></div><div><span style="font-family:monospace">};</span><br><br></div><div>I would like to understand how the memory is deallocated after the life of the struct is over.  Who is responsible for that deallocation, and how do they know how to deallocate the memory?<br><br></div><div>Thanks,<br><br></div><div>John<br></div></div></blockquote></div>