[Android] Save video playback speed option

Geoffrey Métais git at videolan.org
Mon Mar 14 14:02:14 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 14 13:56:21 2016 +0100| [3958d909530aeb9ad6e32d0d5ac1cd9f69e7e7e2] | committer: Geoffrey Métais

Save video playback speed option

> https://code.videolan.org/videolan/vlc-android/commit/3958d909530aeb9ad6e32d0d5ac1cd9f69e7e7e2
---

 vlc-android/res/values/strings.xml                       | 16 ++++++++++++++++
 vlc-android/res/xml/preferences_adv.xml                  |  8 ++++++++
 .../vlc/gui/preferences/PreferencesActivity.java         |  2 ++
 3 files changed, 26 insertions(+)

diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index e8639ff..cf60605 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -306,6 +306,11 @@
     <string name="aout_summary">Change the method that VLC uses to output audio.</string>
     <string name="aout_audiotrack" translatable="false">AudioTrack</string>
     <string name="aout_opensles" translatable="false">OpenSL ES</string>
+    <string name="save_video_speed_title">Save video Playback speed</string>
+    <string name="save_video_speed_summary">Remember the video playback speed for any video</string>
+    <string name="save_video_none">Do not save speed</string>
+    <string name="save_video_session">Save speed during session</string>
+    <string name="save_video_always">Save speed across sessions</string>
     <string name="vout">Video output</string>
     <string name="vout_summary">Change the method that VLC uses to output video.</string>
     <string name="vout_android_surface">Android surface</string>
@@ -407,6 +412,17 @@
     <string name="download_on_device">Download</string>
     <string name="extension_empty">No item to display, go to your extension settings to get some.</string>
 
+    <string-array name="video_rate_list">
+        <item>@string/save_video_none</item>
+        <item>@string/save_video_session</item>
+        <item>@string/save_video_always</item>
+    </string-array>
+    <string-array name="video_rate_values">
+        <item>0</item>
+        <item>1</item>
+        <item>2</item>
+    </string-array>
+
     <string-array name="hardware_acceleration_list">
         <item>@string/automatic</item>
         <item>@string/hardware_acceleration_disabled</item>
diff --git a/vlc-android/res/xml/preferences_adv.xml b/vlc-android/res/xml/preferences_adv.xml
index 250e459..f68ceda 100644
--- a/vlc-android/res/xml/preferences_adv.xml
+++ b/vlc-android/res/xml/preferences_adv.xml
@@ -11,6 +11,14 @@
     <!--android:summary="@string/vout_summary"-->
     <!--android:title="@string/vout" />-->
 
+    <ListPreference
+        android:defaultValue="1"
+        android:key="save_video_speed"
+        android:title="@string/save_video_speed_title"
+        android:summary="@string/save_video_speed_summary"
+        android:entries="@array/video_rate_list"
+        android:entryValues="@array/video_rate_values"/>
+
     <CheckBoxPreference
         android:defaultValue="true"
         android:key="auto_rescan"
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
index 8898169..aac5e5e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
@@ -43,6 +43,8 @@ public class PreferencesActivity extends AppCompatActivity implements PlaybackSe
     public final static String VIDEO_SPEED = "VideoSpeed";
     public final static String VIDEO_BACKGROUND = "video_background";
     public final static String VIDEO_RESTORE = "video_restore";
+    public final static String VIDEO_SAVE_SPEED = "save_video_speed";
+    public final static String VIDEO_RATE = "video_rate";
     public final static String AUTO_RESCAN = "auto_rescan";
     public final static int RESULT_RESCAN = RESULT_FIRST_USER + 1;
     public final static int RESULT_RESTART = RESULT_FIRST_USER + 2;



More information about the Android mailing list