summaryrefslogtreecommitdiff
path: root/libavdevice/avdevice.h
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-12-21 20:12:47 +0100
committerLukasz Marek <lukasz.m.luki2@gmail.com>2015-01-11 18:58:26 +0100
commit007c33df0a2c1a820050dfeb65986c99143d1c7e (patch)
tree8d0b633b92d489c487cb8b9fb74499840b0009d0 /libavdevice/avdevice.h
parent9241e544ffec5c3f4988ff699e6d2bd0f4c2803b (diff)
lavd/avdevice: introduce helper functions for sink/sources listing
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavdevice/avdevice.h')
-rw-r--r--libavdevice/avdevice.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index a39522819e..2d675b012d 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -484,4 +484,26 @@ int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_l
*/
void avdevice_free_list_devices(AVDeviceInfoList **device_list);
+/**
+ * List devices.
+ *
+ * Returns available device names and their parameters.
+ * These are convinient wrappers for avdevice_list_devices().
+ * Device context is allocated and deallocated internally.
+ *
+ * @param device device format. May be NULL if device name is set.
+ * @param device_name device name. May be NULL if device format is set.
+ * @param device_options An AVDictionary filled with device-private options. May be NULL.
+ * The same options must be passed later to avformat_write_header() for output
+ * devices or avformat_open_input() for input devices, or at any other place
+ * that affects device-private options.
+ * @param[out] device_list list of autodetected devices
+ * @return count of autodetected devices, negative on error.
+ * @note device argument takes precedence over device_name when both are set.
+ */
+int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name,
+ AVDictionary *device_options, AVDeviceInfoList **device_list);
+int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name,
+ AVDictionary *device_options, AVDeviceInfoList **device_list);
+
#endif /* AVDEVICE_AVDEVICE_H */