Convert RTP pipeline to RTSP and it uses GstMessages

Toon Heyrman toonheyrman at hotmail.com
Fri Oct 20 07:55:53 UTC 2017


Hi,

I wrote a gstreamer application that has a RTP stream and I want to convert
this program to a RTSP stream. The major problem is that I used GstMessages
to communicate from one Element to another via the GstBus in the main
application. 

The idee is:
I have a video path with low latency and a computation path that skips a lot
of frames and has more latency. The GstMessages are send from the
computation path to the main application and in there I feed the data to an
annotation element in the video path. 

So what I did in the RTP variant is: 
I made a pipeline with 'gst_parse_launch' and used this pipeline(as a
GstElement) to get the GstBus. 
Add a watch on this bus and use this callback to send the GstMessages to
another element in the pipeline. (via a pointer to a struct received via
g_object_get).

When I try to convert this program to one using RTSP, I struggle to get the
GstMessages from the bus.
I made a subclass MediaFactory where I override the create_element and save
a pointer to the pipeline(GstElement) received from gst_parse_launch. 
Then in the main application I make my MediaFactory and connect the
media-configure to a callback function. In this callback function I get the
GstBus(saved in my factory) from the factory and try to add a watch to this
Bus. 
But I get an error 'gst_bus_create_watch: assertion 'bus->priv->poll !=
NULL' failed'.

Is this the correct way to receive messages from the created bus in a RTSP
scenario? 


Similar posts:
http://gstreamer-devel.966125.n4.nabble.com/Using-C-API-based-pipelines-in-RTSP-server-without-quot-launch-quot-arg-td4680144.html#a4680415
<http://gstreamer-devel.966125.n4.nabble.com/Using-C-API-based-pipelines-in-RTSP-server-without-quot-launch-quot-arg-td4680144.html#a4680415>  




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list