mirror of
https://github.com/mpv-player/mpv
synced 2025-02-25 17:58:27 +00:00
-bpp changes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@389 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
17e5fab38f
commit
ca4dc2a1b3
@ -31,7 +31,7 @@ struct config conf[]={
|
||||
{"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 @@ struct config conf[]={
|
||||
{"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},
|
||||
|
@ -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
|
||||
//
|
||||
|
@ -105,4 +105,13 @@ typedef struct vo_functions_s
|
||||
// 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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
16
mplayer.c
16
mplayer.c
@ -433,7 +433,7 @@ float font_factor=0.75;
|
||||
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 @@ has_video=sh_video->codec->driver;
|
||||
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user