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

Luca Barbato lu_zero
Tue Mar 9 08:38:16 CET 2010


On 03/08/2010 09:12 PM, Martin Storsj? wrote:
> 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".

Looks nice. in avf_sdp_create we have

    s.src_addr = "127.0.0.1";    /* FIXME: Properly set this */

maybe we could also think about it.


lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero




More information about the ffmpeg-devel mailing list