27 void *
data,
size_t data_size)
29 if (!
s->oformat || !
ffofmt(
s->oformat)->control_message)
35 void *
data,
size_t data_size)
37 if (!
s->control_message_cb)
39 return s->control_message_cb(
s,
type,
data, data_size);
48 if ((
s->oformat && !
ffofmt(
s->oformat)->get_device_list) ||
49 (
s->iformat && !
ffifmt(
s->iformat)->get_device_list)) {
57 (*device_list)->default_device = -1;
66 return (*device_list)->nb_devices;
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static int list_devices_for_context(AVFormatContext *s, AVDictionary *options, AVDeviceInfoList **device_list)
Main libavdevice API header.
#define i(width, name, range_min, range_max)
static const FFInputFormat * ffifmt(const AVInputFormat *fmt)
AVAppToDevMessageType
Message types used by avdevice_app_to_dev_control_message().
int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
List devices.
void avdevice_free_list_devices(AVDeviceInfoList **device_list)
Convenient function to free result of avdevice_list_devices().
int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type, void *data, size_t data_size)
Send control message from application to device.
AVDevToAppMessageType
Message types used by avdevice_dev_to_app_control_message().
int avdevice_list_output_sinks(const AVOutputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
int avdevice_list_input_sources(const AVInputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
List devices.
int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type, void *data, size_t data_size)
Send control message from device to application.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
Set all the options from a given dictionary on an object.
av_warn_unused_result int ff_alloc_input_device_context(struct AVFormatContext **avctx, const AVInputFormat *iformat, const char *format)
Memory handling functions.
static const FFOutputFormat * ffofmt(const AVOutputFormat *fmt)
int nb_devices
number of autodetected devices
AVDeviceInfo ** devices
list of autodetected devices
Structure describes basic parameters of the device.
char * device_description
human friendly name
enum AVMediaType * media_types
array indicating what media types(s), if any, a device can provide.
char * device_name
device name, format depends on device