TransOgg Transport: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
mNo edit summary
 
Line 14: Line 14:
* 1: Only continuous-time streams are considered when filling buffers.  
* 1: Only continuous-time streams are considered when filling buffers.  


* 2: Pages in continuous-time streams are stamped by end-time (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).  Pages from discontinuous-time streams are stamped by begin-time (begin time of first packet started on a page.  If no packet is started on a page, the page's timestamp shall be the begin time of the packet ending on or spanning the page). Note that continuous/discontinuous is not considered when interleaving pages in time order during multiplexing. This ensures proper delivery of discontinuous-time data when demuxing/buffering. (NUT documentation uses different terminology, but has a really good example that touches on this in the context of subtitles--- go get it)
* 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.


= Page arrangement =
= Page arrangement =

Latest revision as of 16:54, 19 September 2012

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.

Page arrangement

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.