<div dir="ltr">gst-inspect playbin2 yields that it has a uri property. So you should be able to simply set that property and it will identify the input stream type and create the appropriate source element. You can read that created source element (after it has been created) with the source property, which is read-only. gst-inspect tells you a lot of things about the element that you need to know.<br>
<br>Chuck<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 8, 2013 at 5:05 PM, Jim Norton <span dir="ltr"><<a href="mailto:jimnorton@jimnorton.org" target="_blank">jimnorton@jimnorton.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chuck,<br>
<br>
Thank you for the information. Is it possible to connect a udpsrc to playbin2 or a way to specify the URI property of playbin2 to read from a UDP broadcast?<br>
<br>
Thanks again,<br>
Jim<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Look at this example:<br>
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html#section-helloworld" target="_blank">http://gstreamer.freedesktop.<u></u>org/data/doc/gstreamer/head/<u></u>manual/html/chapter-<u></u>helloworld.html#section-<u></u>helloworld</a><br>
<br>
Change the filesrc to udpsrc. Use gst-inspect udpsrc to find the needed<br>
properties. You should also reference this link:<br>
<br>
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/faq/html/chapter-troubleshooting.html" target="_blank">http://gstreamer.freedesktop.<u></u>org/data/doc/gstreamer/head/<u></u>faq/html/chapter-<u></u>troubleshooting.html</a><br>
<br>
You can also use export GST_DEBUG=aaa:<dbg level> where aaa is a plugin<br>
name such as udpsrc. dbg level ranges from 1 to 5 or so, 5 being very<br>
verbose.<br>
<br>
<br>
On Tue, May 7, 2013 at 4:42 PM, Jim Norton <<a href="mailto:jimnorton@jimnorton.org" target="_blank">jimnorton@jimnorton.org</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a small program that uses the GStreamer library to play videos from<br>
local files and videos on webservers using HTTP.<br>
<br>
How does one go about connecting to and playing a UDP video broadcast in C<br>
using GStreamer?<br>
<br>
<br>
For example, what is required to play the streaming video at this<br>
hypothetical URI? <a href="http://10.0.11.255:9001" target="_blank">10.0.11.255:9001</a><br>
<br>
I have to be able to play a streaming video that is created using the<br>
following sample VLC command:<br>
<br>
cvlc -vvv /vlc/attract.mpg :norm=ntsc :v4l2-width=320 :v4l2-height=240<br>
:v4l2-standard=45056 :channel=1 --no-sout-audio --sout<br>
'#transcode{vb="1600",vcodec=*<u></u>*mpgv,acodec=mpga,venc=ffmpeg}<u></u>:**<br>
standard{access=udp,mux=ts,**<u></u>dst=<a href="http://10.0.11.255:9001" target="_blank">10.0.11.255:9001</a>}' --loop --ttl 1<br>
<br>
<br>
I tried:<br>
<br>
// using playbin2 connect to UDP broadcast<br>
g_object_set (data.playbin2, "uri", "udp://<a href="http://10.0.11.255:9001" target="_blank">10.0.11.255:9001</a>", NULL);<br>
<br>
Then I try to start the stream with the following:<br>
<br>
/* Start playing */<br>
if( gst_element_set_state (data.playbin2, GST_STATE_PLAYING) ==<br>
GST_STATE_CHANGE_FAILURE )<br>
{<br>
g_printerr ("Unable to set the pipeline to the playing state.\n");<br>
gst_object_unref (data.playbin2);<br>
return( -1 );<br>
}<br>
<br>
and I get the failure to change state message.<br>
<br>
After some more googling, I found out about udpsrc. However, I can't<br>
figure out how to use it in C code. I've gone through the tutorials, but<br>
have not found any examples showing how to play a video streaming via VLC<br>
from a UDP port.<br>
<br>
Any and all help would be greatly appreciated.<br>
<br>
</blockquote></blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</blockquote></div><br></div>