[FFmpeg-soc] [PATCH] rtsp tunneling

Martin Storsjö martin at martin.st
Mon Jun 14 19:12:30 CEST 2010


On Mon, 14 Jun 2010, Ronald S. Bultje wrote:

> On Mon, Jun 14, 2010 at 12:47 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > add a URLProtocol.priv_data_size
> > this also might simplify existing code by moving allocation of priv_data
> > to a common place
> 
> This doesn't solve the problem of fields that should be initialized to
> a non-zero state in protocol_open(). We really need an API where we
> have:
> 1) a function that allocates both URLContext as well as priv_data
> context (so the type of protocol, e.g. HTTP, is known at this point)
> 2) a function that initializes these values to a default state; it
> makes sense that this function is called at the same time as 1. It
> also might make sense that the URI is known at this point
> 3) a window here where we can make changes to this context by calling
> functions or eventually by introducing AVOptions

Additionally, as far as I've understood AVOptions, they can only set 
something within one struct, since it simply uses offsets. For this case, 
we'd need AVOptions that would only apply if the URLContext happens to be 
a HTTP context, and then set the options within the priv_data, which can't 
be done as a simple offset (unless the priv_data is tacked on at the 
end of the context...)

// Martin


More information about the FFmpeg-soc mailing list