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

Luca Abeni lucabe72
Tue Mar 9 09:07:31 CET 2010


Hi Martin,

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.

Sorry, I missed the beginning of this thread...


> 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".

I am all for improving avf_sdp_create(), but:
1) I am not convinced that the "url" parameter is a good idea: in my opinion,
    the AVFormatContexts passed to avf_sdp_create() should be the ones actually
    used for the RTP streams. So, having a destination address different from
    ac[]->filename does not make too much sense to me.
    It seems to me that the right solution in this case would be to create
    a proper AVFormatContext (or array of AVFormatContexts) before calling
    avf_sdp_create() (you will have to do it anyway, for outputing the RTP
    streams... No?)
2) I'd like to extend avf_sdp_create() in a backward compatible way, if
    possible (that is, without creating a new function and deprecating the
    old one - if possible, of course). Maybe "controlname" can be passed using
    the metadata? (if the metadata approach is considered acceptable, I would
    go for it).

So, I think you and Ronald will have to convince me about the need for these
changes in the avf_sdp_create() interface (for point 2, I think I can be
convinced... But for point 1 you will have to show me a case where the
destination address for the SDP really needs to be different from the RTP
destination :).

(as a side note, I am still not convinced about the fact that using a
non-numeric destination address for RTP is a good idea)


				Thanks,
					Luca



More information about the ffmpeg-devel mailing list