From 4f49ca7bbc75a9db4cdf93f27f95a668c751f160 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 24 Jan 2021 19:38:42 +0100 Subject: avdevice/avdevice: Deprecate AVDevice Capabilities API It has been added in 6db42a2b6b22e6f1928fafcf3faa67ed78201004, yet since then none of the necessary create/free_device_capabilities functions has been implemented, making this API completely useless. Because of this one can already simplify avdevice_capabilities_free/create and can already remove the function pointers at the next major bump; given that the documentation explicitly states that av_device_capabilities is not to be used by a user, it's options can already be removed (save for the sentinel). Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 523cf34d55..41482328f6 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -590,6 +590,7 @@ typedef struct AVOutputFormat { * @see avdevice_list_devices() for more details. */ int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); +#if LIBAVFORMAT_VERSION_MAJOR < 59 /** * Initialize device capabilities submodule. * @see avdevice_capabilities_create() for more details. @@ -600,6 +601,7 @@ typedef struct AVOutputFormat { * @see avdevice_capabilities_free() for more details. */ int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); +#endif enum AVCodecID data_codec; /**< default data codec */ /** * Initialize format. May allocate data here, and set any AVFormatContext or @@ -769,6 +771,7 @@ typedef struct AVInputFormat { */ int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); +#if LIBAVFORMAT_VERSION_MAJOR < 59 /** * Initialize device capabilities submodule. * @see avdevice_capabilities_create() for more details. @@ -780,6 +783,7 @@ typedef struct AVInputFormat { * @see avdevice_capabilities_free() for more details. */ int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); +#endif } AVInputFormat; /** * @} -- cgit v1.2.3