How to use gst-rtsp-server with own pipeline?

2020-04-28 19:30发布

问题:

I am writing gstreamer application and need to transfer output audio/video stream over rtsp. But in gst-rtsp-server examples I have founded factory creation only by gst-launch syntax:

factory = gst_rtsp_media_factory_new ();  
gst_rtsp_media_factory_set_launch (factory,
  "( appsrc name=mysrc ! videoconvert ! x264enc ! rtph264pay name=pay0 pt=96 )");

Is it possible to connect gst-rtsp-server elements to my pipe?

回答1:

You have to subclass rtsp-media-factory and override default_create_element that will return your pipeline as GstElement