Changeset 245478 in webkit
- Timestamp:
- May 17, 2019, 2:29:14 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/mediastream/mac/AVVideoCaptureSource.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r245475 r245478 1 2019-05-17 Youenn Fablet <youenn@apple.com> 2 3 Make AVVideoCaptureSource more robust to configuration failures 4 https://bugs.webkit.org/show_bug.cgi?id=197997 5 rdar://problem/50875662 6 7 Reviewed by Eric Carlson. 8 9 Covered by manual testing. 10 11 * platform/mediastream/mac/AVVideoCaptureSource.mm: 12 (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate): 13 Make sure to commit configuration once calling beginConfiguration. 14 In case of error in setting frame rate, log the error but continue capturing. 15 1 16 2019-05-17 Rob Buis <rbuis@igalia.com> 2 17 -
trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
r245296 r245478 325 325 auto* frameRateRange = frameDurationForFrameRate(m_currentFrameRate); 326 326 ASSERT(frameRateRange); 327 if ( !frameRateRange)328 return;329 330 m_currentFrameRate = clampTo(m_currentFrameRate, frameRateRange.minFrameRate, frameRateRange.maxFrameRate);331 332 ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "setting frame rate to ", m_currentFrameRate);333 [device() setActiveVideoMinFrameDuration: CMTimeMake(1, m_currentFrameRate)];334 [device() setActiveVideoMaxFrameDuration: CMTimeMake(1, m_currentFrameRate)];327 if (frameRateRange) { 328 m_currentFrameRate = clampTo(m_currentFrameRate, frameRateRange.minFrameRate, frameRateRange.maxFrameRate); 329 330 ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "setting frame rate to ", m_currentFrameRate); 331 [device() setActiveVideoMinFrameDuration: CMTimeMake(1, m_currentFrameRate)]; 332 [device() setActiveVideoMaxFrameDuration: CMTimeMake(1, m_currentFrameRate)]; 333 } else 334 ERROR_LOG_IF(loggerPtr(), LOGIDENTIFIER, "cannot find proper frame rate range for the selected preset\n"); 335 335 336 336 [device() unlockForConfiguration]; … … 338 338 } @catch(NSException *exception) { 339 339 ERROR_LOG_IF(loggerPtr(), LOGIDENTIFIER, "error configuring device ", [[exception name] UTF8String], ", reason : ", [[exception reason] UTF8String]); 340 return; 340 [device() unlockForConfiguration]; 341 ASSERT_NOT_REACHED(); 341 342 } 342 343 [m_session commitConfiguration];
Note:
See TracChangeset
for help on using the changeset viewer.