[jitsi~svn:10214] Activates the use of model identifier for audio device.

vincent_lucas at java.net vincent_lucas at java.net
Fri Dec 21 11:13:47 CET 2012


Project:    jitsi
Repository: svn
Revision:   10214
Author:     vincent_lucas
Date:       2012-12-21 10:13:42 UTC
Link:       

Log Message:
------------
Activates the use of model identifier for audio device.


Revisions:
----------
10214


Modified Paths:
---------------
libjitsi/src/org/jitsi/impl/neomedia/device/Devices.java
trunk/lib/installer-exclude/libjitsi.jar
libjitsi/src/org/jitsi/impl/neomedia/device/ExtendedCaptureDeviceInfo.java


Diffs:
------
Index: trunk/lib/installer-exclude/libjitsi.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: libjitsi/src/org/jitsi/impl/neomedia/device/ExtendedCaptureDeviceInfo.java
===================================================================
--- libjitsi/src/org/jitsi/impl/neomedia/device/ExtendedCaptureDeviceInfo.java	(revision 10213)
+++ libjitsi/src/org/jitsi/impl/neomedia/device/ExtendedCaptureDeviceInfo.java	(revision 10214)
@@ -142,7 +142,7 @@
      */
     public String getModelIdentifier()
     {
-        return modelIdentifier;
+        return (modelIdentifier == null) ? name : modelIdentifier;
     }
 
     /**
Index: libjitsi/src/org/jitsi/impl/neomedia/device/Devices.java
===================================================================
--- libjitsi/src/org/jitsi/impl/neomedia/device/Devices.java	(revision 10213)
+++ libjitsi/src/org/jitsi/impl/neomedia/device/Devices.java	(revision 10214)
@@ -73,7 +73,7 @@
                 ExtendedCaptureDeviceInfo activeDevice = activeDevices.get(i);
 
                 if(!devicePreferences.contains(
-                            activeDevice.getIdentifier()))
+                            activeDevice.getModelIdentifier()))
                 {
                     // Adds the device in the preference list (to the end of the
                     // list, but the save device will push it to the top of
@@ -98,7 +98,7 @@
                         // If we have found the "preferred" device among active
                         // device.
                         if(devicePreference.equals(
-                                activeDevice.getIdentifier()))
+                                activeDevice.getModelIdentifier()))
                         {
                             return activeDevice;
                         }
@@ -210,7 +210,7 @@
         String selectedDeviceIdentifier
             = (device == null)
                 ? NoneAudioSystem.LOCATOR_PROTOCOL
-                : device.getIdentifier();
+                : device.getModelIdentifier();
 
         // Sorts the user preferences to put the selected device on top.
         addToDevicePreferences(
@@ -306,7 +306,7 @@
                     for(ExtendedCaptureDeviceInfo activeDevice : activeDevices)
                     {
                         if(devicePreference.equals(
-                                    activeDevice.getIdentifier())
+                                    activeDevice.getModelIdentifier())
                                 || devicePreference.equals(
                                         NoneAudioSystem.LOCATOR_PROTOCOL))
                         {
@@ -337,12 +337,12 @@
         for(ExtendedCaptureDeviceInfo activeDevice : activeDevices)
         {
             String name = activeDevice.getName();
-            String id = activeDevice.getIdentifier();
+            String id = activeDevice.getModelIdentifier();
 
             // We can only switch to the new fashioned notation, only if the OS
             // API gives us a unique identifier (different from the device
             // name).
-            if(id != null)
+            if(!name.equals(id))
             {
                 synchronized(devicePreferences)
                 {







More information about the commits mailing list