1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-25 22:53:20 +00:00
NewPipe/app/src/main/res/xml/exoplayer_settings.xml
AudricV 787758a436
[Android 6+] Add ability to always use ExoPlayer's MediaVideoCodecRenderer setOutputSurface workaround
As some devices not present in ExoPlayer's list may not implement
MediaCodec.setOutputSurface(Surface) properly, this workaround could be useful
on these devices.

It forces ExoPlayer to fall back on releasing and re-instantiating video codec
instances, which is always used on Android 5 and lower due to addition of this
method in Android 6.

To do so, a CustomMediaCodecVideoRenderer, based on ExoPlayer's
MediaVideoCodecRenderer which always return true for the
codecNeedsSetOutputSurfaceWorkaround method has been added, which is used in
CustomRenderersFactory, a class based on DefaultRenderersFactory which always
returns our CustomMediaCodecVideoRenderer as the video renderers.

CustomRenderersFactory replaces DefaultRenderersFactory in the player, in the
case this setting is enabled.
2023-04-10 17:39:27 +02:00

41 lines
1.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:title="@string/settings_category_exoplayer_title">
<ListPreference
android:defaultValue="@string/progressive_load_interval_default_value"
android:entries="@array/progressive_load_interval_descriptions"
android:entryValues="@array/progressive_load_interval_values"
android:key="@string/progressive_load_interval_key"
android:summary="@string/progressive_load_interval_summary"
android:title="@string/progressive_load_interval_title"
app:singleLineTitle="false"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/use_exoplayer_decoder_fallback_key"
android:summary="@string/use_exoplayer_decoder_fallback_summary"
android:title="@string/use_exoplayer_decoder_fallback_title"
app:singleLineTitle="false"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/disable_media_tunneling_key"
android:summary="@string/disable_media_tunneling_summary"
android:title="@string/disable_media_tunneling_title"
app:singleLineTitle="false"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/always_use_exoplayer_set_output_surface_workaround_key"
android:summary="@string/always_use_exoplayer_set_output_surface_workaround_summary"
android:title="@string/always_use_exoplayer_set_output_surface_workaround_title"
app:singleLineTitle="false"
app:iconSpaceReserved="false" />
</PreferenceScreen>