[FFmpeg-devel] [PATCH] avcodec: add minimal teletext subtitle decoder

Michael Niedermayer michael at niedermayer.cc
Thu Apr 26 21:20:43 EEST 2018


On Tue, Apr 24, 2018 at 07:07:58PM -0700, Aman Gupta wrote:
> From: Aman Gupta <aman at tmm1.net>
> 
> Based largely on VLC's modules/codec/telx.c.
> 
> Processes only teletext pages marked as subtitles, so depending
> on the stream it might not produce any output.
> 
> Subtitles are rendered directly to ASS, with support for background
> colors and a best-effort at screen positioning. The ASS packets
> are emitted in real time (similar to ccaption_dec's real_time
> option), with -1 durations. The decoder expects that the player
> will remove all existing subtitles whenever a new packet arrives.
> 
> The teletext clear command is implemented using an empty subtitle,
> which removes existing subtitles but does not render anything new.
> ---
>  libavcodec/Makefile         |   1 +
>  libavcodec/allcodecs.c      |   1 +
>  libavcodec/teletextsubdec.c | 522 ++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 524 insertions(+)
>  create mode 100644 libavcodec/teletextsubdec.c

this produces some warnings:
libavcodec/teletextsubdec.c: In function ‘teletext_decode_frame’:
libavcodec/teletextsubdec.c:439:77: warning: variable ‘f_news’ set but not used [-Wunused-but-set-variable]
libavcodec/teletextsubdec.c:439:67: warning: variable ‘f_update’ set but not used [-Wunused-but-set-variable]
libavcodec/teletextsubdec.c:439:55: warning: variable ‘f_suppress’ set but not used [-Wunused-but-set-variable]
libavcodec/teletextsubdec.c:439:44: warning: variable ‘f_inhibit’ set but not used [-Wunused-but-set-variable]
libavcodec/teletextsubdec.c:438:24: warning: variable ‘page’ set but not used [-Wunused-but-set-variable]

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180426/f533ac8e/attachment.sig>


More information about the ffmpeg-devel mailing list