Example #1
0
        /// <summary>
        /// New PrivateFrame
        /// </summary>
        /// <param name="FrameID">FrameID</param>
        /// <param name="Flags">Frame Flags</param>
        /// <param name="Data">FileStream to read frame data from</param>
        /// <param name="Length">Maximum available length for this frame</param>
        public PrivateFrame(string FrameID, FrameFlags Flags, int Length, Stream FS)
            : base(FrameID, Flags, FS)
        {
            TStream = new Macalifa.Tags.TagStreamUWP(FS);
            _Owner  = TStream.ReadText(Length, TextEncodings.Ascii, ref Length, true);

            _Data = TStream.ReadData(Length); // Read Data
        }
Example #2
0
        /// <summary>
        /// New DataWithSymbolFrame
        /// </summary>
        /// <param name="FrameID">FrameID</param>
        /// <param name="Flags">Frame Flags</param>
        /// <param name="Data">FileStream to read frame data from</param>
        /// <param name="Length">Maximum available length for this frame</param>
        public DataWithSymbolFrame(string FrameID, FrameFlags Flags, int Length, Stream FS)
            : base(FrameID, Flags, FS)
        {
            TStream = new Macalifa.Tags.TagStreamUWP(FS);
            _Owner  = TStream.ReadText(Length, TextEncodings.Ascii, ref Length, true);

            _Symbol = TStream.ReadByte(FS);
            Length--;

            _Data = TStream.ReadData(Length);
        }
Example #3
0
        /// <summary>
        /// Create new AudioEncryptionFrame
        /// </summary>
        /// <param name="FrameID">4 Characters tag identifier</param>
        /// <param name="Flags">2 Bytes flags identifier</param>
        /// <param name="Data">Contain Data for this frame</param>
        /// <param name="Length">Maximum available length for this frame</param>
        public AudioEncryptionFrame(string FrameID, FrameFlags Flags, int Length, Stream FS)
            : base(FrameID, Flags, FS)
        {
            TStream = new Macalifa.Tags.TagStreamUWP(FS);
            _Owner  = TStream.ReadText(Length, TextEncodings.Ascii, ref Length, true);

            _PreviewStart  = Convert.ToInt32(TStream.ReadUInt(2));
            _PreviewLength = Convert.ToInt32(TStream.ReadUInt(2));
            Length        -= 4;

            _Data = TStream.ReadData(Length);
        }
Example #4
0
        /// <summary>
        /// Create new GeneralFileFrame
        /// </summary>
        /// <param name="FrameID">4 Characters tag identifier</param>
        /// <param name="Flags">2 Bytes flags identifier</param>
        /// <param name="Data">Contain Data for this frame</param>
        /// <param name="Length">Maximum available length for this frame</param>
        public GeneralFileFrame(string FrameID, FrameFlags Flags, int Length, Stream FS)
            : base(FrameID, Flags, FS)
        {
            TStream       = new Macalifa.Tags.TagStreamUWP(FS);
            _TextEncoding = (TextEncodings)TStream.ReadByte(FS);
            Length--;
            if (!IsValidEnumValue(_TextEncoding, ExceptionLevels.Error, FrameID))
            {
                return;
            }

            _MIMEType = TStream.ReadText(Length, TextEncodings.Ascii, ref Length, true);

            _FileName = TStream.ReadText(Length, _TextEncoding, ref Length, true);

            _Description = TStream.ReadText(Length, _TextEncoding, ref Length, true);

            _Data = TStream.ReadData(Length);
        }
Example #5
0
 /// <summary>
 /// New BinaryFrame
 /// </summary>
 /// <param name="FrameID">FrameID</param>
 /// <param name="Flags">Frame Flag</param>
 /// <param name="Data">FileStream contain frame data</param>
 /// <param name="Length">Maximum available length for this frame</param>
 public BinaryFrame(string FrameID, FrameFlags Flags, int Length, Stream FS)
     : base(FrameID, Flags, FS)
 {
     TStream = new Macalifa.Tags.TagStreamUWP(FS);
     _Data   = TStream.ReadData(Length);
 }