[gst-devel] state change on udpsrc & caps negotiation
Jyoti D
jyoti.d at allaboutif.com
Thu Mar 26 12:18:50 CET 2009
Hi all,
I am writing an application for udp client to receive the rtp payloaded
packets.
The pipeline I use is on client and server is as below:
******************************************************************************************************************************
SERVER:
gst-launch filesrc location=~/Desktop/h264-aac/alien.mp4 ! qtdemux name=d \
d. ! queue ! rtph264pay ! udpsink port=1234 host=224.0.0.1 \
d. ! queue ! rtpmp4apay ! udpsink port=1233 host=224.0.0.1
CLIENT:
gst-launch udpsrc uri=udp://224.0.0.1:1234 caps="application/x-rtp,
media=(string)video, encoding-name=(string)H264, payload=(int)96" ! queue !
rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! xvimagesink\
udpsrc uri=udp://224.0.0.1:1233 caps="application/x-rtp,
media=(string)audio, clock-rate=(int)44100, encoding-name=(string)MP4A-LATM,
payload=(int)96" ! queue ! rtpmp4adepay ! faad ! audioconvert ! alsasink
******************************************************************************************************************************
In my application I set the state of the pipeline to GST_STATE_PLAYING as
below:
===========================================================================
sres = gst_element_set_state (GST_ELEMENT (pipeline),
GST_STATE_PLAYING);
if (sres == GST_STATE_CHANGE_ASYNC)
{
gint timeout = 0;
while (timeout < 5) {
sres = gst_element_get_state (pipeline, &new_state, &pending_state,
(1 * GST_SECOND));
g_print("GET state pipeline : new_state = %s pending_state = %s\n",
gst_element_state_get_name (new_state),
gst_element_state_get_name (pending_state));
timeout++;
}
}
else {
g_print ("Error changing pipeline state to PLAYING sres = %d\n",
sres);
return -1;
}
===========================================================================
But the state changes only to PAUSED and never to PLAYING. Could someone
suggest me what could be done to change the pipeline state to PLAYING.
I had one more query about caps negotiation. How to dynamically set the caps
on udpsrc element used on the CLIENT side?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090326/7dd2af3f/attachment.htm>
More information about the gstreamer-devel
mailing list