Continuous vs. Discontinuous streams
For purposes of buffering and multiplexing, transport defines two stream types, 'continuous-time' and 'discontinuous time'. A continuous-time stream contains no time or data gaps, with packets at regular predictable intervals. A discontinuous-time stream is more typically widely-spaced events with wide timing and data gaps between. Streams are declared continuous or discontinuous in the mandatory metadata.
Continuous time and discontinuous time streams are treated identically in mux and demux save two points:
- 1: Only continuous-time streams are considered when filling buffers.
- 2: Pages in continuous-time streams are stamped by the end time of last packet completed on a page. If no packet is completed on a page, the page's timestamp shall be equal to the endtime of the packet begun on or spanning the page.
- 3: Pages from discontinuous-time streams are stamped by begin time of first packet on the page, whether the packet spans onto the page or the packet is begun on the page. Discontinuous streams include additional restrictions over continuous streams on the allowed pagination and packet contents of pages.
No data may be inserted between transOgg pages in a transOgg stream. Data outside of of transOgg pages results in a loss-of-capture condition when reading the four bytes immediately following the end of a page does not yield the capture pattern.