Gst Rtsp Server - serving feeds on client request
Krishnan
krishnan.saravanak at gmail.com
Fri Jul 22 15:16:56 PDT 2011
Hi Stefan,
Thank you for the reply. It looks like I have to create different factories
for each stream. I tried like this,
factory = gst_rtsp_media_factory_new ();
factory1 = gst_rtsp_media_factory_new ();
capture_input = 2; // to select second camera
ret = initCapture(capture_input);
gst_rtsp_media_factory_set_launch (factory, "( "
"v4l2src ! video/x-raw-yuv,width=720,height=480 ! "
"queue ! TIVidenc1 codecName=h264enc engineName=codecServer
byteStream=FALSE ! "
"queue ! rtph264pay pt=96 name=pay0 " ")");
gst_rtsp_media_factory_set_launch (factory1, "( "
"videotestsrc ! video/x-raw-yuv,width=720,height=480 ! "
"queue ! TIVidenc1 codecName=h264enc engineName=codecServer
byteStream=FALSE ! "
"queue ! rtph264pay pt=96 name=pay0 " ")");
gst_rtsp_media_mapping_add_factory (mapping, "/test", factory);
gst_rtsp_media_mapping_add_factory (mapping, "/test1", factory1);
gst_rtsp_media_factory_set_shared( factory, 1 );
gst_rtsp_media_factory_set_shared( factory1, 1 );
I could see both the videotestscr and v4l2src by accessing their respective
URL's.
My requirement is to stream different cameras having the same factory
(v4l2src=/dev/video0 - cameras are selected based on the i2c commands and
they all have the same /dev/video0 port) with different urls.
For eg) if first url is selected, i should initialize the first camera
(capture_input = 1 -> to select the first camera) and then pass the factory
(containing v4l2src) to the mapping.
Similarly, if second url is selected, i should initialize the second camera
(capture_input = 2 -> to select the second camera) and then pass the factory
(containing v4l2src) to the mapping.
As you can see, I cannot pass the "capture_input" argument to the factory.
So, I should find a way to initialize my camera first based on the url
requested. Can you suggested me a way of how I can do this?
Thanks,
Krishnan.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gst-Rtsp-Server-serving-feeds-on-client-request-tp3685133p3688033.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list