Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

Dictionary<uint, Bitstream> TagLib::Ogg::File::ReadStreams ( List< Page pages,
out long  end 
) [inline, private]

Reads the file until all streams have finished their property and tagging data.

pages A T:System.Collections.Generic.List`1 object to be filled with Page objects as they are read, or if the pages are not to be stored.
end A long value reference to be updated to the postion of the first page not read by the current instance.
A T:System.Collections.Generic.Dictionary`2 object containing stream serial numbers as the keys Bitstream objects as the values.

Definition at line 370 of file File.cs.

References TagLib::Ogg::PageHeader::Flags, TagLib::Ogg::Page::Header, TagLib::Ogg::Bitstream::ReadPage(), TagLib::Ogg::Page::Size, and TagLib::Ogg::PageHeader::StreamSerialNumber.

                  Dictionary<uint, Bitstream> streams =
                        new Dictionary<uint, Bitstream> ();
                  List<Bitstream> active_streams = new List<Bitstream> ();
                  long position = 0;
                  do {
                        Bitstream stream = null;
                        Page page = new Page (this, position);
                        if ((page.Header.Flags &
                              PageFlags.FirstPageOfStream) != 0) {
                              stream = new Bitstream (page);
                              streams.Add (page.Header
                                    .StreamSerialNumber, stream);
                              active_streams.Add (stream);
                        if (stream == null)
                              stream = streams [
                        if (active_streams.Contains (stream)
                              && stream.ReadPage (page))
                              active_streams.Remove (stream);
                        if (pages != null)
                              pages.Add (page);
                        position += page.Size;
                  } while (active_streams.Count > 0);
                  end = position;
                  return streams;

Generated by  Doxygen 1.6.0   Back to index