Go to the documentation of this file.
19 #ifndef AVDEVICE_AVDEVICE_H
20 #define AVDEVICE_AVDEVICE_H
23 #ifndef HAVE_AV_CONFIG_H
314 void *
data,
size_t data_size);
328 void *
data,
size_t data_size);
330 #if FF_API_DEVICE_CAPABILITIES
AVPixelFormat
Pixel format.
enum AVPixelFormat pixel_format
@ AV_APP_TO_DEV_MUTE
Mute control messages.
@ AV_APP_TO_DEV_SET_VOLUME
Volume control message.
@ AV_DEV_TO_APP_BUFFER_OVERFLOW
Buffer fullness status messages.
AVFormatContext * device_context
char * device_name
device name, format depends on device
Following API allows user to probe device capabilities (supported codecs, pixel formats,...
int nb_devices
number of autodetected devices
@ AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
Prepare window buffer message.
int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list)
List devices.
const attribute_deprecated AVOption av_device_capabilities[]
AVOption table used by devices to implement device capabilities API.
attribute_deprecated int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s, AVDictionary **device_options)
Initialize capabilities probing API based on AVOption API.
enum AVSampleFormat sample_format
AVAppToDevMessageType
Message types used by avdevice_app_to_dev_control_message().
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.
@ AV_APP_TO_DEV_PAUSE
Request pause/play.
@ AV_APP_TO_DEV_WINDOW_REPAINT
Repaint request message.
@ AV_DEV_TO_APP_MUTE_STATE_CHANGED
Mute state change message.
const AVInputFormat * av_input_audio_device_next(const AVInputFormat *d)
Audio input devices iterator.
int avdevice_list_output_sinks(const AVOutputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
AVDeviceInfo ** devices
list of autodetected devices
int avdevice_list_input_sources(const AVInputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
List devices.
@ AV_APP_TO_DEV_TOGGLE_PAUSE
@ AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER
Display window buffer message.
@ AV_DEV_TO_APP_CREATE_WINDOW_BUFFER
Create window buffer message.
const char * avdevice_license(void)
Return the libavdevice license.
enum AVMediaType * media_types
array indicating what media types(s), if any, a device can provide.
int nb_media_types
length of media_types array, 0 if device cannot provide any media types
Describe the class of an AVClass context structure.
@ AV_APP_TO_DEV_GET_VOLUME
Get volume/mute messages.
Rational number (pair of numerator and denominator).
const char * avdevice_configuration(void)
Return the libavdevice build-time configuration.
attribute_deprecated void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s)
Free resources created by avdevice_capabilities_create()
AVCodecID
Identify the syntax and semantics of the bitstream.
int y
y coordinate of top left corner
@ AV_APP_TO_DEV_NONE
Dummy message.
@ AV_DEV_TO_APP_BUFFER_READABLE
Buffer readable/writable.
const AVOutputFormat * av_output_video_device_next(const AVOutputFormat *d)
Video output devices iterator.
#define MKBETAG(a, b, c, d)
Structure describes basic parameters of the device.
void avdevice_free_list_devices(AVDeviceInfoList **device_list)
Convenient function to free result of avdevice_list_devices().
#define attribute_deprecated
@ AV_APP_TO_DEV_TOGGLE_MUTE
AVDevToAppMessageType
Message types used by avdevice_dev_to_app_control_message().
char * device_description
human friendly name
int x
x coordinate of top left corner
unsigned avdevice_version(void)
Return the LIBAVDEVICE_VERSION_INT constant.
AVSampleFormat
Audio sample formats.
@ AV_APP_TO_DEV_WINDOW_SIZE
Window size change message.
int default_device
index of default device or -1 if no default
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.
const AVOutputFormat * av_output_audio_device_next(const AVOutputFormat *d)
Audio output devices iterator.
@ AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED
Volume level change message.
@ AV_DEV_TO_APP_BUFFER_WRITABLE
@ AV_DEV_TO_APP_NONE
Dummy message.
@ AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER
Destroy window buffer message.
const AVInputFormat * av_input_video_device_next(const AVInputFormat *d)
Video input devices iterator.
@ AV_DEV_TO_APP_BUFFER_UNDERFLOW
void avdevice_register_all(void)
Initialize libavdevice and register all the input and output devices.