Mercurial > mplayer.hg
comparison libvo/vo_dfbmga.c @ 11987:5f780dae2cf3
fieldparity verbosity and tvnorm patch
author | attila |
---|---|
date | Sun, 22 Feb 2004 15:27:15 +0000 |
parents | bfc01249a7bc |
children | 39c24343b2a9 |
comparison
equal
deleted
inserted
replaced
11986:80f8c8cffa31 | 11987:5f780dae2cf3 |
---|---|
90 static int use_spic; | 90 static int use_spic; |
91 static int use_input; | 91 static int use_input; |
92 static int field_parity; | 92 static int field_parity; |
93 static int flipping; | 93 static int flipping; |
94 static DFBDisplayLayerBufferMode buffermode; | 94 static DFBDisplayLayerBufferMode buffermode; |
95 static int tvnorm; | |
95 | 96 |
96 static int osd_changed; | 97 static int osd_changed; |
97 static int osd_dirty; | 98 static int osd_dirty; |
98 static int osd_current; | 99 static int osd_current; |
99 static int osd_max; | 100 static int osd_max; |
240 #else | 241 #else |
241 buffermode = DLBM_BACKVIDEO; | 242 buffermode = DLBM_BACKVIDEO; |
242 osd_max = 2; | 243 osd_max = 2; |
243 #endif | 244 #endif |
244 flipping = 1; | 245 flipping = 1; |
246 tvnorm = -1; | |
245 | 247 |
246 use_input = !getenv( "DISPLAY" ); | 248 use_input = !getenv( "DISPLAY" ); |
247 | 249 |
248 if (vo_subdevice) { | 250 if (vo_subdevice) { |
249 int show_help = 0; | 251 int show_help = 0; |
306 } else { | 308 } else { |
307 show_help = 1; | 309 show_help = 1; |
308 break; | 310 break; |
309 } | 311 } |
310 opt_no = 0; | 312 opt_no = 0; |
313 } else if (!strncmp(vo_subdevice, "tvnorm=", 7)) { | |
314 if (opt_no) { | |
315 show_help = 1; | |
316 break; | |
317 } | |
318 vo_subdevice += 7; | |
319 if (!strncmp(vo_subdevice, "pal", 3)) { | |
320 tvnorm = 0; | |
321 vo_subdevice += 3; | |
322 } else if (!strncmp(vo_subdevice, "ntsc" , 4)) { | |
323 tvnorm = 1; | |
324 vo_subdevice += 4; | |
325 } else if (!strncmp(vo_subdevice, "auto" , 4)) { | |
326 tvnorm = 2; | |
327 vo_subdevice += 4; | |
328 } else { | |
329 show_help = 1; | |
330 break; | |
331 } | |
332 opt_no = 0; | |
311 } else if (!strncmp(vo_subdevice, "no", 2)) { | 333 } else if (!strncmp(vo_subdevice, "no", 2)) { |
312 if (opt_no) { | 334 if (opt_no) { |
313 show_help = 1; | 335 show_help = 1; |
314 break; | 336 break; |
315 } | 337 } |
342 " double Use double buffering\n" | 364 " double Use double buffering\n" |
343 " triple Use triple buffering\n" | 365 " triple Use triple buffering\n" |
344 " fieldparity=(top|bottom)\n" | 366 " fieldparity=(top|bottom)\n" |
345 " top Top field first\n" | 367 " top Top field first\n" |
346 " bottom Bottom field first\n" | 368 " bottom Bottom field first\n" |
369 " tvnorm=(pal|ntsc|auto)\n" | |
370 " pal Force PAL\n" | |
371 " ntsc Force NTSC\n" | |
372 " auto Select according to FPS\n" | |
347 "\n" ); | 373 "\n" ); |
348 return -1; | 374 return -1; |
349 } | 375 } |
350 } | 376 } |
351 if (!use_bes && !use_crtc2) { | 377 if (!use_bes && !use_crtc2) { |
363 if (!fb_dev_name && !(fb_dev_name = getenv( "FRAMEBUFFER" ))) | 389 if (!fb_dev_name && !(fb_dev_name = getenv( "FRAMEBUFFER" ))) |
364 fb_dev_name = "/dev/fb0"; | 390 fb_dev_name = "/dev/fb0"; |
365 DirectFBSetOption( "fbdev", fb_dev_name ); | 391 DirectFBSetOption( "fbdev", fb_dev_name ); |
366 DirectFBSetOption( "no-cursor", "" ); | 392 DirectFBSetOption( "no-cursor", "" ); |
367 DirectFBSetOption( "bg-color", "00000000" ); | 393 DirectFBSetOption( "bg-color", "00000000" ); |
394 | |
395 switch (tvnorm) { | |
396 case 0: | |
397 DirectFBSetOption( "matrox-tv-standard", "pal" ); | |
398 mp_msg( MSGT_VO, MSGL_INFO, "vo_dfbmga: Forced TV standard to PAL\n" ); | |
399 break; | |
400 case 1: | |
401 DirectFBSetOption( "matrox-tv-standard", "ntsc" ); | |
402 mp_msg( MSGT_VO, MSGL_INFO, "vo_dfbmga: Forced TV standard to NTSC\n" ); | |
403 break; | |
404 case 2: | |
405 if (vo_fps > 27) { | |
406 DirectFBSetOption( "matrox-tv-standard", "ntsc" ); | |
407 mp_msg( MSGT_VO, MSGL_INFO, | |
408 "vo_dfbmga: Selected TV standard based upon FPS: NTSC\n" ); | |
409 } else { | |
410 DirectFBSetOption( "matrox-tv-standard", "pal" ); | |
411 mp_msg( MSGT_VO, MSGL_INFO, | |
412 "vo_dfbmga: Selected TV standard based upon FPS: PAL\n" ); | |
413 } | |
414 break; | |
415 } | |
368 | 416 |
369 if ((res = DirectFBCreate( &dfb )) != DFB_OK) { | 417 if ((res = DirectFBCreate( &dfb )) != DFB_OK) { |
370 mp_msg( MSGT_VO, MSGL_ERR, | 418 mp_msg( MSGT_VO, MSGL_ERR, |
371 "vo_dfbmga: DirectFBCreate() failed - %s\n", | 419 "vo_dfbmga: DirectFBCreate() failed - %s\n", |
372 DirectFBErrorString( res ) ); | 420 DirectFBErrorString( res ) ); |
588 #if DIRECTFBVERSION > 916 | 636 #if DIRECTFBVERSION > 916 |
589 if (field_parity != -1) { | 637 if (field_parity != -1) { |
590 dlc.options |= DLOP_FIELD_PARITY; | 638 dlc.options |= DLOP_FIELD_PARITY; |
591 } | 639 } |
592 #endif | 640 #endif |
641 mp_msg( MSGT_VO, MSGL_INFO, "vo_dfbmga: Field parity set to: "); | |
642 switch (field_parity) { | |
643 case -1: | |
644 mp_msg( MSGT_VO, MSGL_INFO, "Don't care\n"); | |
645 break; | |
646 case 0: | |
647 mp_msg( MSGT_VO, MSGL_INFO, "Top field first\n"); | |
648 break; | |
649 case 1: | |
650 mp_msg( MSGT_VO, MSGL_INFO, "Bottom field first\n"); | |
651 break; | |
652 } | |
593 | 653 |
594 switch (dlc.pixelformat) { | 654 switch (dlc.pixelformat) { |
595 case DSPF_I420: | 655 case DSPF_I420: |
596 case DSPF_YV12: | 656 case DSPF_YV12: |
597 /* sub-picture supported */ | 657 /* sub-picture supported */ |