On date Sunday 2024-06-16 18:08:29 +0100, Andrew Sayers wrote:
> The old name could be misread as the opposite of "AV_OPT_FLAG_READONLY" -
> some things can be set at runtime, others are read-only.  Clarify that
> this refers to options that can be set after the struct is initialized.
> ---
>  libavutil/opt.h | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/libavutil/opt.h b/libavutil/opt.h
> index 07e27a9208..e050d126ed 100644
> --- a/libavutil/opt.h
> +++ b/libavutil/opt.h
> @@ -53,6 +53,9 @@
>   * question is allowed to access the field. This allows us to extend the
>   * semantics of those fields without breaking API compatibility.
>   *
> + * Note: only options with the AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM flag can 
> be
> + * modified after the struct is initialized.
> + *
>   * @section avoptions_scope Scope of AVOptions
>   *
>   * AVOptions is designed to support any set of multimedia configuration 
> options
> @@ -300,7 +303,12 @@ enum AVOptionType{
>  #define AV_OPT_FLAG_BSF_PARAM       (1 << 8)
>  
>  /**
> - * A generic parameter which can be set by the user at runtime.
> + * A generic parameter which can be set by the user after the struct is 
> initialized.
> + */
> +#define AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM   (1 << 15)

This needs to be dropped at the next bump.

1. define in libavutil/version.h

#define FF_API_OPT_FLAG_RUNTIME_PARAM  (LIBAVUTIL_VERSION_MAJOR < 60)

2. ifdef to automatically drop this at the next bump

#if FF_API_OPT_FLAG_RUNTIME_PARAM
/**
 * A generic parameter which can be set by the user after the struct is 
initialized.
 * @deprecated Renamed to AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM for clarity
  */
#define AV_OPT_FLAG_RUNTIME_PARAM   (1 << 15)
#endif

3. add a note to doc/APIchanges for the new symbol.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to