public override void Import(RawFrame rawFrame, int codePage) { ImportRawFrameHeader(rawFrame); using (var reader = new FrameDataReader(rawFrame.Payload)) { var encodingByte = reader.ReadByte(); Language = reader.ReadFixedString(Encoding.ASCII, 3); TextEncoding = reader.ReadEncoding(encodingByte, codePage); ContentDescriptor = reader.ReadVariableString(TextEncoding); Lyrics = reader.ReadVariableString(TextEncoding); } }
/// <summary> /// Import the raw frame. /// </summary> /// <param name="rawFrame">the raw frame.</param> /// <param name="codePage">Default code page for Ansi encoding. Pass 0 to use default system encoding code page.</param> public override void Import(RawFrame rawFrame, int codePage) { ImportRawFrameHeader(rawFrame); // // XX - Encoding Byte // Y1 Y2 ... Yn - Text // using (var reader = new FrameDataReader(rawFrame.Payload)) { byte encodingByte = reader.ReadByte(); TextEncoding = reader.ReadEncoding(encodingByte, codePage); Content = reader.ReadVariableString(TextEncoding).TrimEnd(Char.MinValue); } }
/* <Header for 'Attached picture', ID: "APIC"> Text encoding $xx MIME type <text string> $00 Picture type $xx Description <text string according to encoding> $00 (00) Picture data <binary data> */ /// <summary> /// Import a raw frame /// </summary> /// <param name="rawFrame">the raw frame</param> /// <param name="codePage">Default code page for Ansi encoding. Pass 0 to use default system encoding code page.</param> public override void Import(RawFrame rawFrame, int codePage) { ImportRawFrameHeader(rawFrame); if (rawFrame.Payload.Length == 0) { throw new ID3TagException("Frame has no payload."); } using (var reader = new FrameDataReader(rawFrame.Payload)) { var encodingByte = reader.ReadByte(); MimeType = reader.ReadVariableString(Encoding.ASCII); PictureCoding = (PictureType)reader.ReadByte(); TextEncoding = reader.ReadEncoding(encodingByte, codePage); Description = reader.ReadVariableString(TextEncoding); PictureData = reader.ReadBytes(); } }
/// <summary> /// Import the raw frame. /// </summary> /// <param name="rawFrame">the raw frame.</param> /// <param name="codePage">Default code page for Ansi encoding. Pass 0 to use default system encoding code page.</param> public override void Import(RawFrame rawFrame, int codePage) { ImportRawFrameHeader(rawFrame); /* ID = "COMM" TextEncoding xx Language xx xx xx Short Content (xx xx ... xx) (00 / 00 00) Text (xx xx ... xx) */ using (var reader = new FrameDataReader(rawFrame.Payload)) { byte encodingByte = reader.ReadByte(); Language = reader.ReadFixedString(Encoding.ASCII, 3); TextEncoding = reader.ReadEncoding(encodingByte, codePage); ContentDescriptor = reader.ReadVariableString(TextEncoding); Text = reader.ReadVariableString(TextEncoding); } }
/// <summary> /// Import the raw frame. /// </summary> /// <param name="rawFrame">the raw frame.</param> /// <param name="codePage">Default code page for Ansi encoding. Pass 0 to use default system encoding code page.</param> public override void Import(RawFrame rawFrame, int codePage) { ImportRawFrameHeader(rawFrame); /* * Text Encoding xx * Description (xx xx .. xx) (00 / 00 00) * URL (xx xx ... xx) als ISO8859-1 ! */ using (var reader = new FrameDataReader(rawFrame.Payload)) { byte encodingByte = reader.ReadByte(); TextEncoding = reader.ReadEncoding(encodingByte, codePage); Description = reader.ReadVariableString(TextEncoding); URL = reader.ReadVariableString(Encoding.GetEncoding(28591)); } }
/// <summary> /// Import the raw content to a high level frame. /// </summary> /// <param name="rawFrame">the raw frame.</param> /// <param name="codePage">Default code page for Ansi encoding. Pass 0 to use default system encoding code page.</param> public override void Import(RawFrame rawFrame, int codePage) { /* * ID = "POPM" * Email to user <text string> $00 * Rating $xx * Counter $xx xx xx xx (xx ...) */ ImportRawFrameHeader(rawFrame); using (var reader = new FrameDataReader(rawFrame.Payload)) { Email = reader.ReadVariableString(Encoding.ASCII); Rating = reader.ReadByte(); PlayCounter = reader.ReadUInt64(); } }
/// <summary> /// Import the raw frame. /// </summary> /// <param name="rawFrame">the raw frame.</param> /// <param name="codePage">Default code page for Ansi encoding. Pass 0 to use default system encoding code page.</param> public override void Import(RawFrame rawFrame, int codePage) { ImportRawFrameHeader(rawFrame); /* <Header for 'User defined text information frame', ID: "TXXX"> Text encoding : $xx Description : <text string according to encoding> $00 (00) Value : <text string according to encoding> */ using (var reader = new FrameDataReader(rawFrame.Payload)) { byte encodingByte = reader.ReadByte(); TextEncoding = reader.ReadEncoding(encodingByte, codePage); Description = reader.ReadVariableString(TextEncoding); Value = reader.ReadVariableString(TextEncoding); } }