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

Martin Storsjö martin
Wed Mar 10 21:35:09 CET 2010


On Tue, 9 Mar 2010, Michael Niedermayer wrote:

> I assume you know how AVOptions are used to set things in AVFormatContext
> the idea is to do the same with AVFormatContext->priv_data

Ah, I see. That generally feels like a good idea. However, here's the list 
of open questions in this approach, as far as I can tell from the code:

Should one be able to do av_set_string3() directly on an AVFormatContext, 
with the name of a private context option, and this should either succeed 
or fail depending on which (de)muxer it actually is? In that case, 
av_find_opt would need to be extended to look for options other than just 
the list found in the AVClass.

Or if we're supposed to do the av_set_string3() on 
AVFormatContext->priv_data instead, we would have to make sure all 
instances of priv_data actually has an AVClass.

In ffmpeg.c/cmdutils.c, the options are temporarily stored in an 
AVFormatContext before they're later applied to the actual muxer using 
set_context_opts. In this scenario, setting a muxer-specific setting 
wouldn't work since the temporary AVFormatContext wouldn't have the 
private data for that particular muxer.

If I did misunderstand the way you intended this to work, please do tell.

Also: This wouldn't work for passing custom parameters to the SDP creation 
routines, since the SDP creation currently works with both RTSP and RTP 
AVFormatContexts (with the former being not totally conceptually correct, 
but definitely is the simplest way to handle things at the moment), so the 
SDP creator can't really look into the private data of the contexts.

> > This part (making the control name non-hardcoded) isn't any big priority 
> > for me at the moment, but syncing the NTP start time is. Does the same 
> > thing apply for that too, that I should pass it through AVOptions in some 
> > way, instead of through metadata as initially tried?
> 
> the question is if NTP start time is metadata or a muxer parameter

Yes, I guess that's the big question. Opinions, Luca A, Luca B, Ronald?

// Martin



More information about the ffmpeg-devel mailing list