[vlc-devel] commit: zvbi: Use the "initial page" as signaled by the TS demuxer. ( Derk-Jan Hartman )
git version control
git at videolan.org
Sat Sep 6 15:22:11 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Sat Sep 6 14:56:08 2008 +0200| [344612b35963ec721a1cb5886133e74b5fd42caf] | committer: Derk-Jan Hartman
zvbi: Use the "initial page" as signaled by the TS demuxer.
This way the TS demux can create multiple tracks that will take you straight to the subtitles, program listings etc.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=344612b35963ec721a1cb5886133e74b5fd42caf
---
modules/codec/zvbi.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index f4de0fd..9405834 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -197,6 +197,16 @@ static int Open( vlc_object_t *p_this )
var_AddCallback( p_dec, "vbi-page",
RequestPage, p_sys );
+ /* Check if the Teletext track has a known "initial page". */
+ if( p_sys->i_wanted_page == 100 && p_dec->fmt_in.subs.dvb.i_id != -1 )
+ {
+ int i_wanted_magazine = p_dec->fmt_in.subs.dvb.i_id >> 16;
+ if( i_wanted_magazine == 0 )
+ i_wanted_magazine = 8;
+ p_sys->i_wanted_page = vbi_bcd2dec(p_dec->fmt_in.subs.dvb.i_id & 0xff);
+ p_sys->i_wanted_page += 100*i_wanted_magazine;
+ }
+
p_sys->b_opaque = var_CreateGetBool( p_dec, "vbi-opaque" );
var_AddCallback( p_dec, "vbi-opaque", Opaque, p_sys );
More information about the vlc-devel
mailing list