passing custom meta data though 3rd party transforms

Sebastian Dröge sebastian at centricular.com
Sat Dec 21 02:23:45 PST 2013


On Fr, 2013-12-20 at 16:32 +0000, Miki Grof-Tisza wrote:
> Hi all,
> 
> I'm working on an embedded appliance, that among other thing will capture and record video.  I'm using gstreamer v1.2.1.  My pipeline is something like:
>     my_v4lsrc ! tee ! queue ! imxipuvideotransform ! myCaptureControler ! imxvpuenc_h264 ! queue ! rtph264pay ! udpsink
> 
> imxipuvideotransform, and imxvpuenc_h264 are beta version elements from https://github.com/Freescale/gstreamer-imx.  They are working well for me.
> 
> my_v4lsrc, is a custom source based on GstPushSrc that pushes video buffers, that have some custom meta data attached to the buffers, in addition to GstVideoMeta.
> myCaptureControler, is a custom filter that eventually will do things to the frames based partially on the meta data from my_v4lsrc.
> 
> So my issue is, that unless the caps are identical on both sides of imxipuvideotransform (which causes pass through mode to be used), the meta data is dropped.  This issue isn't specific to the imxipuvideotransform element, since the same thing happens with the videoscale element.
> 
> I'm thinking that the meta data should have some mechanism to tell a generic 3rd party transform to copy me to the destination.  Is this the case already and I missed it?  I'm not sure how to get the meta data from the source element to my other element without being dropped in transforms?
> Ideally I would not have to maintain a custom version of imxipuvideotransform (or a subclass of it) just to copy metadata.  If this is the only way out, am I correct that  base_transform_class->copy_metadata is the right place to do the copy?

Take a look at the tags of metadata and the transform functions, and how
those are handled in some elements.

Basically the tags tell elements to which aspect of a buffer the
metadata refers and when they can safely copy it (e.g. a meta referring
to the specific memory, or that needs the dimensions of a video frame to
stay the same). The transform functions then allow to transform metas to
a new one if the element does something to the aspect the meta refers to
(e.g. videoscale could transform a region-of-interest meta by scaling
the roi coordinates).

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131221/249c65f3/attachment.pgp>


More information about the gstreamer-devel mailing list