Why does UDPSink multiplex all the streams from the same port together?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does UDPSink multiplex all the streams from the same port together?

debruyn
Good day,

I am currently developing a system that has multiple UDPSinks that sends to the same port( Due to project restrictions). I am curious to know why UDPSink multiplex all the streams from the same port together? I would think that once a source has made a connection with a sink that It won't connect to another senders address. I am doing this in c++ 11, but for debugging these are my pipelines:

Two UDP hosts:
gst-launch-1.0 rtspsrc location=rtsp://10.15.1.15:554//Streaming/Channels/101 user-id=admin user-pw=admin123  ! udpsink host=10.15.1.139 port=5555
gst-launch-1.0 rtspsrc location=rtsp://10.15.1.16:554//Streaming/Channels/101 user-id=admin user-pw=admin123  ! udpsink host=10.15.1.139 port=5555

One UDP Client:
gst-launch-1.0 udpsrc port=5555 caps="application/x-rtp" name=UDP1 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! theoraenc ! oggmux ! shout2send ip=10.15.1.139 port=8000 password=hackme mount=/test.ogg

When viewing test.ogg i notice that both streams are multplexed together, thus the streams flicker between each other.
Any explination would be appreciated

Regads DeBruyn
Reply | Threaded
Open this post in threaded view
|

Re: Why does UDPSink multiplex all the streams from the same port together?

Sebastian Dröge-3
On Do, 2016-04-21 at 04:19 -0700, debruyn wrote:
> Good day,
>
> I am currently developing a system that has multiple UDPSinks that sends to
> the same port( Due to project restrictions). I am curious to know why
> UDPSink multiplex all the streams from the same port together? I would think
> that once a source has made a connection with a sink that It won't connect
> to another senders address.

UDP is connection-less. The source just gives you whatever packets are
arriving on that port, and if you additionally need demultiplexing you
could do that based on the GstNetAddressMeta on each packet that gives
you the sender address/port.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Why does UDPSink multiplex all the streams from the same port together?

debruyn
Thanks once again sebastian!