From 5b673bf021f599e0798fa2e60853208bd72d576f Mon Sep 17 00:00:00 2001 From: voroshil Date: Wed, 29 Aug 2007 17:28:41 +0000 Subject: Implement Flash/Steady (swapping foreground/background colors) and Conceal (filling following chars with spaces) control characters. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24295 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tvi_vbi.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'stream/tvi_vbi.c') diff --git a/stream/tvi_vbi.c b/stream/tvi_vbi.c index 423d1ed23c..f89550e2e3 100644 --- a/stream/tvi_vbi.c +++ b/stream/tvi_vbi.c @@ -572,6 +572,7 @@ static void decode_page(tt_char* p,int lang,unsigned char* raw) int bg_color=0; int row,col; int separated=0; + int conceal; for(row=0;row=0x08 && c<=0x0f){ + if(c>=0x08 && c<=0x09){//Flash/Steady + int tmp; + tmp=bg_color; + bg_color=fg_color; + fg_color=tmp; + if(c==0x09){ + p[i].fg=fg_color; + p[i].bg=bg_color; + } + }else if(c>=0x0a && c<=0x0f){ }else if (c<=0x17){ //colors fg_color=c&0x0f; gfx=c>>4; + conceal=0; }else if (c<=0x18){ + conceal=1; }else if (c<=0x1a){ //Contiguous/Separated gfx separated=!(c&1); }else if (c<=0x1b){ @@ -612,7 +625,10 @@ static void decode_page(tt_char* p,int lang,unsigned char* raw) continue; } - if(gfx){ + if(conceal){ + p[i].gfx=0; + p[i].unicode=' '; + }else if(gfx){ p[i].unicode=c-0x20; if (p[i].unicode>0x3f) p[i].unicode-=0x20; }else -- cgit v1.2.3