add 'last'
[vuplus_dvbapp] / doc / FILEFORMAT
1 == TS FILES ==
2
3 TS files are plain recordings, including PMT and PAT.
4
5 They don't have a private header. 
6
7 == .meta FILES ==
8
9 .meta files have currently 4 lines:
10
11 <service reference>
12 <name>
13 <description>
14 <recording time>
15
16 The service reference contains the Service-ID of the recorded service. With
17 that ID, you can find the PMT and the elementary streams.
18
19 As a backup method, just find the first available PMT and use that.
20
21 Strings are always UTF-8 encoded.
22
23 == .ap FILES ==
24
25 Stored offsets and PTS values. They are collected while recording. Only 
26 GOP starts are stored.
27
28 File format is network-ordered (i.e. big endian), each entry contains
29 two 64 bit values (PTS, offset).
30
31 PTS values are not corrected (i.e. they aren't zero-based), offsets are
32 relative to the beginning of the file (or first file, when we implement
33 splitting)
34
35 == .cut FILES ==
36
37 Also network ordered, they contain a 64bit value (PTS) and 32bit value
38 (type) for each cut. (If you want file offsets, use the .ap file to look up
39 the PTS values.)
40
41 Type is:
42
43 0 - 'in' point
44 1 - 'out' point
45 2 - mark
46 3 - last (resumepoint)
47
48 If the first 'out'-point is not preceeded by an 'in'-point, there is an 
49 implicit 'in' point at zero.
50
51 If the there is no final 'out' point, the end-of-file is an implicit
52 'out'-point.
53
54 Note that the PTS values are zero-based and continouus. If you want absolute
55 PTS values, you can either:
56  - use the .ap file, find discontinuities, and interpolate between the APs
57  - or just use the first PTS value as an offset, and work around PTS
58    wraparounds. (simple method)