⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249154 in webkit


Ignore:
Timestamp:
Aug 27, 2019, 11:16:17 AM (7 years ago)
Author:
youenn@apple.com
Message:

Disabled devices should not be taken into account when searching for a capture device
https://bugs.webkit.org/show_bug.cgi?id=201183
<rdar://problem/54353440>

Reviewed by Jer Noble.

Manually tested.

  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:

(WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID):
We currently keep a list of devices, some of which might be disabled.
We should not take into account disabled devices, only enabled devices
when doing this search.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::setupAudioUnit):
Improve logging.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r249147 r249154  
     12019-08-27  Youenn Fablet  <youenn@apple.com>
     2
     3        Disabled devices should not be taken into account when searching for a capture device
     4        https://bugs.webkit.org/show_bug.cgi?id=201183
     5        <rdar://problem/54353440>
     6
     7        Reviewed by Jer Noble.
     8
     9        Manually tested.
     10
     11        * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
     12        (WebCore::CoreAudioCaptureDeviceManager::coreAudioDeviceWithUID):
     13        We currently keep a list of devices, some of which might be disabled.
     14        We should not take into account disabled devices, only enabled devices
     15        when doing this search.
     16        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
     17        (WebCore::CoreAudioSharedUnit::setupAudioUnit):
     18        Improve logging.
     19
    1202019-08-26  Jer Noble  <jer.noble@apple.com>
    221
  • trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp

    r249002 r249154  
    151151{
    152152    for (auto& device : coreAudioCaptureDevices()) {
    153         if (device.persistentId() == deviceID)
     153        if (device.persistentId() == deviceID && device.enabled())
    154154            return device;
    155155    }
  • trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp

    r247381 r249154  
    340340    err = AudioUnitSetProperty(m_ioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, inputBus, &m_captureDeviceID, sizeof(m_captureDeviceID));
    341341    if (err) {
    342         RELEASE_LOG_ERROR(WebRTC, "CoreAudioSharedUnit::setupAudioUnit(%p) unable to set vpio unit capture device ID, error %d (%.4s)", this, (int)err, (char*)&err);
     342        RELEASE_LOG_ERROR(WebRTC, "CoreAudioSharedUnit::setupAudioUnit(%p) unable to set vpio unit capture device ID %d, error %d (%.4s)", this, (int)m_captureDeviceID, (int)err, (char*)&err);
    343343        return err;
    344344    }
Note: See TracChangeset for help on using the changeset viewer.