How to write a simple mux element?

Nicolas Dufresne nicolas.dufresne at collabora.com
Sat Feb 13 02:27:36 UTC 2016


Le vendredi 12 février 2016 à 05:24 -0800, mariannasb a écrit :
> Is there somewhere a simple example on how to write a simple mux
> element
> (N-to-1)?

Muxers are never simple. Fortunately, there is GstAggregator base class
now, that may help somehow (par of gst-plugins-bad libraries).
> 
> Basically what I want to do is get a video frame from one source and
> append
> to it metadata from another source.
> (Then I have a different element which uses the metadata to overlay
> something on the frame.)

There is also GstVideoAggregator, specialized for video.

> 
> I only want to output frames when I have data from both inputs and I
> would
> like to check that the timestamps from both inputs are equal.

That's exactly what aggregator do, synchronize multiple streams. If
it's live, there is a change that you only have 1 frame in the
aggregate call. As you are implementing your one element, it should be
easy to just drop this frame for your needs.

good luck,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160212/61a657ad/attachment.sig>


More information about the gstreamer-devel mailing list