Replace frame pacing hack with Choreographer-based rendering

This mimics the frame pacing logic now present in the iOS client.
This commit is contained in:
Cameron Gutman
2022-02-17 23:48:02 -06:00
parent c0f8001627
commit c25faf6426
7 changed files with 138 additions and 125 deletions

View File

@@ -94,4 +94,13 @@
<item>forceh265</item>
<item>neverh265</item>
</string-array>
<string-array name="video_frame_pacing_names">
<item>@string/pacing_latency</item>
<item>@string/pacing_smoothness</item>
</string-array>
<string-array name="video_frame_pacing_values" translatable="false">
<item>latency</item>
<item>smoothness</item>
</string-array>
</resources>

View File

@@ -247,4 +247,9 @@
<string name="videoformat_hevcauto">Use HEVC only if stable</string>
<string name="videoformat_hevcalways">Always use HEVC (may crash)</string>
<string name="videoformat_hevcnever">Never use HEVC</string>
<string name="title_frame_pacing">Video frame pacing</string>
<string name="summary_frame_pacing">Specify how to balance video latency and smoothness</string>
<string name="pacing_latency">Prefer Lowest Latency</string>
<string name="pacing_smoothness">Prefer Smoothest Video</string>
</resources>

View File

@@ -29,6 +29,13 @@
android:summary="@string/summary_seekbar_bitrate"
android:text="@string/suffix_seekbar_bitrate_mbps"
android:title="@string/title_seekbar_bitrate" />
<ListPreference
android:key="frame_pacing"
android:title="@string/title_frame_pacing"
android:entries="@array/video_frame_pacing_names"
android:entryValues="@array/video_frame_pacing_values"
android:summary="@string/summary_frame_pacing"
android:defaultValue="latency" />
<CheckBoxPreference
android:key="checkbox_stretch_video"
android:title="@string/title_checkbox_stretch_video"
@@ -183,11 +190,6 @@
android:entryValues="@array/video_format_values"
android:summary="@string/summary_video_format"
android:defaultValue="auto" />
<CheckBoxPreference
android:key="checkbox_disable_frame_drop"
android:title="@string/title_disable_frame_drop"
android:summary="@string/summary_disable_frame_drop"
android:defaultValue="false" />
<CheckBoxPreference
android:key="checkbox_enable_hdr"
android:title="@string/title_enable_hdr"