I maintain the MultimediaWiki you linked to and I can attest that the codec HOWTO is out of date, especially since FFmpeg is always evolving its internal interfaces. It would be best to start your journey by getting the latest FFmpeg source code and studying a few of the simplest codecs to understand the interface (sounds like you have already been doing this).
About priv_data_size: whether you set this depends entirely on whether your codec cares about maintaining any state between calls. Most codecs care about this and define a structure in their main source file named, e.g., MyCodecContext. Then the sizeof()
this structure is passed as priv_data_size. In the example you posted, it was sizeof(COOKContext)
, because this example was clearly copied from the RealAudio COOK codec file.
Most codecs need to maintain some kind of state (like pointers to previous frames or various tables). The priv_data_size member tells the core engine how much space to allocate for this structure and then the core passes that structure to all the codec calls.