mirror of
https://github.com/jellyfin/jellyfin-sdk-kotlin.git
synced 2024-12-02 19:06:29 +00:00
rework video profile
This commit is contained in:
parent
4f7962c41f
commit
63e7b990a4
Binary file not shown.
Binary file not shown.
@ -131,8 +131,10 @@ public class ConditionProcessor
|
||||
|
||||
switch (condition.getCondition())
|
||||
{
|
||||
case SubstringOf:
|
||||
return StringHelper.IndexOfIgnoreCase(currentValue, expected) != -1;
|
||||
case EqualsAny:
|
||||
{
|
||||
return ListHelper.ContainsIgnoreCase(expected.split("[|]", -1), currentValue);
|
||||
}
|
||||
case Equals:
|
||||
return StringHelper.EqualsIgnoreCase(currentValue, expected);
|
||||
case NotEquals:
|
||||
|
@ -6,7 +6,7 @@ public enum ProfileConditionType
|
||||
NotEquals(1),
|
||||
LessThanEqual(2),
|
||||
GreaterThanEqual(3),
|
||||
SubstringOf(4);
|
||||
EqualsAny(4);
|
||||
|
||||
private int intValue;
|
||||
private static java.util.HashMap<Integer, ProfileConditionType> mappings;
|
||||
|
@ -30,7 +30,7 @@ public class AndroidProfile extends DefaultProfile
|
||||
tempVar2.setVideoCodec("h264");
|
||||
tempVar2.setAudioCodec("aac");
|
||||
tempVar2.setType(DlnaProfileType.Video);
|
||||
tempVar2.setVideoProfile("Baseline");
|
||||
tempVar2.setVideoProfile("baseline");
|
||||
tempVar2.setContext(EncodingContext.Streaming);
|
||||
transcodingProfiles.add(tempVar2);
|
||||
}
|
||||
@ -39,7 +39,7 @@ public class AndroidProfile extends DefaultProfile
|
||||
tempVar3.setVideoCodec("h264");
|
||||
tempVar3.setAudioCodec("aac");
|
||||
tempVar3.setType(DlnaProfileType.Video);
|
||||
tempVar3.setVideoProfile("Baseline");
|
||||
tempVar3.setVideoProfile("baseline");
|
||||
tempVar3.setContext(EncodingContext.Static);
|
||||
transcodingProfiles.add(tempVar3);
|
||||
|
||||
@ -76,7 +76,7 @@ public class AndroidProfile extends DefaultProfile
|
||||
tempVar10.setCodec("h264");
|
||||
tempVar10.setConditions(new ProfileCondition[]
|
||||
{
|
||||
new ProfileCondition(ProfileConditionType.SubstringOf, ProfileConditionValue.VideoProfile, "baseline"),
|
||||
new ProfileCondition(ProfileConditionType.EqualsAny, ProfileConditionValue.VideoProfile, "baseline|constrained baseline"),
|
||||
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"),
|
||||
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"),
|
||||
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"),
|
||||
|
@ -301,6 +301,7 @@ public class StreamBuilder
|
||||
playlistItem.setVideoCodec(transcodingProfile.getVideoCodec());
|
||||
playlistItem.setProtocol(transcodingProfile.getProtocol());
|
||||
playlistItem.setAudioStreamIndex(audioStreamIndex);
|
||||
playlistItem.setVideoProfile(transcodingProfile.getVideoProfile());
|
||||
|
||||
java.util.ArrayList<ProfileCondition> videoTranscodingConditions = new java.util.ArrayList<ProfileCondition>();
|
||||
for (CodecProfile i : options.getProfile().getCodecProfiles())
|
||||
|
@ -347,6 +347,8 @@ public class StreamInfo
|
||||
list.add(item.getIsDirectStream() ? "" : String.valueOf(new java.util.Date().getTime()));
|
||||
list.add(item.getMaxRefFrames() != null ? StringHelper.ToStringCultureInvariant(item.getMaxRefFrames()) : "");
|
||||
list.add(item.getMaxVideoBitDepth() != null ? StringHelper.ToStringCultureInvariant(item.getMaxVideoBitDepth()) : "");
|
||||
String tempVar6 = item.getVideoProfile();
|
||||
list.add((tempVar6 != null) ? tempVar6 : "");
|
||||
|
||||
return String.format("Params=%1$s", tangible.DotNetToJavaStringHelper.join(";", list.toArray(new String[0])));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user