public Builder(String uri, TrackInfo trackInfo, EncryptionData encryptionData, bool hasDiscontinuity, MapInfo mapInfo, ByteRange byteRange) { mUri = uri; mTrackInfo = trackInfo; mEncryptionData = encryptionData; mHasDiscontinuity = hasDiscontinuity; mMapInfo = mapInfo; mByteRange = byteRange; }
private TrackData(String uri, TrackInfo trackInfo, EncryptionData encryptionData, String programDateTime, bool hasDiscontinuity, MapInfo mapInfo, ByteRange byteRange) { mUri = uri; mTrackInfo = trackInfo; mEncryptionData = encryptionData; mProgramDateTime = programDateTime; mHasDiscontinuity = hasDiscontinuity; mMapInfo = mapInfo; mByteRange = byteRange; }
public override bool Equals(Object o) { if (this == o) { return(true); } if (o == null || GetType() != o.GetType()) { return(false); } ByteRange byteRange = (ByteRange)o; return(mSubRangeLength == byteRange.mSubRangeLength && object.Equals(mOffset, byteRange.mOffset)); }
private static void writeByteRange(TagWriter tagWriter, ByteRange byteRange) { String value; if (byteRange.getOffset() != null) { value = byteRange.getSubRangeLength().ToString() + '@' + byteRange.getOffset().ToString(); } else { value = byteRange.getSubRangeLength().ToString(); } tagWriter.writeTag(Constants.EXT_X_BYTERANGE_TAG, value); }
public void testEXT_X_BYTERANGE() { IExtTagParser handler = MediaPlaylistLineParser.EXT_X_BYTERANGE; String tag = Constants.EXT_X_BYTERANGE_TAG; long subRangeLength = 350; long offset = 70L; String line = "#" + tag + ":" + subRangeLength + "@" + offset; Assert.Equal(tag, handler.getTag()); handler.parse(line, mParseState); ByteRange byteRange = mParseState.getMedia().byteRange; Assert.Equal(subRangeLength, byteRange.getSubRangeLength()); Assert.Equal(offset, byteRange.getOffset()); }
public String write(MapInfo attributes) { ByteRange byteRange = attributes.getByteRange(); String value; if (byteRange.hasOffset()) { value = byteRange.getSubRangeLength().ToString() + '@' + byteRange.getOffset().ToString(); } else { value = byteRange.getSubRangeLength().ToString(); } return(WriteUtil.writeQuotedString(value)); }
public Builder withByteRange(ByteRange byteRange) { this.mByteRange = byteRange; return(this); }
public Builder(String uri, ByteRange byteRange) { this.mUri = uri; this.mByteRange = byteRange; }
public MapInfo(String uri, ByteRange byteRange) { this.uri = uri; this.byteRange = byteRange; }