Index: libvo/vo_gl.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v retrieving revision 1.40 diff -u -r1.40 vo_gl.c --- libvo/vo_gl.c 8 Apr 2004 21:50:29 -0000 1.40 +++ libvo/vo_gl.c 14 Apr 2004 19:03:25 -0000 @@ -324,6 +324,10 @@ int i; uint8_t *ImageData=src[0]; + if (slice_height == 0) + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, image_width, image_height, + gl_format, gl_type, ImageData); + else for(i=0;i= 1.2 and used corresponding headers for compiling!"); - many_fmts = 1; - arg = &arg[8]; - } - if (arg[0] != 0) { - slice_height = atoi(arg); - if (slice_height <= 0) - slice_height = 65536; - } + char *parse_pos = &arg[0]; + while (parse_pos[0] && !parse_err) { + if (strncmp (parse_pos, "manyfmts", 8) == 0) { + parse_pos = &parse_pos[8]; + many_fmts = 1; + } else if (strncmp (parse_pos, "slice-height=", 13) == 0) { + parse_pos = &parse_pos[13]; + slice_height = strtol(parse_pos, &parse_pos, 0); + if (slice_height < 0) parse_err = 1; + } + if (parse_pos[0] == ':') parse_pos = &parse_pos[1]; + else if (parse_pos[0]) parse_err = 1; + } } - mp_msg(MSGT_VO, MSGL_INFO, "[vo_gl] Using %d as slice_height (0 means image_height).\n", slice_height); - + if (parse_err) { + mp_msg(MSGT_VO, MSGL_ERR, + "\n-vo gl command line help:\n" + "Example: mplayer -vo gl:slice-height=4\n" + "\nOptions:\n" + " manyfmts\n" + " Enable extended color formats for OpenGL 1.2 and later\n" + " slice-height=<0-...>\n" + " Slice size for texture transfer, 0 for whole image\n" + "\n" ); + return -1; + } + if (many_fmts) + mp_msg (MSGT_VO, MSGL_WARN, "[gl] using extended formats.\n" + "Make sure you have OpenGL >= 1.2 and used corresponding " + "headers for compiling!\n"); + mp_msg (MSGT_VO, MSGL_INFO, "[gl] Using %d as slice height " + "(0 means image height).\n", slice_height); if( !vo_init() ) return -1; // Can't open X11 return 0; Index: DOCS/man/en/mplayer.1 =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v retrieving revision 1.568 diff -u -r1.568 mplayer.1 --- DOCS/man/en/mplayer.1 13 Apr 2004 20:03:10 -0000 1.568 +++ DOCS/man/en/mplayer.1 14 Apr 2004 19:03:50 -0000 @@ -3591,7 +3591,7 @@ .IPs manyfmts Enables support for more (RGB and BGR) color formats. Needs OpenGL version >= 1.2, NOT yet WORKING correctly. -.IPs +.IPs slice-height=<0-...> Number of lines copied to texture in one piece. 0 for whole image. .RE