[MPlayer-dev-eng] [PATCH] Add DVB teletext support

Francesco Lavra francescolavra at interfree.it
Sat Sep 19 12:26:49 CEST 2009


On Thu, 2009-09-17 at 21:37 +0200, Reimar Döffinger wrote:
> The moment you add the demuxer->teletext all the DEMUXER_TYPE_TV checks
> should go since they are now pointless.

Removed in attached patches

> Another question is why the teletext goes into the demuxer struct, it
> does not really have much to do with the demuxer, depending on how you
> see it, it either is a global state or it is associated with a specific
> subtitle stream.

update_teletext() in mpcommmon.c takes as second argument the demuxer
struct, and uses it to retrieve the pointer to pass to
teletext_control(). I didn't want to change that, I only replaced TV
input specifics with a generic teletext pointer added to the demuxer
struct. Having the teletext associated to the subtitle stream wouldn't
work with analog TV. If global state means an additional global
variable, well, I don't like global variables!

> I also particularly dislike the tvh->demuxer, why pass around the whole
> demuxer when the teletext part in it would be enough? (I also have not
> been able to find where tvh->demuxer is set, whether that is because I
> am blind or because it was forgotten and thus broke "normal" teletext
> support I don't know).

When teletext_control() needs to be called in stream/tv.c, the available
local variables are either a tvi_handle_t (which doesn't contain a
pointer to teletext private data) or a demuxer_t. Instead of having an
additional teletext pointer in tvi_handle_t (which would duplicate
demuxer->teletext), I preferred to add a demuxer pointer to
tvi_handle_t. And yes, you are right, I forgot to initialize it, in the
attached patches that has been fixed with tvh->demuxer being set in
demux_open_tv().

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01_dec_teletext.patch
Type: text/x-patch
Size: 17480 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090919/021d9cb2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02_teletext.patch
Type: text/x-patch
Size: 31109 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090919/021d9cb2/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03_lavf.patch
Type: text/x-patch
Size: 2161 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090919/021d9cb2/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04_dvb_teletext.patch
Type: text/x-patch
Size: 9943 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090919/021d9cb2/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05_charset.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090919/021d9cb2/attachment-0004.bin>


More information about the MPlayer-dev-eng mailing list