summaryrefslogtreecommitdiff
path: root/doc/mainpage.txt
blob: 642cff6af230271a6e5c7d30fd91b9f339c5f9f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*!

@mainpage libsub

libsub is a library to read and write subtitles in a variety of formats.  It can be used to read subtitles for
processing, to write them or to convert between formats.

The current version has reasonable support for the following subtitle formats:
- Digital Cinema Package (DCP) XML
- SubRip (.srt)
- EBU-STL text and binary


Reading subtitles
--

The basic process is:

    shared_ptr<sub::Reader> reader = reader_factory (filename);
    list<sub::Subtitle> subs = collect<list<sub::Subtitle> > (reader->subtitles ());

We first have:

    shared_ptr<sub::Reader> reader = reader_factory (filename);
 
This looks at the extension of `filename' and, if necessary, its header, and guesses
what format it is in.  Based on the format it creates an appropriate Reader object.
This reader object can then return its subtitles using

    reader->subtitles ();

    



*/