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

Francesco Lavra francescolavra at interfree.it
Mon Jun 29 19:41:43 CEST 2009


On Sat, 2009-06-27 at 21:57 +0200, Nico Sabbi wrote:
> Il giorno sab, 27/06/2009 alle 19.03 +0200, Francesco Lavra ha scritto:
> > Hi,
> > This patch adds support for DVB teletext decoding and display (parts of
> > code have been taken from the DVB patch of AleVT).
> > Teletext support is limited to DVB-T (because I could test it only with
> > a DVB-T card), but adding support for DVB-C and DVB-S should be fairly
> > trivial.
> > A new field needs to be added to the channels definition file (typically
> > found at ~/.mplayer/channels.conf[.ter]), which specifies the Packet ID
> > (PID) of the teletext stream, just after the audio PIDs field; if there
> > is not teletext on a given program, a negative value must be provided as
> > teletext PID. This can break compatibility with previous versions, so if
> > this is too much of a concern I could insert code which detects
> > automatically the teletext PID of a given program (I could take it from
> > the DVB patch of AleVT). Let me know.
> 
> not the slightest change is needed in the stream code: multiple pids can
> be selected by means of pid+pid+pid... syntax, or using a plain 8192 pid
> (that selects the whole TS).
> Moreover, the meaning of those changes in the stream code is obscure and
> would need a serious documentation, but I'll repeat it: the stream layer
> doesn't need any change. The only changes needed are
> 1) a decoder that I won't review ;)
> 2) *eventually* something in demux_ts.c

OK, it makes sense to specify the teletext PID with pid+pid syntax,
although it's not technically correct, because teletext is neither video
nor audio...
Re-implementing DVB teletext support without touching the stream layer
could be done as follows:
- Add DVB teletext decoding capability to stream/tvi_vbi.c.
- Add teletext support to libmpdemux/demux_ts.c (by means of code which
detects teletext packets and passes them to teletext_control() in
tvi_vbi.c)
- Modify update_teletext() in mpcommon.c and some functions in command.c
such that they call directly teletext_control() in tvi_vbi.c

It could be worthwhile moving teletext-related definitions outside the
stream/ directory, maybe in libmpcodecs/, renaming tvi_vbi.c to
something like dec_teletext.c, and adding in the same directory
libmpcodecs/ an header file (dec_teletext.h?) containing all the
teletext-related definitions currently split between stream/tv.h and
stream/tvi_def.h.

What do you think?





More information about the MPlayer-dev-eng mailing list