summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authoracki2 <acki2@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-13 11:15:25 +0000
committeracki2 <acki2@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-04-13 11:15:25 +0000
commit39765b05ea89fc8153a4a659348d1ef3725cf652 (patch)
tree57d2bc1778503845a06ff45f2662f7142eade96f /mplayer.c
parent8b84635c64500dc48ba1785710e0168bd4a1d51f (diff)
downloadmpv-39765b05ea89fc8153a4a659348d1ef3725cf652.tar.bz2
mpv-39765b05ea89fc8153a4a659348d1ef3725cf652.tar.xz
- added -bpp switch (only takes effect if IMGFMT_BGR) to select the desired depth
(15,16,24,32) by querying libvo for just this depth (if supported by codec) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@386 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 839ca3ce34..94a2bec9e7 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -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");