I'm doing a Gstreamer 1.0 application in C. The pipeline is built, based on user configuration and system "state" during runtime. Therefore I'm using multiple GstElements which are later added and linked to a "GstElement pipeline". Here's a minimal example for a better understanding:
GstElement *pipeline = gst_pipeline_new("mypipeline");
...
GstElement *src = gst_element_factory_make("videotestsrc", NULL);
...
gst_bin_add_many(GST_BIN(pipeline), src, enc, pay, NULL);
gst_element_link_many(src, enc, pay, NULL);
...
This pipeline should then be launched by a GstRTSPMediaFactory. The problem I'm facing here is that the gst_rtsp_media_factory_set_launch
function is only accepting a const gchar *
pipeline.
Therefore my question is, if anybody of you is aware of a function for either
- transforming the
GstElement *pipeline
to aconst gchar*
representation (kinda reversegst_parse
) - or launching the GstRTSPMediaFactory from a
GstElement *pipeline
(see edit #1 below)
Any help is much appreciated! Thank you.
EDIT #1:
From the gst-rtsp-server documentation:
The default implementation of GstRTSPMediaFactory allows you to easily create GStreamer pipelines using the gst-launch syntax. It is possible to create a GstRTSPMediaFactory subclass that uses different methods for constructing pipelines.
Therefore launching a GstRTSPMediaFactory from a GstElement is technically possible. Additional question to this approach: Is anybody aware of such an GstRTSPMediaFactory subclass implementation?