Caption Stream Encoding (block_data)
The 63 caption service sub-streams contain a mixed command and text stream, much like Telnet. There are four logical code sub-groups: CL, GL, CR, and GR. These each have single and multi-character code sets.
CL Group: C0 | 0x00-0x1F | Subset of ASCII Control Codes |
CR Group: C1 | 0x80-0x9F | Caption Control Codes |
CL Group: C2 | 0x1000-0x101F | Extended Miscellaneous Control Codes |
CR Group: C3 | 0x1080-0x109F | Extended Control Code Set 2 |
GL Group: G0 | 0x20-0x7F | Modified version of ANSI X3.4 Printable Character Set (ASCII) |
GR Group: G1 | 0xA0-0xFF | ISO 8859-1 Latin 1 Characters |
GL Group: G2 | 0x1020-0x107F | Extended Control Code Set 1 |
GR Group: G3 | 0x10A0-0x10FF | Future characters and icons |
Whenever a command character is seen any text accumulated in the parser should be flushed. Since text might need to be flushed when there is no command pending, there is a null command known as the ETX command in the C0 command set. There are also two special commands, the Reset and DelayCancel. These must be parsed with lookahead. A Delay command issued previously can be canceled at any time with a DelayCancel command, so once a Delay is seen a decoder must look ahead for a DelayCancel, and only look for a DelayCancel. A Reset command on the other hand is sent to break out from an unknown decoder state and all data before it must be ignored.
Read more about this topic: CEA-708
Famous quotes containing the word stream:
“The habit some writers indulge in of perpetual quotation is one it behoves lovers of good literature to protest against, for it is an insidious habit which in the end must cloud the stream of thought, or at least check spontaneity. If it be true that le style cest lhomme, what is likely to happen if lhomme is for ever eking out his own personality with that of some other individual?”
—Dame Ethel Smyth (18581944)