changeset 388:ccb5ebfaaeac

-bpp changes
author arpi_esp
date Fri, 13 Apr 2001 13:47:36 +0000
parents 43acef8f7c74
children d19a6cf1c2e3
files cfg-mplayer.h libvo/video_out.c libvo/video_out.h libvo/x11_common.c mplayer.c
diffstat 5 files changed, 30 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mplayer.h	Fri Apr 13 13:02:13 2001 +0000
+++ b/cfg-mplayer.h	Fri Apr 13 13:47:36 2001 +0000
@@ -31,7 +31,7 @@
 	{"bg", &play_in_bg, CONF_TYPE_FLAG, 0, 0, 1},
 	{"nobg", &play_in_bg, CONF_TYPE_FLAG, 0, 1, 0},
 	{"sb", &seek_to_byte, CONF_TYPE_INT, CONF_MIN, 0, 0},
-	{"ss", &seek_to_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
+//	{"ss", &seek_to_sec, CONF_TYPE_INT, CONF_MIN, 0, 0},
 	{"sound", &has_audio, CONF_TYPE_FLAG, 0, 0, 1},
 	{"nosound", &has_audio, CONF_TYPE_FLAG, 0, 1, 0},
 	{"abs", &audio_buffer_size, CONF_TYPE_INT, CONF_MIN, 0, 0},
@@ -65,7 +65,7 @@
         {"zoom", &softzoom, CONF_TYPE_FLAG, 0, 0, 1},
         {"nozoom", &softzoom, CONF_TYPE_FLAG, 0, 1, 0},
        
-        {"bpp", &user_bpp, CONF_TYPE_INT, CONF_RANGE, 0, 32},
+        {"bpp", &vo_dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32},
 	
 	{"idx", &no_index, CONF_TYPE_FLAG, 0, 1, 0},
 	{"noidx", &no_index, CONF_TYPE_FLAG, 0, 0, 1},
--- a/libvo/video_out.c	Fri Apr 13 13:02:13 2001 +0000
+++ b/libvo/video_out.c	Fri Apr 13 13:47:36 2001 +0000
@@ -31,6 +31,17 @@
 
 #include "../linux/shmem.h"
 
+// currect resolution/bpp on screen:  (should be autodetected by vo_init())
+int vo_depthonscreen=0;
+int vo_screenwidth=0;
+int vo_screenheight=0;
+
+// requested resolution/bpp:  (-x -y -bpp options)
+int vo_dwidth=0;
+int vo_dheight=0;
+int vo_dbpp=0;
+
+
 //
 // Externally visible list of all vo drivers
 //
--- a/libvo/video_out.h	Fri Apr 13 13:02:13 2001 +0000
+++ b/libvo/video_out.h	Fri Apr 13 13:47:36 2001 +0000
@@ -105,4 +105,13 @@
 // NULL terminated array of all drivers
 extern vo_functions_t* video_out_drivers[];
 
+// currect resolution/bpp on screen:  (should be autodetected by vo_init())
+extern int vo_depthonscreen;
+extern int vo_screenwidth;
+extern int vo_screenheight;
 
+// requested resolution/bpp:  (-x -y -bpp options)
+extern int vo_dwidth;
+extern int vo_dheight;
+extern int vo_dbpp;
+
--- a/libvo/x11_common.c	Fri Apr 13 13:02:13 2001 +0000
+++ b/libvo/x11_common.c	Fri Apr 13 13:47:36 2001 +0000
@@ -15,12 +15,6 @@
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 
-int vo_depthonscreen=0;
-int vo_screenwidth=0;
-int vo_screenheight=0;
-int vo_dwidth=0;
-int vo_dheight=0;
-
 static int dpms_disabled=0;
 static int timeout_save=0;
 
--- a/mplayer.c	Fri Apr 13 13:02:13 2001 +0000
+++ b/mplayer.c	Fri Apr 13 13:47:36 2001 +0000
@@ -433,7 +433,7 @@
 char *sub_name=NULL;
 float sub_delay=0;
 float sub_fps=0;
-int user_bpp=0;
+//int user_bpp=0;
 #include "cfg-mplayer.h"
 
   printf("%s",banner_text);
@@ -858,17 +858,17 @@
 
 printf("Found video codec: [%s] drv:%d (%s)\n",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
 
-if(user_bpp)printf("Trying user defined depth of %dbpp\n", user_bpp);
+//if(user_bpp)printf("Trying user defined depth of %dbpp\n", user_bpp);
 
 for(i=0;i<CODECS_MAX_OUTFMT;i++){
     out_fmt=sh_video->codec->outfmt[i];
-    if(user_bpp){
-        if( ((out_fmt & IMGFMT_BGR_MASK) == IMGFMT_BGR) && ((out_fmt & 0xff) == user_bpp) || (out_fmt & IMGFMT_BGR_MASK) != IMGFMT_BGR){
-	     if(video_out->query_format(out_fmt)) break;
-	}
-    }else{
+//    if(user_bpp){
+//        if( ((out_fmt & IMGFMT_BGR_MASK) == IMGFMT_BGR) && ((out_fmt & 0xff) == user_bpp) || (out_fmt & IMGFMT_BGR_MASK) != IMGFMT_BGR){
+//	     if(video_out->query_format(out_fmt)) break;
+//	}
+//    }else{
   	  if(video_out->query_format(out_fmt)) break;
-    }
+//    }
 }
 if(i>=CODECS_MAX_OUTFMT){
     printf("Sorry, selected video_out device is incompatible with this codec.\n");