[FFmpeg-devel] [PATCH] VFW capture support

Ramiro Polla ramiro
Mon Mar 3 18:07:23 CET 2008


Hello Rich,

Rich Felker wrote:
> On Mon, Mar 03, 2008 at 03:19:55AM -0300, Ramiro Polla wrote:
>>>> I have also used "var == FALSE" and "var == NULL" checks. I prefer
>>>> that instead of "!var" just to be closer to MSDN.
>>> Using "var == FALSE", and "var == TRUE" more so, not only not our
>>> style, it's plain stupid.  Being closer to msdn is hardly a desirable
>>> goal.
>> Hey, we never know if Microsoft someday decides that FALSE == 18 instead 
>> of the expected 0...
> 
> This is akin to insisting on using PI instead of 3.1415926535897932
> because the value of ? might change...
> 
> Seriously, Windows is so encrusted with legacy crap that they can't
> even fix their long to be the right size even when moving to a new
> arch (LP64). So of course they couldn't change FALSE to something
> other than 0 even if they wanted. And moreover the value of false is
> defined by the C language not by Windows..

Thanks for bringing it up. It's a valuable argument.

>>>> struct vfw_ctx {
>>>>    HWND hwnd;
>>>>    int grabbed;
>>>>    AVPacket *pkt;
>>>> };
>>>>
>>>> static int vfw_pixfmt( DWORD biCompression )
>>> Do we really have to use those dreadful windows typedefs and naming
>>> conventions?
>> I find it best when writing an interface to an API that has 
>> documentation, the same way you follow variable names from specs.
> 
> It's hideous style and IMO not acceptable.
...
> Not to mention the name
> DWORD is _incorrect_!!!

Sorry, I don't see how it's incorrect. Please enlighten us.

>>> It is preferred to have no whitespace immediately inside () in FFmpeg.
>> This is my preferred style, and I'll maintain this file. You won't need 
>> to look at it after it gets into SVN.
> 
> This is not the way to make people feel positive about accepting your
> code...

This makes me wonder... How much code do you have in FFmpeg, again?

[...]

Ramiro Polla




More information about the ffmpeg-devel mailing list