Beispiel #1
0
 private static void addStartErrors(StartData startData, HashSet <PlaylistError> errors)
 {
     if (float.IsNaN(startData.getTimeOffset()))
     {
         errors.Add(PlaylistError.START_DATA_WITHOUT_TIME_OFFSET);
     }
 }
 public override void doWrite(TagWriter tagWriter, Playlist playlist, MediaPlaylist mediaPlaylist)
 {
     if (mediaPlaylist.hasStartData())
     {
         StartData startData = mediaPlaylist.getStartData();
         writeAttributes(tagWriter, startData, HANDLERS);
     }
 }
Beispiel #3
0
 private MasterPlaylist(List <PlaylistData> playlists, List <IFrameStreamInfo> iFramePlaylists, List <MediaData> mediaData, List <String> unknownTags, StartData startData)
 {
     mPlaylists       = DataUtil.emptyOrUnmodifiable(playlists);
     mIFramePlaylists = DataUtil.emptyOrUnmodifiable(iFramePlaylists);
     mMediaData       = DataUtil.emptyOrUnmodifiable(mediaData);
     mUnknownTags     = DataUtil.emptyOrUnmodifiable(unknownTags);
     mStartData       = startData;
 }
            public void parse(String line, ParseState state)
            {
                lineParser.parse(line, state);

                StartData.Builder builder = new StartData.Builder();
                ParseUtil.parseAttributes(line, builder, state, HANDLERS, getTag());
                StartData startData = builder.build();

                state.getMedia().setStartData(startData);
            }
Beispiel #5
0
 public Builder(List <TrackData> tracks, List <String> unknownTags, int targetDuration, int mediaSequenceNumber, bool isIframesOnly, bool isOngoing, PlaylistType playlistType, StartData startData)
 {
     mTracks              = tracks;
     mUnknownTags         = unknownTags;
     mTargetDuration      = targetDuration;
     mMediaSequenceNumber = mediaSequenceNumber;
     mIsIframesOnly       = isIframesOnly;
     mIsOngoing           = isOngoing;
     mPlaylistType        = playlistType;
     mStartData           = startData;
 }
Beispiel #6
0
 private MediaPlaylist(List <TrackData> tracks, List <String> unknownTags, int targetDuration, StartData startData, int mediaSequenceNumber, bool isIframesOnly, bool isOngoing, PlaylistType playlistType)
 {
     mTracks              = DataUtil.emptyOrUnmodifiable(tracks);
     mUnknownTags         = DataUtil.emptyOrUnmodifiable(unknownTags);
     mTargetDuration      = targetDuration;
     mMediaSequenceNumber = mediaSequenceNumber;
     mIsIframesOnly       = isIframesOnly;
     mIsOngoing           = isOngoing;
     mStartData           = startData;
     mPlaylistType        = playlistType;
 }
Beispiel #7
0
        public override bool Equals(object o)
        {
            if (!(o is StartData))
            {
                return(false);
            }

            StartData other = (StartData)o;

            return(this.mPrecise == other.mPrecise &&
                   this.mTimeOffset == other.mTimeOffset);
        }
Beispiel #8
0
 public PlaylistParseState <MediaPlaylist> setStartData(StartData startData)
 {
     mStartData = startData;
     return(this);
 }
Beispiel #9
0
 public Builder withStartData(StartData startData)
 {
     mStartData = startData;
     return(this);
 }