Commit 6c165b77 authored by Guillaume Charifi's avatar Guillaume Charifi Committed by Geoffrey Métais
Browse files

VLCOptions: Allow user-defined libVLC options


Signed-off-by: default avatarGuillaume Charifi <guillaume.charifi@sfr.fr>
Signed-off-by: default avatarGeoffrey Métais <geoffrey.metais@gmail.com>
parent 55265e3f
......@@ -448,6 +448,7 @@
<string name="dump_logcat">Dump logcat log</string>
<string name="dump_logcat_success">Logcat successfully dumped to %1$s!</string>
<string name="dump_logcat_failure">Failed to dump logcat.</string>
<string name="custom_libvlc_options">Custom libVLC options</string>
<string name="serious_crash">Unfortunately, a serious error has occurred and VLC had to close.</string>
<string name="help_us_send_log">Help us improving VLC by sending the following crash log:</string>
......
......@@ -81,6 +81,13 @@
<PreferenceScreen
android:key="debug_logs"
android:title="@string/debug_logs" />
<EditTextPreference
android:defaultValue=""
android:inputType="textMultiLine"
android:key="custom_libvlc_options"
android:singleLine="false"
android:title="@string/custom_libvlc_options" />
</PreferenceCategory>
</PreferenceScreen>
......@@ -175,6 +175,7 @@ public class PreferencesAdvanced extends BasePreferenceFragment implements Share
// No break because need VLCInstance.restart();
case "opengl":
case "chroma_format":
case "custom_libvlc_options":
case "deblocking":
case "enable_frame_skip":
case "enable_time_stretching_audio":
......
......@@ -134,6 +134,7 @@ public class PreferencesAdvanced extends BasePreferenceFragment implements Share
// No break because need VLCInstance.restart();
case "opengl":
case "chroma_format":
case "custom_libvlc_options":
case "deblocking":
case "enable_frame_skip":
case "enable_time_stretching_audio":
......
......@@ -40,6 +40,7 @@ import org.videolan.vlc.VLCApplication;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
public class VLCOptions {
......@@ -144,6 +145,9 @@ public class VLCOptions {
options.add("--sout-chromecast-conversion-quality="+pref.getString("casting_quality", "2"));
options.add("--sout-keep");
final String customOptions[] = pref.getString("custom_libvlc_options", "").split("\\r?\\n", -1);
if (!Util.isArrayEmpty(customOptions)) Collections.addAll(options, customOptions);
return options;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment