[Bug 759558] New: osxaudiosrc/osaudiosink uses non-unique identifiers as device ID
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Dec 16 09:30:52 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=759558
Bug ID: 759558
Summary: osxaudiosrc/osaudiosink uses non-unique identifiers as
device ID
Classification: Platform
Product: GStreamer
Version: 1.6.1
OS: Mac OS
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-good
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: marcin at saepia.net
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
It seems that current version of osxaudiosrc/osxaudiosink handles "device"
parameter in a way that may be ambiguous in some setups.
It expects that device ID that is passed is a numeric ID, such as obtained by
running "say -a ?". This is however, inaccurate, as such device ID is not Core
Audio UNIQUE identifier.
In some setups that's fine, for instance my setup is like that
$ say -a ?
50 Built-in Output
60 Z-10 USB Speaker
However, depending to which USB port I plug my USB Speaker I get this UID from
CoreAudio:
AppleUSBAudioEngine:Logitech:Z-10 USB Speaker:fd120000:1
or this
AppleUSBAudioEngine:Logitech:Z-10 USB Speaker:fa130000:1
(this is the code used to query)
CFStringRef uid;
propertySize = sizeof(uid);
deviceAddress.mSelector = kAudioDevicePropertyDeviceUID;
deviceAddress.mScope = kAudioObjectPropertyScopeGlobal;
deviceAddress.mElement = kAudioObjectPropertyElementMaster;
if(AudioObjectGetPropertyData(deviceIDs[idx], &deviceAddress, 0, NULL,
&propertySize, &uid) == noErr) {
...
}
In some setups, especially in pro audio/broadcasting environments it may be
necessary to use very precise reference to avoid issues if two devices of the
same type are plugged in.
To avoid API break, I suggest adding a boolean parameter "device-is-uid" that
will indicate whether interpret "device" like now or with exact uid, or another
string parameter "uid" that can be used in exchange of "device".
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list