[FFmpeg-devel] [PATCH] Separate video specific BufferRef properties into VideoProps

Stefano Sabatini stefano.sabatini-lala
Tue Aug 10 18:13:34 CEST 2010


On date Tuesday 2010-08-10 19:39:38 +0200, Michael Niedermayer encoded:
> On Tue, Aug 10, 2010 at 05:15:19PM +0200, Stefano Sabatini wrote:
> > On date Monday 2010-08-09 15:34:02 +0200, Michael Niedermayer encoded:
> > > On Sat, Aug 07, 2010 at 06:23:22PM -0700, S.N. Hemanth Meenakshisundaram wrote:
[...]
> > > >   * A reference to an AVFilterBuffer. Since filters can manipulate the origin of
> > > >   * a buffer to, for example, crop image without any memcpy, the buffer origin
> > > >   * and dimensions are per-reference properties. Linesize is also useful for
> > > > @@ -101,34 +117,41 @@ typedef struct AVFilterBufferRef
> > > >      AVFilterBuffer *buf;        ///< the buffer that this is a reference to
> > > >      uint8_t *data[4];           ///< picture data for each plane
> > > >      int linesize[4];            ///< number of bytes per line
> > > > -    int w;                      ///< image width
> > > > -    int h;                      ///< image height
> > > >      int format;                 ///< media format
> > > >  
> > > >      int64_t pts;                ///< presentation timestamp in units of 1/AV_TIME_BASE
> > > >      int64_t pos;                ///< byte position in stream, -1 if unknown
> > > >  
> > > > -    AVRational pixel_aspect;    ///< pixel aspect ratio
> > > > -
> > > >      int perms;                  ///< permissions, see the AV_PERM_* flags
> > > >  
> > > > -    int interlaced;             ///< is frame interlaced
> > > > -    int top_field_first;
> > > > +    enum AVMediaType type;      ///< media type of buffer data
> > > > +    void *props;                ///< media specific properties, cast to right type
> > > 
> > > AVFilterBufferRefVideoProps *vid;
> > > AVFilterBufferRefAudioProps *aud;
> > 
> > I have a slightly preference for a *props generic pointer, but two
> > distinct fields are fine as well, can you say Michael why do you
> > prefer like that?
> 
> because that way you dont need casts, you can just use p->vid->blah
> 
> > 
> > Also in this case I'd prefer *video_props, *audio_props, really don't
> > like arbitrary contractions.
> 
> i think these would become too long in code as these could be used alot

So I suggest audio/video. Is that OK?

Regards.
-- 
FFmpeg = Fostering Furious MultiPurpose Ephemeral Gadget



More information about the ffmpeg-devel mailing list