public static OggPage[] Paginate(ByteVectorCollection packets, PaginationStrategy strategy, uint streamSerialNumber, int firstPage, bool firstPacketContinued, bool lastPacketCompleted, bool containsLastPacket) { ArrayList l = new ArrayList(); int totalSize = 0; foreach (ByteVector b in packets) { totalSize += b.Count; } if (strategy == PaginationStrategy.Repaginate || totalSize + packets.Count > 255 * 256) { TagLibDebugger.Debug("Ogg.Page.Paginate() -- Sorry! Repagination is not yet implemented."); return((OggPage[])l.ToArray(typeof(OggPage))); } // TODO: Handle creation of multiple pages here with appropriate pagination. OggPage p = new OggPage(packets, streamSerialNumber, firstPage, firstPacketContinued, lastPacketCompleted, containsLastPacket); l.Add(p); return((OggPage[])l.ToArray(typeof(OggPage))); }
public static OggPage[] Paginate(ByteVectorCollection packets, PaginationStrategy strategy, uint streamSerialNumber, int firstPage) { return(Paginate(packets, strategy, streamSerialNumber, firstPage, false)); }
public static OggPage[] Paginate(ByteVectorCollection packets, PaginationStrategy strategy, uint streamSerialNumber, int firstPage, bool firstPacketContinued) { return(Paginate(packets, strategy, streamSerialNumber, firstPage, firstPacketContinued, true)); }
public static OggPage[] Paginate(ByteVectorCollection packets, PaginationStrategy strategy, uint streamSerialNumber, int firstPage) { return Paginate(packets, strategy, streamSerialNumber, firstPage, false); }
public static OggPage[] Paginate(ByteVectorCollection packets, PaginationStrategy strategy, uint streamSerialNumber, int firstPage, bool firstPacketContinued) { return Paginate(packets, strategy, streamSerialNumber, firstPage, firstPacketContinued, true); }
public static OggPage[] Paginate(ByteVectorCollection packets, PaginationStrategy strategy, uint streamSerialNumber, int firstPage, bool firstPacketContinued, bool lastPacketCompleted, bool containsLastPacket) { ArrayList l = new ArrayList(); int totalSize = 0; foreach (ByteVector b in packets) totalSize += b.Count; if (strategy == PaginationStrategy.Repaginate || totalSize + packets.Count > 255 * 256) { TagLibDebugger.Debug ("Ogg.Page.Paginate() -- Sorry! Repagination is not yet implemented."); return (OggPage[]) l.ToArray(typeof(OggPage)); } // TODO: Handle creation of multiple pages here with appropriate pagination. OggPage p = new OggPage(packets, streamSerialNumber, firstPage, firstPacketContinued, lastPacketCompleted, containsLastPacket); l.Add (p); return (OggPage[]) l.ToArray(typeof(OggPage)); }