Remove DCP subtitle support.
[libsub.git] / doc / mainpage.txt
1 /*!
2
3 @mainpage libsub
4
5 libsub is a library to read and write subtitles in a variety of
6 formats.  It can be used to read subtitles for processing, to write
7 them or to convert between formats.
8
9 The current version has reasonable support for the following subtitle
10 formats:
11
12 - SubRip (.srt)
13 - SubStation Alpha and Advanced SubStation Alpha (SSA/ASS)
14 - EBU-STL text and binary
15
16 The general `philosophy' of libsub is that it should not guess any
17 subtitle details that are not explicitly stated in the file unless it
18 is absolutely neessary.  For example, if a file does not specify a
19 font size it will be returned as unknown for the caller to fill in.
20
21 Reading subtitles
22 --
23
24 The basic process is:
25
26     shared_ptr<sub::Reader> reader = reader_factory (filename);
27     list<sub::Subtitle> subs = collect<list<sub::Subtitle> > (reader->subtitles ());
28
29 We first have:
30
31     shared_ptr<sub::Reader> reader = reader_factory (filename);
32
33 This looks at the extension of `filename' and, if necessary, its header, and guesses
34 what format it is in.  Based on the format it creates an appropriate Reader object.
35 This reader object can then return its subtitles using
36
37     reader->subtitles ();
38
39 This method returns a set of RawSubtitle objects which are then formed into Subtitle,
40 Line and Block objects by collect().
41
42 */