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

Changeset 285751 in webkit


Ignore:
Timestamp:
Nov 12, 2021, 3:54:09 PM (5 years ago)
Author:
Russell Epstein
Message:

Revert r285682. rdar://problem/85004449

Location:
branches/safari-612.3.6.0-branch/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.3.6.0-branch/Source/WebCore/ChangeLog

    r285689 r285751  
     12021-11-12  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Revert r285682. rdar://problem/85004449
     4
    152021-11-11  Alan Coon  <alancoon@apple.com>
    26
  • branches/safari-612.3.6.0-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h

    r285682 r285751  
    420420    unsigned m_pendingStatusChanges { 0 };
    421421    int m_cachedItemStatus;
    422     int m_runLoopNestingLevel { 0 };
    423422    MediaPlayer::BufferingPolicy m_bufferingPolicy { MediaPlayer::BufferingPolicy::Default };
    424423    bool m_cachedLikelyToKeepUp { false };
     
    440439    bool m_shouldPlayToPlaybackTarget { false };
    441440#endif
     441    bool m_runningModalPaint { false };
    442442    bool m_waitForVideoOutputMediaDataWillChangeTimedOut { false };
    443443    bool m_haveBeenAskedToPaint { false };
  • branches/safari-612.3.6.0-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r285682 r285751  
    25642564    if (m_waitForVideoOutputMediaDataWillChangeTimedOut)
    25652565        return;
     2566    [m_videoOutput requestNotificationOfMediaDataChangeWithAdvanceInterval:0];
    25662567
    25672568    // Wait for 1 second.
    25682569    MonotonicTime start = MonotonicTime::now();
    25692570
    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;
    25822577    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();
    25912581    if (!satisfied) {
    25922582        ERROR_LOG(LOGIDENTIFIER, "timed out");
     
    25982588void MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange()
    25992589{
    2600     if (m_runLoopNestingLevel)
     2590    if (m_runningModalPaint)
    26012591        RunLoop::main().stop();
    26022592}
Note: See TracChangeset for help on using the changeset viewer.