From f048466acf52c3ce1da7c528af1f42f2f44df002 Mon Sep 17 00:00:00 2001 From: yan yan Date: Wed, 17 Jan 2018 06:43:28 +0000 Subject: ATVCC: Remove deletion in cr command, add vbi clean api [1/1] PD# 157353 Change-Id: Ifc41acf24ad7898e5c1f85b0d56bee32b22729ff --- diff --git a/src/caption.c b/src/caption.c index 82ca1e9..c4e815a 100644 --- a/src/caption.c +++ b/src/caption.c @@ -1171,8 +1171,6 @@ caption_command(vbi_decoder *vbi, struct caption *cc, case 10: /* Text Restart 001 c10f 010 1010 */ // not verified - erase_memory(cc, ch, ch->hidden); - erase_memory(cc, ch, ch->hidden ^ 1); ch = switch_channel(cc, chan | 4); ch->pos_flag = 1; set_cursor(ch, 1, 0); @@ -1550,7 +1548,7 @@ vbi_decode_caption(vbi_decoder *vbi, int line, uint8_t *buf) put_char(cc, ch, c); } } - +#if 0 clock_gettime(CLOCK_REALTIME, &now); flash = (now.tv_nsec / 250000000) & 1; @@ -1577,6 +1575,7 @@ vbi_decode_caption(vbi_decoder *vbi, int line, uint8_t *buf) } } } +#endif update_display(vbi); @@ -1865,6 +1864,24 @@ void vbi_refresh_cc(vbi_decoder *vbi) pthread_mutex_unlock(&vbi->cc.mutex); } +void vbi_caption_reset(vbi_decoder *vbi) +{ + cc_channel *ch; + vbi_page *spg; + int i, j; + + pthread_mutex_lock(&vbi->cc.mutex); + for (i=0; i<9; i++) + { + for (j=0; j<3; j++) + { + ch = &vbi->cc.channel[i]; + erase_memory(&vbi->cc, ch, j); + } + } + pthread_mutex_unlock(&vbi->cc.mutex); +} + /* Local variables: c-set-style: K&R -- cgit