diff options
author | cehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-07 12:31:05 +0000 |
---|---|---|
committer | cehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-11-07 12:31:05 +0000 |
commit | 423c415534f7393c07247b87ab4d95f6d0635474 (patch) | |
tree | dd986257786302c543d7a1807b4c310d15883276 /mpcommon.c | |
parent | 1698db0726e4b7c11f4dc47dfc823df5ab1cd80d (diff) | |
download | mpv-423c415534f7393c07247b87ab4d95f6d0635474.tar.bz2 mpv-423c415534f7393c07247b87ab4d95f6d0635474.tar.xz |
Separate teletext from tv support.
Path by Francesco Lavra, francescolavra interfree it
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mpcommon.c')
-rw-r--r-- | mpcommon.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/mpcommon.c b/mpcommon.c index ed0c11e725..575ddd0425 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -11,7 +11,6 @@ #include "spudec.h" #include "version.h" #include "vobsub.h" -#include "stream/tv.h" #include "libmpcodecs/dec_teletext.h" #include "libavutil/intreadwrite.h" #include "m_option.h" @@ -209,29 +208,29 @@ void update_subtitles(sh_video_t *sh_video, double refpts, demux_stream_t *d_dvd void update_teletext(sh_video_t *sh_video, demuxer_t *demuxer, int reset) { #ifdef CONFIG_TV_TELETEXT - tvi_handle_t* tvh=demuxer->priv; int page_changed; - if (demuxer->type != DEMUXER_TYPE_TV || !tvh) return; + if (!demuxer->teletext) + return; //Also forcing page update when such ioctl is not supported or call error occured - if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_IS_CHANGED,&page_changed)!=VBI_CONTROL_TRUE) + if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_IS_CHANGED,&page_changed)!=VBI_CONTROL_TRUE) page_changed=1; if(!page_changed) return; - if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_VBIPAGE,&vo_osd_teletext_page)!=VBI_CONTROL_TRUE) + if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_VBIPAGE,&vo_osd_teletext_page)!=VBI_CONTROL_TRUE) vo_osd_teletext_page=NULL; - if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_HALF_PAGE,&vo_osd_teletext_half)!=VBI_CONTROL_TRUE) + if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_HALF_PAGE,&vo_osd_teletext_half)!=VBI_CONTROL_TRUE) vo_osd_teletext_half=0; - if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_MODE,&vo_osd_teletext_mode)!=VBI_CONTROL_TRUE) + if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_MODE,&vo_osd_teletext_mode)!=VBI_CONTROL_TRUE) vo_osd_teletext_mode=0; - if(tvh->functions->control(tvh->priv,TV_VBI_CONTROL_GET_FORMAT,&vo_osd_teletext_format)!=VBI_CONTROL_TRUE) + if(teletext_control(demuxer->teletext,TV_VBI_CONTROL_GET_FORMAT,&vo_osd_teletext_format)!=VBI_CONTROL_TRUE) vo_osd_teletext_format=0; vo_osd_changed(OSDTYPE_TELETEXT); - tvh->functions->control(tvh->priv,TV_VBI_CONTROL_MARK_UNCHANGED,NULL); + teletext_control(demuxer->teletext,TV_VBI_CONTROL_MARK_UNCHANGED,NULL); #endif } |