summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/osd.c15
-rw-r--r--src/xine-engine/osd.h13
-rw-r--r--src/xine-engine/video_out.h2
-rw-r--r--src/xine-engine/xine_interface.c5
4 files changed, 35 insertions, 0 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index 05acd4779..0bc1574ca 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -152,6 +152,8 @@ static osd_object_t *XINE_MALLOC osd_new_object (osd_renderer_t *this, int width
osd->x2 = 0;
osd->y2 = 0;
+ osd->argb_buffer = NULL;
+
memcpy(osd->color, textpalettes_color[0], sizeof(textpalettes_color[0]));
memcpy(osd->trans, textpalettes_trans[0], sizeof(textpalettes_trans[0]));
@@ -228,6 +230,9 @@ static int _osd_show (osd_object_t *osd, int64_t vpts, int unscaled ) {
this->event.object.handle = osd->handle;
memset( this->event.object.overlay, 0, sizeof(*this->event.object.overlay) );
+
+ this->event.object.overlay->argb_buffer = osd->argb_buffer;
+
this->event.object.overlay->unscaled = unscaled;
this->event.object.overlay->x = osd->display_x + osd->x1;
this->event.object.overlay->y = osd->display_y + osd->y1;
@@ -1537,6 +1542,15 @@ static void osd_draw_bitmap(osd_object_t *osd, uint8_t *bitmap,
}
}
+static void osd_set_argb_buffer(osd_object_t *osd, uint32_t *argb_buffer)
+{
+ osd->argb_buffer = argb_buffer;
+ osd->x2 = osd->width;
+ osd->x1 = 0;
+ osd->y2 = osd->height;
+ osd->y1 = 0;
+}
+
static uint32_t osd_get_capabilities (osd_object_t *osd) {
osd_renderer_t *this = osd->renderer;
@@ -1612,6 +1626,7 @@ osd_renderer_t *_x_osd_renderer_init( xine_stream_t *stream ) {
this->get_text_size = osd_get_text_size;
this->close = osd_renderer_close;
this->draw_bitmap = osd_draw_bitmap;
+ this->set_argb_buffer = osd_set_argb_buffer;
this->show_unscaled = osd_show_unscaled;
this->get_capabilities = osd_get_capabilities;
diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h
index 70193a2ea..ed3118a05 100644
--- a/src/xine-engine/osd.h
+++ b/src/xine-engine/osd.h
@@ -65,6 +65,13 @@ 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 */
+ uint32_t *argb_buffer;
+
};
/* this one is public */
@@ -211,6 +218,12 @@ struct osd_renderer_s {
*/
uint32_t (*get_capabilities) (osd_object_t *osd);
+ /*
+ * set a buffer to an argb buffer
+ */
+ void (*set_argb_buffer) (osd_object_t *osd, uint32_t *argb_buffer);
+
+
/* private stuff */
pthread_mutex_t osd_mutex;
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index 17ddd660b..7fa34ac8b 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -419,6 +419,8 @@ struct vo_overlay_s {
int hili_rgb_clut; /* true if clut was converted to rgb */
int unscaled; /* true if it should be blended unscaled */
+
+ uint32_t *argb_buffer;
};
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index d1d5a18d9..1f6175a06 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.c
@@ -855,6 +855,11 @@ void xine_osd_draw_bitmap(xine_osd_t *this, uint8_t *bitmap,
this->osd.renderer->draw_bitmap(&this->osd, bitmap, x1, y1, width, height, palette_map);
}
+void xine_osd_set_argb_buffer(xine_osd_t *this, uint32_t *argb_buffer) {
+ this->osd.renderer->set_argb_buffer(&this->osd, argb_buffer);
+}
+
+
const char *const *xine_post_list_inputs(xine_post_t *this_gen) {
post_plugin_t *this = (post_plugin_t *)this_gen;
return this->input_ids;