Mercurial > mplayer.hg
diff libvo/vo_xvidix.c @ 6550:991e03ca5ceb
added OSD support for yvu9/y800, corrected query_format \(added flag VFCAP_OSD\), fixed multifile support \(no more control infinite loop and destroying old window\) and some cosmetics
author | alex |
---|---|
date | Mon, 24 Jun 2002 11:51:55 +0000 |
parents | 7bd342baa785 |
children | 4a0b45902fc9 |
line wrap: on
line diff
--- a/libvo/vo_xvidix.c Mon Jun 24 11:07:58 2002 +0000 +++ b/libvo/vo_xvidix.c Mon Jun 24 11:51:55 2002 +0000 @@ -64,7 +64,6 @@ static uint32_t image_width; static uint32_t image_height; static uint32_t image_format; -static uint32_t image_depth; /* Window parameters */ static uint32_t window_x, window_y; @@ -174,7 +173,7 @@ vidix_start(); } - mp_msg(MSGT_VO, MSGL_INFO, "[xvidix] window properties: pos: %dx%d, size: %dx%d\n", + mp_msg(MSGT_VO, MSGL_V, "[xvidix] window properties: pos: %dx%d, size: %dx%d\n", vo_dx, vo_dy, window_width, window_height); /* mDrawColorKey: */ @@ -215,42 +214,6 @@ image_format = format; vo_mouse_autohide=1; - if (IMGFMT_IS_RGB(format)) - { - image_depth = IMGFMT_RGB_DEPTH(format); - } - else - if (IMGFMT_IS_BGR(format)) - { - image_depth = IMGFMT_BGR_DEPTH(format); - } - else - switch(format) - { - case IMGFMT_IYUV: - case IMGFMT_I420: - case IMGFMT_YV12: - image_depth = 12; - break; - case IMGFMT_UYVY: - case IMGFMT_YUY2: - image_depth = 16; - break; - case IMGFMT_YVU9: - case IMGFMT_IF09: - image_depth = 9; - break; - case IMGFMT_Y800: - case IMGFMT_Y8: - image_depth = 8; - break; - default: - image_depth = 16; - mp_msg(MSGT_VO, MSGL_FATAL, "Unknown image format: %s\n", - vo_format_name(format)); - break; - } - if (!vo_init()) return(-1); @@ -297,6 +260,9 @@ { #endif + /* destroy window before creating one */ + if (vo_window) XDestroyWindow(mDisplay, vo_window); + #ifdef X11_FULLSCREEN if ( ( flags&1 )||(flags & 0x04) ) aspect(&d_width, &d_height, A_ZOOM); #endif @@ -355,9 +321,6 @@ } #endif - mp_msg(MSGT_VO, MSGL_INFO, "[xvidix] image properties: %dx%d depth: %d\n", - image_width, image_height, image_depth); - if ( ( !WinID )&&( flags&1 ) ) { vo_dx=0; vo_dy=0; vo_dwidth=vo_screenwidth; vo_dheight=vo_screenheight; vo_fs=1; } if (vidix_grkey_support()) @@ -425,14 +388,14 @@ UNUSED(x); UNUSED(y); mp_msg(MSGT_VO, MSGL_FATAL, "[xvidix] error: didn't used vidix draw_slice!\n"); - return(0); + return(-1); } static uint32_t draw_frame(uint8_t *src[]) { UNUSED(src); mp_msg(MSGT_VO, MSGL_FATAL, "[xvidix] error: didn't used vidix draw_frame!\n"); - return(0); + return(-1); } static uint32_t query_format(uint32_t format) @@ -486,6 +449,6 @@ } return VO_TRUE; } - vidix_control(request, data); + return vidix_control(request, data); // return VO_NOTIMPL; }