[Ffmpeg-devel] Prefix for img_* functions

Panagiotis Issaris takis
Sun Mar 4 13:09:58 CET 2007


Hi,

Michael Niedermayer schreef:
> On Sat, Mar 03, 2007 at 10:39:23PM +0100, Panagiotis Issaris wrote:
>   
>> [...]
>> There is also a function img_get_alpha_info(), is it okay to rename that 
>> one too? In the same patch or in a separate one?
>>     
>
> whichever way you prefer ...
>   
I prefer to do it in a separate patch.


>   
>> I'm a bit confused regarding the FFmpeg project's naming conventions: 
>> Some functions are prefixed ith avcodec_, some with av_, some with 
>> avpicture_ some are not prefixed (such as register_avcodec, dump_format, 
>> parse_image_size, parse_frame_rate, parse_date, find_info_tag, 
>> video_grab_init, audio_init, dv1394_init, dc1394_init), some with ffm_ 
>> and now because of this patch :) three with av_picture.
>>     
>
> things are a "little" inconsistent, i know ...
> every new public fuction should have av_ infront of it and
>   
I'll prepare a patch to do this soon.

> every function whith a simple name like parse_date() should be renamed
> that way, functions which contain some av somewhere else in their name
> can be left IMHO as its probably not worth the work to rename them ...
>   
I respectfully disagree on this :) I think consistently named APIs are 
not only a pleasure to look at, but are really easy to use. With a truly 
consistently named API you can nearly guess the name of the function you 
need to use, when thinking of some stuff you need to do.

I'll also try to write a patch doing this, but only after reaching 
consensus on naming conventions in some discussion on the mailinglist.

>
> [...]
>   
>> Is there a document describing naming conventions for the project?
>>     
>
> not that i know, but ive the feeing you will write one :)
>   
:) I'll start a new thread regarding this, so that naming conventions 
can be discussed. Hopefully that will result in a patch soon.


> and patch looks ok
>   
Applied.

With friendly regards,
Takis




More information about the ffmpeg-devel mailing list