Пример #1
0
        public void test()
        {
            Playlist      playlist      = TestUtil.parsePlaylistFromResource("mediaPlaylist.m3u8");
            MediaPlaylist mediaPlaylist = playlist.getMediaPlaylist();

            Assert.False(playlist.hasMasterPlaylist());
            Assert.True(playlist.hasMediaPlaylist());
            Assert.True(mediaPlaylist.hasStartData());
            Assert.Equal(-4.5, mediaPlaylist.getStartData().getTimeOffset(), 12);
            Assert.True(mediaPlaylist.getStartData().isPrecise());
            Assert.Equal(10, mediaPlaylist.getTargetDuration());
        }
Пример #2
0
 public override void doWrite(TagWriter tagWriter, Playlist playlist, MediaPlaylist mediaPlaylist)
 {
     if (mediaPlaylist.hasStartData())
     {
         StartData startData = mediaPlaylist.getStartData();
         writeAttributes(tagWriter, startData, HANDLERS);
     }
 }
Пример #3
0
        private static void addMediaPlaylistErrors(MediaPlaylist playlist, HashSet <PlaylistError> errors, bool isExtended, ParsingMode parsingMode)
        {
            if (isExtended && playlist.hasStartData())
            {
                addStartErrors(playlist.getStartData(), errors);
            }

            addByteRangeErrors(playlist.getTracks(), errors, parsingMode);

            foreach (TrackData trackData in playlist.getTracks())
            {
                addTrackDataErrors(trackData, errors, isExtended, parsingMode);
            }
        }