FFmpeg
|
Main libavdevice API header. More...
Go to the source code of this file.
Data Structures | |
struct | AVDeviceRect |
struct | AVDeviceInfo |
Structure describes basic parameters of the device. More... | |
struct | AVDeviceInfoList |
List of devices. More... | |
Enumerations | |
enum | AVAppToDevMessageType { AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'), AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'), AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A') } |
Message types used by avdevice_app_to_dev_control_message(). More... | |
enum | AVDevToAppMessageType { AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'), AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'), AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'), AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'), AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S') } |
Message types used by avdevice_dev_to_app_control_message(). More... | |
Functions | |
unsigned | avdevice_version (void) |
Return the LIBAVDEVICE_VERSION_INT constant. | |
const char * | avdevice_configuration (void) |
Return the libavdevice build-time configuration. | |
const char * | avdevice_license (void) |
Return the libavdevice license. | |
void | avdevice_register_all (void) |
Initialize libavdevice and register all the input and output 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. | |
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. | |
int | avdevice_list_devices (struct AVFormatContext *s, AVDeviceInfoList **device_list) |
List devices. | |
void | avdevice_free_list_devices (AVDeviceInfoList **device_list) |
Convinient function to free result of avdevice_list_devices(). | |
Main libavdevice API header.
Definition in file avdevice.h.
Message types used by avdevice_app_to_dev_control_message().
AV_APP_TO_DEV_NONE |
Dummy message. |
AV_APP_TO_DEV_WINDOW_SIZE |
Window size change message. Message is sent to the device every time the application changes the size of the window device renders to. Message should also be sent right after window is created. data: AVDeviceRect: new window size. |
AV_APP_TO_DEV_WINDOW_REPAINT |
Repaint request message. Message is sent to the device when window have to be rapainted. data: AVDeviceRect: area required to be repainted. NULL: whole area is required to be repainted. |
Definition at line 79 of file avdevice.h.
Message types used by avdevice_dev_to_app_control_message().
AV_DEV_TO_APP_NONE |
Dummy message. |
AV_DEV_TO_APP_CREATE_WINDOW_BUFFER |
Create window buffer message. Device requests to create a window buffer. Exact meaning is device- and application-dependent. Message is sent before rendering first frame and all one-shot initializations should be done here. Application is allowed to ignore preferred window buffer size.
data: AVDeviceRect: preferred size of the window buffer. NULL: no preferred size of the window buffer. |
AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER |
Prepare window buffer message. Device requests to prepare a window buffer for rendering. Exact meaning is device- and application-dependent. Message is sent before rendering of each frame. data: NULL. |
AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER |
Display window buffer message. Device requests to display a window buffer. Message is sent when new frame is ready to be displyed. Usually buffers need to be swapped in handler of this message. data: NULL. |
AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER |
Destroy window buffer message. Device requests to destroy a window buffer. Message is sent when device is about to be destroyed and window buffer is not required anymore. data: NULL. |
Definition at line 110 of file avdevice.h.
unsigned avdevice_version | ( | void | ) |
Return the LIBAVDEVICE_VERSION_INT constant.
Definition at line 23 of file avdevice.c.
const char* avdevice_configuration | ( | void | ) |
Return the libavdevice build-time configuration.
Definition at line 29 of file avdevice.c.
const char* avdevice_license | ( | void | ) |
Return the libavdevice license.
Definition at line 34 of file avdevice.c.
Initialize libavdevice and register all the input and output devices.
Definition at line 40 of file alldevices.c.
Referenced by main().
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.
s | device context. |
type | message type. |
data | message data. Exact type depends on message type. |
data_size | size of message data. |
Definition at line 40 of file avdevice.c.
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.
s | device context. |
type | message type. |
data | message data. Can be NULL. |
data_size | size of message data. |
Definition at line 48 of file avdevice.c.
Referenced by opengl_create_window(), opengl_draw(), opengl_release_window(), opengl_resize(), opengl_write_header(), and opengl_write_trailer().
int avdevice_list_devices | ( | struct AVFormatContext * | s, |
AVDeviceInfoList ** | device_list | ||
) |
List devices.
Returns available device names and their parameters.
s | device context. | |
[out] | device_list | list of autodetected devices. |
Definition at line 56 of file avdevice.c.
void avdevice_free_list_devices | ( | AVDeviceInfoList ** | device_list | ) |
Convinient function to free result of avdevice_list_devices().
devices | device list to be freed. |
Definition at line 74 of file avdevice.c.