From 0daf53d611bf4a8bb896a8b641079ecb50140268 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 3 Nov 2006 13:52:12 +0000 Subject: move file up so its found first, this probably improves readability git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20634 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/tech/nut.txt | 95 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 47 deletions(-) (limited to 'DOCS') diff --git a/DOCS/tech/nut.txt b/DOCS/tech/nut.txt index b6885f0116..ca086e4c7a 100644 --- a/DOCS/tech/nut.txt +++ b/DOCS/tech/nut.txt @@ -116,6 +116,54 @@ t (v coded universal timestamp) Bitstream syntax: ================= +file: + file_id_string + while(!eof){ + if(next_byte == 'N'){ + packet_header + switch(startcode){ + case main_startcode: main_header; break; + case stream_startcode:stream_header; break; + case info_startcode: info_packet; break; + case index_startcode: index; break; + case syncpoint_startcode: syncpoint; break; + } + packet_footer + }else + frame + } + +the structure of a undamaged file should look like the following, but +demuxers should be flexible and be able to deal with damaged headers so the +above is a better loop in practice (not to mention its simpler) +note, demuxers MUST be able to deal with new and unknown headers + +file: + file_id_string + while(!eof){ + packet_header, main_header, packet_footer + reserved_headers + for(i=0; i