Gstreamer RTSP src element name
rajvik
kamdar.rajvi at gmail.com
Mon Jan 23 11:50:02 UTC 2017
I am trying to link audio and video queue's using rtspsrc element property
name. The pipeline is:
*gst-launch-1.0 rtspsrc location="rtsp://<file path>" latency=0 name=demux
demux. ! queue ! rtpmp4gdepay ! aacparse ! avdec_aac ! audioconvert !
audioresample ! autoaudiosink demux. ! queue ! rtph264depay ! h264parse !
omxh264dec ! videoconvert ! videoscale ! video/x-raw,width=176, height=144 !
ximagesink*
I could create the value of name element using
*g_object_set(source, "name", "demux", NULL);*
But I am not able to link audio and video queues hence create. Following is
the part of code:
*audio bin*
audio = gst_bin_new ("audiobin");
audioQueue = gst_element_factory_make ("queue", "audio-queue");
audioDepay = gst_element_factory_make ("rtpmp4gdepay",
"audio-depayer");
audioParse = gst_element_factory_make ("aacparse", "audio-parser");
audioDecode = gst_element_factory_make ("avdec_aac",
"audio-decoder");
audioConvert = gst_element_factory_make ("audioconvert", "aconv");
audioResample = gst_element_factory_make ("audioresample",
"audio-resample");
audioSink = gst_element_factory_make ("autoaudiosink", "audiosink");
*video bin*
video = gst_bin_new ("videobin");
videoQueue = gst_element_factory_make ("queue", "video-queue");
videoDepay= gst_element_factory_make ("rtph264depay",
"video-depayer");
videoParser = gst_element_factory_make ("h264parse",
"video-parser");
videoDecode = gst_element_factory_make ("omxh264dec",
"video-decoder");
videoConvert = gst_element_factory_make("videoconvert", "convert");
videoScale = gst_element_factory_make("videoscale", "video-scale");
videoSink = gst_element_factory_make("ximagesink", "video-sink");
capsFilter = gst_caps_new_simple("video/x-raw",
"width", G_TYPE_INT, 176,
"height", G_TYPE_INT, 144,
NULL);
*Linking procedure*
/*Linking filter element to videoScale and videoSink */
link_ok = gst_element_link_filtered(videoScale,videoSink,
capsFilter);
gst_caps_unref (capsFilter);
if (!link_ok) {
g_warning ("Failed to link element1 and element2!");
}
/* Linking video elements internally */
if (!gst_element_link_many(videoQueue, videoDepay, videoParser,
videoDecode, videoConvert, NULL))
{
g_printerr("Cannot link videoDepay and videoParser \n");
return 0;
}
if (!gst_element_link_many(audioQueue, audioDepay, audioParse,
audioDecode, audioConvert, audioResample, audioSink, NULL))
{
g_printerr("Cannot link audioDepay and audioParse \n");
return 0;
}
*Help is highly appreciated*
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-RTSP-src-element-name-tp4681595.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list