コード例 #1
0
        private static IEnumerable <SmoothStreamingMediaStreamIndexC> CreateChunks(SegmentIndexBox sidx)
        {
            int i = 0;

            foreach (var subsegment in sidx.Subsegments)
            {
                var c = new SmoothStreamingMediaStreamIndexC();
                if (i == 0)
                {
                    c.t = sidx.EarliestPresentationTime;
                }
                c.n = i;
                c.d = subsegment.Duration;
                //c.d = ConvertTimeToTimescale(track.Duration, mvhd.TimeScale, track.TimeScale) - entriesDuration;
                yield return(c);
            }
        }
コード例 #2
0
        private static IEnumerable <SmoothStreamingMediaStreamIndexC> CreateChunks(SegmentTimeline segmentTimeline)
        {
            int i = 0;

            foreach (var s in segmentTimeline.S)
            {
                for (int repeatIndex = 0; repeatIndex <= s.R; repeatIndex++)
                {
                    var c = new SmoothStreamingMediaStreamIndexC();
                    c.n = i;
                    c.t = s.T;
                    c.d = s.D;
                    //c.d = ConvertTimeToTimescale(track.Duration, mvhd.TimeScale, track.TimeScale) - entriesDuration;

                    yield return(c);

                    i++;
                }
            }
        }