Skip to content

Commit

Permalink
avdevice: add info about media types(s) to AVDeviceInfo
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Roger Pack <[email protected]>
  • Loading branch information
dcnieho authored and GyanD committed Dec 24, 2021
1 parent 54fdbfc commit a8a5303
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions libavdevice/avdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 2 additions & 0 deletions libavdevice/avdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
4 changes: 2 additions & 2 deletions libavdevice/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down

0 comments on commit a8a5303

Please sign in to comment.