[FFmpeg-devel] [PATCH] Use the actual RTSP peer IP for RTP sessions

Martin Storsjö martin
Mon Mar 8 21:12:50 CET 2010


Hi,

On Mon, 8 Mar 2010, Ronald S. Bultje wrote:

> On Mon, Mar 8, 2010 at 11:53 AM, Martin Storsj? <martin at martin.st> wrote:
> > On Mon, 8 Mar 2010, Ronald S. Bultje wrote:
> >> On Mon, Mar 8, 2010 at 5:08 AM, Martin Storsj? <martin at martin.st> wrote:
> >> > The IP address is also present in the SDP, so the
> >> > AVFormatContext->filename field must be temporarily changed to contain an
> >> > URL with the numerical IP, but later changed back to the originally
> >> > requested url. This feels a bit messy, though.
> >>
> >> Better not change that, imo. Can you make it a local buffer? Also, we
> >> already have RTSPState->filename (or so) as a copy (for control:
> >> purposes), maybe you should use that, see the comments in the code for
> >> that.
> >
> > No, unfortunately, I can't give the url directly to avf_sdp_create, it
> > only reads the AVFormatContext->filename field. Unless we improve it, of
> > course. :-)
> 
> Improve it, indeed.

Ok, here's the first attempt.

If we update avf_sdp_create to take new parameters, what other flexibility 
may we need? These ones were the ones that I felt needed at the moment. As 
a bonus, this lets us avoid hardcoding the fact that the control uri in 
the SDP is exactly "streamid".

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-new-function-avf_sdp_create2-which-allows-spec.patch
Type: text/x-diff
Size: 4705 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/a11bb3b2/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-the-new-avf_sdp_create2-in-the-ffmpeg-ffserver-a.patch
Type: text/x-diff
Size: 1194 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/a11bb3b2/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Use-avf_sdp_create2-in-the-RTSP-muxer.patch
Type: text/x-diff
Size: 1660 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/a11bb3b2/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Resolve-and-use-the-actual-IP-address-of-the-peer-we.patch
Type: text/x-diff
Size: 1678 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/a11bb3b2/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Construct-a-temporary-URL-for-the-SDP-destination-IP.patch
Type: text/x-diff
Size: 1690 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/a11bb3b2/attachment-0004.patch>



More information about the ffmpeg-devel mailing list