[MPlayer-cvslog] CVS: main/libvo gl_common.c, 1.11, 1.12 vo_gl.c, 1.80, 1.81 vo_gl2.c, 1.69, 1.70

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Aug 14 21:24:51 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv14316/libvo

Modified Files:
	gl_common.c vo_gl.c vo_gl2.c 
Log Message:
remove/move some unused headers/variables/code


Index: gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- gl_common.c	14 Aug 2005 13:44:14 -0000	1.11
+++ gl_common.c	14 Aug 2005 19:24:48 -0000	1.12
@@ -38,8 +38,6 @@
   glPixelStorei (GL_UNPACK_ALIGNMENT, gl_alignment);
 }
 
-#include "img_format.h"
-
 struct gl_name_map_struct {
   GLint value;
   char *name;

Index: vo_gl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- vo_gl.c	14 Aug 2005 13:44:14 -0000	1.80
+++ vo_gl.c	14 Aug 2005 19:24:48 -0000	1.81
@@ -1,19 +1,15 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <math.h>
-#include <errno.h>
 
-#include "mp_msg.h"
 #include "config.h"
+#include "mp_msg.h"
 #include "subopt-helper.h"
 #include "video_out.h"
 #include "video_out_internal.h"
 #include "font_load.h"
 #include "sub.h"
 
-#include <errno.h>
-
 #include "gl_common.h"
 #include "aspect.h"
 #ifdef HAVE_NEW_GUI
@@ -204,8 +200,6 @@
     return -1;
 #else
   if (WinID >= 0) {
-    Window win_tmp;
-    int int_tmp;
     vo_window = WinID ? (Window)WinID : mRootWin;
     goto glconfig;
   }
@@ -304,7 +298,6 @@
                                  unsigned char *src, unsigned char *srca,
                                  int stride)
 {
-  int i;
   // initialize to 8 to avoid special-casing on alignment
   int sx = 8, sy = 8;
   GLint scale_type = (scaled_osd) ? GL_LINEAR : GL_NEAREST;
@@ -327,6 +320,7 @@
   BindTexture(gl_target, osdatex[osdtexCnt]);
   glCreateClearTex(gl_target, GL_ALPHA, scale_type, sx, sy, 0);
   {
+  int i;
   char *tmp = (char *)malloc(stride * h);
   for (i = 0; i < h * stride; i++)
     tmp[i] = ~(-srca[i]);
@@ -358,10 +352,10 @@
 
 static void draw_osd(void)
 {
-  int i;
-  int osd_h, osd_w;
   if (!use_osd) return;
   if (vo_osd_changed(0)) {
+    int i;
+    int osd_h, osd_w;
     for (i = 0; i < osdtexCnt; i++) {
       glDeleteTextures(1, &osdtex[i]);
 #ifndef FAST_OSD

Index: vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- vo_gl2.c	14 Aug 2005 18:36:01 -0000	1.69
+++ vo_gl2.c	14 Aug 2005 19:24:49 -0000	1.70
@@ -7,8 +7,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <math.h>
-#include <errno.h>
 
 #include "config.h"
 #include "mp_msg.h"
@@ -20,8 +18,6 @@
 #include "Gui/interface.h"
 #endif
 
-#include <errno.h>
-
 #include "gl_common.h"
 #include "aspect.h"
 
@@ -46,11 +42,6 @@
 /* local data */
 static unsigned char *ImageData=NULL;
 
-/* X11 related variables */
-//static Window vo_window;
-
-//static int texture_id=1;
-
 #ifdef GL_WIN32
     static int gl_vinfo = 0;
     static HGLRC gl_context = 0;
@@ -150,7 +141,7 @@
 {
   struct TexSquare *tsq=0;
   GLfloat texpercx, texpercy;
-  int s, i=0;
+  int s;
   int x=0, y=0;
   GLint format=0;
   GLenum err;
@@ -467,12 +458,14 @@
 		mp_msg (MSGT_VO, MSGL_V, "GLERROR glBindTexture := GL_INVALID_OPERATION, texnum x=%d, y=%d, texture=%d\n", x, y, square->texobj);
 	      }
 
+#ifndef NDEBUG
       if(glIsTexture(square->texobj) == GL_FALSE)
       {
         square->isTexture=GL_FALSE;
 	mp_msg (MSGT_VO, MSGL_ERR, "GLERROR ain't a texture(update): texnum x=%d, y=%d, texture=%d\n",
 		x, y, square->texobj);
       }
+#endif
 
       if(square->isDirty)
       {
@@ -970,7 +963,7 @@
     if(arg) 
     {
 	mp_msg(MSGT_VO, MSGL_FATAL, "[gl2] Unknown subdevice: %s\n",arg);
-	return ENOSYS;
+	return -1;
     }
     if( !vo_init() ) return -1; // Can't open X11
     return 0;




More information about the MPlayer-cvslog mailing list