diff options
-rw-r--r-- | cfg-mplayer.h | 4 | ||||
-rw-r--r-- | mplayer.c | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 78651adf6a..f1e5501d5f 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -64,7 +64,9 @@ struct config conf[]={ {"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0}, {"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}, + {"idx", &no_index, CONF_TYPE_FLAG, 0, 1, 0}, {"noidx", &no_index, CONF_TYPE_FLAG, 0, 0, 1}, {"verbose", &verbose, CONF_TYPE_INT, CONF_RANGE, 0, 100}, @@ -433,6 +433,7 @@ float font_factor=0.75; char *sub_name=NULL; float sub_delay=0; float sub_fps=0; +int user_bpp=0; #include "cfg-mplayer.h" printf("%s",banner_text); @@ -857,9 +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); + for(i=0;i<CODECS_MAX_OUTFMT;i++){ out_fmt=sh_video->codec->outfmt[i]; - if(video_out->query_format(out_fmt)) break; + 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"); |