[Android] LibVLC: MediaPlayer: rename mAudioDeviceFromUser

Thomas Guillem git at videolan.org
Fri Mar 30 16:51:23 CEST 2018


vlc-android | branch: 3.0.x | Thomas Guillem <thomas at gllm.fr> | Mon Mar 26 13:08:50 2018 +0200| [5d98ec27c2500fab35d8757169d721fc00235ac1] | committer: Geoffrey Métais

LibVLC: MediaPlayer: rename mAudioDeviceFromUser

(cherry picked from commit c9cf56f20065c7e1f77d6e76671f0fb4ccd30a21)

> https://code.videolan.org/videolan/vlc-android/commit/5d98ec27c2500fab35d8757169d721fc00235ac1
---

 libvlc/src/org/videolan/libvlc/MediaPlayer.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
index 9be5b6bc3..a3459e104 100644
--- a/libvlc/src/org/videolan/libvlc/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
@@ -362,7 +362,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
     private Media mMedia = null;
     private boolean mPlaying = false;
     private boolean mPlayRequested = false;
-    private boolean mAudioDeviceFromUser = false;
+    private boolean mListenAudioPlug = true;
     private int mVoutCount = 0;
     private boolean mAudioReset = false;
     private String mAudioOutput = "android_audiotrack";
@@ -615,7 +615,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
                         nativeSetAudioOutputDevice(mAudioOutputDevice);
                     mAudioReset = false;
                 }
-                if (!mAudioDeviceFromUser)
+                if (mListenAudioPlug)
                     registerAudioPlug(true);
                 mPlayRequested = true;
                 if (mWindow.areSurfacesWaiting())
@@ -723,7 +723,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
             synchronized (this) {
                 mAudioOutput = aout;
                 /* The user forced an output, don't listen to audio plug events and let the user decide */
-                mAudioDeviceFromUser = true;
+                mListenAudioPlug = false;
                 registerAudioPlug(false);
             }
         }
@@ -737,7 +737,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
                 mAudioOutputDevice = id;
                 if (fromUser) {
                     /* The user forced a device, don't listen to audio plug events and let the user decide */
-                    mAudioDeviceFromUser = true;
+                    mListenAudioPlug = false;
                     registerAudioPlug(false);
                 }
             }



More information about the Android mailing list