add reference frame limit

This commit is contained in:
Luke Pulverenti 2015-04-27 13:52:53 -04:00
parent 1e7e76bafe
commit 707c15b33f
7 changed files with 65 additions and 22 deletions

81
.idea/workspace.xml generated
View File

@ -7,12 +7,13 @@
</component>
<component name="ChangeListManager">
<list default="true" id="5b626835-6518-4586-bf6c-5bbba32974d2" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/classes/Production/android/mediabrowser/apiinteraction/android/profiles/AndroidProfile.class" afterPath="$PROJECT_DIR$/out/classes/Production/android/mediabrowser/apiinteraction/android/profiles/AndroidProfile.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/classes/Production/android/mediabrowser/apiinteraction/android/profiles/Api16Builder.class" afterPath="$PROJECT_DIR$/out/classes/Production/android/mediabrowser/apiinteraction/android/profiles/Api16Builder.class" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/artifacts/jar/emby.apiclient.android.jar" afterPath="$PROJECT_DIR$/out/artifacts/jar/emby.apiclient.android.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/artifacts/jar/emby.apiclient.jar" afterPath="$PROJECT_DIR$/out/artifacts/jar/emby.apiclient.jar" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java" afterPath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfileOptions.java" afterPath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfileOptions.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api16Builder.java" afterPath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api16Builder.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api21Builder.java" afterPath="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api21Builder.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="MediaBrowser.ApiClient.Java.iws" />
<ignored path=".idea/workspace.xml" />
@ -42,7 +43,7 @@
<file leaf-file-name="StreamBuilder.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="11201" max-vertical-offset="17629">
<state vertical-scroll-proportion="0.0" vertical-offset="10997" max-vertical-offset="17629">
<caret line="725" column="38" selection-start-line="725" selection-start-column="38" selection-end-line="725" selection-end-column="38" />
<folding />
</state>
@ -59,11 +60,23 @@
</provider>
</entry>
</file>
<file leaf-file-name="AndroidProfile.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.17" vertical-offset="1224" max-vertical-offset="3842">
<caret line="87" column="23" selection-start-line="87" selection-start-column="23" selection-end-line="87" selection-end-column="23" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Api16Builder.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api16Builder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-13.689655" vertical-offset="5417" max-vertical-offset="6919">
<caret line="348" column="0" selection-start-line="348" selection-start-column="0" selection-end-line="348" selection-end-column="0" />
<state vertical-scroll-proportion="-13.689655" vertical-offset="1065" max-vertical-offset="6970">
<caret line="92" column="9" selection-start-line="92" selection-start-column="9" selection-end-line="92" selection-end-column="9" />
<folding>
<element signature="e#399#400#0" expanded="true" />
<element signature="e#434#435#0" expanded="true" />
@ -72,10 +85,10 @@
</provider>
</entry>
</file>
<file leaf-file-name="Api21Builder.java" pinned="false" current-in-tab="true">
<file leaf-file-name="Api21Builder.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api21Builder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.29384616" vertical-offset="553" max-vertical-offset="1853">
<state vertical-scroll-proportion="0.0" vertical-offset="553" max-vertical-offset="1853">
<caret line="62" column="26" selection-start-line="62" selection-start-column="26" selection-end-line="62" selection-end-column="26" />
<folding />
</state>
@ -138,9 +151,9 @@
<option value="$PROJECT_DIR$/src/mediabrowser/apiinteraction/ApiClient.java" />
<option value="$PROJECT_DIR$/src/mediabrowser/model/dlna/StreamBuilder.java" />
<option value="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfileOptions.java" />
<option value="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api21Builder.java" />
<option value="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java" />
<option value="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api16Builder.java" />
<option value="$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api21Builder.java" />
</list>
</option>
</component>
@ -301,6 +314,32 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="MediaBrowser.ApiClient.Java" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="MediaBrowser.ApiClient.Java" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="android" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="android" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="profiles" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="PackagesPane" />
@ -852,15 +891,11 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java">
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api21Builder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="1.776542" vertical-offset="283" max-vertical-offset="3825">
<caret line="120" column="36" selection-start-line="120" selection-start-column="36" selection-end-line="120" selection-end-column="36" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#271#272#0" expanded="true" />
<element signature="e#311#312#0" expanded="true" />
</folding>
<state vertical-scroll-proportion="0.0" vertical-offset="553" max-vertical-offset="1853">
<caret line="62" column="26" selection-start-line="62" selection-start-column="26" selection-end-line="62" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
@ -882,8 +917,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api16Builder.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-13.689655" vertical-offset="5417" max-vertical-offset="6919">
<caret line="348" column="0" selection-start-line="348" selection-start-column="0" selection-end-line="348" selection-end-column="0" />
<state vertical-scroll-proportion="-13.689655" vertical-offset="1065" max-vertical-offset="6970">
<caret line="92" column="9" selection-start-line="92" selection-start-column="9" selection-end-line="92" selection-end-column="9" />
<folding>
<element signature="e#399#400#0" expanded="true" />
<element signature="e#434#435#0" expanded="true" />
@ -891,11 +926,13 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/Api21Builder.java">
<entry file="file://$PROJECT_DIR$/android/src/mediabrowser/apiinteraction/android/profiles/AndroidProfile.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.29384616" vertical-offset="553" max-vertical-offset="1853">
<caret line="62" column="26" selection-start-line="62" selection-start-column="26" selection-end-line="62" selection-end-column="26" />
<folding />
<state vertical-scroll-proportion="0.17" vertical-offset="1224" max-vertical-offset="3842">
<caret line="87" column="23" selection-start-line="87" selection-start-column="23" selection-end-line="87" selection-end-column="23" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>

View File

@ -103,6 +103,9 @@ public class AndroidProfile extends DeviceProfile
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"),
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"),
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"),
// TODO: This needs to vary per resolution
new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.RefFrames, "4"),
new ProfileCondition(ProfileConditionType.NotEquals, ProfileConditionValue.IsAnamorphic, "true")
});

View File

@ -87,6 +87,9 @@ public class Api16Builder {
maxLevel = Defaults.DefaultH264Level;
}
conditions.add(new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoLevel, String.valueOf(maxLevel)));
// TODO: This needs to vary per resolution
conditions.add(new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.RefFrames, "4"));
}
for (ProfileCondition existing : profile.getConditions()){

Binary file not shown.