[Ffmpeg-devel] Naming conventions
Tue Mar 6 08:53:20 CET 2007
Aurelien Jacobs wrote:
> On Mon, 05 Mar 2007 16:16:16 +0100
> Panagiotis Issaris <takis.issaris at uhasselt.be> wrote:
>> I think all agree that all public API functions should be prefixed with
>> at least "av" and possibly "av_".
I like av_
>> * The name of the type "it works on". Libavformat uses this for some of
>> its functions: av_parser_init, av_parser_parse, av_parser_change,
>> av_bitstream_filter_init, avpicture_alloc, avpicture_free, ...
> But I would prefer avpicture_* to be renamed to av_picture_*.
>> How should these possibly included parts be ordered? The previously
>> mentioned functionnames used the "type_action" order, but there also
>> appear functions which do not use this order:
>> av_init_packet, av_new_packet, av_get_packet, av_dup_packet,
>> av_free_packet, ...
>> _Personally_, I prefer the "type_action" type of names, and having all
>> of them prefixed with some FFmpeg specific part, so that the chance of
>> namecollisions is greatly reduced.
> Same preference for me.
I'm undecided, both av_action_type or av_type_action sound fine, as log
we have the notation compact.
> IMO, the first thing to do before any change is to write a clear naming
> policy document and enforce it for any new function added to the public
More information about the ffmpeg-devel