fieldparity verbosity and tvnorm patch

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11988 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
attila 2004-02-22 15:27:15 +00:00
parent 1723559859
commit 08b0da4c33
1 changed files with 60 additions and 0 deletions

View File

@ -92,6 +92,7 @@ static int use_input;
static int field_parity;
static int flipping;
static DFBDisplayLayerBufferMode buffermode;
static int tvnorm;
static int osd_changed;
static int osd_dirty;
@ -242,6 +243,7 @@ preinit( const char *arg )
osd_max = 2;
#endif
flipping = 1;
tvnorm = -1;
use_input = !getenv( "DISPLAY" );
@ -308,6 +310,26 @@ preinit( const char *arg )
break;
}
opt_no = 0;
} else if (!strncmp(vo_subdevice, "tvnorm=", 7)) {
if (opt_no) {
show_help = 1;
break;
}
vo_subdevice += 7;
if (!strncmp(vo_subdevice, "pal", 3)) {
tvnorm = 0;
vo_subdevice += 3;
} else if (!strncmp(vo_subdevice, "ntsc" , 4)) {
tvnorm = 1;
vo_subdevice += 4;
} else if (!strncmp(vo_subdevice, "auto" , 4)) {
tvnorm = 2;
vo_subdevice += 4;
} else {
show_help = 1;
break;
}
opt_no = 0;
} else if (!strncmp(vo_subdevice, "no", 2)) {
if (opt_no) {
show_help = 1;
@ -344,6 +366,10 @@ preinit( const char *arg )
" fieldparity=(top|bottom)\n"
" top Top field first\n"
" bottom Bottom field first\n"
" tvnorm=(pal|ntsc|auto)\n"
" pal Force PAL\n"
" ntsc Force NTSC\n"
" auto Select according to FPS\n"
"\n" );
return -1;
}
@ -366,6 +392,28 @@ preinit( const char *arg )
DirectFBSetOption( "no-cursor", "" );
DirectFBSetOption( "bg-color", "00000000" );
switch (tvnorm) {
case 0:
DirectFBSetOption( "matrox-tv-standard", "pal" );
mp_msg( MSGT_VO, MSGL_INFO, "vo_dfbmga: Forced TV standard to PAL\n" );
break;
case 1:
DirectFBSetOption( "matrox-tv-standard", "ntsc" );
mp_msg( MSGT_VO, MSGL_INFO, "vo_dfbmga: Forced TV standard to NTSC\n" );
break;
case 2:
if (vo_fps > 27) {
DirectFBSetOption( "matrox-tv-standard", "ntsc" );
mp_msg( MSGT_VO, MSGL_INFO,
"vo_dfbmga: Selected TV standard based upon FPS: NTSC\n" );
} else {
DirectFBSetOption( "matrox-tv-standard", "pal" );
mp_msg( MSGT_VO, MSGL_INFO,
"vo_dfbmga: Selected TV standard based upon FPS: PAL\n" );
}
break;
}
if ((res = DirectFBCreate( &dfb )) != DFB_OK) {
mp_msg( MSGT_VO, MSGL_ERR,
"vo_dfbmga: DirectFBCreate() failed - %s\n",
@ -590,6 +638,18 @@ config( uint32_t width, uint32_t height,
dlc.options |= DLOP_FIELD_PARITY;
}
#endif
mp_msg( MSGT_VO, MSGL_INFO, "vo_dfbmga: Field parity set to: ");
switch (field_parity) {
case -1:
mp_msg( MSGT_VO, MSGL_INFO, "Don't care\n");
break;
case 0:
mp_msg( MSGT_VO, MSGL_INFO, "Top field first\n");
break;
case 1:
mp_msg( MSGT_VO, MSGL_INFO, "Bottom field first\n");
break;
}
switch (dlc.pixelformat) {
case DSPF_I420: