Mercurial > mplayer.hg
comparison mplayer.c @ 23510:a6c619ee9d30
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
author | voroshil |
---|---|
date | Sun, 10 Jun 2007 00:06:12 +0000 |
parents | 15710094cb15 |
children | 7acb7ac64104 |
comparison
equal
deleted
inserted
replaced
23509:53d57a0ebe13 | 23510:a6c619ee9d30 |
---|---|
1038 current_module="spudec_init_normal"; | 1038 current_module="spudec_init_normal"; |
1039 vo_spudec=spudec_new_scaled(palette, mpctx->sh_video->disp_w, mpctx->sh_video->disp_h); | 1039 vo_spudec=spudec_new_scaled(palette, mpctx->sh_video->disp_w, mpctx->sh_video->disp_h); |
1040 spudec_set_font_factor(vo_spudec,font_factor); | 1040 spudec_set_font_factor(vo_spudec,font_factor); |
1041 } | 1041 } |
1042 | 1042 |
1043 #ifdef HAVE_TV_TELETEXT | |
1044 if (vo_spudec==NULL && mpctx->demuxer->type==DEMUXER_TYPE_TV) | |
1045 vo_spudec=spudec_new_scaled(NULL, mpctx->sh_video->disp_w, mpctx->sh_video->disp_h); | |
1046 #endif | |
1043 if (vo_spudec!=NULL) | 1047 if (vo_spudec!=NULL) |
1044 inited_flags|=INITED_SPUDEC; | 1048 inited_flags|=INITED_SPUDEC; |
1045 } | 1049 } |
1046 | 1050 |
1047 /* | 1051 /* |
1620 max_framesize = in_size; | 1624 max_framesize = in_size; |
1621 current_module = "decode video"; | 1625 current_module = "decode video"; |
1622 decoded_frame = decode_video(sh_video, start, in_size, 0, pts); | 1626 decoded_frame = decode_video(sh_video, start, in_size, 0, pts); |
1623 if (decoded_frame) { | 1627 if (decoded_frame) { |
1624 update_subtitles(sh_video, mpctx->d_sub, 0); | 1628 update_subtitles(sh_video, mpctx->d_sub, 0); |
1629 update_teletext(sh_video, mpctx->demuxer, 0); | |
1625 update_osd_msg(); | 1630 update_osd_msg(); |
1626 current_module = "filter video"; | 1631 current_module = "filter video"; |
1627 if (filter_video(sh_video, decoded_frame, sh_video->pts)) | 1632 if (filter_video(sh_video, decoded_frame, sh_video->pts)) |
1628 break; | 1633 break; |
1629 } | 1634 } |
2034 } else | 2039 } else |
2035 drop_frame = dropped_frames = 0; | 2040 drop_frame = dropped_frames = 0; |
2036 ++total_frame_cnt; | 2041 ++total_frame_cnt; |
2037 } | 2042 } |
2038 update_subtitles(sh_video, mpctx->d_sub, 0); | 2043 update_subtitles(sh_video, mpctx->d_sub, 0); |
2044 update_teletext(sh_video, mpctx->demuxer, 0); | |
2039 update_osd_msg(); | 2045 update_osd_msg(); |
2040 current_module = "decode_video"; | 2046 current_module = "decode_video"; |
2041 decoded_frame = decode_video(sh_video, start, in_size, drop_frame, | 2047 decoded_frame = decode_video(sh_video, start, in_size, drop_frame, |
2042 sh_video->pts); | 2048 sh_video->pts); |
2043 current_module = "filter_video"; | 2049 current_module = "filter_video"; |
2247 // Not all demuxers set d_video->pts during seek, so this value | 2253 // Not all demuxers set d_video->pts during seek, so this value |
2248 // (which is used by at least vobsub and edl code below) may | 2254 // (which is used by at least vobsub and edl code below) may |
2249 // be completely wrong (probably 0). | 2255 // be completely wrong (probably 0). |
2250 mpctx->sh_video->pts = mpctx->d_video->pts; | 2256 mpctx->sh_video->pts = mpctx->d_video->pts; |
2251 update_subtitles(mpctx->sh_video, mpctx->d_sub, 1); | 2257 update_subtitles(mpctx->sh_video, mpctx->d_sub, 1); |
2258 update_teletext(mpctx->sh_video, mpctx->demuxer, 1); | |
2252 } | 2259 } |
2253 | 2260 |
2254 if (mpctx->sh_audio) { | 2261 if (mpctx->sh_audio) { |
2255 current_module = "seek_audio_reset"; | 2262 current_module = "seek_audio_reset"; |
2256 mpctx->audio_out->reset(); // stop audio, throwing away buffered data | 2263 mpctx->audio_out->reset(); // stop audio, throwing away buffered data |
3121 /* display clip info */ | 3128 /* display clip info */ |
3122 demux_info_print(mpctx->demuxer); | 3129 demux_info_print(mpctx->demuxer); |
3123 | 3130 |
3124 //================== Read SUBTITLES (DVD & TEXT) ========================== | 3131 //================== Read SUBTITLES (DVD & TEXT) ========================== |
3125 if(vo_spudec==NULL && mpctx->sh_video && | 3132 if(vo_spudec==NULL && mpctx->sh_video && |
3126 (mpctx->stream->type==STREAMTYPE_DVD || mpctx->stream->type == STREAMTYPE_DVDNAV || mpctx->d_sub->id >= 0)){ | 3133 (mpctx->stream->type==STREAMTYPE_DVD || mpctx->stream->type == STREAMTYPE_DVDNAV || |
3134 #ifdef HAVE_TV_TELETEXT | |
3135 mpctx->demuxer->type==DEMUXER_TYPE_TV || | |
3136 #endif | |
3137 mpctx->d_sub->id >= 0)){ | |
3127 init_vo_spudec(); | 3138 init_vo_spudec(); |
3128 } | 3139 } |
3129 | 3140 |
3130 // Apply current settings for forced subs | 3141 // Apply current settings for forced subs |
3131 if (vo_spudec!=NULL) | 3142 if (vo_spudec!=NULL) |