Changeset 285751 in webkit
- Timestamp:
- Nov 12, 2021, 3:54:09 PM (5 years ago)
- Location:
- branches/safari-612.3.6.0-branch/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (modified) (2 diffs)
-
platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.3.6.0-branch/Source/WebCore/ChangeLog
r285689 r285751 1 2021-11-12 Babak Shafiei <bshafiei@apple.com> 2 3 Revert r285682. rdar://problem/85004449 4 1 5 2021-11-11 Alan Coon <alancoon@apple.com> 2 6 -
branches/safari-612.3.6.0-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
r285682 r285751 420 420 unsigned m_pendingStatusChanges { 0 }; 421 421 int m_cachedItemStatus; 422 int m_runLoopNestingLevel { 0 };423 422 MediaPlayer::BufferingPolicy m_bufferingPolicy { MediaPlayer::BufferingPolicy::Default }; 424 423 bool m_cachedLikelyToKeepUp { false }; … … 440 439 bool m_shouldPlayToPlaybackTarget { false }; 441 440 #endif 441 bool m_runningModalPaint { false }; 442 442 bool m_waitForVideoOutputMediaDataWillChangeTimedOut { false }; 443 443 bool m_haveBeenAskedToPaint { false }; -
branches/safari-612.3.6.0-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r285682 r285751 2564 2564 if (m_waitForVideoOutputMediaDataWillChangeTimedOut) 2565 2565 return; 2566 [m_videoOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:0]; 2566 2567 2567 2568 // Wait for 1 second. 2568 2569 MonotonicTime start = MonotonicTime::now(); 2569 2570 2570 std::optional<RunLoop::Timer<MediaPlayerPrivateAVFoundationObjC>> timeoutTimer; 2571 2572 if (!m_runLoopNestingLevel) { 2573 [m_videoOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:0]; 2574 2575 timeoutTimer.emplace(RunLoop::main(), [&] { 2576 RunLoop::main().stop(); 2577 }); 2578 timeoutTimer->startOneShot(1_s); 2579 } 2580 2581 ++m_runLoopNestingLevel; 2571 RunLoop::Timer<MediaPlayerPrivateAVFoundationObjC> timeoutTimer { RunLoop::main(), [] { 2572 RunLoop::main().stop(); 2573 } }; 2574 timeoutTimer.startOneShot(1_s); 2575 2576 m_runningModalPaint = true; 2582 2577 RunLoop::run(); 2583 --m_runLoopNestingLevel; 2584 2585 if (m_runLoopNestingLevel) { 2586 RunLoop::main().stop(); 2587 return; 2588 } 2589 2590 bool satisfied = timeoutTimer->isActive(); 2578 m_runningModalPaint = false; 2579 2580 bool satisfied = timeoutTimer.isActive(); 2591 2581 if (!satisfied) { 2592 2582 ERROR_LOG(LOGIDENTIFIER, "timed out"); … … 2598 2588 void MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange() 2599 2589 { 2600 if (m_run LoopNestingLevel)2590 if (m_runningModalPaint) 2601 2591 RunLoop::main().stop(); 2602 2592 }
Note:
See TracChangeset
for help on using the changeset viewer.