<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Demuxing is done on server side and rtsp server is sending each
video and audio stream separately.<br>
<br>
<div class="moz-cite-prefix">Dňa 27.11.2014 o 09:31 Rajesh salumuri
napísal(a):<br>
</div>
<blockquote
cite="mid:CANQbXdhdBEp_AdXbHgDTxdw_ek2_FvGJQCLN7sCjL_TZk4eM1w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Hi Poizl,<br>
<br>
</div>
Thanks for your reply,<br>
<br>
</div>
Actually i called the connect to pad-added and in the call back
function i 'm connecting them to respective elements.<br>
<br>
One thing is i don't know the stream in which format they are
sending like from .avi or .mov ,here i have taken the avidemux
to show,but how to find out what type of streaming they are
sending, according to that i will use respective demuxer .Can
you please suggest how i get know to know this.<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Nov 27, 2014 at 1:16 PM, Dušan
Poizl <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:poizl@maindata.sk" target="_blank">poizl@maindata.sk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> you need connect to
"pad-added" signal and in callback of that signal you will
get GstPad. from this pad you get caps and according to
them you link this pad to additional elements.<br>
<br>
<div>Dňa 27.11.2014 o 08:05 Rajesh salumuri napísal(a):<br>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">
<div>
<div>
<div>Hi,<br>
<br>
</div>
I am trying to convert the following
gst-launch command into c:<br>
<br>
<b>gst-launch rtspsrc location=<a
moz-do-not-send="true">rtsp://ipaddress:port</a>
name=demux demux. ! queue ! decodebin !
autovideosink demux. ! queue ! rtppcmudepay
! autoaudiosink<br>
<br>
</b></div>
<div>I tried the above command it is able to
stream both audio and video.<b><br>
</b></div>
<div><br>
</div>
And I played this rtspurl in vlc media player it
is showing the properties are as follows:<br>
<p>Type: Video Codec: H264 - MPEG-4 AVC (part
10) (h264) Resolution: 320x180 Decoded format:
Planar 4:2:0 YUV</p>
<p>Type: Audio Codec: PCM MU-LAW (mlaw)
Channels: Mono Sample rate: 8000 Hz Bits per
sample: 8</p>
<b>I am converting the above gst-launch command
in c in brief explained below</b><br>
<br>
pipeline = gst_pipeline_new("nice_pipeline");<br>
source =
gst_element_factory_make("nicesrc","source");//thsi
source will take the stream from rtsp url<br>
<b> demuxer = gst_element_factory_make
("avidemux", "avi-demuxer");</b><br>
decvd= gst_element_factory_make ("decodebin",
"decodebin");<br>
vdsink = gst_element_factory_make
("autovideosink", "video-sink");<br>
vdqueue = gst_element_factory_make ("queue",
"video-queue");<br>
adqueue = gst_element_factory_make ("queue",
"audio-queue");<br>
decad= gst_element_factory_make
("rtppcmudepay", "rtppcmudepay");<br>
adsink = gst_element_factory_make
("autoaudiosink", "audio-sink");<br>
<br>
bus =
gst_pipeline_get_bus(GST_PIPELINE(pipeline));<br>
gst_bus_add_watch(bus, bus_call, NULL);<br>
gst_object_unref (bus);<br>
gst_bin_add_many(GST_BIN (pipeline),
source,decvd,decad, adqueue, vdqueue, vdsink,
adsink, NULL);<br>
<br>
gst_element_link (source, demuxer);<br>
gst_element_link (decvd, vdqueue);<br>
gst_element_link (vdqueue, vdsink);<br>
gst_element_link (decad, adqueue);<br>
gst_element_link (adqueue, adsink);<br>
<br>
g_signal_connect (demuxer, "pad-added",
G_CALLBACK (on_pad_added), NULL);<br>
gst_element_set_state(pipeline,
GST_STATE_PLAYING);<br>
<br>
</div>
<b>on_pad_added func defintion:</b><br>
<br>
GstCaps *caps;<br>
GstStructure *str;<br>
<br>
caps = gst_pad_get_caps (pad);<br>
g_assert (caps != NULL);<br>
str = gst_caps_get_structure (caps, 0);<br>
g_assert (str != NULL);<br>
<br>
if (g_strrstr (gst_structure_get_name (str),
"video")) {<br>
g_debug ("Linking video pad to dec_vd");<br>
<br>
GstPad *targetsink = gst_element_get_pad
(decvd, "sink");<br>
g_assert (targetsink != NULL);<br>
gst_pad_link (pad, targetsink);<br>
gst_object_unref (targetsink);<br>
}<br>
<br>
if (g_strrstr (gst_structure_get_name (str),
"audio")) {<br>
g_debug ("Linking audio pad to dec_ad");<br>
<br>
GstPad *targetsink = gst_element_get_pad
(decad, "sink");<br>
g_assert (targetsink != NULL);<br>
gst_pad_link (pad, targetsink);<br>
gst_object_unref (targetsink);<br>
}<br>
<br>
gst_caps_unref (caps);<br>
<br>
<div>
<div>
<div>My question is that what type of demuxer
i have to select for the properties of video
and audio it is streaming.<br>
</div>
<div><br>
</div>
<div>If any other solution is there for
demuxing audio and video from rtsp url
please suggest or provide some sample code
for that.<br>
<br>
</div>
<div>Thanks.<br>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
gstreamer-devel mailing list
<a moz-do-not-send="true" href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a moz-do-not-send="true" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>