This page describes our coding conventions.
Platform specific code should use the predominant coding convention for that platform. Basically, DirectShow code should look familar to a Windows coder, and QuickTime code should look familiar to an Apple coder. Otherwise, we follow the conventions described here.
Our whitespace rules are defined by the following astyle transform:
astyle --style=bsd --min-conditional-indent=0 --break-blocks \
--pad-oper --pad-header --unpad-paren \
--align-pointer=name --indent-preprocessor \
--indent-labels "$@"
This boils down to:
+, - , * , / , , etc.) and
after control statements (if, while, etc.)_t, but …The code is not always consistent with these conventions, for
historical reasons. These inconsistencies should be resolved, not
propagated. i.e., if you find something that’s named inconsistently,
submit a patch fixing it. Some identifiers conform to these
conventions but are spelled funny (e.g. de_quantize) as a result of some
automatic transforms. You can submit patches fixing these as well.