changeset 35015:906125680c06

Rename -vo gl2 to gl_tiled which hopefully is less misleading, since gl2 is not (anymore) a replacement for gl.
author reimar
date Mon, 20 Aug 2012 19:04:45 +0000
parents df3b195a810d
children 772f245b011b
files DOCS/man/en/mplayer.1 libvo/video_out.c libvo/vo_gl2.c
diffstat 3 files changed, 40 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Mon Aug 20 18:54:59 2012 +0000
+++ b/DOCS/man/en/mplayer.1	Mon Aug 20 19:04:45 2012 +0000
@@ -1021,7 +1021,7 @@
 Enforces a fixed video system for multiple files (one (un)initialization for
 all files).
 Therefore only one window will be opened for all files.
-Currently the following drivers are fixed-vo compliant: gl, gl2, mga, svga, x11,
+Currently the following drivers are fixed-vo compliant: gl, gl_tiled, mga, svga, x11,
 xmga, xv, xvidix and dfbmga.
 .
 .TP
@@ -1203,7 +1203,7 @@
 Permit MPlayer to receive pointer events reported by the video
 output driver.
 Necessary to select the buttons in DVD menus.
-Supported for X11-based VOs (x11, xv, xvmc, etc) and the gl, gl2, direct3d and
+Supported for X11-based VOs (x11, xv, xvmc, etc) and the gl, gl_tiled, direct3d and
 corevideo VOs.
 .
 .TP
@@ -3470,12 +3470,12 @@
 y coordinates are relative to the top-left corner of the window rather
 than the screen.
 The coordinates are relative to the screen given with \-xineramascreen for
-the video output drivers that fully support \-xineramascreen (direct3d, gl, gl2,
+the video output drivers that fully support \-xineramascreen (direct3d, gl, gl_tiled,
 vdpau, x11, xv, xvmc, corevideo).
 .br
 .I NOTE:
 This option is only supported by the x11, xmga, xv, xvmc, xvidix,
-gl, gl2, direct3d, directx, fbdev, sdl, dfxfb and corevideo
+gl, gl_tiled, direct3d, directx, fbdev, sdl, dfxfb and corevideo
 video output drivers.
 .sp 1
 .I EXAMPLE:
@@ -3563,14 +3563,14 @@
 .B "\-ontop\ "
 Makes the player window stay on top of other windows.
 Supported by video output drivers which use X11, except SDL,
-as well as directx, corevideo, quartz, ggi and gl2.
+as well as directx, corevideo, quartz, ggi and gl_tiled.
 .
 .TP
 .B \-panscan <0.0\-1.0>
 Enables pan-and-scan functionality (cropping the sides of e.g.\& a 16:9
 movie to make it fit a 4:3 display without black bands).
 The range controls how much of the image is cropped.
-Only works with the xv, xmga, mga, gl, gl2, quartz, corevideo and xvidix
+Only works with the xv, xmga, mga, gl, gl_tiled, quartz, corevideo and xvidix
 video output drivers.
 .br
 .I NOTE:
@@ -3665,7 +3665,7 @@
 it will always display on the given screen in fullscreen mode),
 \-geometry is the best that is available for that purpose
 currently.
-Supported by at least the direct3d, gl, gl2, x11, xv and corevideo video output
+Supported by at least the direct3d, gl, gl_tiled, x11, xv and corevideo video output
 drivers.
 .
 .TP
@@ -4375,7 +4375,7 @@
 .PD 1
 .
 .TP
-.B "gl2\ \ \ \ "
+.B gl_tiled
 Variant of the OpenGL video output driver.
 Supports videos larger than the maximum texture size but lacks many of the
 advanced features and optimizations of the gl driver and is unlikely to be
--- a/libvo/video_out.c	Mon Aug 20 18:54:59 2012 +0000
+++ b/libvo/video_out.c	Mon Aug 20 19:04:45 2012 +0000
@@ -98,7 +98,7 @@
 extern const vo_functions_t video_out_xv;
 extern const vo_functions_t video_out_gl_nosw;
 extern const vo_functions_t video_out_gl;
-extern const vo_functions_t video_out_gl2;
+extern const vo_functions_t video_out_gl_tiled;
 extern const vo_functions_t video_out_matrixview;
 extern const vo_functions_t video_out_dga;
 extern const vo_functions_t video_out_sdl;
@@ -208,7 +208,7 @@
         &video_out_gl,
 #endif
 #if defined(CONFIG_GL_WIN32) || defined(CONFIG_GL_X11)
-        &video_out_gl2,
+        &video_out_gl_tiled,
 #endif
 #ifdef CONFIG_DGA
         &video_out_dga,
