Gstreamer - use existing socket, fdsrc/fdsink

karol221-10 karol221-10 at hotmail.com
Sun Sep 17 18:23:15 UTC 2017


Hello guys. I have 'big' problem with gstreamer. 
I created basic client/server app, using tcp sockets. Everything worked
fine. 
But my goal was different. I wanted to send video 'in my tcp session' from
client to server.
Everything worked fine, when I used tcpclientsink/tcpserversrc. But this
solution had some disadvantages for me: 
Primarly, using one port, only one client can be connected to server. 
Later, I tried to use fdsrc/fdsink elements. In fd parameter, I inserted
socket integer number (socket is file descriptor, of course). But this
solution didn't work. Packets were sent from client to server, but server
didn't recognize it. How can I solve this problem?

My pipelines:
Working, but only one client per server: 
client: videotestsrc ! x264enc ! mpegtsmux ! tcpclientsink host=192.168.1.40
port=3000
server: tcpserversrc ! tsdemux ! h264parse ! avdec_h264 ! autovideosink 

Not working:
client: videotestsrc ! x264enc ! mpegtsmux ! fdsink fd=x (instead of x -
socket file descriptor)
server: fdsrc fd=x ! tsdemux ! h264parse ! avdec_h264 ! autovideosink 



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list