Commit e79c970b authored by Geoffrey Métais's avatar Geoffrey Métais

Option to enable fast-seek

parent d989fa56
......@@ -300,6 +300,7 @@
<string name="video_min_group_length_first">First letter only</string>
<string name="video_min_group_length_short">Short number of letters (6)</string>
<string name="video_min_group_length_long">Long number of letters (9)</string>
<string name="media_fast_seek">Enable experimental fast seek option</string>
<string name="media_seen">Show seen video marker</string>
<string name="media_seen_summary">Mark a video as seen when you play it until the end</string>
<string name="force_list_portrait">No grid in portrait mode</string>
......
......@@ -34,6 +34,11 @@
android:summary="@string/save_audiodelay_summary"
android:title="@string/save_audiodelay_title" />
<CheckBoxPreference
android:defaultValue="false"
android:key="media_fast_seek"
android:title="@string/media_fast_seek" />
<PreferenceCategory android:title="@string/controls_prefs_category">
<CheckBoxPreference
android:defaultValue="false"
......
......@@ -180,6 +180,7 @@ public class VLCOptions {
boolean noVideo = (flags & MediaWrapper.MEDIA_VIDEO) == 0;
final boolean paused = (flags & MediaWrapper.MEDIA_PAUSED) != 0;
int hardwareAcceleration = HW_ACCELERATION_DISABLED;
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
if (!noHardwareAcceleration) {
try {
......@@ -199,7 +200,8 @@ public class VLCOptions {
if (noVideo) media.addOption(":no-video");
if (paused) media.addOption(":start-paused");
if (!PreferenceManager.getDefaultSharedPreferences(context).getBoolean("subtitles_autoload", true)) media.addOption(":sub-language=none");
if (!prefs.getBoolean("subtitles_autoload", true)) media.addOption(":sub-language=none");
if (prefs.getBoolean("media_fast_seek", false)) media.addOption(":input-fast-seek");
}
private static MediaPlayer.Equalizer getEqualizerSetFromSettings(SharedPreferences pref) {
......
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