summaryrefslogtreecommitdiff
authoryan yan <yan.yan@amlogic.com>2018-01-17 06:43:28 (GMT)
committer Tellen Yu <tellen.yu@amlogic.com>2018-01-19 02:33:08 (GMT)
commitf048466acf52c3ce1da7c528af1f42f2f44df002 (patch)
treef6ea80a6300b1242476d9cb3eaac6c7ab001ba25
parentcd943637bca584f38a0298b18602a7d96a0d24b0 (diff)
downloadlibzvbi-o-amlogic.zip
libzvbi-o-amlogic.tar.gz
libzvbi-o-amlogic.tar.bz2
ATVCC: Remove deletion in cr command, add vbi clean api [1/1]
PD# 157353 Change-Id: Ifc41acf24ad7898e5c1f85b0d56bee32b22729ff
Diffstat
-rw-r--r--src/caption.c23
1 files changed, 20 insertions, 3 deletions
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