[FFmpeg-devel] [PATCH 1/2] avformat/rtp: add localaddr for network interface selection

lance.lmwang at gmail.com lance.lmwang at gmail.com
Thu Nov 25 15:53:58 EET 2021


On Thu, Nov 25, 2021 at 12:56:24PM +0200, Martin Storsjö wrote:
> On Thu, 25 Nov 2021, lance.lmwang at gmail.com wrote:
> 
> > From: Limin Wang <lance.lmwang at gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > ---
> > doc/protocols.texi     |  4 ++++
> > libavformat/rtpproto.c | 17 ++++++++++++++---
> > libavformat/rtsp.c     |  3 +++
> > libavformat/rtsp.h     |  1 +
> > 4 files changed, 22 insertions(+), 3 deletions(-)
> > 
> > diff --git a/doc/protocols.texi b/doc/protocols.texi
> > index c100f23..d207df0 100644
> > --- a/doc/protocols.texi
> > +++ b/doc/protocols.texi
> > @@ -1087,6 +1087,10 @@ set to 1) or to a default remote address (if set to 0).
> > @item localport=@var{n}
> > Set the local RTP port to @var{n}.
> > 
> > + at item localaddr=@var{addr}
> > +Local IP address of a network interface used for sending packets or joining
> > +multicast groups.
> 
> Just to clarify things for myself for understanding this: Today, if
> receiving UDP unicast, we can use udp://<localip>:<port> to select which
> local IP address to listen on? But for multicast, we'd do
> udp://<multicast-ip>:<port>?localaddr=<localip> to select which address to
> use for joining the group?

yes, it's useful to select/bind which network interface to use for the multicast
stream in case you have many network port, udp have support it already, but rtp haven't
yet. 

> 
> // Martin
> 

-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list