コード例 #1
0
        public AviHeaderList(TagLib.File file, long position, int length)
        {
            if (file == null)
            {
                throw new ArgumentNullException("file");
            }

            List list = new List(file, position, length);

            if (!list.ContainsKey("avih"))
            {
                throw new CorruptFileException("Avi header not found.");
            }

            ByteVector header_data = list ["avih"][0];

            if (header_data.Count != 0x38)
            {
                throw new CorruptFileException("Invalid header length.");
            }

            header = new AviHeader(header_data);

            foreach (ByteVector list_data in list["LIST"])
            {
                if (list_data.StartsWith("strl"))
                {
                    codecs.Add(AviStream.ParseStreamList(list_data).Codec);
                }
            }
        }
コード例 #2
0
 public AviHeaderList (TagLib.File file, long position, int length)
 {
    if (file == null)
       throw new ArgumentNullException ("file");
    
    List list = new List (file, position, length);
    
    if (!list.ContainsKey ("avih"))
       throw new CorruptFileException ("Avi header not found.");
    
    ByteVector header_data = list ["avih"][0];
    if (header_data.Count != 0x38)
       throw new CorruptFileException ("Invalid header length.");
       
    header = new AviHeader (header_data);
    
    foreach (ByteVector list_data in list ["LIST"])
    {
       if (list_data.StartsWith ("strl"))
          codecs.Add (AviStream.ParseStreamList (list_data).Codec);
    }
 }