metadata propagation in gsttransform plugins

Philippe De Muyter phdm at macq.eu
Thu Jan 19 09:15:39 UTC 2017


Hi Dimitrios,

thanks for your answer

On Thu, Jan 19, 2017 at 09:33:23AM +0100, Dimitrios Katsaros wrote:
> I am not able to find the code implementing that specific encoder on the
> fly so I will try and work with whtever assumptions I can make about
> encoders in general and your post.
> 
> You will need to make sure that your metadata implements a transformation
> function, the encoder implements a transformation function and that the
> tags of the metadata are correctly set for the specific transformation.
> Assuming that the imxvpuenc_mjpeg inherits the videoencoder class and does
> not override the transform_meta function, you will need to make sure that
> the meta tags include "video" and do *not* include "memory"

The imxvpuenc_* encoders (https://github.com/Freescale/gstreamer-imx.git)
inherit from GstVideoEncoderClass and do not provide their own transform_meta
function.

Our metadata provide a meta_transform function as last parameter to
gst_meta_register, and I have now added a "video" tag.  There is no
"memory" tag.

But our metadata meta_transform function is not called, while I can see
that our meta_free function is well called.

If I add a mprintmeta before the encoders, I can see our metadata being there,
actually only one instance of our metadata shared by the two branches of our
pipeline; but our metadata are still lost after the encoders.

Philippe
> 
> 
> Dimitrios
> 
> On Thu, Jan 19, 2017 at 12:47 AM, Philippe De Muyter <phdm at macq.eu> wrote:
> 
> > Hi all,
> >
> > I have read that since the 1.6 version of gstreamer frame tags are
> > preserved
> > by each plugin.  My questions below are targeted at the propagation by
> > GstVideoEncoders of memory- and frame-size- independent tags, such as gps
> > data,
> > exposure, gain that could vary from frame to frame, and so on.
> >
> > I have the following pipeline :
> >
> > gst-launch-1.0 imxv4l2videosrc ! tee name=t ! queue ! \
> >         imxvpuenc_mjpeg ! mprintmeta logname=1 ! fakesink i\
> >         t. ! queue ! imxvpuenc_h264 ! mprintmeta logname=2 ! fakesink
> >
> > where imxv4l2videosrc has been modified to add custom metadata, and
> > mprintmeta is debugging to show those metadata.  I notice that the
> > metadata are not present after the encoders
> >
> > - Is the propagation mechanism implemented outside of the plugins, or must
> > it be implemented in each plugin ? In that case, is a generic propagation
> > code
> > available, that we could add e.g. to gstreamer-imx (imx hardware
> > accelerated)
> > encoder plugins ?
> >
> > - Is GstMetaFreeFunction only called after all instances are unused, or is
> > there a refcount accessible inside the definition of GstMetaFreeFunction
> > for a new metadata type, to avoid that one branch after a 'tee' destroys a
> > metadata that's still used by the other branch ?
> >
> > Thanks in advance
> >
> > Philippe
> >
> > --
> > Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140
> > Bruxelles


More information about the gstreamer-devel mailing list