FFmpeg
avdevice.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVDEVICE_AVDEVICE_H
20 #define AVDEVICE_AVDEVICE_H
21 
22 #include "version.h"
23 
24 /**
25  * @file
26  * @ingroup lavd
27  * Main libavdevice API header
28  */
29 
30 /**
31  * @defgroup lavd libavdevice
32  * Special devices muxing/demuxing library.
33  *
34  * Libavdevice is a complementary library to @ref libavf "libavformat". It
35  * provides various "special" platform-specific muxers and demuxers, e.g. for
36  * grabbing devices, audio capture and playback etc. As a consequence, the
37  * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own
38  * I/O functions). The filename passed to avformat_open_input() often does not
39  * refer to an actually existing file, but has some special device-specific
40  * meaning - e.g. for xcbgrab it is the display name.
41  *
42  * To use libavdevice, simply call avdevice_register_all() to register all
43  * compiled muxers and demuxers. They all use standard libavformat API.
44  *
45  * @{
46  */
47 
48 #include "libavutil/log.h"
49 #include "libavutil/opt.h"
50 #include "libavutil/dict.h"
51 #include "libavformat/avformat.h"
52 
53 /**
54  * Return the LIBAVDEVICE_VERSION_INT constant.
55  */
56 unsigned avdevice_version(void);
57 
58 /**
59  * Return the libavdevice build-time configuration.
60  */
61 const char *avdevice_configuration(void);
62 
63 /**
64  * Return the libavdevice license.
65  */
66 const char *avdevice_license(void);
67 
68 /**
69  * Initialize libavdevice and register all the input and output devices.
70  */
71 void avdevice_register_all(void);
72 
73 /**
74  * Audio input devices iterator.
75  *
76  * If d is NULL, returns the first registered input audio/video device,
77  * if d is non-NULL, returns the next registered input audio/video device after d
78  * or NULL if d is the last one.
79  */
81 
82 /**
83  * Video input devices iterator.
84  *
85  * If d is NULL, returns the first registered input audio/video device,
86  * if d is non-NULL, returns the next registered input audio/video device after d
87  * or NULL if d is the last one.
88  */
90 
91 /**
92  * Audio output devices iterator.
93  *
94  * If d is NULL, returns the first registered output audio/video device,
95  * if d is non-NULL, returns the next registered output audio/video device after d
96  * or NULL if d is the last one.
97  */
99 
100 /**
101  * Video output devices iterator.
102  *
103  * If d is NULL, returns the first registered output audio/video device,
104  * if d is non-NULL, returns the next registered output audio/video device after d
105  * or NULL if d is the last one.
106  */
108 
109 typedef struct AVDeviceRect {
110  int x; /**< x coordinate of top left corner */
111  int y; /**< y coordinate of top left corner */
112  int width; /**< width */
113  int height; /**< height */
114 } AVDeviceRect;
115 
116 /**
117  * Message types used by avdevice_app_to_dev_control_message().
118  */
120  /**
121  * Dummy message.
122  */
123  AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),
124 
125  /**
126  * Window size change message.
127  *
128  * Message is sent to the device every time the application changes the size
129  * of the window device renders to.
130  * Message should also be sent right after window is created.
131  *
132  * data: AVDeviceRect: new window size.
133  */
134  AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),
135 
136  /**
137  * Repaint request message.
138  *
139  * Message is sent to the device when window has to be repainted.
140  *
141  * data: AVDeviceRect: area required to be repainted.
142  * NULL: whole area is required to be repainted.
143  */
145 
146  /**
147  * Request pause/play.
148  *
149  * Application requests pause/unpause playback.
150  * Mostly usable with devices that have internal buffer.
151  * By default devices are not paused.
152  *
153  * data: NULL
154  */
155  AV_APP_TO_DEV_PAUSE = MKBETAG('P', 'A', 'U', ' '),
156  AV_APP_TO_DEV_PLAY = MKBETAG('P', 'L', 'A', 'Y'),
157  AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T'),
158 
159  /**
160  * Volume control message.
161  *
162  * Set volume level. It may be device-dependent if volume
163  * is changed per stream or system wide. Per stream volume
164  * change is expected when possible.
165  *
166  * data: double: new volume with range of 0.0 - 1.0.
167  */
168  AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'),
169 
170  /**
171  * Mute control messages.
172  *
173  * Change mute state. It may be device-dependent if mute status
174  * is changed per stream or system wide. Per stream mute status
175  * change is expected when possible.
176  *
177  * data: NULL.
178  */
179  AV_APP_TO_DEV_MUTE = MKBETAG(' ', 'M', 'U', 'T'),
180  AV_APP_TO_DEV_UNMUTE = MKBETAG('U', 'M', 'U', 'T'),
181  AV_APP_TO_DEV_TOGGLE_MUTE = MKBETAG('T', 'M', 'U', 'T'),
182 
183  /**
184  * Get volume/mute messages.
185  *
186  * Force the device to send AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED or
187  * AV_DEV_TO_APP_MUTE_STATE_CHANGED command respectively.
188  *
189  * data: NULL.
190  */
191  AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'),
192  AV_APP_TO_DEV_GET_MUTE = MKBETAG('G', 'M', 'U', 'T'),
193 };
194 
195 /**
196  * Message types used by avdevice_dev_to_app_control_message().
197  */
199  /**
200  * Dummy message.
201  */
202  AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),
203 
204  /**
205  * Create window buffer message.
206  *
207  * Device requests to create a window buffer. Exact meaning is device-
208  * and application-dependent. Message is sent before rendering first
209  * frame and all one-shot initializations should be done here.
210  * Application is allowed to ignore preferred window buffer size.
211  *
212  * @note: Application is obligated to inform about window buffer size
213  * with AV_APP_TO_DEV_WINDOW_SIZE message.
214  *
215  * data: AVDeviceRect: preferred size of the window buffer.
216  * NULL: no preferred size of the window buffer.
217  */
219 
220  /**
221  * Prepare window buffer message.
222  *
223  * Device requests to prepare a window buffer for rendering.
224  * Exact meaning is device- and application-dependent.
225  * Message is sent before rendering of each frame.
226  *
227  * data: NULL.
228  */
230 
231  /**
232  * Display window buffer message.
233  *
234  * Device requests to display a window buffer.
235  * Message is sent when new frame is ready to be displayed.
236  * Usually buffers need to be swapped in handler of this message.
237  *
238  * data: NULL.
239  */
241 
242  /**
243  * Destroy window buffer message.
244  *
245  * Device requests to destroy a window buffer.
246  * Message is sent when device is about to be destroyed and window
247  * buffer is not required anymore.
248  *
249  * data: NULL.
250  */
252 
253  /**
254  * Buffer fullness status messages.
255  *
256  * Device signals buffer overflow/underflow.
257  *
258  * data: NULL.
259  */
262 
263  /**
264  * Buffer readable/writable.
265  *
266  * Device informs that buffer is readable/writable.
267  * When possible, device informs how many bytes can be read/write.
268  *
269  * @warning Device may not inform when number of bytes than can be read/write changes.
270  *
271  * data: int64_t: amount of bytes available to read/write.
272  * NULL: amount of bytes available to read/write is not known.
273  */
276 
277  /**
278  * Mute state change message.
279  *
280  * Device informs that mute state has changed.
281  *
282  * data: int: 0 for not muted state, non-zero for muted state.
283  */
285 
286  /**
287  * Volume level change message.
288  *
289  * Device informs that volume level has changed.
290  *
291  * data: double: new volume with range of 0.0 - 1.0.
292  */
294 };
295 
296 /**
297  * Send control message from application to device.
298  *
299  * @param s device context.
300  * @param type message type.
301  * @param data message data. Exact type depends on message type.
302  * @param data_size size of message data.
303  * @return >= 0 on success, negative on error.
304  * AVERROR(ENOSYS) when device doesn't implement handler of the message.
305  */
308  void *data, size_t data_size);
309 
310 /**
311  * Send control message from device to application.
312  *
313  * @param s device context.
314  * @param type message type.
315  * @param data message data. Can be NULL.
316  * @param data_size size of message data.
317  * @return >= 0 on success, negative on error.
318  * AVERROR(ENOSYS) when application doesn't implement handler of the message.
319  */
322  void *data, size_t data_size);
323 
324 #if FF_API_DEVICE_CAPABILITIES
325 /**
326  * Following API allows user to probe device capabilities (supported codecs,
327  * pixel formats, sample formats, resolutions, channel counts, etc).
328  * It is build on top op AVOption API.
329  * Queried capabilities make it possible to set up converters of video or audio
330  * parameters that fit to the device.
331  *
332  * List of capabilities that can be queried:
333  * - Capabilities valid for both audio and video devices:
334  * - codec: supported audio/video codecs.
335  * type: AV_OPT_TYPE_INT (AVCodecID value)
336  * - Capabilities valid for audio devices:
337  * - sample_format: supported sample formats.
338  * type: AV_OPT_TYPE_INT (AVSampleFormat value)
339  * - sample_rate: supported sample rates.
340  * type: AV_OPT_TYPE_INT
341  * - channels: supported number of channels.
342  * type: AV_OPT_TYPE_INT
343  * - channel_layout: supported channel layouts.
344  * type: AV_OPT_TYPE_INT64
345  * - Capabilities valid for video devices:
346  * - pixel_format: supported pixel formats.
347  * type: AV_OPT_TYPE_INT (AVPixelFormat value)
348  * - window_size: supported window sizes (describes size of the window size presented to the user).
349  * type: AV_OPT_TYPE_IMAGE_SIZE
350  * - frame_size: supported frame sizes (describes size of provided video frames).
351  * type: AV_OPT_TYPE_IMAGE_SIZE
352  * - fps: supported fps values
353  * type: AV_OPT_TYPE_RATIONAL
354  *
355  * Value of the capability may be set by user using av_opt_set() function
356  * and AVDeviceCapabilitiesQuery object. Following queries will
357  * limit results to the values matching already set capabilities.
358  * For example, setting a codec may impact number of formats or fps values
359  * returned during next query. Setting invalid value may limit results to zero.
360  *
361  * Example of the usage basing on opengl output device:
362  *
363  * @code
364  * AVFormatContext *oc = NULL;
365  * AVDeviceCapabilitiesQuery *caps = NULL;
366  * AVOptionRanges *ranges;
367  * int ret;
368  *
369  * if ((ret = avformat_alloc_output_context2(&oc, NULL, "opengl", NULL)) < 0)
370  * goto fail;
371  * if (avdevice_capabilities_create(&caps, oc, NULL) < 0)
372  * goto fail;
373  *
374  * //query codecs
375  * if (av_opt_query_ranges(&ranges, caps, "codec", AV_OPT_MULTI_COMPONENT_RANGE)) < 0)
376  * goto fail;
377  * //pick codec here and set it
378  * av_opt_set(caps, "codec", AV_CODEC_ID_RAWVIDEO, 0);
379  *
380  * //query format
381  * if (av_opt_query_ranges(&ranges, caps, "pixel_format", AV_OPT_MULTI_COMPONENT_RANGE)) < 0)
382  * goto fail;
383  * //pick format here and set it
384  * av_opt_set(caps, "pixel_format", AV_PIX_FMT_YUV420P, 0);
385  *
386  * //query and set more capabilities
387  *
388  * fail:
389  * //clean up code
390  * avdevice_capabilities_free(&query, oc);
391  * avformat_free_context(oc);
392  * @endcode
393  */
394 
395 /**
396  * Structure describes device capabilities.
397  *
398  * It is used by devices in conjunction with av_device_capabilities AVOption table
399  * to implement capabilities probing API based on AVOption API. Should not be used directly.
400  */
408  int channels;
409  int64_t channel_layout;
416 
417 /**
418  * AVOption table used by devices to implement device capabilities API. Should not be used by a user.
419  */
421 extern const AVOption av_device_capabilities[];
422 
423 /**
424  * Initialize capabilities probing API based on AVOption API.
425  *
426  * avdevice_capabilities_free() must be called when query capabilities API is
427  * not used anymore.
428  *
429  * @param[out] caps Device capabilities data. Pointer to a NULL pointer must be passed.
430  * @param s Context of the device.
431  * @param device_options An AVDictionary filled with device-private options.
432  * On return this parameter will be destroyed and replaced with a dict
433  * containing options that were not found. May be NULL.
434  * The same options must be passed later to avformat_write_header() for output
435  * devices or avformat_open_input() for input devices, or at any other place
436  * that affects device-private options.
437  *
438  * @return >= 0 on success, negative otherwise.
439  */
442  AVDictionary **device_options);
443 
444 /**
445  * Free resources created by avdevice_capabilities_create()
446  *
447  * @param caps Device capabilities data to be freed.
448  * @param s Context of the device.
449  */
452 #endif
453 
454 /**
455  * Structure describes basic parameters of the device.
456  */
457 typedef struct AVDeviceInfo {
458  char *device_name; /**< device name, format depends on device */
459  char *device_description; /**< human friendly name */
460 } AVDeviceInfo;
461 
462 /**
463  * List of devices.
464  */
465 typedef struct AVDeviceInfoList {
466  AVDeviceInfo **devices; /**< list of autodetected devices */
467  int nb_devices; /**< number of autodetected devices */
468  int default_device; /**< index of default device or -1 if no default */
470 
471 /**
472  * List devices.
473  *
474  * Returns available device names and their parameters.
475  *
476  * @note: Some devices may accept system-dependent device names that cannot be
477  * autodetected. The list returned by this function cannot be assumed to
478  * be always completed.
479  *
480  * @param s device context.
481  * @param[out] device_list list of autodetected devices.
482  * @return count of autodetected devices, negative on error.
483  */
484 int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list);
485 
486 /**
487  * Convenient function to free result of avdevice_list_devices().
488  *
489  * @param devices device list to be freed.
490  */
491 void avdevice_free_list_devices(AVDeviceInfoList **device_list);
492 
493 /**
494  * List devices.
495  *
496  * Returns available device names and their parameters.
497  * These are convinient wrappers for avdevice_list_devices().
498  * Device context is allocated and deallocated internally.
499  *
500  * @param device device format. May be NULL if device name is set.
501  * @param device_name device name. May be NULL if device format is set.
502  * @param device_options An AVDictionary filled with device-private options. May be NULL.
503  * The same options must be passed later to avformat_write_header() for output
504  * devices or avformat_open_input() for input devices, or at any other place
505  * that affects device-private options.
506  * @param[out] device_list list of autodetected devices
507  * @return count of autodetected devices, negative on error.
508  * @note device argument takes precedence over device_name when both are set.
509  */
510 int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name,
511  AVDictionary *device_options, AVDeviceInfoList **device_list);
512 int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name,
513  AVDictionary *device_options, AVDeviceInfoList **device_list);
514 
515 /**
516  * @}
517  */
518 
519 #endif /* AVDEVICE_AVDEVICE_H */
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
AVDeviceCapabilitiesQuery::pixel_format
enum AVPixelFormat pixel_format
Definition: avdevice.h:406
AV_APP_TO_DEV_MUTE
@ AV_APP_TO_DEV_MUTE
Mute control messages.
Definition: avdevice.h:179
avdevice_list_input_sources
int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
List devices.
Definition: avdevice.c:123
opt.h
AV_APP_TO_DEV_SET_VOLUME
@ AV_APP_TO_DEV_SET_VOLUME
Volume control message.
Definition: avdevice.h:168
AV_DEV_TO_APP_BUFFER_OVERFLOW
@ AV_DEV_TO_APP_BUFFER_OVERFLOW
Buffer fullness status messages.
Definition: avdevice.h:260
AVDeviceCapabilitiesQuery::device_context
AVFormatContext * device_context
Definition: avdevice.h:403
AVDeviceInfo::device_name
char * device_name
device name, format depends on device
Definition: avdevice.h:458
AVDeviceCapabilitiesQuery
Following API allows user to probe device capabilities (supported codecs, pixel formats,...
Definition: avdevice.h:401
version.h
AVDeviceInfoList::nb_devices
int nb_devices
number of autodetected devices
Definition: avdevice.h:467
AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
@ AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
Prepare window buffer message.
Definition: avdevice.h:229
avdevice_list_devices
int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list)
List devices.
Definition: avdevice.c:82
av_device_capabilities
const attribute_deprecated AVOption av_device_capabilities[]
AVOption table used by devices to implement device capabilities API.
Definition: avdevice.c:31
avdevice_capabilities_create
attribute_deprecated int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s, AVDictionary **device_options)
Initialize capabilities probing API based on AVOption API.
Definition: avdevice.c:70
AVDeviceCapabilitiesQuery::sample_format
enum AVSampleFormat sample_format
Definition: avdevice.h:405
AVOption
AVOption.
Definition: opt.h:248
AVAppToDevMessageType
AVAppToDevMessageType
Message types used by avdevice_app_to_dev_control_message().
Definition: avdevice.h:119
data
const char data[16]
Definition: mxf.c:142
avdevice_dev_to_app_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.
Definition: avdevice.c:61
AV_APP_TO_DEV_PAUSE
@ AV_APP_TO_DEV_PAUSE
Request pause/play.
Definition: avdevice.h:155
AVDictionary
Definition: dict.c:30
AV_APP_TO_DEV_GET_MUTE
@ AV_APP_TO_DEV_GET_MUTE
Definition: avdevice.h:192
AVDeviceCapabilitiesQuery::window_width
int window_width
Definition: avdevice.h:410
AV_APP_TO_DEV_WINDOW_REPAINT
@ AV_APP_TO_DEV_WINDOW_REPAINT
Repaint request message.
Definition: avdevice.h:144
AV_DEV_TO_APP_MUTE_STATE_CHANGED
@ AV_DEV_TO_APP_MUTE_STATE_CHANGED
Mute state change message.
Definition: avdevice.h:284
av_output_video_device_next
AVOutputFormat * av_output_video_device_next(AVOutputFormat *d)
Video output devices iterator.
Definition: alldevices.c:138
type
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
Definition: writing_filters.txt:86
AV_APP_TO_DEV_UNMUTE
@ AV_APP_TO_DEV_UNMUTE
Definition: avdevice.h:180
AVDeviceInfoList::devices
AVDeviceInfo ** devices
list of autodetected devices
Definition: avdevice.h:466
AVInputFormat
Definition: avformat.h:640
AV_APP_TO_DEV_TOGGLE_PAUSE
@ AV_APP_TO_DEV_TOGGLE_PAUSE
Definition: avdevice.h:157
AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER
@ AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER
Display window buffer message.
Definition: avdevice.h:240
s
#define s(width, name)
Definition: cbs_vp9.c:257
AV_DEV_TO_APP_CREATE_WINDOW_BUFFER
@ AV_DEV_TO_APP_CREATE_WINDOW_BUFFER
Create window buffer message.
Definition: avdevice.h:218
avdevice_license
const char * avdevice_license(void)
Return the libavdevice license.
Definition: avdevice.c:47
AVFormatContext
Format I/O context.
Definition: avformat.h:1232
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:67
AV_APP_TO_DEV_GET_VOLUME
@ AV_APP_TO_DEV_GET_VOLUME
Get volume/mute messages.
Definition: avdevice.h:191
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
avdevice_configuration
const char * avdevice_configuration(void)
Return the libavdevice build-time configuration.
Definition: avdevice.c:42
avdevice_capabilities_free
attribute_deprecated void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s)
Free resources created by avdevice_capabilities_create()
Definition: avdevice.c:76
av_output_audio_device_next
AVOutputFormat * av_output_audio_device_next(AVOutputFormat *d)
Audio output devices iterator.
Definition: alldevices.c:133
AVCodecID
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: codec_id.h:46
av_input_video_device_next
AVInputFormat * av_input_video_device_next(AVInputFormat *d)
Video input devices iterator.
Definition: alldevices.c:128
AVDeviceCapabilitiesQuery::frame_width
int frame_width
Definition: avdevice.h:412
AVDeviceRect::y
int y
y coordinate of top left corner
Definition: avdevice.h:111
AV_APP_TO_DEV_NONE
@ AV_APP_TO_DEV_NONE
Dummy message.
Definition: avdevice.h:123
AV_DEV_TO_APP_BUFFER_READABLE
@ AV_DEV_TO_APP_BUFFER_READABLE
Buffer readable/writable.
Definition: avdevice.h:274
AV_APP_TO_DEV_PLAY
@ AV_APP_TO_DEV_PLAY
Definition: avdevice.h:156
MKBETAG
#define MKBETAG(a, b, c, d)
Definition: common.h:479
AVDeviceInfo
Structure describes basic parameters of the device.
Definition: avdevice.h:457
avdevice_free_list_devices
void avdevice_free_list_devices(AVDeviceInfoList **device_list)
Convenient function to free result of avdevice_list_devices().
Definition: avdevice.c:145
attribute_deprecated
#define attribute_deprecated
Definition: attributes.h:104
av_input_audio_device_next
AVInputFormat * av_input_audio_device_next(AVInputFormat *d)
Audio input devices iterator.
Definition: alldevices.c:123
AV_APP_TO_DEV_TOGGLE_MUTE
@ AV_APP_TO_DEV_TOGGLE_MUTE
Definition: avdevice.h:181
AVDevToAppMessageType
AVDevToAppMessageType
Message types used by avdevice_dev_to_app_control_message().
Definition: avdevice.h:198
AVDeviceInfo::device_description
char * device_description
human friendly name
Definition: avdevice.h:459
avdevice_list_output_sinks
int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
Definition: avdevice.c:134
AVDeviceRect::x
int x
x coordinate of top left corner
Definition: avdevice.h:110
avdevice_version
unsigned avdevice_version(void)
Return the LIBAVDEVICE_VERSION_INT constant.
Definition: avdevice.c:36
AVDeviceRect
Definition: avdevice.h:109
log.h
AVOutputFormat
Definition: avformat.h:490
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
AVDeviceCapabilitiesQuery::frame_height
int frame_height
Definition: avdevice.h:413
AVDeviceCapabilitiesQuery::channel_layout
int64_t channel_layout
Definition: avdevice.h:409
AV_APP_TO_DEV_WINDOW_SIZE
@ AV_APP_TO_DEV_WINDOW_SIZE
Window size change message.
Definition: avdevice.h:134
AVDeviceCapabilitiesQuery::channels
int channels
Definition: avdevice.h:408
AVDeviceInfoList
List of devices.
Definition: avdevice.h:465
avformat.h
dict.h
AVDeviceRect::height
int height
height
Definition: avdevice.h:113
AVDeviceCapabilitiesQuery::av_class
const AVClass * av_class
Definition: avdevice.h:402
AVDeviceInfoList::default_device
int default_device
index of default device or -1 if no default
Definition: avdevice.h:468
avdevice_app_to_dev_control_message
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.
Definition: avdevice.c:53
AVDeviceCapabilitiesQuery::sample_rate
int sample_rate
Definition: avdevice.h:407
AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED
@ AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED
Volume level change message.
Definition: avdevice.h:293
AV_DEV_TO_APP_BUFFER_WRITABLE
@ AV_DEV_TO_APP_BUFFER_WRITABLE
Definition: avdevice.h:275
AV_DEV_TO_APP_NONE
@ AV_DEV_TO_APP_NONE
Dummy message.
Definition: avdevice.h:202
AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER
@ AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER
Destroy window buffer message.
Definition: avdevice.h:251
AV_DEV_TO_APP_BUFFER_UNDERFLOW
@ AV_DEV_TO_APP_BUFFER_UNDERFLOW
Definition: avdevice.h:261
AVDeviceCapabilitiesQuery::fps
AVRational fps
Definition: avdevice.h:414
AVDeviceCapabilitiesQuery::window_height
int window_height
Definition: avdevice.h:411
AVDeviceRect::width
int width
width
Definition: avdevice.h:112
avdevice_register_all
void avdevice_register_all(void)
Initialize libavdevice and register all the input and output devices.
Definition: alldevices.c:66
AVDeviceCapabilitiesQuery::codec
enum AVCodecID codec
Definition: avdevice.h:404