コード例 #1
0
ファイル: Metadata.cs プロジェクト: zeta1999/Vrmac
        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));
        }
コード例 #2
0
ファイル: SampleReader.cs プロジェクト: zeta1999/Vrmac
        public SampleReader(TrackMetadata track)
        {
            MediaInformation mi = track.info.mediaInformation;

            sampleCount         = mi.sampleTable.sampleSize.sampleCount;
            sampleSize          = mi.sampleTable.sampleSize;
            timeToSampleEntries = mi.sampleTable.timeToSample;
            sampleToChunk       = mi.sampleTable.sampleToChunk;
            chunkOffset         = mi.sampleTable.chunkOffset;
            timeScale           = track.info.timeScale;
            duration            = track.info.duration;
            sampleTable         = mi.sampleTable;
            timeDeltas          = mi.sampleTable.compositionToSample;
            editList            = track.editList;
            rewind();
        }
コード例 #3
0
ファイル: Metadata.cs プロジェクト: zeta1999/Vrmac
 internal TrackMetadata(TrackHeader header, MediaInfo info, iEditList editList)
 {
     this.header   = header;
     this.info     = info;
     this.editList = editList;
 }