From 83a2c50ef9ef648b576bf4299765c73212d1f480 Mon Sep 17 00:00:00 2001 From: voroshil Date: Sun, 10 Jun 2007 00:06:12 +0000 Subject: Teletext support for tv:// (v4l and v4l2 only) modified patch from Otvos Attila oattila at chello dot hu Module uses zvbi library for all low-level VBI operations (like I/O with vbi device, converting vbi pages into usefull vbi_page stuctures, rendering them into RGB32 images). All teletext related stuff (except properties, slave commands and rendering osd in text mode or RGB32 rendered teletext pages in spu mode) is implemented in tvi_vbi.c New properties: teletext_page - switching between pages teletext_mode - switch between on/off/opaque/transparent modes teletext_format - (currently read-only) allows to get format info (black/white,gray,text) teletext_half_page - trivial zooming (displaying top/bottom half of teletext page) New slave commands: teletext_add_dec - user interface for jumping to any page by editing page number interactively teletext_go_link - goes though links, specified on current page git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23530 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mpcommon.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'mpcommon.c') diff --git a/mpcommon.c b/mpcommon.c index 9a5c52accc..7734c443d0 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -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,31 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) } current_module=NULL; } + +void update_teletext(sh_video_t *sh_video, demuxer_t *demuxer, int reset) +{ +#ifdef HAVE_TV_TELETEXT + int half_page; + tvi_handle_t *tvh = demuxer->priv; + if (demuxer->type != DEMUXER_TYPE_TV) return; + if(!tvh) return; + if(vo_spudec) { + tv_teletext_img_t* img=tv_get_teletext_imgpage(tvh); + if(img!=NULL) { + spudec_heartbeat_teletext(vo_spudec, img); + if(img->canvas) + free(img->canvas); + free(img); + vo_osd_changed(OSDTYPE_SPU); + vo_osd_teletex_text=NULL; + vo_osd_changed(OSDTYPE_TELETEXT); + return; + } + vo_osd_changed(OSDTYPE_SPU); + } + vo_osd_teletex_text=tv_get_teletext_txtpage(tvh); + tv_teletext_control(tvh,TVI_CONTROL_VBI_GET_HALF_PAGE,&half_page); + vo_osd_teletext_flip=half_page; + vo_osd_changed(OSDTYPE_TELETEXT); +#endif +} -- cgit v1.2.3