<div dir="ltr">If you have no tags in the gst_meta_api_type_register then the metadata should pass all the element checks. So adding the video tag and removing memory would only change something if you were already defining you own tags, like e.g. GPS.<br><br>looking at this function: <a href="https://github.com/Freescale/gstreamer-imx/blob/master/src/vpu/encoder_base.c#L504">https://github.com/Freescale/gstreamer-imx/blob/master/src/vpu/encoder_base.c#L504</a> frames passed to finish frame are not the same as the input_frame param of the function. Your metadata is probably on the input frame and not being handled since the call to the meta transform happens in gst_video_encoder_finish_frame. I think you will have to implement the metadata handling for the finished frames of that element.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 19, 2017 at 10:29 AM, Philippe De Muyter <span dir="ltr"><<a href="mailto:phdm@macq.eu" target="_blank">phdm@macq.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Jan 19, 2017 at 09:41:35AM +0100, Dimitrios Katsaros wrote:<br>
> And i forgot to answer your specific questions, sorry about that :p<br>
><br>
> 1) There is a default propagation mechanism implemented in every plugin. It<br>
> usually goes by the name "transform_meta". You should not have to implement<br>
> it assuming that elements inherit from the base classes. What you do need<br>
> to implement is a transformation function within your metadata.<br>
><br>
> 2) metadata lifetime is linked with the buffer it is associated with. When<br>
> tee propagates a buffer it increases the buffers reference count for every<br>
> branch. So you should not have to worry about the reference counting for<br>
> the metadata.<br>
<br>
</span>After the 'tee' I have only one instance of our metadata with a refcount set<br>
to 2.  After the videoencoder, in the specific case where the metadata are<br>
invariant per frame, is that instance merely attached to the encoded buffer or<br>
must it be copied by the transformation function of our metadata ?<br>
<br>
Philippe<br>
<span class=""><br>
><br>
> DImitrios<br>
><br>
> On Thu, Jan 19, 2017 at 9:33 AM, Dimitrios Katsaros <<a href="mailto:patcherwork@gmail.com">patcherwork@gmail.com</a>><br>
> wrote:<br>
><br>
> > I am not able to find the code implementing that specific encoder on the<br>
> > fly so I will try and work with whtever assumptions I can make about<br>
> > encoders in general and your post.<br>
> ><br>
> > You will need to make sure that your metadata implements a transformation<br>
> > function, the encoder implements a transformation function and that the<br>
> > tags of the metadata are correctly set for the specific transformation.<br>
> > Assuming that the imxvpuenc_mjpeg inherits the videoencoder class and does<br>
> > not override the transform_meta function, you will need to make sure that<br>
</span>> > the meta tags include "video" and do *not* include "memory"<br>
<div class="HOEnZb"><div class="h5">> ><br>
> ><br>
> > Dimitrios<br>
> ><br>
> > On Thu, Jan 19, 2017 at 12:47 AM, Philippe De Muyter <<a href="mailto:phdm@macq.eu">phdm@macq.eu</a>> wrote:<br>
> ><br>
> >> Hi all,<br>
> >><br>
> >> I have read that since the 1.6 version of gstreamer frame tags are<br>
> >> preserved<br>
> >> by each plugin.  My questions below are targeted at the propagation by<br>
> >> GstVideoEncoders of memory- and frame-size- independent tags, such as gps<br>
> >> data,<br>
> >> exposure, gain that could vary from frame to frame, and so on.<br>
> >><br>
> >> I have the following pipeline :<br>
> >><br>
> >> gst-launch-1.0 imxv4l2videosrc ! tee name=t ! queue ! \<br>
> >>         imxvpuenc_mjpeg ! mprintmeta logname=1 ! fakesink i\<br>
> >>         t. ! queue ! imxvpuenc_h264 ! mprintmeta logname=2 ! fakesink<br>
> >><br>
> >> where imxv4l2videosrc has been modified to add custom metadata, and<br>
> >> mprintmeta is debugging to show those metadata.  I notice that the<br>
> >> metadata are not present after the encoders<br>
> >><br>
> >> - Is the propagation mechanism implemented outside of the plugins, or must<br>
> >> it be implemented in each plugin ? In that case, is a generic propagation<br>
> >> code<br>
> >> available, that we could add e.g. to gstreamer-imx (imx hardware<br>
> >> accelerated)<br>
> >> encoder plugins ?<br>
> >><br>
> >> - Is GstMetaFreeFunction only called after all instances are unused, or is<br>
> >> there a refcount accessible inside the definition of GstMetaFreeFunction<br>
> >> for a new metadata type, to avoid that one branch after a 'tee' destroys a<br>
> >> metadata that's still used by the other branch ?<br>
> >><br>
> >> Thanks in advance<br>
> >><br>
> >> Philippe<br>
> >><br>
> >> --<br>
> >> Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140<br>
> >> Bruxelles<br>
> >> ______________________________<wbr>_________________<br>
> >> gstreamer-devel mailing list<br>
> >> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
> >> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
> >><br>
> ><br>
> ><br>
<br>
> ______________________________<wbr>_________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br>
<br>
--<br>
Philippe De Muyter <a href="tel:%2B32%202%206101532" value="+3226101532">+32 2 6101532</a> Macq SA rue de l'Aeronef 2 B-1140 Bruxelles<br>
______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
</div></div></blockquote></div><br></div>