World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
avdevice.h
См. документацию.
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 
71 void avdevice_register_all(void);
72 
81 
90 
99 
108 
109 typedef struct AVDeviceRect {
110  int x;
111  int y;
112  int width;
113  int height;
114 } AVDeviceRect;
115 
123  AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'),
124 
134  AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'),
135 
144  AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A'),
145 
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 
168  AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'),
169 
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 
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 
202  AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'),
203 
218  AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'),
219 
229  AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'),
230 
240  AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'),
241 
251  AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S'),
252 
260  AV_DEV_TO_APP_BUFFER_OVERFLOW = MKBETAG('B','O','F','L'),
261  AV_DEV_TO_APP_BUFFER_UNDERFLOW = MKBETAG('B','U','F','L'),
262 
274  AV_DEV_TO_APP_BUFFER_READABLE = MKBETAG('B','R','D',' '),
275  AV_DEV_TO_APP_BUFFER_WRITABLE = MKBETAG('B','W','R',' '),
276 
284  AV_DEV_TO_APP_MUTE_STATE_CHANGED = MKBETAG('C','M','U','T'),
285 
293  AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED = MKBETAG('C','V','O','L'),
294 };
295 
308  void *data, size_t data_size);
309 
322  void *data, size_t data_size);
323 
407  int channels;
415 
419 extern const AVOption av_device_capabilities[];
420 
439  AVDictionary **device_options);
440 
448 
452 typedef struct AVDeviceInfo {
453  char *device_name;
455 } AVDeviceInfo;
456 
460 typedef struct AVDeviceInfoList {
465 
479 int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list);
480 
486 void avdevice_free_list_devices(AVDeviceInfoList **device_list);
487 
505 int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name,
506  AVDictionary *device_options, AVDeviceInfoList **device_list);
507 int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name,
508  AVDictionary *device_options, AVDeviceInfoList **device_list);
509 
514 #endif /* AVDEVICE_AVDEVICE_H */
AVDeviceRect::width
int width
Definition: avdevice.h:112
AVInputFormat
Definition: avformat.h:640
AVPixelFormat
AVPixelFormat
Definition: pixfmt.h:64
s
GLdouble s
Definition: SDL_opengl.h:2063
AV_APP_TO_DEV_MUTE
@ AV_APP_TO_DEV_MUTE
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)
opt.h
AV_APP_TO_DEV_SET_VOLUME
@ AV_APP_TO_DEV_SET_VOLUME
Definition: avdevice.h:168
AV_DEV_TO_APP_BUFFER_OVERFLOW
@ AV_DEV_TO_APP_BUFFER_OVERFLOW
Definition: avdevice.h:260
AVDeviceRect
Definition: avdevice.h:109
AVDeviceInfoList
Definition: avdevice.h:460
AVDeviceCapabilitiesQuery::sample_rate
int sample_rate
Definition: avdevice.h:406
AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
@ AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
Definition: avdevice.h:229
avdevice_list_devices
int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list)
AVAppToDevMessageType
AVAppToDevMessageType
Definition: avdevice.h:119
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)
AV_APP_TO_DEV_PAUSE
@ AV_APP_TO_DEV_PAUSE
Definition: avdevice.h:155
AV_APP_TO_DEV_GET_MUTE
@ AV_APP_TO_DEV_GET_MUTE
Definition: avdevice.h:192
AV_APP_TO_DEV_WINDOW_REPAINT
@ AV_APP_TO_DEV_WINDOW_REPAINT
Definition: avdevice.h:144
AV_DEV_TO_APP_MUTE_STATE_CHANGED
@ AV_DEV_TO_APP_MUTE_STATE_CHANGED
Definition: avdevice.h:284
AVDeviceCapabilitiesQuery::window_width
int window_width
Definition: avdevice.h:409
AVDeviceCapabilitiesQuery::channels
int channels
Definition: avdevice.h:407
AVDeviceInfoList
struct AVDeviceInfoList AVDeviceInfoList
int64_t
__int64 int64_t
Definition: alext.h:31
av_output_video_device_next
AVOutputFormat * av_output_video_device_next(AVOutputFormat *d)
AVDeviceCapabilitiesQuery
struct AVDeviceCapabilitiesQuery AVDeviceCapabilitiesQuery
AV_APP_TO_DEV_UNMUTE
@ AV_APP_TO_DEV_UNMUTE
Definition: avdevice.h:180
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
Definition: avdevice.h:240
AV_DEV_TO_APP_CREATE_WINDOW_BUFFER
@ AV_DEV_TO_APP_CREATE_WINDOW_BUFFER
Definition: avdevice.h:218
avdevice_capabilities_create
int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s, AVDictionary **device_options)
AVDeviceInfo
struct AVDeviceInfo AVDeviceInfo
AVOption
Definition: opt.h:246
avdevice_license
const char * avdevice_license(void)
AVDeviceCapabilitiesQuery::codec
enum AVCodecID codec
Definition: avdevice.h:403
AVDeviceInfoList::default_device
int default_device
Definition: avdevice.h:463
AV_APP_TO_DEV_GET_VOLUME
@ AV_APP_TO_DEV_GET_VOLUME
Definition: avdevice.h:191
log.h
avdevice_configuration
const char * avdevice_configuration(void)
AVDeviceCapabilitiesQuery
Definition: avdevice.h:400
av_output_audio_device_next
AVOutputFormat * av_output_audio_device_next(AVOutputFormat *d)
AVCodecID
AVCodecID
Definition: avcodec.h:215
av_input_video_device_next
AVInputFormat * av_input_video_device_next(AVInputFormat *d)
AV_APP_TO_DEV_NONE
@ AV_APP_TO_DEV_NONE
Definition: avdevice.h:123
type
EGLenum type
Definition: SDL_egl.h:850
AV_DEV_TO_APP_BUFFER_READABLE
@ AV_DEV_TO_APP_BUFFER_READABLE
Definition: avdevice.h:274
AV_APP_TO_DEV_PLAY
@ AV_APP_TO_DEV_PLAY
Definition: avdevice.h:156
AVDeviceCapabilitiesQuery::fps
AVRational fps
Definition: avdevice.h:413
AVDeviceRect
struct AVDeviceRect AVDeviceRect
AVDeviceCapabilitiesQuery::sample_format
enum AVSampleFormat sample_format
Definition: avdevice.h:404
AVClass
Definition: log.h:67
avdevice_free_list_devices
void avdevice_free_list_devices(AVDeviceInfoList **device_list)
av_input_audio_device_next
AVInputFormat * av_input_audio_device_next(AVInputFormat *d)
AVDeviceCapabilitiesQuery::window_height
int window_height
Definition: avdevice.h:410
AVDeviceInfoList::nb_devices
int nb_devices
Definition: avdevice.h:462
AV_APP_TO_DEV_TOGGLE_MUTE
@ AV_APP_TO_DEV_TOGGLE_MUTE
Definition: avdevice.h:181
AVDeviceCapabilitiesQuery::pixel_format
enum AVPixelFormat pixel_format
Definition: avdevice.h:405
AVDevToAppMessageType
AVDevToAppMessageType
Definition: avdevice.h:198
avdevice_list_output_sinks
int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name, AVDictionary *device_options, AVDeviceInfoList **device_list)
av_device_capabilities
const AVOption av_device_capabilities[]
avdevice_version
unsigned avdevice_version(void)
AVDeviceInfo::device_description
char * device_description
Definition: avdevice.h:454
AVDeviceCapabilitiesQuery::av_class
const AVClass * av_class
Definition: avdevice.h:401
AVSampleFormat
AVSampleFormat
Definition: samplefmt.h:58
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
AV_APP_TO_DEV_WINDOW_SIZE
@ AV_APP_TO_DEV_WINDOW_SIZE
Definition: avdevice.h:134
AVDeviceCapabilitiesQuery::frame_height
int frame_height
Definition: avdevice.h:412
avformat.h
dict.h
avdevice_capabilities_free
void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s)
AVDeviceCapabilitiesQuery::device_context
AVFormatContext * device_context
Definition: avdevice.h:402
AVDeviceRect::x
int x
Definition: avdevice.h:110
AVFormatContext
Definition: avformat.h:1344
AVDictionary
struct AVDictionary AVDictionary
Definition: dict.h:86
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)
AVDeviceInfo::device_name
char * device_name
Definition: avdevice.h:453
AVDeviceInfoList::devices
AVDeviceInfo ** devices
Definition: avdevice.h:461
AVRational
Definition: rational.h:58
AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED
@ AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED
Definition: avdevice.h:293
AVDeviceRect::y
int y
Definition: avdevice.h:111
AV_DEV_TO_APP_BUFFER_WRITABLE
@ AV_DEV_TO_APP_BUFFER_WRITABLE
Definition: avdevice.h:275
AVDeviceInfo
Definition: avdevice.h:452
AVDeviceCapabilitiesQuery::frame_width
int frame_width
Definition: avdevice.h:411
AV_DEV_TO_APP_NONE
@ AV_DEV_TO_APP_NONE
Definition: avdevice.h:202
AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER
@ AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER
Definition: avdevice.h:251
AVDeviceRect::height
int height
Definition: avdevice.h:113
AV_DEV_TO_APP_BUFFER_UNDERFLOW
@ AV_DEV_TO_APP_BUFFER_UNDERFLOW
Definition: avdevice.h:261
AVOutputFormat
Definition: avformat.h:495
avdevice_register_all
void avdevice_register_all(void)
AVDeviceCapabilitiesQuery::channel_layout
int64_t channel_layout
Definition: avdevice.h:408