diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c index 7bbf0c255d..f59a660106 100644 --- a/libvo/vo_dga.c +++ b/libvo/vo_dga.c @@ -23,6 +23,9 @@ * - works only on x86 architectures * * $Log$ + * Revision 1.16 2001/04/24 10:21:12 szabii + * some warnings killed + * * Revision 1.15 2001/04/19 21:39:10 arpi_esp * driver info now depends on detected DGA version * @@ -274,6 +277,18 @@ void vd_printf( int level, const char *str, ...){ //--------------------------------------------------------- +extern void vo_draw_alpha_rgb24(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb15(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb16(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); static void draw_alpha( int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride ){ @@ -359,6 +374,10 @@ static void check_events(void) //--------------------------------------------------------- +extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, + int w,int h, unsigned char* src, unsigned char *srca, + int stride)); + static void flip_page( void ){ if(vo_dga_src_format ==IMGFMT_YV12 ){ diff --git a/libvo/vo_fsdga.c b/libvo/vo_fsdga.c index 949e378b82..3c636deafa 100644 --- a/libvo/vo_fsdga.c +++ b/libvo/vo_fsdga.c @@ -281,7 +281,7 @@ static uint32_t query_format( uint32_t format ) printf("vo_dga: query_format\n"); if( !vo_init() ) return 0; // Can't open X11 - printf("Format: %lx\n", format); + printf("Format: %lx\n", (unsigned long) format); if( format==IMGFMT_YV12 ) return 1; if( ( format&IMGFMT_BGR_MASK )==IMGFMT_BGR && @@ -341,7 +341,7 @@ static uint32_t init( uint32_t width, uint32_t height, vo_dga_src_height = height; vo_dga_bpp = (vo_depthonscreen+7) >> 3; - printf("vo_dga: bytes/line: %d, screen res: %dx%d, depth: %d, base: %08x, bpp: %d\n", + printf("vo_dga: bytes/line: %d, screen res: %dx%d, depth: %d, base: %p, bpp: %d\n", vo_dga_width, vo_dga_vp_width, vo_dga_vp_height, vo_depthonscreen, vo_dga_base, vo_dga_bpp); diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 8d3e23ad22..c16d9addef 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -79,7 +79,7 @@ static uint32_t image_bytes; static uint32_t texture_width; static uint32_t texture_height; -static resize(int x,int y){ +static void resize(int x,int y){ printf("Resize: %dx%d\n",x,y); glViewport( 0, 0, x, y ); diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index 241d48de1a..4c989282fb 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -111,6 +111,9 @@ uninit(void) printf("vo: uninit!\n"); } +extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, + int w,int h, unsigned char* src, unsigned char *srca, + int stride)); static void flip_page(void) { diff --git a/libvo/vo_odivx.c b/libvo/vo_odivx.c index 7ba7914ef4..5abf4f26f6 100644 --- a/libvo/vo_odivx.c +++ b/libvo/vo_odivx.c @@ -152,7 +152,7 @@ enc_frame.bitstream=buffer; enc_frame.length=0; encore(0x123,0,&enc_frame,&enc_result); -printf("coded length: %d \n",enc_frame.length); +printf("coded length: %ld \n",enc_frame.length); if(encode_name){ AVIINDEXENTRY i; diff --git a/libvo/vo_png.c b/libvo/vo_png.c index 2c833d6a2a..aaf5865455 100644 --- a/libvo/vo_png.c +++ b/libvo/vo_png.c @@ -12,6 +12,7 @@ #include #include #include +#include #include //#include "/usr/include/png.h" @@ -146,7 +147,7 @@ struct pngdata create_png (char * fname) png.fp = fopen (fname, "wb"); if (png.fp == NULL) { - printf("\nPNG Error opening %s for writing!\n"); + printf("\nPNG Error opening %s for writing!\n", strerror(errno)); png.status = ERROR; return png; } diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 183a931838..d133003312 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -445,7 +445,7 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3 if(verbose) printf("SDL: setting zoomed fullscreen without modeswitching\n"); priv->windowsize.w = d_width; priv->windowsize.h = d_height; - if(priv->surface = SDL_SetVideoMode (d_width, d_height, priv->bpp, priv->sdlfullflags)) + if((priv->surface = SDL_SetVideoMode (d_width, d_height, priv->bpp, priv->sdlfullflags))) SDL_ShowCursor(0); break; case 0x02: @@ -710,6 +710,10 @@ static void check_events (void) * returns : doesn't return **/ +extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, + int w,int h, unsigned char* src, unsigned char *srca, + int stride)); + static void flip_page (void) { struct sdl_priv_s *priv = &sdl_priv; diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c index 94012eec30..ec138c0910 100644 --- a/libvo/vo_svga.c +++ b/libvo/vo_svga.c @@ -418,6 +418,20 @@ static const vo_info_t* get_info(void) { return (&vo_info); } +extern void vo_draw_alpha_rgb24(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb15(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb16(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); + + static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src, unsigned char *srca, int stride) { switch (bpp) { @@ -481,6 +495,7 @@ static uint32_t draw_frame(uint8_t *src[]) { src[0] = bppbuf; } gl_putbox(x_pos, y_pos, maxw, maxh, src[0]); + return 0; } static uint32_t draw_slice(uint8_t *image[], int stride[], @@ -497,8 +512,13 @@ static uint32_t draw_slice(uint8_t *image[], int stride[], src = scalebuf; } gl_putbox((int)(x * scaling) + x_pos, (int)(y * scaling) + y_pos, sw, sh, src); + return 0; } +extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, + int w,int h, unsigned char* src, unsigned char *srca, + int stride)); + static void flip_page(void) { if (y_pos) { gl_fillbox(0, 0, WIDTH, y_pos, 0); @@ -536,4 +556,4 @@ static void uninit(void) { free(modelist); } } - \ No newline at end of file + diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index a8f26d9cfb..39cbd2a447 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -319,7 +319,7 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d bpp=myximage->bits_per_pixel; - fprintf( stderr,"X11 color mask: R:%X G:%X B:%X\n",myximage->red_mask,myximage->green_mask,myximage->blue_mask ); + fprintf( stderr,"X11 color mask: R:%lX G:%lX B:%lX\n",myximage->red_mask,myximage->green_mask,myximage->blue_mask ); // If we have blue in the lowest bit then obviously RGB mode=( ( myximage->blue_mask & 0x01 ) != 0 ) ? MODE_RGB : MODE_BGR; @@ -387,6 +387,19 @@ static void Display_Image( XImage *myximage,uint8_t *ImageData ) #endif } +extern void vo_draw_alpha_rgb24(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb15(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); +extern void vo_draw_alpha_rgb16(int w,int h, unsigned char* src, + unsigned char *srca, int srcstride, unsigned char* dstbase, + int dststride); + static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ switch(bpp){ case 24: @@ -405,6 +418,9 @@ static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned } } +extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, + int w,int h, unsigned char* src, unsigned char *srca, + int stride)); static void flip_page( void ){ vo_draw_text(image_width,image_height,draw_alpha); diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 77401c501f..c700581754 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -142,6 +142,10 @@ static void check_events(void) } +extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, + int w,int h, unsigned char* src, unsigned char *srca, + int stride)); + static void flip_page(void){ #ifdef SHOW_TIME unsigned int t; diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 4f71e456ff..fd5a37d4a0 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -282,6 +282,10 @@ static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned } +extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, + int w,int h, unsigned char* src, unsigned char *srca, + int stride)); + static void flip_page(void) { vo_draw_text(image_width,image_height,draw_alpha);