[FFmpeg-soc] [soc] libavsequencer [PATCH 01/08] Music module public API header file.

Vitor Sessak vitor1001 at gmail.com
Thu Jul 15 21:49:29 CEST 2010


On 07/15/2010 09:35 PM, Ronald S. Bultje wrote:
> Hi,
>
> On Thu, Jul 15, 2010 at 3:12 PM, Sebastian Vater
> <cdgs.basty-gM/Ye1E23mwN+BqQ9rBEUg at public.gmane.org>  wrote:
>> Just a question for understanding...what's the advantage of using enum's
>> then? The only one I see straight away is that there is less space
>> required (saving 4 characters by replacing '#define ' with '    ').
>
> Documentation tools (e.g. doxy) will group them together and treat
> them as a group of related properties, rather than separate entities.
> That's a big one for a huge project such as FFmpeg, where in the
> future many people will look at and modify your code, without
> necessarily understanding everything at the beginning.

Not to mention having variables of the type "enum Whatever" instead of a 
plain int, which tell immediately which kind of constants should be 
assigned to it.

-Vitor


More information about the FFmpeg-soc mailing list