Mercurial > mplayer.hg
annotate DOCS/tech/realcodecs/streaming.txt @ 30791:d8d15a9fcc43
Update URL for Subversion homepage.
author | diego |
---|---|
date | Thu, 04 Mar 2010 15:45:32 +0000 |
parents | 32725ca88fed |
children | 0ad2da052b2e |
rev | line source |
---|---|
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
1 In the RV30 format, another encapsulated data layer for the video stream |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
2 has been introduced. In lack of a name I'll call them sub packets, the |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
3 normal packets which exist in RV10 I'll call - well - packets. The stream |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
4 of bytes which is put in one memory block is named block. |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
5 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
6 The format extension has been * by wild guessing and comparing the |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
7 received data between the original viewer and the demuxer. |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
8 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
9 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
10 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
11 Every packet may contain one or more sub packets, and one block may |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
12 be contained inside one or more adjacent (sub) packets. |
6350 | 13 A sub packet (fragment) starts with a small header (two letters are one byte): |
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
14 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
15 |
6350 | 16 aa(bb)[cccc{gggg}dddd{eeee}ff] |
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
17 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
18 aa: indicates the type of header |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
19 the 2MSB indicate the header type (mask C0) |
6350 | 20 C0: the [] part exists, but not () -> whole packet (not fragmented) |
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
21 00, 80: the data block is encapsulated inside multiple packets. |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
22 bb contains the sequence number, beginning with 1. |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
23 80 indicates the last sub packet containing data for the |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
24 current block. no C0 or 40 sub packet follows until |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
25 the block has been finished with a 80 sub packet. |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
26 No packet with another stream than the current video stream |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
27 is inside the sub packet chain, at least I haven't seen |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
28 such case - the demuxer will shout in this case. |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
29 40: [] does not exist, the meaning of bb is unknown to me |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
30 data follows to the end of the packet |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
31 mask 3F: unknown |
6350 | 32 bb: sub-seq - mask 0x7f: the sequence number of the _fragment_ |
33 mask 0x80: unknown, seems to alternating between 00 and 80 | |
34 cccc: mask 3FFF: _total_ length of the packet | |
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
35 mask C000: unknown, seems to be always 4000 |
6350 | 36 when it's all 0000, it indicates value >=0x4000, you should read {gggg} |
37 and use all 16 bits of it. dunno what happens when length>=65536... | |
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
38 dddd: when it's 0, {} exists (only in this case) |
6350 | 39 mask 3FFF: offset of fragment inside the whole packet. it's counted |
40 from the beginning of the packet, except when hdr&0x80, | |
41 hten it's relative to the _end_ of the packet, so it's | |
42 equal to fragment size! | |
43 mask C000: like cccc, except the first case (always 4000) | |
44 when it's all 0000, it indicates value >=0x4000, you should read {eeee} | |
45 and use all 16 bits of it. dunno what happens when length>=65536... | |
46 ff: sequence number of the assembled (defragmented) packets, beginning with 0 | |
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
47 |
6350 | 48 NOTE: the demuxer should build a table of the subpacket offsets relative to the |
49 start of whole packet, it's required by the rv20/rv30 video decoders. | |
6349
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
50 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
51 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
52 packet header: |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
53 |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
54 ushort unknown |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
55 ulong blocksize |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
56 ushort streamid |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
57 uchar reserved |
c09a890e4c8c
initial version from Florian Schneider <flo-mplayer-dev@gmx.net>
arpi
parents:
diff
changeset
|
58 uchar flags 1=reliable, 2=keyframe |