From 582bcd19d6a58c266f5453961c87acf72fae5353 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 10 Apr 2006 13:04:31 +0000 Subject: *** empty log message *** --- client/xvaccelrenderer.cc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'client/xvaccelrenderer.cc') diff --git a/client/xvaccelrenderer.cc b/client/xvaccelrenderer.cc index f030642..7de4510 100644 --- a/client/xvaccelrenderer.cc +++ b/client/xvaccelrenderer.cc @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /*************************************************************************** gui_xv.cpp - description ------------------- @@ -28,10 +29,6 @@ // Use this define for verbose output #define VERBOSE_XV - -//static uint8_t GUI_XvSync(void); - - //________________Wrapper around Xv_______________ XvAccelRender::XvAccelRender( void ) { @@ -57,14 +54,19 @@ uint8_t XvAccelRender::end(void) return 1; } -uint8_t XvAccelRender::display(uint8_t *ptr, uint32_t w, uint32_t h) +char *XvAccelRender::getDisplayData() +{ + if(xvimage) return xvimage->data; + else return NULL; +} + +uint8_t XvAccelRender::display(uint32_t w, uint32_t h) { - return GUI_XvDisplay(ptr, w, h); + return GUI_XvDisplay(w, h); } //________________Wrapper around Xv_______________ -//static uint8_t GUI_XvExpose( void ); // // Free all ressources allocated by xv // @@ -92,7 +94,7 @@ void XvAccelRender::GUI_XvEnd( void ) } //------------------------------------ -uint8_t XvAccelRender::GUI_XvDisplay(uint8_t * src, uint32_t w, uint32_t h) +uint8_t XvAccelRender::GUI_XvDisplay(uint32_t w, uint32_t h) { if (xvimage) @@ -102,7 +104,10 @@ uint8_t XvAccelRender::GUI_XvDisplay(uint8_t * src, uint32_t w, uint32_t h) // for YV12, 4 bits for Y 4 bits for u, 4 bits for v // total 1.5* - memcpy(xvimage->data, src, (w*h*3)>>1); + + // memcpy(xvimage->data, src, (w*h*3)>>1); + //memcpy(xvimage->data, src, (w*h*4)>>1); // We decodee directly to the buffer, so we don't need to copy it. + XLockDisplay (xv_display); // And display it ! #if 1 -- cgit v1.2.3