public Mpeg4IsoMetaBox(ByteVector handler_type, string handler_name) : this(handler_type, handler_name, null) { }
public AsfContentDescriptor(string name, ByteVector value) : this() { this.name = name; this.type = AsfDataType.Bytes; this.bvValue = new ByteVector(value); }
public void SetData(ByteVector data) { Parse(data); }
public Mpeg4IsoMetaBox(ByteVector handler_type, string handler_name, Mpeg4Box parent) : base("meta", 0, parent) { AddChild(new Mpeg4IsoHandlerBox(handler_type, handler_name, this)); }
public Id3v2RelativeVolumeFrame(ByteVector data) : base(data) { //SetData(data); ParseHeader(data); ParseRelativeVolumeFields(data); }
protected internal Id3v2RelativeVolumeFrame(ByteVector data, Id3v2FrameHeader header) : base(header) { //ParseFields(FieldData(data)); ParseRelativeVolumeFields(FieldData(data)); }
protected override void ParseFields(ByteVector data) { ParseRelativeVolumeFields(data); }
public Mpeg4AppleAnnotationBox(ByteVector type) : this(type, null) { }
// This box can be created without loading it. public Mpeg4AppleAnnotationBox(ByteVector type, Mpeg4Box parent) : base(type, parent) { }
protected override void ParseFields(ByteVector data) { ParseAttachedPictureFields(data); }
private void ParseAttachedPictureFields(ByteVector data) { if (data != null) { if (data.Count < 5) { TagLibDebugger.Debug("A picture frame must contain at least 5 bytes."); return; } int pos = 0; textEncoding = (StringType)data[pos]; pos += 1; int offset; if (Header.Version > 2) { offset = data.Find(TextDelimiter(StringType.Latin1), pos); if (offset < pos) { return; } mimeType = data.Mid(pos, offset - pos).ToString(StringType.Latin1); pos = offset + 1; } else { ByteVector ext = data.Mid(pos, 3); if (ext == "JPG") { mimeType = "image/jpeg"; } else if (ext == "PNG") { mimeType = "image/png"; } else { mimeType = "image/unknown"; } pos += 3; } type = (PictureType)data[pos]; pos += 1; offset = data.Find(TextDelimiter(textEncoding), pos); if (offset < pos) { return; } description = data.Mid(pos, offset - pos).ToString(textEncoding); pos = offset + 1; this.data = data.Mid(pos); } else { throw new ArgumentNullException("data"); } }