Mercurial > mplayer.hg
diff mpcommon.c @ 23903:037737866f6a
Teletext support
Part 4/5: teletext page rendering
author | voroshil |
---|---|
date | Sun, 29 Jul 2007 17:57:39 +0000 |
parents | 21c28c2645fe |
children | 8873c972c6aa |
line wrap: on
line diff
--- a/mpcommon.c Sun Jul 29 17:57:12 2007 +0000 +++ b/mpcommon.c Sun Jul 29 17:57:39 2007 +0000 @@ -7,6 +7,9 @@ #include "libvo/video_out.h" #include "spudec.h" #include "vobsub.h" +#ifdef HAVE_TV_TELETEXT +#include "stream/tv.h" +#endif double sub_last_pts = -303; @@ -138,3 +141,21 @@ } current_module=NULL; } + +void update_teletext(sh_video_t *sh_video, demuxer_t *demuxer, int reset) +{ +#ifdef HAVE_TV_TELETEXT + tvi_handle_t* tvh=demuxer->priv; + if (demuxer->type != DEMUXER_TYPE_TV || !tvh) return; + + if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_VBIPAGE,&vo_osd_teletext_page)!=TVI_CONTROL_TRUE) + vo_osd_teletext_page=NULL; + if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_HALF_PAGE,&vo_osd_teletext_half)!=TVI_CONTROL_TRUE) + vo_osd_teletext_half=0; + if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_MODE,&vo_osd_teletext_mode)!=TVI_CONTROL_TRUE) + vo_osd_teletext_mode=0; + if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_FORMAT,&vo_osd_teletext_format)!=TVI_CONTROL_TRUE) + vo_osd_teletext_format=0; + vo_osd_changed(OSDTYPE_TELETEXT); +#endif +}