public F4VBox ReadBox() { if (currentHeader == null) ReadHeader(); F4VBox box; switch (currentHeader.BoxType.ToString()) { case "abst": box = new BootstrapInfoBox(); break; case "asrt": box = new SegmentRunTableBox(); break; case "afrt": box = new FragmentRunTableBox(); break; case "mdat": box = new MediaDataBox(); break; default: box = new UnknownBox(); break; } box.BoxHeader = currentHeader; box.Parse(br); currentHeader = null; return box; }
public static BootstrapInfoBox FromBase64String(string s) { var stream = new MemoryStream(System.Convert.FromBase64String(s)); using (var br = new ExtendedBinaryReader(stream)) { BootstrapInfoBox bib = new BootstrapInfoBox(); bib.Parse(br); return bib; } }