[FFmpeg-devel] [PATCH 1/3] lavc: implement accessors for some AVFrame fields.
Nicolas George
nicolas.george at normalesup.org
Wed May 2 12:04:31 CEST 2012
Le quartidi 14 floréal, an CCXX, Stefano Sabatini a écrit :
> > +MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp)
> > +MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos)
> > +MAKE_ACCESSORS(AVFrame, frame, int64_t, channel_layout)
> > +MAKE_ACCESSORS(AVFrame, frame, int, sample_rate)
>
> What about to move this to the header? This way you avoid the IMO
> redundant declarations.
You mean as inline functions? Unfortunately, that can not work: an inline
function in a header behaves exactly like code in the client program, i.e.,
accessing directly the fields. And that is precisely what we want to avoid.
Additionally, I like having the prototypes completely written in the header,
as it is self-documenting. Otherwise, a macro could have served to build
them.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120502/f2bb3b2c/attachment.asc>
More information about the ffmpeg-devel
mailing list