What
For some time now,
GStreamer has supported
subtitles. One of the players using this feature is
Totem. Subtitles are
automatically supported if you use the
playbin
element. Currently, Ogm and Matroska plain-text subtitles and external
subtitle files in microDVD, MPsub and Subrip format are supported.
It would be nice to support more types of subtitles, particularly the
ones in external text files, since those are very easy to add.
Why
It's a good idea to support as many media formats as possible. In
addition, our subtitle support is not very wide yet, and we hope
to change that.
How
External subtitle files are handled by the subparse
element (in
gst-plugins/gst/subparse/gstsubparse.c). Each
subtitle has three functions available - one for initialization, one
for reading a single subtitle and one to deinitialize. For each new
subtitle format, adding those three functions is enough. After that,
test the newly added code in Totem. If all is well, it should just
work.
It is also possible to add more subtitle support to particular
demuxers, e.g. Ogg/Ogm or Matroska. In that case look at the code
of that particular demuxer and it there.
Where
- subparse
- The subparse element in the gst-plugins module in
GStreamer Git.
Who to contact
Difficulty
EASY: three functions per format, and no code involved elsewhere.