summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorDiederick Niehorster <dcnieho@gmail.com>2021-12-21 14:53:33 +0100
committerGyan Doshi <ffmpeg@gyani.pro>2021-12-24 14:06:45 +0530
commita8a530331fba298fa0f8863502906f5d7d17d54f (patch)
tree891ba2c1e8a2f4ad9238497decfe4d4b8e0ae182 /libavdevice
parent54fdbfc366db8d43eab46c09adc45842c9744fdd (diff)
avdevice: add info about media types(s) to AVDeviceInfo
An avdevice, regardless of whether its category says its an audio or video device, may provide access to devices providing different media types, or even single devices providing multiple media types. Also, some devices may provide no media types. dshow is an example encompassing all of these cases. Users should be provided with this information, so AVDeviceInfo is extended to provide it. Bump avdevice version Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/avdevice.c1
-rw-r--r--libavdevice/avdevice.h2
-rw-r--r--libavdevice/version.h4
3 files changed, 5 insertions, 2 deletions
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index 2ae26ab8e3..8f460c7564 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -157,6 +157,7 @@ void avdevice_free_list_devices(AVDeviceInfoList **device_list)
if (dev) {
av_freep(&dev->device_name);
av_freep(&dev->device_description);
+ av_freep(&dev->media_types);
av_free(dev);
}
}
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 8370bbc7f2..6f24976dcc 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -457,6 +457,8 @@ void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContex
typedef struct AVDeviceInfo {
char *device_name; /**< device name, format depends on device */
char *device_description; /**< human friendly name */
+ enum AVMediaType *media_types; /**< array indicating what media types(s), if any, a device can provide. If null, cannot provide any */
+ int nb_media_types; /**< length of media_types array, 0 if device cannot provide any media types */
} AVDeviceInfo;
/**
diff --git a/libavdevice/version.h b/libavdevice/version.h
index 914e156ec7..41f568d6b0 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -28,8 +28,8 @@
#include "libavutil/version.h"
#define LIBAVDEVICE_VERSION_MAJOR 59
-#define LIBAVDEVICE_VERSION_MINOR 0
-#define LIBAVDEVICE_VERSION_MICRO 101
+#define LIBAVDEVICE_VERSION_MINOR 1
+#define LIBAVDEVICE_VERSION_MICRO 100
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
LIBAVDEVICE_VERSION_MINOR, \