@@ -316,7 +316,8 @@
     // first try the preferred drivers, with their optional subdevice param:
     if(vo_list && vo_list[0])
       while(vo_list[0][0]){
-        char* vo=strdup(vo_list[0]);
+        char* buffer=strdup(vo_list[0]);
+        char *vo = buffer;
 	vo_subdevice=strchr(vo,':');
 	if(vo_subdevice){
 	    vo_subdevice[0]=0;
@@ -326,6 +327,10 @@
 	    mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_VO_PGM_HasBeenReplaced);
 	if (!strcmp(vo, "md5"))
 	    mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_VO_MD5_HasBeenReplaced);
+	if (!strcmp(vo, "gl2")) {
+	    mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_VO_GL2_HasBeenRenamed);
+	    vo = "gl_tiled";
+        }
 	for(i=0;video_out_drivers[i];i++){
 	    const vo_functions_t* video_driver=video_out_drivers[i];
 	    const vo_info_t *info = video_driver->info;
@@ -333,13 +338,13 @@
 		// name matches, try it
 		if(!video_driver->preinit(vo_subdevice))
 		{
-		    free(vo);
+		    free(buffer);
 		    return video_driver; // success!
 		}
 	    }
 	}
         // continue...
-	free(vo);
+	free(buffer);
 	++vo_list;
 	if(!(vo_list[0])) return NULL; // do NOT fallback to others
       }
--- a/libvo/vo_gl2.c	Mon Aug 20 18:54:59 2012 +0000
+++ b/libvo/vo_gl2.c	Mon Aug 20 19:04:45 2012 +0000
@@ -50,12 +50,12 @@
 static const vo_info_t info =
 {
   "X11 (OpenGL) - multiple textures version",
-  "gl2",
+  "gl_tiled",
   "Arpad Gereoffy & Sven Goethel",
   ""
 };
 
-const LIBVO_EXTERN(gl2)
+const LIBVO_EXTERN(gl_tiled)
 
 /* local data */
 static unsigned char *ImageData=NULL;
@@ -199,7 +199,7 @@
     if (w >= texture_width)
       break;
 
-    mp_msg (MSGT_VO, MSGL_V, "[gl2] Needed texture [%dx%d] too big, trying ",
+    mp_msg (MSGT_VO, MSGL_V, "[gl_tiled] Needed texture [%dx%d] too big, trying ",
             texture_width, texture_height);
 
     if (texture_width > texture_height)
@@ -210,7 +210,7 @@
     mp_msg (MSGT_VO, MSGL_V, "[%dx%d] !\n", texture_width, texture_height);
 
     if(texture_width < 64 || texture_height < 64) {
-      mp_msg (MSGT_VO, MSGL_FATAL, "[gl2] Give up .. usable texture size not available, or texture config error !\n");
+      mp_msg (MSGT_VO, MSGL_FATAL, "[gl_tiled] Give up .. usable texture size not available, or texture config error !\n");
       return -1;
     }
   } while (texture_width > 1 && texture_height > 1);
@@ -229,7 +229,7 @@
   if ((image_height % texture_height) > 0)
     texnumy++;
 
-  mp_msg(MSGT_VO, MSGL_V, "[gl2] Creating %dx%d textures of size %dx%d ...\n",
+  mp_msg(MSGT_VO, MSGL_V, "[gl_tiled] Creating %dx%d textures of size %dx%d ...\n",
          texnumx, texnumy, texture_width,texture_height);
 
   /* Allocate the texture memory */
@@ -242,7 +242,7 @@
 
   raw_line_len = image_width * image_bytes;
 
-  mp_msg (MSGT_VO, MSGL_DBG2, "[gl2] texture-usage %d*width=%d, %d*height=%d\n",
+  mp_msg (MSGT_VO, MSGL_DBG2, "[gl_tiled] texture-usage %d*width=%d, %d*height=%d\n",
           (int) texnumx, (int) texture_width, (int) texnumy,
           (int) texture_height);
 
@@ -335,22 +335,22 @@
         case 0:
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-          mp_msg(MSGT_VO, MSGL_INFO, "[gl2] bilinear off\n");
+          mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] bilinear off\n");
           break;
         case 1:
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-          mp_msg(MSGT_VO, MSGL_INFO, "[gl2] bilinear linear\n");
+          mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] bilinear linear\n");
           break;
         case 2:
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST);
-          mp_msg(MSGT_VO, MSGL_INFO, "[gl2] bilinear mipmap nearest\n");
+          mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] bilinear mipmap nearest\n");
           break;
         case 3:
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
           glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR);
-          mp_msg(MSGT_VO, MSGL_INFO, "[gl2] bilinear mipmap linear\n");
+          mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] bilinear mipmap linear\n");
           break;
       }
     }
@@ -366,13 +366,13 @@
     glEnable (GL_POLYGON_SMOOTH);
     glEnable (GL_LINE_SMOOTH);
     glEnable (GL_POINT_SMOOTH);
-    mp_msg(MSGT_VO, MSGL_INFO, "[gl2] antialiasing on\n");
+    mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] antialiasing on\n");
   } else {
     glShadeModel (GL_FLAT);
     glDisable (GL_POLYGON_SMOOTH);
     glDisable (GL_LINE_SMOOTH);
     glDisable (GL_POINT_SMOOTH);
-    mp_msg(MSGT_VO, MSGL_INFO, "[gl2] antialiasing off\n");
+    mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] antialiasing off\n");
   }
 }
 
