Miam-Player  0.8.0
A nice music player
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 
48 #include "libavutil/log.h"
49 #include "libavutil/opt.h"
50 #include "libavutil/dict.h"
51 #include "libavformat/avformat.h"
52 
56 unsigned avdevice_version(void);
57 
61 const char *avdevice_configuration(void);
62 
66 const char *avdevice_license(void);
67 
72 void avdevice_register_all(void);
73 
82 
91 
100 
109 
110 typedef struct AVDeviceRect {
111  int x;
112  int y;
113  int width;
114  int height;
115 } AVDeviceRect;
116 
124  AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),
125 
135  AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),
136 
146 
156  AV_APP_TO_DEV_PAUSE = MKBETAG('P', 'A', 'U', ' '),
157  AV_APP_TO_DEV_PLAY = MKBETAG('P', 'L', 'A', 'Y'),
158  AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T'),
159 
169  AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'),
170 
180  AV_APP_TO_DEV_MUTE = MKBETAG(' ', 'M', 'U', 'T'),
181  AV_APP_TO_DEV_UNMUTE = MKBETAG('U', 'M', 'U', 'T'),
182  AV_APP_TO_DEV_TOGGLE_MUTE = MKBETAG('T', 'M', 'U', 'T'),
183 
192  AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'),
193  AV_APP_TO_DEV_GET_MUTE = MKBETAG('G', 'M', 'U', 'T'),
194 };
195 
203  AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),
204 
220 
231 
242 
253 
263 
277 
286 
295 };
296 
308  enum AVAppToDevMessageType type,
309  void *data, size_t data_size);
310 
322  enum AVDevToAppMessageType type,
323  void *data, size_t data_size);
324 
404  enum AVCodecID codec;
405  enum AVSampleFormat sample_format;
406  enum AVPixelFormat pixel_format;
408  int channels;
409  int64_t channel_layout;
416 
420 extern const AVOption av_device_capabilities[];
421 
440  AVDictionary **device_options);
441 
449 
453 typedef struct AVDeviceInfo {
454  char *device_name;
456 } AVDeviceInfo;
457 
461 typedef struct AVDeviceInfoList {
466 
480 int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list);
481 
487 void avdevice_free_list_devices(AVDeviceInfoList **device_list);
488 
506 int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name,
507  AVDictionary *device_options, AVDeviceInfoList **device_list);
508 int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name,
509  AVDictionary *device_options, AVDeviceInfoList **device_list);
510 
515 #endif /* AVDEVICE_AVDEVICE_H */
Definition: avformat.h:523
Definition: avdevice.h:135
const char * avdevice_configuration(void)
Definition: avdevice.h:145
const AVClass * av_class
Definition: avdevice.h:402
Definition: avdevice.h:157
AVOutputFormat * av_output_audio_device_next(AVOutputFormat *d)
Definition: avdevice.h:230
int height
Definition: avdevice.h:114
Definition: avdevice.h:203
void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s)
struct AVDeviceRect AVDeviceRect
Definition: avdevice.h:294
int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list)
int nb_devices
Definition: avdevice.h:463
Definition: avdevice.h:158
Definition: avdevice.h:261
Definition: avdevice.h:241
Definition: avformat.h:659
Definition: avdevice.h:219
Definition: avdevice.h:193
int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type, void *data, size_t data_size)
int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s, AVDictionary **device_options)
AVDevToAppMessageType
Definition: avdevice.h:199
void avdevice_free_list_devices(AVDeviceInfoList **device_list)
AVOutputFormat * av_output_video_device_next(AVOutputFormat *d)
Definition: avdevice.h:192
Definition: avdevice.h:276
AVDeviceInfo ** devices
Definition: avdevice.h:462
Definition: avdevice.h:453
Definition: opt.h:245
AVCodecID
Definition: avcodec.h:191
AVRational fps
Definition: avdevice.h:414
struct AVDictionary AVDictionary
Definition: dict.h:90
int channels
Definition: avdevice.h:408
Definition: avdevice.h:156
int window_width
Definition: avdevice.h:410
struct AVDeviceInfoList AVDeviceInfoList
Definition: avdevice.h:169
int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
Definition: avdevice.h:180
struct AVDeviceCapabilitiesQuery AVDeviceCapabilitiesQuery
int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
Definition: log.h:67
Definition: avdevice.h:181
struct AVDeviceInfo AVDeviceInfo
const AVOption av_device_capabilities[]
Definition: avdevice.h:124
Definition: avdevice.h:252
AVInputFormat * av_input_video_device_next(AVInputFormat *d)
AVSampleFormat
Definition: samplefmt.h:58
int frame_width
Definition: avdevice.h:412
AVFormatContext * device_context
Definition: avdevice.h:403
int window_height
Definition: avdevice.h:411
Definition: avdevice.h:182
Definition: avdevice.h:461
Definition: avdevice.h:110
AVInputFormat * av_input_audio_device_next(AVInputFormat *d)
const char * avdevice_license(void)
Definition: avdevice.h:285
char * device_description
Definition: avdevice.h:455
Definition: rational.h:58
Definition: avformat.h:1338
int x
Definition: avdevice.h:111
int sample_rate
Definition: avdevice.h:407
int64_t channel_layout
Definition: avdevice.h:409
void avdevice_register_all(void)
int frame_height
Definition: avdevice.h:413
int y
Definition: avdevice.h:112
#define MKBETAG(a, b, c, d)
Definition: common.h:343
unsigned avdevice_version(void)
Definition: avdevice.h:275
AVAppToDevMessageType
Definition: avdevice.h:120
Definition: avdevice.h:262
char * device_name
Definition: avdevice.h:454
Definition: avdevice.h:401
int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type, void *data, size_t data_size)
AVPixelFormat
Definition: pixfmt.h:60
int width
Definition: avdevice.h:113
int default_device
Definition: avdevice.h:464