[Android] libvlc: LibVLC: constructor use an ArrayList for options
Thomas Guillem
git at videolan.org
Fri May 29 12:04:07 CEST 2015
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri May 29 11:42:35 2015 +0200| [7d471844997dff29bdd67d4aa9068e9f756ca863] | committer: Thomas Guillem
libvlc: LibVLC: constructor use an ArrayList for options
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7d471844997dff29bdd67d4aa9068e9f756ca863
---
libvlc/src/org/videolan/libvlc/LibVLC.java | 4 ++--
vlc-android/src/org/videolan/vlc/util/VLCOptions.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libvlc/src/org/videolan/libvlc/LibVLC.java b/libvlc/src/org/videolan/libvlc/LibVLC.java
index 5352447..941d2fb 100644
--- a/libvlc/src/org/videolan/libvlc/LibVLC.java
+++ b/libvlc/src/org/videolan/libvlc/LibVLC.java
@@ -53,8 +53,8 @@ public class LibVLC extends VLCObject {
*
* @param options
*/
- public LibVLC(String options[]) {
- nativeNew(options);
+ public LibVLC(ArrayList<String> options) {
+ nativeNew(options != null ? options.toArray(new String[options.size()]) : null);
setEventHandler(EventHandler.getInstance());
}
diff --git a/vlc-android/src/org/videolan/vlc/util/VLCOptions.java b/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
index 1f89554..ea343e6 100644
--- a/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
+++ b/vlc-android/src/org/videolan/vlc/util/VLCOptions.java
@@ -59,7 +59,7 @@ public class VLCOptions {
private static float[] sEqualizer = null;
private static boolean sHdmiAudioEnabled = false;
- public static String[] getLibOptions(SharedPreferences pref) {
+ public static ArrayList<String> getLibOptions(SharedPreferences pref) {
ArrayList<String> options = new ArrayList<String>(50);
final boolean timeStrechingDefault = VLCApplication.getAppResources().getBoolean(R.bool.time_stretching_default);
@@ -124,7 +124,7 @@ public class VLCOptions {
options.add("8"); // 7.1 maximum
}
options.add(verboseMode ? "-vvv" : "-vv");
- return options.toArray(new String[options.size()]);
+ return options;
}
private static int getAout(int aout) {
More information about the Android
mailing list