Changeset 228325 in webkit
- Timestamp:
- Feb 9, 2018 10:10:53 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r228323 r228325 1 2018-02-09 Youenn Fablet <youenn@apple.com> 2 3 Make CoreAudioCaptureSource error logging be release logging 4 https://bugs.webkit.org/show_bug.cgi?id=182614 5 6 Reviewed by Eric Carlson. 7 8 No change of behavior. 9 10 * platform/mediastream/mac/CoreAudioCaptureSource.cpp: 11 (WebCore::CoreAudioSharedUnit::addEchoCancellationSource): 12 (WebCore::CoreAudioSharedUnit::setupAudioUnit): 13 (WebCore::CoreAudioSharedUnit::configureMicrophoneProc): 14 (WebCore::CoreAudioSharedUnit::configureSpeakerProc): 15 (WebCore::CoreAudioSharedUnit::checkTimestamps): 16 (WebCore::CoreAudioSharedUnit::provideSpeakerData): 17 (WebCore::CoreAudioSharedUnit::processMicrophoneSamples): 18 (WebCore::CoreAudioSharedUnit::cleanupAudioUnit): 19 (WebCore::CoreAudioSharedUnit::reconfigureAudioUnit): 20 (WebCore::CoreAudioSharedUnit::startInternal): 21 (WebCore::CoreAudioSharedUnit::verifyIsCapturing): 22 (WebCore::CoreAudioSharedUnit::stopInternal): 23 (WebCore::CoreAudioSharedUnit::defaultInputDevice): 24 1 25 2018-02-09 Carlos Garcia Campos <cgarcia@igalia.com> 2 26 -
trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp
r228310 r228325 199 199 { 200 200 if (!source.setOutputFormat(m_speakerProcFormat)) { 201 LOG(Media, "CoreAudioSharedUnit::addEchoCancellationSource: source %p configureOutput failed", &source);201 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::addEchoCancellationSource: source %p configureOutput failed", &source); 202 202 return; 203 203 } … … 233 233 ASSERT(ioComponent); 234 234 if (!ioComponent) { 235 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to find vpio unit component", this);235 RELEASE_LOG_ERROR(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to find vpio unit component", this); 236 236 return -1; 237 237 } … … 243 243 m_ioUnitName = name; 244 244 CFRelease(name); 245 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) created \"%s\" component", this, m_ioUnitName.utf8().data());245 RELEASE_LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) created \"%s\" component", this, m_ioUnitName.utf8().data()); 246 246 } 247 247 #endif … … 249 249 auto err = AudioComponentInstanceNew(ioComponent, &m_ioUnit); 250 250 if (err) { 251 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to open vpio unit, error %d (%.4s)", this, (int)err, (char*)&err);251 RELEASE_LOG_ERROR(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to open vpio unit, error %d (%.4s)", this, (int)err, (char*)&err); 252 252 return err; 253 253 } … … 257 257 err = AudioUnitSetProperty(m_ioUnit, kAUVoiceIOProperty_VoiceProcessingEnableAGC, kAudioUnitScope_Global, inputBus, ¶m, sizeof(param)); 258 258 if (err) { 259 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to set vpio automatic gain control, error %d (%.4s)", this, (int)err, (char*)&err);259 RELEASE_LOG_ERROR(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to set vpio automatic gain control, error %d (%.4s)", this, (int)err, (char*)&err); 260 260 return err; 261 261 } … … 263 263 err = AudioUnitSetProperty(m_ioUnit, kAUVoiceIOProperty_BypassVoiceProcessing, kAudioUnitScope_Global, inputBus, ¶m, sizeof(param)); 264 264 if (err) { 265 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to set vpio unit echo cancellation, error %d (%.4s)", this, (int)err, (char*)&err);265 RELEASE_LOG_ERROR(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to set vpio unit echo cancellation, error %d (%.4s)", this, (int)err, (char*)&err); 266 266 return err; 267 267 } … … 272 272 err = AudioUnitSetProperty(m_ioUnit, kAudioOutputUnitProperty_EnableIO, kAudioUnitScope_Input, inputBus, ¶m, sizeof(param)); 273 273 if (err) { 274 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to enable vpio unit input, error %d (%.4s)", this, (int)err, (char*)&err);274 RELEASE_LOG_ERROR(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to enable vpio unit input, error %d (%.4s)", this, (int)err, (char*)&err); 275 275 return err; 276 276 } … … 284 284 err = AudioUnitSetProperty(m_ioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, inputBus, &m_captureDeviceID, sizeof(m_captureDeviceID)); 285 285 if (err) { 286 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to set vpio unit capture device ID, error %d (%.4s)", this, (int)err, (char*)&err);286 RELEASE_LOG_ERROR(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) unable to set vpio unit capture device ID, error %d (%.4s)", this, (int)err, (char*)&err); 287 287 return err; 288 288 } … … 297 297 err = AudioUnitInitialize(m_ioUnit); 298 298 if (err) { 299 LOG(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) AudioUnitInitialize() failed, error %d (%.4s)", this, (int)err, (char*)&err);299 RELEASE_LOG_ERROR(Media, "CoreAudioCaptureSource::setupAudioUnit(%p) AudioUnitInitialize() failed, error %d (%.4s)", this, (int)err, (char*)&err); 300 300 return err; 301 301 } … … 311 311 auto err = AudioUnitSetProperty(m_ioUnit, kAudioOutputUnitProperty_SetInputCallback, kAudioUnitScope_Global, inputBus, &callback, sizeof(callback)); 312 312 if (err) { 313 LOG(Media, "CoreAudioSharedUnit::configureMicrophoneProc(%p) unable to set vpio unit mic proc, error %d (%.4s)", this, (int)err, (char*)&err);313 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::configureMicrophoneProc(%p) unable to set vpio unit mic proc, error %d (%.4s)", this, (int)err, (char*)&err); 314 314 return err; 315 315 } … … 320 320 err = AudioUnitGetProperty(m_ioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, inputBus, µphoneProcFormat, &size); 321 321 if (err) { 322 LOG(Media, "CoreAudioSharedUnit::configureMicrophoneProc(%p) unable to get output stream format, error %d (%.4s)", this, (int)err, (char*)&err);322 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::configureMicrophoneProc(%p) unable to get output stream format, error %d (%.4s)", this, (int)err, (char*)&err); 323 323 return err; 324 324 } … … 327 327 err = AudioUnitSetProperty(m_ioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, inputBus, µphoneProcFormat, size); 328 328 if (err) { 329 LOG(Media, "CoreAudioSharedUnit::configureMicrophoneProc(%p) unable to set output stream format, error %d (%.4s)", this, (int)err, (char*)&err);329 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::configureMicrophoneProc(%p) unable to set output stream format, error %d (%.4s)", this, (int)err, (char*)&err); 330 330 return err; 331 331 } … … 342 342 auto err = AudioUnitSetProperty(m_ioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, outputBus, &callback, sizeof(callback)); 343 343 if (err) { 344 LOG(Media, "CoreAudioSharedUnit::configureSpeakerProc(%p) unable to set vpio unit speaker proc, error %d (%.4s)", this, (int)err, (char*)&err);344 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::configureSpeakerProc(%p) unable to set vpio unit speaker proc, error %d (%.4s)", this, (int)err, (char*)&err); 345 345 return err; 346 346 } … … 351 351 err = AudioUnitGetProperty(m_ioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, outputBus, &speakerProcFormat, &size); 352 352 if (err) { 353 LOG(Media, "CoreAudioSharedUnit::configureSpeakerProc(%p) unable to get input stream format, error %d (%.4s)", this, (int)err, (char*)&err);353 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::configureSpeakerProc(%p) unable to get input stream format, error %d (%.4s)", this, (int)err, (char*)&err); 354 354 return err; 355 355 } … … 358 358 err = AudioUnitSetProperty(m_ioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, outputBus, &speakerProcFormat, size); 359 359 if (err) { 360 LOG(Media, "CoreAudioSharedUnit::configureSpeakerProc(%p) unable to get input stream format, error %d (%.4s)", this, (int)err, (char*)&err);360 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::configureSpeakerProc(%p) unable to get input stream format, error %d (%.4s)", this, (int)err, (char*)&err); 361 361 return err; 362 362 } … … 372 372 { 373 373 if (!timeStamp.mSampleTime || sampleTime == m_latestMicTimeStamp || !hostTime) 374 LOG(Media, "CoreAudioSharedUnit::checkTimestamps: unusual timestamps, sample time = %lld, previous sample time = %lld, hostTime %f", sampleTime, m_latestMicTimeStamp, hostTime);374 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::checkTimestamps: unusual timestamps, sample time = %lld, previous sample time = %lld, hostTime %f", sampleTime, m_latestMicTimeStamp, hostTime); 375 375 } 376 376 #endif … … 384 384 385 385 if (m_speakerSampleBuffer->sampleCapacity() < inNumberFrames) { 386 LOG(Media, "CoreAudioSharedUnit::provideSpeakerData: speaker sample buffer size (%d) too small for amount of sample data requested (%d)!", m_speakerSampleBuffer->sampleCapacity(), (int)inNumberFrames);386 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::provideSpeakerData: speaker sample buffer size (%d) too small for amount of sample data requested (%d)!", m_speakerSampleBuffer->sampleCapacity(), (int)inNumberFrames); 387 387 return kAudio_ParamError; 388 388 } … … 447 447 auto err = AudioUnitRender(m_ioUnit, &ioActionFlags, &timeStamp, inBusNumber, inNumberFrames, &bufferList); 448 448 if (err) { 449 LOG(Media, "CoreAudioSharedUnit::processMicrophoneSamples(%p) AudioUnitRender failed with error %d (%.4s)", this, (int)err, (char*)&err);449 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::processMicrophoneSamples(%p) AudioUnitRender failed with error %d (%.4s)", this, (int)err, (char*)&err); 450 450 return err; 451 451 } … … 483 483 auto err = AudioUnitUninitialize(m_ioUnit); 484 484 if (err) 485 LOG(Media, "CoreAudioSharedUnit::cleanupAudioUnit(%p) AudioUnitUninitialize failed with error %d (%.4s)", this, (int)err, (char*)&err);485 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::cleanupAudioUnit(%p) AudioUnitUninitialize failed with error %d (%.4s)", this, (int)err, (char*)&err); 486 486 m_ioUnitInitialized = false; 487 487 } … … 508 508 err = AudioOutputUnitStop(m_ioUnit); 509 509 if (err) { 510 LOG(Media, "CoreAudioSharedUnit::reconfigureAudioUnit(%p) AudioOutputUnitStop failed with error %d (%.4s)", this, (int)err, (char*)&err);510 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::reconfigureAudioUnit(%p) AudioOutputUnitStop failed with error %d (%.4s)", this, (int)err, (char*)&err); 511 511 return err; 512 512 } … … 521 521 err = AudioOutputUnitStart(m_ioUnit); 522 522 if (err) { 523 LOG(Media, "CoreAudioSharedUnit::reconfigureAudioUnit(%p) AudioOutputUnitStart failed with error %d (%.4s)", this, (int)err, (char*)&err);523 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::reconfigureAudioUnit(%p) AudioOutputUnitStart failed with error %d (%.4s)", this, (int)err, (char*)&err); 524 524 return err; 525 525 } … … 581 581 err = AudioOutputUnitStart(m_ioUnit); 582 582 if (err) { 583 LOG(Media, "CoreAudioSharedUnit::start(%p) AudioOutputUnitStart failed with error %d (%.4s)", this, (int)err, (char*)&err);583 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::start(%p) AudioOutputUnitStart failed with error %d (%.4s)", this, (int)err, (char*)&err); 584 584 return; 585 585 } … … 602 602 603 603 #if !RELEASE_LOG_DISABLED 604 RELEASE_LOG (Media, "CoreAudioSharedUnit::verifyIsCapturing - capture failed\n");604 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::verifyIsCapturing - capture failed\n"); 605 605 #endif 606 606 for (CoreAudioCaptureSource& client : m_clients) … … 643 643 auto err = AudioOutputUnitStop(m_ioUnit); 644 644 if (err) { 645 LOG(Media, "CoreAudioSharedUnit::stop(%p) AudioOutputUnitStop failed with error %d (%.4s)", this, (int)err, (char*)&err);645 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::stop(%p) AudioOutputUnitStop failed with error %d (%.4s)", this, (int)err, (char*)&err); 646 646 return; 647 647 } … … 657 657 auto err = AudioUnitGetProperty(m_ioUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, inputBus, deviceID, &propertySize); 658 658 if (err) 659 LOG(Media, "CoreAudioSharedUnit::defaultInputDevice(%p) unable to get default input device ID, error %d (%.4s)", this, (int)err, (char*)&err);659 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::defaultInputDevice(%p) unable to get default input device ID, error %d (%.4s)", this, (int)err, (char*)&err); 660 660 661 661 return err;
Note: See TracChangeset
for help on using the changeset viewer.