Changeset 275574 in webkit


Ignore:
Timestamp:
Apr 6, 2021 5:32:09 PM (3 years ago)
Author:
eric.carlson@apple.com
Message:

REGRESSION (r275538): [ macOS ] TestWebKitAPI.WebKitLegacy.MediaPlaybackSleepAssertion and TestWebKitAPI.SleepDisabler.Pause consistently failing
https://bugs.webkit.org/show_bug.cgi?id=224249
<rdar://problem/76286539>

Reviewed by Jer Noble.

No new tests, this fixes two API tests.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use m_requestedRate
when choosing the pitch correction algorithm.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setPlayerRate): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setPitchCorrectionAlgorithm): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange): Ditto.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275573 r275574  
     12021-04-06  Eric Carlson  <eric.carlson@apple.com>
     2
     3        REGRESSION (r275538): [ macOS ] TestWebKitAPI.WebKitLegacy.MediaPlaybackSleepAssertion and TestWebKitAPI.SleepDisabler.Pause consistently failing
     4        https://bugs.webkit.org/show_bug.cgi?id=224249
     5        <rdar://problem/76286539>
     6
     7        Reviewed by Jer Noble.
     8
     9        No new tests, this fixes two API tests.
     10
     11        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     12        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use m_requestedRate
     13        when choosing the pitch correction algorithm.
     14        (WebCore::MediaPlayerPrivateAVFoundationObjC::setPlayerRate): Ditto.
     15        (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch): Ditto.
     16        (WebCore::MediaPlayerPrivateAVFoundationObjC::setPitchCorrectionAlgorithm): Ditto.
     17        (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange): Ditto.
     18
    1192021-04-06  Jer Noble  <jer.noble@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r275538 r275574  
    11351135        [m_avPlayerItem.get() addObserver:m_objcObserver.get() forKeyPath:keyName options:options context:(void *)MediaPlayerAVFoundationObservationContextPlayerItem];
    11361136
    1137     [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch(), m_cachedRate)];
     1137    [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch(), m_requestedRate)];
    11381138
    11391139#if HAVE(AVFOUNDATION_INTERSTITIAL_EVENTS)
     
    15141514    setDelayCallbacks(true);
    15151515
    1516     m_cachedRate = rate;
    1517     [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch(), m_cachedRate)];
     1516    [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch(), m_requestedRate)];
    15181517
    15191518    setShouldObserveTimeControlStatus(false);
     
    15531552{
    15541553    if (m_avPlayerItem)
    1555         [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), preservesPitch, m_cachedRate)];
     1554        [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), preservesPitch, m_requestedRate)];
    15561555}
    15571556
     
    15591558{
    15601559    if (m_avPlayerItem)
    1561         [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(pitchCorrectionAlgorithm, player()->preservesPitch(), m_cachedRate)];
     1560        [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(pitchCorrectionAlgorithm, player()->preservesPitch(), m_requestedRate)];
    15621561}
    15631562
     
    30433042    // FIXME(rdar://72829354): Remove after AVFoundation radar is fixed.
    30443043    if (status == AVPlayerItemStatusReadyToPlay)
    3045         [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch(), m_cachedRate)];
     3044        [m_avPlayerItem setAudioTimePitchAlgorithm:audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm(player()->pitchCorrectionAlgorithm(), player()->preservesPitch(), m_requestedRate)];
    30463045#endif
    30473046
Note: See TracChangeset for help on using the changeset viewer.