aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-09-25 20:59:35 +0200
committerAnton Khirnov <anton@khirnov.net>2024-09-30 09:14:04 +0200
commitdf9b80d21a25e06992c3a3aa87b5703404942b08 (patch)
tree76bf3b05cc39e157eefcecea2b14fa9733d1ac09
parentb97ccc537d83a4678ea889f01c17f79f87f7f0f4 (diff)
downloadffmpeg-df9b80d21a25e06992c3a3aa87b5703404942b08.tar.gz
lavu: deprecate av_opt_set_int_list() and related infrastructure
It has no more users and is replaced by array-type options.
-rw-r--r--doc/APIchanges5
-rw-r--r--libavutil/avutil.h3
-rw-r--r--libavutil/opt.h2
-rw-r--r--libavutil/utils.c2
-rw-r--r--libavutil/version.h1
5 files changed, 13 insertions, 0 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index a79353f79b..f9a4d0e442 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,11 @@ The last version increases of all libraries were on 2024-03-07
API changes, most recent first:
+2024-09-xx - xxxxxxxxxx - lavu 59
+ Deprecate av_int_list_length_for_size(), av_int_list_length(), and
+ av_opt_set_int_list() without replacement. All AVOptions using these
+ should be replaced with AV_OPT_TYPE_FLAG_ARRAY.
+
2024-09-xx - xxxxxxxxxx - lavfi 10.6.100
Buffersink now has array-type options
- pixel_formats
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index d2900dcb48..ee709fbb2a 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -314,6 +314,7 @@ static inline void *av_x_if_null(const void *p, const void *x)
return (void *)(intptr_t)(p ? p : x);
}
+#if FF_API_OPT_INT_LIST
/**
* Compute the length of an integer list.
*
@@ -322,6 +323,7 @@ static inline void *av_x_if_null(const void *p, const void *x)
* @param list pointer to the list
* @return length of the list, in elements, not counting the terminator
*/
+attribute_deprecated
unsigned av_int_list_length_for_size(unsigned elsize,
const void *list, uint64_t term) av_pure;
@@ -334,6 +336,7 @@ unsigned av_int_list_length_for_size(unsigned elsize,
*/
#define av_int_list_length(list, term) \
av_int_list_length_for_size(sizeof(*(list)), list, term)
+#endif
/**
* Return the fractional representation of the internal time base.
diff --git a/libavutil/opt.h b/libavutil/opt.h
index be189f7653..17374211a4 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -886,6 +886,7 @@ int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layo
*/
int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags);
+#if FF_API_OPT_INT_LIST
/**
* Set a binary option to an integer list.
*
@@ -901,6 +902,7 @@ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, in
AVERROR(EINVAL) : \
av_opt_set_bin(obj, name, (const uint8_t *)(val), \
av_int_list_length(val, term) * sizeof(*(val)), flags))
+#endif
/**
* Add, replace, or remove elements for an array option. Which of these
diff --git a/libavutil/utils.c b/libavutil/utils.c
index 94d247bbee..162a4dee26 100644
--- a/libavutil/utils.c
+++ b/libavutil/utils.c
@@ -51,6 +51,7 @@ char av_get_picture_type_char(enum AVPictureType pict_type)
}
}
+#if FF_API_OPT_INT_LIST
unsigned av_int_list_length_for_size(unsigned elsize,
const void *list, uint64_t term)
{
@@ -69,6 +70,7 @@ unsigned av_int_list_length_for_size(unsigned elsize,
}
return i;
}
+#endif
char *av_fourcc_make_string(char *buf, uint32_t fourcc)
{
diff --git a/libavutil/version.h b/libavutil/version.h
index 1ae3f4ef87..69519cfd06 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -115,6 +115,7 @@
#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 60)
#define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 60)
#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_OPT_INT_LIST (LIBAVUTIL_VERSION_MAJOR < 60)
/**
* @}