On Wed, 09 Jan 2013 04:08:02 +0100, Luca Barbato <[email protected]> wrote:
> On 08/01/13 15:35, Anton Khirnov wrote:
> > +enum AVFrameSideDataType {
> > +    /**
> > +     * The data is the AVPanScan struct defined in libavcodec.
> > +     */
> > +    AV_FRAME_DATA_PANSCAN,
> > +};
> > +
> > +typedef struct AVFrameSideData {
> > +    enum AVFrameSideDataType type;
> > +    uint8_t *data;
> > +    int      size;
> > +} AVFrameSideData;
> 
> Since the side data is not something we store would be better having
> something like:
> 
> typedef struct AVFrameInfo {
>     enum AVFrameInfoType type;
>     void *info;
>     void (*cleanup)(void *info);
> } AVFrameInfo;
> 
> Those pointers will remain alive till the avframe is reclaimed.
> 

I would prefer to avoid callbacks if possible. They complicate stuff and i'm not
convinced the intended use case needs such complexity. It also prevents the
generic code from copying the side data.

> I'd also leverage the avcodec capability system to make optional
> publishing informations (motion vectors and such).

I would drop motion vectors unless there is evidence for people actually using
them.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to