Mercurial > mplayer.hg
diff mpcommon.c @ 24342:8873c972c6aa
Decrease teletext page rendering frequency from 1/frame to about 4/sec.
author | voroshil |
---|---|
date | Sat, 08 Sep 2007 03:06:23 +0000 |
parents | 037737866f6a |
children | 078bdfd44751 |
line wrap: on
line diff
--- a/mpcommon.c Fri Sep 07 19:36:14 2007 +0000 +++ b/mpcommon.c Sat Sep 08 03:06:23 2007 +0000 @@ -146,8 +146,17 @@ { #ifdef HAVE_TV_TELETEXT tvi_handle_t* tvh=demuxer->priv; + int page_changed; + if (demuxer->type != DEMUXER_TYPE_TV || !tvh) 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)!=TVI_CONTROL_TRUE) + page_changed=1; + + if(!page_changed) + 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) @@ -157,5 +166,7 @@ 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); + + tvh->functions->control(tvh->priv,TV_VBI_CONTROL_MARK_UNCHANGED,NULL); #endif }