@@ -430,7 +430,7 @@
      0,  0, 0, 0,
     -1,  1, 0, 1,
   };
-  mp_msg(MSGT_VO,MSGL_V,"[gl2] Resize: %dx%d\n",x,y);
+  mp_msg(MSGT_VO,MSGL_V,"[gl_tiled] Resize: %dx%d\n",x,y);
   if(aspect_scaling()) {
     glClear(GL_COLOR_BUFFER_BIT);
     aspect(&x, &y, A_WINZOOM);
@@ -547,12 +547,12 @@
   XVisualInfo *vinfo, vinfo_buf;
     vinfo = choose_glx_visual(mDisplay,mScreen,&vinfo_buf) < 0 ? NULL : &vinfo_buf;
     if (vinfo == NULL) {
-      mp_msg(MSGT_VO, MSGL_FATAL, "[gl2] no GLX support present\n");
+      mp_msg(MSGT_VO, MSGL_FATAL, "[gl_tiled] no GLX support present\n");
       return -1;
     }
 
   vo_x11_create_vo_window(vinfo, vo_dx, vo_dy, d_width, d_height,
-          flags, vo_x11_create_colormap(vinfo), "gl2", title);
+          flags, vo_x11_create_colormap(vinfo), "gl_tiled", title);
 
   return 0;
 }
@@ -601,7 +601,7 @@
   gl_set_antialias(0);
   gl_set_bilinear(1);
 
-  mp_msg(MSGT_VO, MSGL_V, "[gl2] Using image_bpp=%d, image_bytes=%d, \n\tgl_bitmap_format=%s, gl_bitmap_type=%s, \n\trgb_size=%d (%d,%d,%d), a_sz=%d, \n\tgl_internal_format=%s\n",
+  mp_msg(MSGT_VO, MSGL_V, "[gl_tiled] Using image_bpp=%d, image_bytes=%d, \n\tgl_bitmap_format=%s, gl_bitmap_type=%s, \n\trgb_size=%d (%d,%d,%d), a_sz=%d, \n\tgl_internal_format=%s\n",
         image_bpp, image_bytes,
         glValName(gl_bitmap_format), glValName(gl_bitmap_type),
         rgb_sz, r_sz, g_sz, b_sz, a_sz, glValName(gl_internal_format));
@@ -646,7 +646,7 @@
 
   glVersion = glGetString(GL_VERSION);
 
-  mp_msg(MSGT_VO, MSGL_V, "[gl2] OpenGL Driver Information:\n");
+  mp_msg(MSGT_VO, MSGL_V, "[gl_tiled] OpenGL Driver Information:\n");
   mp_msg(MSGT_VO, MSGL_V, "\tvendor: %s,\n\trenderer %s,\n\tversion %s\n",
          glGetString(GL_VENDOR), glGetString(GL_RENDERER), glVersion);
 
@@ -656,9 +656,9 @@
     isGL12 = GL_FALSE;
 
   if(isGL12) {
-    mp_msg(MSGT_VO, MSGL_INFO, "[gl2] You have OpenGL >= 1.2 capable drivers, GOOD (16bpp and BGR is ok!)\n");
+    mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] You have OpenGL >= 1.2 capable drivers, GOOD (16bpp and BGR is ok!)\n");
   } else {
-    mp_msg(MSGT_VO, MSGL_INFO, "[gl2] You have OpenGL < 1.2 drivers, BAD (16bpp and BGR may be damaged!)\n");
+    mp_msg(MSGT_VO, MSGL_INFO, "[gl_tiled] You have OpenGL < 1.2 drivers, BAD (16bpp and BGR may be damaged!)\n");
   }
 
   glFindFormat(format, &image_bpp, &gl_internal_format, &gl_bitmap_format, &gl_bitmap_type);
@@ -804,7 +804,7 @@
 draw_frame(uint8_t *src[])
 {
   if (is_yuv) {
-    mp_msg(MSGT_VO, MSGL_ERR, "[gl2] error: draw_frame called for YV12!\n");
+    mp_msg(MSGT_VO, MSGL_ERR, "[gl_tiled] error: draw_frame called for YV12!\n");
     return 0;
   }
   ImageData=(unsigned char *)src[0];
@@ -863,8 +863,8 @@
   use_glFinish = 1;
   if (subopt_parse(arg, subopts) != 0) {
     mp_msg(MSGT_VO, MSGL_FATAL,
-            "\n-vo gl2 command line help:\n"
-            "Example: mplayer -vo gl2:noglfinish\n"
+            "\n-vo gl_tiled command line help:\n"
+            "Example: mplayer -vo gl_tiled:noglfinish\n"
             "\nOptions:\n"
             "  noglfinish\n"
             "    Do not call glFinish() before swapping buffers\n"