diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/xine.h | 28 | ||||
-rw-r--r-- | include/xine/osd.h | 34 | ||||
-rw-r--r-- | include/xine/video_out.h | 17 |
3 files changed, 76 insertions, 3 deletions
diff --git a/include/xine.h b/include/xine.h index 613850b09..b4573bf73 100644 --- a/include/xine.h +++ b/include/xine.h @@ -2077,8 +2077,10 @@ void xine_event_send (xine_stream_t *stream, const xine_event_t *event) XINE_PRO /* yellow text, black border, transparent background */ #define XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3 -#define XINE_OSD_CAP_FREETYPE2 0x0001 /* freetype2 support compiled in */ -#define XINE_OSD_CAP_UNSCALED 0x0002 /* unscaled overlays supp. by vo drv */ +#define XINE_OSD_CAP_FREETYPE2 0x0001 /* freetype2 support compiled in */ +#define XINE_OSD_CAP_UNSCALED 0x0002 /* unscaled overlays supp. by vo drv */ +#define XINE_OSD_CAP_CUSTOM_EXTENT 0x0004 /* hardware scaled to match video output window */ +#define XINE_OSD_CAP_ARGB_LAYER 0x0008 /* supports separate true color layer */ typedef struct xine_osd_s xine_osd_t; @@ -2143,6 +2145,28 @@ void xine_osd_get_palette (xine_osd_t *self, uint32_t *color, void xine_osd_set_palette (xine_osd_t *self, const uint32_t *const color, const uint8_t *const trans ) XINE_PROTECTED; + +/* + * set an argb buffer to be blended into video + * the buffer must exactly match the osd dimensions + * and stay valid while the osd is on screen. pass + * a NULL pointer to safely remove the buffer from + * the osd layer. only the dirty area will be + * updated on screen. for convinience the whole + * osd object will be considered dirty when setting + * a different buffer pointer. + * see also XINE_OSD_CAP_ARGB_LAYER + */ +void xine_osd_set_argb_buffer(xine_osd_t *self, uint32_t *argb_buffer, + int dirty_x, int dirty_y, int dirty_width, int dirty_height) XINE_PROTECTED; + +/* + * define extent of reference coordinate system + * for video resolution independent osds. + * see also XINE_OSD_CAP_CUSTOM_EXTENT + */ +void xine_osd_set_extent(xine_osd_t *self, int extent_width, int extent_height) XINE_PROTECTED; + /* * close osd rendering engine * loaded fonts are unloaded diff --git a/include/xine/osd.h b/include/xine/osd.h index de924a1ae..b22c02996 100644 --- a/include/xine/osd.h +++ b/include/xine/osd.h @@ -40,7 +40,11 @@ struct osd_object_s { int width, height; /* work area dimentions */ uint8_t *area; /* work area */ + int area_touched; /* work area was used for painting */ int display_x,display_y; /* where to display it in screen */ + + /* extent of reference coordinate system */ + int extent_width, extent_height; /* clipping box inside work area */ int x1, y1; @@ -57,6 +61,12 @@ struct osd_object_s { osd_font_t *font; osd_ft2context_t *ft2; + + /* this holds an optional ARGB overlay, which + * is only be used by supported video_out modules. + * right now this is only vdpau */ + argb_layer_t argb_layer; + int32_t handle; }; @@ -205,7 +215,29 @@ struct osd_renderer_s { * see xine.h for defined XINE_OSD_CAP_ values. */ uint32_t (*get_capabilities) (osd_object_t *osd); - + + /* + * define extent of reference coordinate system for video + * resolution independent osds. both sizes must be > 0 to + * take effect. otherwise, video resolution will be used. + */ + void (*set_extent) (osd_object_t *osd, int extent_width, int extent_height); + + /* + * set an argb buffer to be blended into video + * the buffer must exactly match the osd dimensions + * and stay valid while the osd is on screen. pass + * a NULL pointer to safely remove the buffer from + * the osd layer. only the dirty area will be + * updated on screen. for convinience the whole + * osd object will be considered dirty when setting + * a different buffer pointer. + * see also XINE_OSD_CAP_ARGB_LAYER + */ + void (*set_argb_buffer) (osd_object_t *osd, uint32_t *argb_buffer, + int dirty_x, int dirty_y, int dirty_width, int dirty_height); + + /* private stuff */ pthread_mutex_t osd_mutex; diff --git a/include/xine/video_out.h b/include/xine/video_out.h index 7b3c26497..cd32fd22f 100644 --- a/include/xine/video_out.h +++ b/include/xine/video_out.h @@ -298,6 +298,8 @@ struct xine_video_port_s { #define VO_CAP_AUTOPAINT_COLORKEY 0x00200000 #define VO_CAP_ZOOM_X 0x00400000 #define VO_CAP_ZOOM_Y 0x00800000 +#define VO_CAP_CUSTOM_EXTENT_OVERLAY 0x01000000 /* driver can blend custom extent overlay to output extent */ +#define VO_CAP_ARGB_LAYER_OVERLAY 0x02000000 /* driver supports true color overlay */ /* * vo_driver_s contains the functions every display driver @@ -426,6 +428,14 @@ typedef struct rle_elem_s { uint16_t color; } rle_elem_t; +typedef struct argb_layer_s { + pthread_mutex_t mutex; + uint32_t *buffer; + /* dirty area */ + int x1, y1; + int x2, y2; +} argb_layer_t; + struct vo_overlay_s { rle_elem_t *rle; /* rle code buffer */ @@ -435,6 +445,10 @@ struct vo_overlay_s { int y; /* y start of subpicture area */ int width; /* width of subpicture area */ int height; /* height of subpicture area */ + + /* extent of reference coordinate system */ + int extent_width; + int extent_height; uint32_t color[OVL_PALETTE_SIZE]; /* color lookup table */ uint8_t trans[OVL_PALETTE_SIZE]; /* mixer key table */ @@ -450,6 +464,9 @@ struct vo_overlay_s { int hili_rgb_clut; /* true if clut was converted to rgb */ int unscaled; /* true if it should be blended unscaled */ + + + argb_layer_t *argb_layer; }; |