rework video profile

This commit is contained in:
Luke Pulverenti 2014-10-08 23:15:52 -04:00
parent 4f7962c41f
commit 63e7b990a4
7 changed files with 11 additions and 6 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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"),

View File

@ -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())

View File

@ -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])));
}