Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled 3D header REQ-VIDEO-LAYOUT https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis #65

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/main/java/io/lindstrom/m3u8/model/Variant.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public interface Variant {
*/
Optional<String> pathwayId();

/**
* @return variant attribute REQ-VIDEO-LAYOUT
*/
Optional<String> reqVideoLayout();

static Builder builder() {
return new Builder();
}
Expand All @@ -122,4 +127,4 @@ public Builder videoRange(String value) {
return videoRange(VideoRange.valueOf(value));
}
}
}
}
15 changes: 13 additions & 2 deletions src/main/java/io/lindstrom/m3u8/parser/VariantAttribute.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,18 @@ public void read(Variant.Builder builder, String value) throws PlaylistParserExc
public void write(Variant value, TextBuilder textBuilder) {
value.pathwayId().ifPresent(v -> textBuilder.addQuoted(key(), v));
}
};
},

REQ_VIDEO_LAYOUT {
@Override
public void read(Variant.Builder builder, String value) {
builder.reqVideoLayout(value);
}

@Override
public void write(Variant value, TextBuilder textBuilder) {
value.reqVideoLayout().ifPresent(v -> textBuilder.addQuoted(key(), v));
};

final static Map<String, VariantAttribute> attributeMap = ParserUtils.toMap(values(), Attribute::key);

Expand All @@ -223,4 +234,4 @@ static Variant parse(String attributes, String uri, ParsingMode parsingMode) thr
builder.uri(uri);
return builder.build();
}
}
}