[FFmpeg-devel] [PATCH 5/8] lavu: add a JSON writer API (WIP)

Nicolas George george at nsup.org
Mon May 1 12:46:53 EEST 2023


Michael Niedermayer (12023-04-30):
> There are many projects which use libavcodec, format, filter
> Human users use these projects
> 
> If the standarization is at a C struct level only then the human interface
> for each application can be different.
> Thats fine if the 2 cases use fundamentally different interfaces like a
> GUI draging, droping and connecting components vs some command line
> interface.
> But if 2 applications both use command line / string based interfaces
> it would be nice to the human user if she could use/learn the same syntax
> and transfer a working example / script from one to the other.
> 
> So i think strings do matter for C libs because of that.

Thank you for stating it that way.

I think I can make it even a little stronger:

The API of the avlibraries is so rich that applications cannot
realistically cover all of them, and this is why we have the options
system: so that applications can expose all the knobs and controls of
avlibs without having to maintain code for every one of them.

But the options system has severe limitations, including the occasional
need for half-a-dozen backslashes or more for escaping and the inability
to define AV_OPT_TYPE_SOMETHING if SOMETHING is defined in another
library than lavu or nor generic enough.

Overcoming the limitations of the options system is a project I have had
for a long time, and it connects to the project of embedding the
documentation into the libraries (which has received some support).

http://ffmpeg.org/pipermail/ffmpeg-devel/2015-December/184525.html
(the technical details in my mind have evolved a little, but not much)
http://ffmpeg.org/pipermail/ffmpeg-devel/2020-August/268389.html

And for that, we absolutely need an efficient strings API (this is now
supported by a majority of developers, thankfully) and standardized
serialization functions. In the libraries, not the avtools.

To say it in a more concise way:

The avlibraries must not only perform work for applications, they also
must help applications communicate with users about that work, and that
is done with text.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230501/9376488c/attachment.sig>


More information about the ffmpeg-devel mailing list