Mercurial > mplayer.hg
diff mplayer.c @ 385:3360c39a6bb7
- 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)
author | acki2 |
---|---|
date | Fri, 13 Apr 2001 11:15:25 +0000 |
parents | a894e005bb56 |
children | ccb5ebfaaeac |
line wrap: on
line diff
--- a/mplayer.c Fri Apr 13 00:54:05 2001 +0000 +++ b/mplayer.c Fri Apr 13 11:15:25 2001 +0000 @@ -433,6 +433,7 @@ 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 @@ 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");