summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-10 00:06:12 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-10 00:06:12 +0000
commit83a2c50ef9ef648b576bf4299765c73212d1f480 (patch)
treeab09f836c3ca91641c96b0630b2b2f479a3a6c2f /mplayer.c
parent990b33b1c28d6b604a85e588689ad7fb6de59354 (diff)
downloadmpv-83a2c50ef9ef648b576bf4299765c73212d1f480.tar.bz2
mpv-83a2c50ef9ef648b576bf4299765c73212d1f480.tar.xz
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
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index e79f2586aa..693b7ed353 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1040,6 +1040,10 @@ void init_vo_spudec(void) {
spudec_set_font_factor(vo_spudec,font_factor);
}
+#ifdef HAVE_TV_TELETEXT
+ if (vo_spudec==NULL && mpctx->demuxer->type==DEMUXER_TYPE_TV)
+ vo_spudec=spudec_new_scaled(NULL, mpctx->sh_video->disp_w, mpctx->sh_video->disp_h);
+#endif
if (vo_spudec!=NULL)
inited_flags|=INITED_SPUDEC;
}
@@ -1622,6 +1626,7 @@ static int generate_video_frame(sh_video_t *sh_video, demux_stream_t *d_video)
decoded_frame = decode_video(sh_video, start, in_size, 0, pts);
if (decoded_frame) {
update_subtitles(sh_video, mpctx->d_sub, 0);
+ update_teletext(sh_video, mpctx->demuxer, 0);
update_osd_msg();
current_module = "filter video";
if (filter_video(sh_video, decoded_frame, sh_video->pts))
@@ -2036,6 +2041,7 @@ static double update_video(int *blit_frame)
++total_frame_cnt;
}
update_subtitles(sh_video, mpctx->d_sub, 0);
+ update_teletext(sh_video, mpctx->demuxer, 0);
update_osd_msg();
current_module = "decode_video";
decoded_frame = decode_video(sh_video, start, in_size, drop_frame,
@@ -2249,6 +2255,7 @@ static int seek(MPContext *mpctx, double amount, int style)
// be completely wrong (probably 0).
mpctx->sh_video->pts = mpctx->d_video->pts;
update_subtitles(mpctx->sh_video, mpctx->d_sub, 1);
+ update_teletext(mpctx->sh_video, mpctx->demuxer, 1);
}
if (mpctx->sh_audio) {
@@ -3123,7 +3130,11 @@ demux_info_print(mpctx->demuxer);
//================== Read SUBTITLES (DVD & TEXT) ==========================
if(vo_spudec==NULL && mpctx->sh_video &&
- (mpctx->stream->type==STREAMTYPE_DVD || mpctx->stream->type == STREAMTYPE_DVDNAV || mpctx->d_sub->id >= 0)){
+ (mpctx->stream->type==STREAMTYPE_DVD || mpctx->stream->type == STREAMTYPE_DVDNAV ||
+#ifdef HAVE_TV_TELETEXT
+ mpctx->demuxer->type==DEMUXER_TYPE_TV ||
+#endif
+ mpctx->d_sub->id >= 0)){
init_vo_spudec();
}