[NUT-devel] Main file loop

Oded Shimon ods15 at ods15.dyndns.org
Sun Nov 5 08:33:31 CET 2006


On Sun, Nov 05, 2006 at 12:42:39AM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Sat, Nov 04, 2006 at 04:30:49PM +0200, Oded Shimon wrote:
> > The way it should be in my opinion:
> > file:
> >     file_id_string
> >     while(!eof){
> >         packet_header, main_header, packet_footer
> >         for(i=0; i<stream_count; i++){
> >             packet_header, stream_header, packet_footer
> >         }
> >         reserved_headers
> >         while(next_code == info_startcode){
> >             packet_header, info_packet, packet_footer
> >         }
> >         reserved_headers
> >         if(next_code == index_startcode){
> >             packet_header, index_packet, packet_footer
> >         }
> >         if (!eof) while(next_code != main_startcode){
> >             packet_header, syncpoint, packet_footer
> >             do {
> >                 frame
> >             } while (next_code == framecode)
> >             reserved_headers
> >             if (realtime_stream) {
> >                 while(next_code == info_startcode){
> >                     packet_header, info_packet, packet_footer
> >                 }
> >                 reserved_headers
> >             }
> >         }
> >     }
> [...]
> > 3. syncpoints must be written after any non frame packets, before any 
> >    frame packets.
> 
> i think that is required by other parts of the spec already

Yes, I know, I wanted it written in the main loop.
OK, I accept your arguments on reserved data. I still have some thoughts 
on info packets, will reply in other mail..

- ods15



More information about the NUT-devel mailing list