diff options
author | Josh de Kock <josh@itanimul.li> | 2018-01-02 14:34:18 +0000 |
---|---|---|
committer | Josh de Kock <josh@itanimul.li> | 2018-02-06 18:57:42 +0000 |
commit | 0fd475704e871ef3a535947596a012894bae3cbd (patch) | |
tree | b4f94e4e1de998837296e48a7dba037e1a93d959 /libavdevice/avdevice.h | |
parent | 0694d8702421e7aff1340038559c438b61bb30dd (diff) |
lavd: add new API for iterating input and output devices
This also adds an avpriv function to register devices in
libavformat
Diffstat (limited to 'libavdevice/avdevice.h')
-rw-r--r-- | libavdevice/avdevice.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index ee9462480e..dd6ad9365e 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -66,6 +66,29 @@ const char *avdevice_configuration(void); const char *avdevice_license(void); /** + * Iterate over all registered output devices. + * + * @param opaque a pointer where libavdevice will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered output device or NULL when the iteration is + * finished + */ +const AVOutputFormat *av_outdev_iterate(void **opaque); + +/** + * Iterate over all registered input devices. + * + * @param opaque a pointer where libavdevice will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered input device or NULL when the iteration is + * finished + */ +const AVInputFormat *av_indev_iterate(void **opaque); + +#if FF_API_NEXT +/** * Initialize libavdevice and register all the input and output devices. */ void avdevice_register_all(void); @@ -77,6 +100,7 @@ void avdevice_register_all(void); * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. */ +attribute_deprecated AVInputFormat *av_input_audio_device_next(AVInputFormat *d); /** @@ -86,6 +110,7 @@ AVInputFormat *av_input_audio_device_next(AVInputFormat *d); * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. */ +attribute_deprecated AVInputFormat *av_input_video_device_next(AVInputFormat *d); /** @@ -95,6 +120,7 @@ AVInputFormat *av_input_video_device_next(AVInputFormat *d); * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. */ +attribute_deprecated AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d); /** @@ -104,7 +130,9 @@ AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d); * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. */ +attribute_deprecated AVOutputFormat *av_output_video_device_next(AVOutputFormat *d); +#endif typedef struct AVDeviceRect { int x; /**< x coordinate of top left corner */ |