[Ffmpeg-devel] Naming conventions
Michel Bardiaux
mbardiaux
Tue Mar 6 10:50:06 CET 2007
Luca Barbato wrote:
> 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_".
>> agree.
>
> I like av_
"av" would considerably increase the risk of name clashes. IIRC the
namespace "lowercase alnum" is reserved for the C library.
[snip]
>
> I'm undecided, both av_action_type or av_type_action sound fine, as log
> we have the notation compact.
av_type_action is better, it goes from the general to the particular,
which is what we do rather naturally with versions:
av_type_action_version.
>> 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
>> API.
Because of the global namespace of the 'nix linkers, there must be rules
for *all* functions not static.
Just for 2 eurocents: what we use here for internal APIs is to simply
mark the names with K for "kernel"; we use captitalization rather than
underscores so we have
projectTypeKActionVersion
Mind you, I am *not* proposing capitalization for ffmpeg! So it would be
av_type_k_action
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be
Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
More information about the ffmpeg-devel
mailing list