Ticket #466: mplayer.cc.patch
| File mplayer.cc.patch, 9.8 KB (added by , 20 years ago) |
|---|
-
cfg-common.h
old new 253 253 // specify IFO file for VOBSUB subtitle 254 254 {"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL}, 255 255 // enable Closed Captioning display 256 {"subcc", &subcc_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL}, 257 {"nosubcc", &subcc_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL}, 256 {"subcc", &subcc_enabled, CONF_TYPE_INT, 0, 0, 1, NULL}, 258 257 {"overlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 2, NULL}, 259 258 {"nooverlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 0, NULL}, 260 259 {"sub-bg-color", &sub_bg_color, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL}, -
libmpdemux/demux_ty.c
old new 103 103 } TiVoInfo; 104 104 105 105 off_t vstream_streamsize( ); 106 void ty_ClearOSD( int start );106 void ty_ClearOSD( int start, int osd ); 107 107 108 108 // DTiVo MPEG 336, 480, 576, 768 109 109 // SA TiVo 864 … … 1008 1008 } 1009 1009 if ( subcc_enabled ) 1010 1010 { 1011 ty_ClearOSD( 0 );1011 ty_ClearOSD( 0, 0 ); 1012 1012 } 1013 1013 } 1014 1014 -
libmpdemux/demux_ty_osd.c
old new 65 65 66 66 static void ty_DrawOSD() 67 67 { 68 int index; 68 69 // printf( "Calling ty_DrawOSD()\n" ); 70 for ( index = 1; index < SUB_MAX_TEXT ; index++ ) 71 { 72 memcpy( ty_OSD1.text[ index ], ty_OSD2.text[ index ], TY_CC_MAX_X - 1 ); 73 ty_OSD1.text[ index ][ TY_CC_MAX_X - 1 ] = 0; 74 } 69 75 tyOSDUpdate = 1; 70 76 } 71 77 72 void ty_ClearOSD( int start )78 void ty_ClearOSD( int start, int osd ) 73 79 { 74 80 int index; 75 81 // printf( "Calling ty_ClearOSD()\n" ); 76 82 for ( index = start ; index < SUB_MAX_TEXT ; index++ ) 77 83 { 78 memset( ty_OSD1.text[ index ], ' ', TY_CC_MAX_X - 1 ); 79 ty_OSD1.text[ index ][ TY_CC_MAX_X - 1 ] = 0; 80 memset( ty_OSD2.text[ index ], ' ', TY_CC_MAX_X - 1 ); 81 ty_OSD2.text[ index ][ TY_CC_MAX_X - 1 ] = 0; 84 85 if ( osd == 0 || osd == 1 ) 86 { 87 memset( ty_OSD1.text[ index ], ' ', TY_CC_MAX_X - 1 ); 88 ty_OSD1.text[ index ][ TY_CC_MAX_X - 1 ] = 0; 89 } 90 91 if ( osd == 0 || osd == 2 ) 92 { 93 memset( ty_OSD2.text[ index ], ' ', TY_CC_MAX_X - 1 ); 94 ty_OSD2.text[ index ][ TY_CC_MAX_X - 1 ] = 0; 95 } 82 96 } 83 97 } 84 98 … … 103 117 // printf( "Calling ty_DrawChar() x:%d y:%d %c fg:%d bg:%d\n", 104 118 // cx, cy, disChar, fgColor, bgColor ); 105 119 106 ty_OSD 1.text[ TY_CC_Y_Offset + cy ][ cx ] = disChar;107 memset( &( ty_OSD 1.text[ TY_CC_Y_Offset + cy ][ cx + 1 ] ), ' ',120 ty_OSD2.text[ TY_CC_Y_Offset + cy ][ cx ] = disChar; 121 memset( &( ty_OSD2.text[ TY_CC_Y_Offset + cy ][ cx + 1 ] ), ' ', 108 122 TY_CC_MAX_X - cx - 2 ); 109 123 ( *x )++; 110 124 } … … 118 132 // 119 133 if ( ( source + TY_CC_Y_Offset + numLines ) > SUB_MAX_TEXT ) 120 134 { 121 ty_ClearOSD( 1 );135 ty_ClearOSD( 1, 1 ); 122 136 return; 123 137 } 124 138 125 139 if ( ( source + TY_CC_Y_Offset + numLines ) < 0 ) 126 140 { 127 ty_ClearOSD( 1 );141 ty_ClearOSD( 1, 1 ); 128 142 return; 129 143 } 130 144 131 145 if ( numLines > SUB_MAX_TEXT ) 132 146 { 133 ty_ClearOSD( 1 );147 ty_ClearOSD( 1, 1 ); 134 148 return; 135 149 } 136 150 … … 148 162 static void ty_drawchar( char c ) 149 163 { 150 164 if ( c < 2 ) return; 151 165 152 166 if ( TY_OSD_flags & TY_OSD_MODE && TY_CC_stat != TY_CCNONE && 153 167 TY_CC_CUR_Y != -1 ) 154 168 ty_DrawChar( &TY_CC_CUR_X, &TY_CC_CUR_Y, c, 4, 13 ); … … 186 200 11, -1, 1, 2, 3, 4, 12, 13, 14, 15, 5, 6, 7, 8, 9, 10 187 201 }; 188 202 203 // these are kind of poor substitutes for the actual special characters 204 char specialchar[] = { 'R', 'o', '/', '?', '*', 'c', 'E', '/', 'a', ' ', 'e', 'a', 'e', 'i', 'o', 'u' }; 189 205 // char specialchar[] = { '®', '°', '½', '¿', '*', '¢', '£', 14, 'à ', ' ', 'è', 'â', 'ê', 'î', 'ô', 'û' }; 190 206 191 207 static int ty_CCdecode( char b1, char b2 ) … … 333 349 } 334 350 else 335 351 { 336 // ty_drawchar(specialchar[ b2 & 0x0f ] );337 ty_drawchar( ' ' );352 ty_drawchar( specialchar[ b2 & 0x0f ] ); 353 // ty_drawchar( ' ' ); 338 354 } 339 355 break; 340 356 } … … 353 369 { 354 370 if ( TY_OSD_flags & TY_OSD_MODE && 355 371 TY_CC_stat != TY_CCPOPUP ) 356 ty_ClearOSD( 1 );372 ty_ClearOSD( 1, 2 ); 357 373 TY_CC_stat = TY_CCPOPUP; 358 374 break; 359 375 } … … 366 382 367 383 case 0x25 ... 0x27: // 2-4 row captions 368 384 { 369 if ( TY_CC_stat == TY_CCPOPUP ) ty_ClearOSD( 1 );385 if ( TY_CC_stat == TY_CCPOPUP ) ty_ClearOSD( 1, 2 ); 370 386 TY_CC_stat = b2 - 0x23; 371 387 if ( TY_CC_CUR_Y < TY_CC_stat ) TY_CC_CUR_Y = TY_CC_stat; 372 388 break; … … 397 413 { 398 414 if ( TY_CC_stat > TY_CCPOPUP || TY_CC_ptr == TY_CC_buf ) 399 415 { 400 ty_ClearOSD( 1 );416 ty_ClearOSD( 1, 1 ); 401 417 ty_draw(); 402 418 } 403 419 else 404 420 { 405 ty_ClearOSD( 1 );421 ty_ClearOSD( 1, 1 ); 406 422 407 423 // CRW - 408 424 // new buffer … … 442 458 if ( TY_OSD_debug && TY_CC_ptr != TY_CC_buf ) 443 459 mp_msg( MSGT_DEMUX, MSGL_DBG3, "(TY_OSD_debug) %s\n", 444 460 TY_CC_buf ); 445 if ( TY_OSD_flags & TY_OSD_MODE ) ty_ClearOSD( 1 );461 if ( TY_OSD_flags & TY_OSD_MODE ) ty_ClearOSD( 1, 2 ); 446 462 447 463 TY_CC_CUR_X = 1; 448 464 TY_CC_CUR_Y = -1; … … 871 887 ty_OSD1.text[ index ] = malloc( TY_CC_MAX_X ); 872 888 ty_OSD2.text[ index ] = malloc( TY_CC_MAX_X ); 873 889 } 874 ty_ClearOSD( 0 );890 ty_ClearOSD( 0, 0 ); 875 891 ty_OSD1.lines = SUB_MAX_TEXT; 876 892 ty_OSD2.lines = SUB_MAX_TEXT; 877 893 ty_pOSD1 = &ty_OSD1; … … 880 896 tyOSDInited = 1; 881 897 } 882 898 883 if ( buf[ 0 ] == 0x01 )899 if ( buf[ 0 ] == 0x01 && ( subcc_enabled & 0x01 ) ) 884 900 { 885 901 ty_CCdecode( buf[ 1 ], buf[ 2 ] ); 886 902 } 887 if ( buf[ 0 ] == 0x02 )903 if ( buf[ 0 ] == 0x02 && ( subcc_enabled & 0x02 ) ) 888 904 { 889 905 ty_XDSdecode( buf[ 1 ], buf[ 2 ] ); 890 906 } -
DOCS/man/cs/mplayer.1
old new 1571 1571 .PD 1 1572 1572 . 1573 1573 .TP 1574 .B \-subcc \1574 .B \-subcc 1 \ 1575 1575 Zobrazovat DVD Closed Caption (CC) titulky. 1576 1576 Toto 1577 1577 .B nejsou -
DOCS/man/de/mplayer.1
old new 1614 1614 .PD 1 1615 1615 . 1616 1616 .TP 1617 .B \-subcc \1617 .B \-subcc 1 \ 1618 1618 Zeigt DVD-Closed-Caption-Untertitel an (CC). 1619 1619 Diese sind KEINE VOB-Untertitel. Hierbei handelt es sich um spezielle 1620 1620 ASCII-Untertitel für Hörgeschädigte, die in VOB-Userdatenstreams auf -
DOCS/man/en/mplayer.1
old new 1586 1586 .PD 1 1587 1587 . 1588 1588 .TP 1589 .B \-subcc \1590 Display DVD Closed Caption (CC) subtitles.1589 .B \-subcc <0\-3> \ 1590 Display Closed Caption (CC) or Extended Data Service (XDS) subtitles. 1591 1591 These are 1592 1592 .B not 1593 1593 the VOB subtitles, these are special ASCII subtitles for the 1594 1594 hearing impaired encoded in the VOB userdata stream on most region 1 DVDs. 1595 1595 CC subtitles have not been spotted on DVDs from other regions so far. 1596 . 1597 Passing -subcc 1 will show Closed Caption subtitles. Passing -subcc 2 will 1598 show XDS subtitles. Passing -subcc 3 will show both types. 1596 1599 . 1597 1600 .TP 1598 1601 .B \-subcp <codepage> (iconv only) -
DOCS/man/es/mplayer.1
old new 1535 1535 .PD 1 1536 1536 . 1537 1537 .TP 1538 .B \-subcc \1538 .B \-subcc 1 \ 1539 1539 Muestra subtículos de DVD Closed Caption (CC). 1540 1540 Esto no es los subtítulos VOB, son subtítulos especiales ASCII codificados 1541 1541 para el que no oye bien en el flujo de datos de usuario VOB en la mayoría de los -
DOCS/man/fr/mplayer.1
old new 1683 1683 .PD 1 1684 1684 . 1685 1685 .TP 1686 .B \-subcc \1686 .B \-subcc 1 \ 1687 1687 Affiche les sous-titres DVD Closed Caption (CC). 1688 1688 Ce ne sont 1689 1689 .B pas -
DOCS/man/hu/mplayer.1
old new 1264 1264 Megadja hogy a feliratok merre legyenek rendezve. 1265 1265 A 0 a képernyõ felsõ része, az 1 a közepe, a 2 az alsó része. 1266 1266 .TP 1267 .B \-subcc \1267 .B \-subcc 1 \ 1268 1268 DVD Closed Caption (CC) feliratok megjelenítése. 1269 1269 Ezek nem VOB feliratok, hanem ASCII-k. Az 1-es régiókódú lemezeken 1270 1270 haszálatosak. -
DOCS/man/it/mplayer.1
old new 1689 1689 .PD 1 1690 1690 . 1691 1691 .TP 1692 .B \-subcc \1692 .B \-subcc 1 \ 1693 1693 Visualizza i sottotitoli Close Caption (CC) dei DVD. 1694 1694 Questi 1695 1695 .B non -
DOCS/man/pl/mplayer.1
old new 1607 1607 .PD 1 1608 1608 . 1609 1609 .TP 1610 .B \-subcc \1610 .B \-subcc 1 \ 1611 1611 Wy¶wietla napisy DVD Closed Caption (CC). 1612 1612 To 1613 1613 .B nie -
DOCS/man/sv/mplayer.1
old new 1513 1513 .PD 1 1514 1514 . 1515 1515 .TP 1516 .B \-subcc \1516 .B \-subcc 1 \ 1517 1517 Display DVD Closed Caption (CC) subtitles. 1518 1518 These are NOT the VOB subtitles, these are special ASCII subtitles for the 1519 1519 hearing impaired encoded in the VOB userdata stream on most region 1 DVDs. -
DOCS/man/zh/mplayer.1
old new 859 859 ÉèÖÃ×ÖÄ»ºÍOSD±³¾°µÄÑÕɫֵ. Ŀǰ×ÖÄ»ÊǻҶÈͼÏñËùÒÔÕâ¸öÖµÏ൱ÓÚÑÕÉ«µÄÁÁ¶È. 860 860 255´ú±í°×É«0´ú±íºÚÉ«. 861 861 .TP 862 .B \-subcc \862 .B \-subcc 1 \ 863 863 ÏÔʾDVDµÄÒþ²Ø×ÖÄ»Êý¾Ý±í(CC)×ÖÄ». 864 864 ËüÃDz»ÊÇVOB×ÖÄ», ËüÃÇÊÇΪÌýÁ¦ÕϰµÄÈË×¼±¸µÄÌØÊâµÄASCII×ÖÄ», 865 865 ±àÂëÔÚ´ó¶àÊýÇøÂëΪ1µÄVOBµÄÓû§Êý¾ÝÁ÷ÖÐ.
