Beispiel #1
0
 private static StreamPacket readStreamPacket(Stream fs)
 {
     try
     {
         byte[] buffer = readStream(fs);
         return(StreamPacket.Decode(buffer));
     }
     catch { }
     return(null);
 }
        public static VideoStreamsPacket Decode(MemoryStream ms)
        {
            TimePeriodPacket ti = TimePeriodPacket.Decode(ms);
            int length          = PacketBase.ReadInt(ms);

            StreamPacket[] spList = new StreamPacket[length];
            for (int i = 0; i < length; i++)
            {
                spList[i] = StreamPacket.Decode(ms);
            }
            return(new VideoStreamsPacket(ti, spList));
        }