Esempio n. 1
0
        private bool Parse3(Stream stream)
        {
            if ((_header.Flags & ID3v2HeaderFlags.ExtendedHeader) == ID3v2HeaderFlags.ExtendedHeader)
            {
                _extendedHeader = new ID3v2ExtendedHeader(stream, ID3Version.ID3v2_3);
            }
            if (((int)_header.Flags & 0x1F) != 0)
            {
                throw new ID3Exception("Invalid headerflags: 0x{0}.", ((int)_header.Flags).ToString("x"));
            }

            return(true);
        }
Esempio n. 2
0
        private bool Parse4(Stream stream)
        {
            if ((_header.Flags & ID3v2HeaderFlags.ExtendedHeader) == ID3v2HeaderFlags.ExtendedHeader)
            {
                _extendedHeader = new ID3v2ExtendedHeader(stream, ID3Version.ID3v2_4);
            }
            if ((_header.Flags & ID3v2HeaderFlags.FooterPresent) == ID3v2HeaderFlags.FooterPresent)
            {
                //footer vom orginal stream lesen - da im neuen stream kein footer vorhanden ist
                _footer = ID3v2Footer.FromStream(_stream);
                if (_footer == null)
                {
                    throw new ID3Exception("Invalid Id3Footer.");
                }
            }
            if (((int)_header.Flags & 0x0F) != 0)
            {
                throw new ID3Exception("Invalid headerflags: 0x{0}.", ((int)_header.Flags).ToString("x"));
            }

            return(true);
        }