[FFmpeg-devel] [PATCH v4 10/22] avdevice: capabilities API details no longer public
Diederick Niehorster
dcnieho at gmail.com
Fri Mar 25 16:10:29 EET 2022
Bumping avdevice major version (API removed, even if it cannot have been used by anyone)
Signed-off-by: Diederick Niehorster <dcnieho at gmail.com>
---
libavdevice/avdevice.c | 2 +-
libavdevice/avdevice.h | 28 +---------------------------
libavdevice/internal.h | 33 +++++++++++++++++++++++++++++++++
libavdevice/version.h | 2 +-
libavdevice/version_major.h | 2 +-
5 files changed, 37 insertions(+), 30 deletions(-)
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index 24e14b84c9..db412985b2 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -34,7 +34,7 @@ const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
#define V AV_OPT_FLAG_VIDEO_PARAM
#define OFFSET(x) offsetof(AVDeviceCapabilitiesQuery, x)
-const AVOption av_device_capabilities[] = {
+const AVOption ff_device_capabilities[] = {
{ "codec", "codec", OFFSET(codec), AV_OPT_TYPE_INT,
{.i64 = AV_CODEC_ID_NONE}, AV_CODEC_ID_NONE, INT_MAX, E|D|A|V },
{ "sample_format", "sample format", OFFSET(sample_format), AV_OPT_TYPE_SAMPLE_FMT,
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 9724e7edf5..6d45c74616 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -416,33 +416,7 @@ int avdevice_dev_to_app_control_message(struct AVFormatContext *s,
* avformat_free_context(oc);
* @endcode
*/
-
-/**
- * Structure describes device capabilities.
- *
- * It is used by devices in conjunction with av_device_capabilities AVOption table
- * to implement capabilities probing API based on AVOption API. Should not be used directly.
- */
-typedef struct AVDeviceCapabilitiesQuery {
- const AVClass *av_class;
- AVFormatContext *device_context;
- enum AVCodecID codec;
- enum AVSampleFormat sample_format;
- enum AVPixelFormat pixel_format;
- int sample_rate;
- int channels;
- int64_t channel_layout;
- int window_width;
- int window_height;
- int frame_width;
- int frame_height;
- AVRational fps;
-} AVDeviceCapabilitiesQuery;
-
-/**
- * AVOption table used by devices to implement device capabilities API. Should not be used by a user.
- */
-extern const AVOption av_device_capabilities[];
+typedef struct AVDeviceCapabilitiesQuery AVDeviceCapabilitiesQuery;
/**
* Initialize capabilities probing API based on AVOption API.
diff --git a/libavdevice/internal.h b/libavdevice/internal.h
index 67c90e1f87..bef3a4bd2d 100644
--- a/libavdevice/internal.h
+++ b/libavdevice/internal.h
@@ -19,10 +19,43 @@
#ifndef AVDEVICE_INTERNAL_H
#define AVDEVICE_INTERNAL_H
+#include "libavutil/log.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixfmt.h"
+#include "libavutil/rational.h"
+#include "libavutil/samplefmt.h"
+#include "libavcodec/codec_id.h"
#include "libavformat/avformat.h"
av_warn_unused_result
int ff_alloc_input_device_context(struct AVFormatContext **avctx, const AVInputFormat *iformat,
const char *format);
+/**
+ * Structure describes device capabilities.
+ *
+ * It is used by devices in conjunction with ff_device_capabilities AVOption table
+ * to implement capabilities probing API based on AVOption API.
+ */
+struct AVDeviceCapabilitiesQuery {
+ const AVClass *av_class;
+ AVFormatContext *device_context;
+ enum AVCodecID codec;
+ enum AVSampleFormat sample_format;
+ enum AVPixelFormat pixel_format;
+ int sample_rate;
+ int channels;
+ int64_t channel_layout;
+ int window_width;
+ int window_height;
+ int frame_width;
+ int frame_height;
+ AVRational fps;
+};
+
+/**
+ * AVOption table used by devices to implement device capabilities API.
+ */
+extern const AVOption ff_device_capabilities[];
+
#endif
diff --git a/libavdevice/version.h b/libavdevice/version.h
index 2c25804784..d789b3fd7b 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -30,7 +30,7 @@
#include "version_major.h"
-#define LIBAVDEVICE_VERSION_MINOR 9
+#define LIBAVDEVICE_VERSION_MINOR 1
#define LIBAVDEVICE_VERSION_MICRO 100
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index d255ff6992..b32de7325d 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -25,7 +25,7 @@
* Libavdevice version macros
*/
-#define LIBAVDEVICE_VERSION_MAJOR 59
+#define LIBAVDEVICE_VERSION_MAJOR 60
/**
* FF_API_* defines may be placed below to indicate public API that will be
--
2.28.0.windows.1
More information about the ffmpeg-devel
mailing list