[RFC] provide a bin to GstRtspMediaFactory

Sebastian Dröge sebastian at centricular.com
Wed Dec 6 16:17:48 UTC 2017


On Wed, 2017-12-06 at 16:41 +0100, Eloi Bail wrote:
> 
> 
> > You can provide a custom bin for the part of the pipeline that has the
> > sources up to the payloader, and catch messages of those elements.
> > 
> > All the other elements in the RTSP server pipeline are not under your
> > control but something the RTSP server manages. Do you need to catch any
> > messages of those elements, and if so, what for?
> > 
> > 
> > 
> 
> Something like this:
> 
> videotestsrc -> tee -> queue -> annotationElement -> x264enc -> rtph264pay name=pay0
>                              | 
>                              | 
>                              | 
>                              | 
>                              | 
>                               -> queue -> motionDetector -> fakesink
> 
> 
> motionDetector would send messages to annotationElement.
> 
> Otherwise, could I subclass GstRTSPMedia, overwrite handle_message,
> check my custom message and call the parent message handler of
> GstRTSPMedia ?

As both elements are at the same level of the bin hierarchy, annotation
element would never see any messages from motion detector. Only the
surrounding bin would see messages.

And the surrounding bin is exactly the "element" that is created by the
RTSP media factory, and you can return your bin subclass there that is
catching messages of its child elements (like the motion detector).

A better approach might be to place the motion detector in front of the
annotation element, so that it can be to information directly on its
output buffers (GstMeta e.g.) and let the annotation element directly
read it from there instead of having yet another way of communication.

Alternatively you could also let the motion detection element know
about the annotation element and have them communicate via direct
function calls.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171206/23dec0af/attachment.sig>


More information about the gstreamer-devel mailing list