diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/xine.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/include/xine.h b/include/xine.h index 035f4ef7f..b96fdcf84 100644 --- a/include/xine.h +++ b/include/xine.h @@ -158,6 +158,7 @@ void xine_close_video_driver (xine_t *self, xine_video_port_t *driver) XINE_PRO #define XINE_VISUAL_TYPE_CACA 8 #define XINE_VISUAL_TYPE_MACOSX 9 #define XINE_VISUAL_TYPE_XCB 11 +#define XINE_VISUAL_TYPE_RAW 12 /* * free all resources, close all plugins, close engine. @@ -1053,6 +1054,8 @@ const char *xine_get_post_plugin_description (xine_t *self, /* get lists of available audio and video output plugins */ const char *const *xine_list_audio_output_plugins (xine_t *self) XINE_PROTECTED; const char *const *xine_list_video_output_plugins (xine_t *self) XINE_PROTECTED; +/* typemask is (1ULL << XINE_VISUAL_TYPE_FOO) | ... */ +const char *const *xine_list_video_output_plugins_typed (xine_t *self, uint64_t typemask) XINE_PROTECTED; /* get list of available demultiplexor plugins */ const char *const *xine_list_demuxer_plugins(xine_t *self) XINE_PROTECTED; @@ -1262,6 +1265,76 @@ typedef struct { } xcb_visual_t; +/************************************************** + * XINE_VO_RAW struct definitions + *************************************************/ +/* frame_format definitions */ +#define XINE_VORAW_YV12 1 +#define XINE_VORAW_YUY2 2 +#define XINE_VORAW_RGB 4 + +/* maximum number of overlays the raw driver can handle */ +#define XINE_VORAW_MAX_OVL 16 + +/* raw_overlay_t struct used in raw_overlay_cb callback */ +typedef struct { + uint8_t *ovl_rgba; + int ovl_w, ovl_h; /* overlay's width and height */ + int ovl_x, ovl_y; /* overlay's top-left display position */ +} raw_overlay_t; + +/* this is the visual data struct any raw gui + * must supply to the xine_open_video_driver call + * ("data" parameter) + */ +typedef struct { + void *user_data; + + /* OR'ed frame_format + * a frontend must at least support rgb + * a frontend supporting yuv must support both yv12 and yuy2 + * then possible combinations are: + * XINE_VORAW_RGB ( rgb ) + * XINE_VORAW_YV12|XINE_VORAW_YUY2|XINE_VORAW_RGB ( yv12, yuy2 and rgb ) + * + * Be aware that rgb requires more cpu than yuv, + * so avoid its usage for video playback. + * However, it's usefull for single frame capture (e.g. thumbs) + */ + int supported_formats; + + /* raw output callback + * this will be called by the video driver for every frame + * + * If frame_format==XINE_VORAW_YV12, data0 points to frame_width*frame_height Y values + * data1 points to (frame_width/2)*(frame_height/2) U values + * data2 points to (frame_width/2)*(frame_height/2) V values + * + * If frame_format==XINE_VORAW_YUY2, data0 points to frame_width*frame_height*2 YU/Y²V values + * data1 is NULL + * data2 is NULL + * + * If frame_format==XINE_VORAW_RGB, data0 points to frame_width*frame_height*3 RGB values + * data1 is NULL + * data2 is NULL + */ + void (*raw_output_cb) (void *user_data, int frame_format, + int frame_width, int frame_height, + double frame_aspect, + void *data0, void *data1, void *data2); + + /* raw overlay callback + * this will be called by the video driver for every new overlay state + * overlays_array points to an array of num_ovl raw_overlay_t + * Note that num_ovl can be 0, meaning "end of overlay display" + * num_ovl is at most XINE_VORAW_MAX_OVL */ + void (*raw_overlay_cb) (void *user_data, int num_ovl, + raw_overlay_t *overlays_array); +} raw_visual_t; +/********************************************** + * end of vo_raw defs + *********************************************/ + /* * this is the visual data struct any fb gui * may supply to the xine_open_video_driver call |