[FFmpeg-soc] [PATCH] rtsp tunneling

Michael Niedermayer michaelni at gmx.at
Wed Jun 16 18:19:12 CEST 2010


On Mon, Jun 14, 2010 at 08:12:30PM +0300, Martin Storsjö wrote:
> 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

AVOptions have a field for defaults
thus as soon as a struct can be accssed through AVOptions there also are
known defaults


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

I think we should check the past discussion about using AVOptions and private
contexts. but from memory
Adding an AVClass pointer to URLProtocol (and a priv_data_size of course too)
allows us to allocate and init to defaults the private context in generic code


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100616/db8049dc/attachment.pgp>


More information about the FFmpeg-soc mailing list