Converting a gst-launch pipeline to C code

Sebastian Dröge sebastian at centricular.com
Wed Jul 27 06:29:13 UTC 2016


On Di, 2016-07-26 at 18:50 +0000, William Salibrici wrote:
> Hello,
> 
> I am converting the following simple pipeline to C code but it is not
> working. This receiver pipeline works just fine using the launch tool
> which shows that my test environment is set up correctly.
> 
> udpsrc address="192.168.1.101" port=5018 ! fakesink dump=TRUE
> 
>  
> 
> Attached is my C code snippet. My bus_call message handler [not
> included] prints out the pipeline state changes. I used visual studio
> 2010 to compile the C code. Here is the run time screen capture.
> 
>  
> 
> GST_STATE_CHANGE_ASYNC for udp recv.
>  
> Running...
>  
> Pipeline state changed from NULL to READY.
>  
> Pipeline state changed from READY to PAUSED.
> 
>  
> 
> So, the return from setting the pipeline to playing is the ‘async’
> state change. As I understand it, this means that pipeline state
> changes may be delayed. However, for my simple test case the pipeline
> never goes to the PLAYING state. The pipeline just sits there in the
> PAUSED state and data never flows to the display. For my test case I
> start the receiver first, then the sender which runs on a separate
> machine.
> 
> I’m using GStreamer 1.8.1 with your windows pre-built binaries on my
> windows 7 machines.
> 
> I’m probably tripping over something simple. Any ideas on what I
> might be doing wrong?

The code looks correct from a short look over it, or at least
equivalent to what gst-launch would do. Are you running gst-launch on
the very same machine? Is it the same version?

Basically the behaviour you see means that you never receive any
packets for that IP on that port (double check with e.g. wireshark or
tcpdump if they actually arrive and the port/address is correct). The
pipeline would automatically get to PLAYING once a packet was received
and passed to fakesink.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160727/b0fe4cfb/attachment.sig>


More information about the gstreamer-devel mailing list