udpsink to specific interface

Joseph Olivier jolivier at picodigital.com
Sat Mar 1 12:34:13 PST 2014


Perhaps I was unclear about my scenario. I have an embedded linux system
with multiple (VLAN) ethernet interfaces that generates MPEGTS data to
distribute via UDP multicast.

So, under `ifconfig`, I have several interfaces, such as: eth0, eth0.10,
eth0.12, eth0.25, eth0.30. Each of these "dot" interfaces sends packets via
a different VLAN (eth0.X goes on VLAN X).

I need to ensure my video stream goes out (not to) a particular interface
so that it gets the correct VLAN tag. For example, I need to target
specifically `eth0.25` from the example above.

If I have direct control of the socket, I can call set_sockopt() with
SO_BINDTODEVICE. Can this be done with udpsink? What would be the best way
to ensure that my (multicast) packets go out the appropriate interface?


On Sat, Mar 1, 2014 at 11:43 AM, Peter Maersk-Moller <pmaersk at gmail.com>wrote:

> Hi Jospeh
>
> It is rather trivial to identify the IP address though you may have to
> customize it to your system
>
> #!/bin/bash
> get_ip()
> {
>   ifconfig $1 |grep 'inet addr' |cut -f2 -d: |cut -f1 -d' '
> }
>
> gst-launch ....... upsrc host=`get_ip eth0`
>
>
>
>
>
> On Sat, Mar 1, 2014 at 8:23 PM, Joseph Olivier <jolivier at picodigital.com>wrote:
>
>> I'm generating a video stream which I send via UDP multicast. But the
>> packets have to go out a specific Linux ethernet interface (with a VLAN
>> tag).
>>
>> Looking at udpsink, seems like the only configurables are HOST and PORT,
>> which would not trivially allow me to identify the target interface. I'm
>> looking for a strategy that more-or-less executes a bind-to-device(ethX) or
>> a workaround.
>>
>>
>> Thanks,
>> Joe
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140301/5af2c98b/attachment.html>


More information about the gstreamer-devel mailing list