Exemplo n.º 1
0
        static TrackMetadata parseTrack(Mp4Reader reader, uint timescale)
        {
            TrackHeader header   = default;
            MediaInfo   info     = default;
            EditListBox editList = null;

            foreach (eBoxType boxType in reader.readChildren())
            {
                switch (boxType)
                {
                case eBoxType.tkhd:
                    header = new TrackHeader(reader, timescale);
                    break;

                case eBoxType.mdia:
                    info = new MediaInfo(reader);
                    break;

                case eBoxType.edts:
                    editList = EditListBox.load(reader);
                    break;

                default:
                    reader.skipCurrentBox();
                    break;
                }
            }
            iEditList el = Mpeg4EditList.create(editList, timescale, info.timeScale);

            return(new TrackMetadata(header, info, el));
        }
Exemplo n.º 2
0
 internal TrackMetadata(TrackHeader header, MediaInfo info, iEditList editList)
 {
     this.header   = header;
     this.info     = info;
     this.editList = editList;
 }