diff mbox series

[FFmpeg-devel] lavu/opt: Clarify that AVOptions is not indended for general use

Message ID 20240422084945.376401-1-ffmpeg-devel@pileofstuff.org
State New
Headers show
Series [FFmpeg-devel] lavu/opt: Clarify that AVOptions is not indended for general use | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andrew Sayers April 22, 2024, 8:49 a.m. UTC
---
 libavutil/opt.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stefano Sabatini April 22, 2024, 11 a.m. UTC | #1
On date Monday 2024-04-22 09:49:45 +0100, Andrew Sayers wrote:
> ---
>  libavutil/opt.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/libavutil/opt.h b/libavutil/opt.h
> index e6013662f6..795accb363 100644
> --- a/libavutil/opt.h
> +++ b/libavutil/opt.h
> @@ -54,7 +54,11 @@
>   * semantics of those fields without breaking API compatibility.
>   *
>   * @section avoptions_implement Implementing AVOptions
> + *
>   * This section describes how to add AVOptions capabilities to a struct.

> + * It is intended for developers of FFmpeg itself - AVOptions can technically
> + * be used as a more general toolkit, but is neither intended nor expected
> + * to be good fit for other use cases.
>   *

Nit: I'd make this statement somehow milder:

Use of AVOptions is intended for development of FFmpeg itself, but use
outside of FFmpeg is also possible.

the rationale being that it is very difficult to know in advance the
use case - in case the FFmpeg are the ones and only employed libraries
(as in the case of the FFmpeg tools themselves) this might even be a
good choice if you want to keep a small dependencies footprint and you
don't plan to switch to a different multimedia library.

Also:
developers => development
since an FFmpeg developer might work on other libraries as well, so
"FFmpeg development" defines the scope more exactly.
diff mbox series

Patch

diff --git a/libavutil/opt.h b/libavutil/opt.h
index e6013662f6..795accb363 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -54,7 +54,11 @@ 
  * semantics of those fields without breaking API compatibility.
  *
  * @section avoptions_implement Implementing AVOptions
+ *
  * This section describes how to add AVOptions capabilities to a struct.
+ * It is intended for developers of FFmpeg itself - AVOptions can technically
+ * be used as a more general toolkit, but is neither intended nor expected
+ * to be good fit for other use cases.
  *
  * All AVOptions-related information is stored in an AVClass. Therefore
  * the first member of the struct should be a pointer to an AVClass describing it.