gst_buffer_add_meta and get from another .so file

eyalhir74 eyalhir74 at
Mon Apr 26 16:04:35 UTC 2021

  I have to .so files which can't share classes/headers between themselves.
  In the first one I'm adding a custom meta object to the GstBuffer object
(with a GST_META_XXX_FRAME_DATA_ADD(buffer) function) , which is pushed down
the pipe.

  Later on in the second .so file, I try to retrieve the custom meta data
information I've set in the first .so class.
  However I don't understand how to retrieve the right metadata.

  I can use something like this (in the second down the pipe .so):
    while ((meta = gst_buffer_iterate_meta(buffer, &state)) != NULL) {
        if (meta && meta->info /*&& meta->info->api == ?????? */) {
            printf("Meta API: [%ld, %ld, %ld]\n", meta->info->api,
meta->info->type, meta->info->size);
            GstMyCustomMetaFrameData *rr = ( GstMyCustomMetaFrameData
            printf("%d, %ld, %d.......... \n", rr->m_frameIndex,
rr->m_timestamp, rr->m_rvflag);

  I get two meta's, however:
1. I can't understand which of the two metas is mine? 
2. I set the m_rv_flag to 99 in the first .so, so technically I am able to
check which is mine (in a wrong way I guess, just make sure this value is
99), however every few frames, I get wrong values for both of the metas...

 any idea how to solve this?

I'm using code along the lines of the sample here:


Sent from:

More information about the gstreamer-devel mailing list