[Mplayer-cvslog] CVS: main/libvo vo_dfbmga.c,1.14,1.15
Attila Kinali CVS
syncmail at mplayerhq.hu
Sun Feb 22 16:27:17 CET 2004
CVS change done by Attila Kinali CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv9928
Modified Files:
vo_dfbmga.c
Log Message:
fieldparity verbosity and tvnorm patch
Index: vo_dfbmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dfbmga.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vo_dfbmga.c 28 Jan 2004 10:19:49 -0000 1.14
+++ vo_dfbmga.c 22 Feb 2004 15:27:15 -0000 1.15
@@ -92,6 +92,7 @@
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 @@
osd_max = 2;
#endif
flipping = 1;
+ tvnorm = -1;
use_input = !getenv( "DISPLAY" );
@@ -308,6 +310,26 @@
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 @@
" 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 @@
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 @@
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:
More information about the MPlayer-cvslog
mailing list