[FFmpeg-devel] Embedded documentation?

Timo Rothenpieler timo at rothenpieler.org
Mon May 1 16:15:07 EEST 2023


On 01.05.2023 12:13, Nicolas George wrote:
> Hi.
> 
> Three years ago, I shared some brief thoughts about embedding the
> documentation in the libraries. For example, that would allow GUI
> applications to open help dialogs about specific options.
> 
> To see what it would need, I wrote the following header. I did not work
> any further, because groundwork need to be laid first. But now that it
> was mentioned in another thread, I think it is a good idea to show it,
> to see how people like it.
> 
> Please share your remarks. Even “+1” to say you like it, because people
> who will not like it will not hesitate to post “-1”.
> 
> Regards,

Somewhat loosely related to this:

A frequent issue is that it's entirely non-obvious which global 
libavcodec options a codec might make use of.
Having a way to self-document that would be amazing, so those options 
show up in the --help output, ideally with their codec-specific default.

The obvious idea I had for this was to utilize the FFCodecDefault struct 
which already exists, maybe expanding it a tiny bit to allow the second 
value to be NULL, indicating "This codec uses that option, but does not 
change the default".

Main issue with this is that FFCodecDefault is a private struct.
It could just be made public and user-queryable, while making every 
current user of it aware of possible NULL-values, which they can then 
just ignore.


More information about the ffmpeg-devel mailing list