Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZRTP
libjitsi
Commits
423f51e7
Commit
423f51e7
authored
12 years ago
by
Vincent Lucas
Browse files
Options
Downloads
Patches
Plain Diff
Activates the use of model identifier for audio device.
parent
b3fa7044
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/org/jitsi/impl/neomedia/device/Devices.java
+6
-6
6 additions, 6 deletions
src/org/jitsi/impl/neomedia/device/Devices.java
src/org/jitsi/impl/neomedia/device/ExtendedCaptureDeviceInfo.java
+1
-1
1 addition, 1 deletion
...jitsi/impl/neomedia/device/ExtendedCaptureDeviceInfo.java
with
7 additions
and
7 deletions
src/org/jitsi/impl/neomedia/device/Devices.java
+
6
−
6
View file @
423f51e7
...
@@ -73,7 +73,7 @@ public ExtendedCaptureDeviceInfo getDevice(
...
@@ -73,7 +73,7 @@ public ExtendedCaptureDeviceInfo getDevice(
ExtendedCaptureDeviceInfo
activeDevice
=
activeDevices
.
get
(
i
);
ExtendedCaptureDeviceInfo
activeDevice
=
activeDevices
.
get
(
i
);
if
(!
devicePreferences
.
contains
(
if
(!
devicePreferences
.
contains
(
activeDevice
.
getIdentifier
()))
activeDevice
.
get
Model
Identifier
()))
{
{
// Adds the device in the preference list (to the end of the
// Adds the device in the preference list (to the end of the
// list, but the save device will push it to the top of
// list, but the save device will push it to the top of
...
@@ -98,7 +98,7 @@ public ExtendedCaptureDeviceInfo getDevice(
...
@@ -98,7 +98,7 @@ public ExtendedCaptureDeviceInfo getDevice(
// If we have found the "preferred" device among active
// If we have found the "preferred" device among active
// device.
// device.
if
(
devicePreference
.
equals
(
if
(
devicePreference
.
equals
(
activeDevice
.
getIdentifier
()))
activeDevice
.
get
Model
Identifier
()))
{
{
return
activeDevice
;
return
activeDevice
;
}
}
...
@@ -210,7 +210,7 @@ private void saveDevice(
...
@@ -210,7 +210,7 @@ private void saveDevice(
String
selectedDeviceIdentifier
String
selectedDeviceIdentifier
=
(
device
==
null
)
=
(
device
==
null
)
?
NoneAudioSystem
.
LOCATOR_PROTOCOL
?
NoneAudioSystem
.
LOCATOR_PROTOCOL
:
device
.
getIdentifier
();
:
device
.
get
Model
Identifier
();
// Sorts the user preferences to put the selected device on top.
// Sorts the user preferences to put the selected device on top.
addToDevicePreferences
(
addToDevicePreferences
(
...
@@ -306,7 +306,7 @@ private void addToDevicePreferences(
...
@@ -306,7 +306,7 @@ private void addToDevicePreferences(
for
(
ExtendedCaptureDeviceInfo
activeDevice
:
activeDevices
)
for
(
ExtendedCaptureDeviceInfo
activeDevice
:
activeDevices
)
{
{
if
(
devicePreference
.
equals
(
if
(
devicePreference
.
equals
(
activeDevice
.
getIdentifier
())
activeDevice
.
get
Model
Identifier
())
||
devicePreference
.
equals
(
||
devicePreference
.
equals
(
NoneAudioSystem
.
LOCATOR_PROTOCOL
))
NoneAudioSystem
.
LOCATOR_PROTOCOL
))
{
{
...
@@ -337,12 +337,12 @@ private void renameOldFashionedIdentifier(
...
@@ -337,12 +337,12 @@ private void renameOldFashionedIdentifier(
for
(
ExtendedCaptureDeviceInfo
activeDevice
:
activeDevices
)
for
(
ExtendedCaptureDeviceInfo
activeDevice
:
activeDevices
)
{
{
String
name
=
activeDevice
.
getName
();
String
name
=
activeDevice
.
getName
();
String
id
=
activeDevice
.
getIdentifier
();
String
id
=
activeDevice
.
get
Model
Identifier
();
// We can only switch to the new fashioned notation, only if the OS
// We can only switch to the new fashioned notation, only if the OS
// API gives us a unique identifier (different from the device
// API gives us a unique identifier (different from the device
// name).
// name).
if
(
id
!=
null
)
if
(
!
name
.
equals
(
id
)
)
{
{
synchronized
(
devicePreferences
)
synchronized
(
devicePreferences
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/org/jitsi/impl/neomedia/device/ExtendedCaptureDeviceInfo.java
+
1
−
1
View file @
423f51e7
...
@@ -142,7 +142,7 @@ public String getUID()
...
@@ -142,7 +142,7 @@ public String getUID()
*/
*/
public
String
getModelIdentifier
()
public
String
getModelIdentifier
()
{
{
return
modelIdentifier
;
return
(
modelIdentifier
==
null
)
?
name
:
modelIdentifier
;
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment