io.lindstrom.m3u8.model.Variant Maven / Gradle / Ivy
package io.lindstrom.m3u8.model;
import org.immutables.value.Value;
import java.util.List;
import java.util.Optional;
/**
* Variant Stream (EXT-X-STREAM-INF)
*
* @see
* RFC 8216 - 4.3.4.2. EXT-X-STREAM-INF
*/
@Value.Immutable
public interface Variant {
/**
* The value is a decimal-integer of bits per second. It represents the peak segment
* bit rate of the Variant Stream.
*
* @return variant attribute BANDWIDTH
*/
long bandwidth();
/**
* The value is a decimal-integer of bits per second. It represents the average segment
* bit rate of the Variant Stream.
*
* @return variant attribute AVERAGE-BANDWIDTH
*/
Optional averageBandwidth();
/**
* @return variant attribute CODECS
*/
List codecs();
/**
* @return variant attribute RESOLUTION
*/
Optional resolution();
/**
* @return variant attribute FRAME-RATE
*/
Optional frameRate();
/**
* @return variant attribute HDCP-LEVEL
*/
Optional hdcpLevel();
/**
* @return variant attribute AUDIO
*/
Optional audio();
/**
* @return variant attribute VIDEO
*/
Optional video();
/**
* @return variant attribute SUBTITLES
*/
Optional subtitles();
/**
* @return variant attribute CLOSED-CAPTIONS
*/
Optional closedCaptions();
/**
* @return URI to the media playlist
*/
String uri();
static Builder builder() {
return new Builder();
}
class Builder extends VariantBuilder {
public Builder resolution(int width, int height) {
return resolution(Resolution.of(width, height));
}
}
}