Hello guys. I have 'big' problem with gstreamer.
I created basic client/server app, using tcp sockets. Everything worked
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?
Working, but only one client per server:
client: videotestsrc ! x264enc ! mpegtsmux ! tcpclientsink host=192.168.1.40
server: tcpserversrc ! tsdemux ! h264parse ! avdec_h264 ! autovideosink
client: videotestsrc ! x264enc ! mpegtsmux ! fdsink fd=x (instead of x -
socket file descriptor)
server: fdsrc fd=x ! tsdemux ! h264parse ! avdec_h264 ! autovideosink
On Sun, 2017-09-17 at 11:23 -0700, karol221-10 wrote:
> Packets were sent from client to server, but
> server didn't recognize it.
> Not working:
> client: videotestsrc ! x264enc ! mpegtsmux ! fdsink fd=x (instead of
> x - socket file descriptor)
> server: fdsrc fd=x ! tsdemux ! h264parse ! avdec_h264 !
What kind of socket is this? Do you expect multiple clients to send on
the same socket?
In any case, try
fdsrc fd=x ! filesink location=foo.ts
and see if you can play the foo.ts file afterwards.
I'm not sure how this solves your problem btw (multiple clients).
Do you want a separate playback pipeline server-side for each client?