Names of functions, variables, and struct members must be lowercase, using underscores (_) to separate words. For example, ‘avfilter_get_video_buffer’ is an acceptable function name and ‘AVFilterGetVideo’ is not.
Struct, union, enum, and typedeffed type names must use CamelCase. All structs and unions should be typedeffed to the same name as the struct/union tag, e.g. typedef struct AVFoo { ... } AVFoo;. Enums are typically not typedeffed.
Enumeration constants and macros must be UPPERCASE, except for macros masquerading as functions, which should use the function naming convention.
All identifiers in the libraries should be namespaced as follows:
No namespacing for identifiers with file and lower scope (e.g. local variables, static functions), and struct and union members,
The ff_ prefix must be used for variables and functions visible outside of file scope, but only used internally within a single library, e.g. ‘ff_w64_demuxer’. This prevents name collisions when FFmpeg is statically linked.
For variables and functions visible outside of file scope, used internally across multiple libraries, use avpriv_ as prefix, for example, ‘avpriv_report_missing_feature’.
All other internal identifiers, like private type or macro names, should be namespaced only to avoid possible internal conflicts. E.g. H264_NAL_SPS vs. HEVC_NAL_SPS.
Each library has its own prefix for public symbols, in addition to the commonly used av_ (avformat_ for libavformat, avcodec_ for libavcodec, swr_ for libswresample, etc). Check the existing code and choose names accordingly.
Other public identifiers (struct, union, enum, macro, type names) must use their library’s public prefix (AV, Sws, or Swr).
Furthermore, name space reserved for the system should not be invaded. Identifiers ending in _t are reserved by POSIX. Also avoid names starting with __ or _ followed by an uppercase letter as they are reserved by the C standard. Names starting with _ are reserved at the file level and may not be used for externally visible symbols. If in doubt, just avoid names starting with _ altogether.