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

Changeset 284770 in webkit


Ignore:
Timestamp:
Oct 24, 2021, 5:04:12 PM (5 years ago)
Author:
Jean-Yves Avenard
Message:

Fix typo in MediaPlayerPrivateAVFoundationObjC::updateVideoTracks()
https://bugs.webkit.org/show_bug.cgi?id=232194

Reviewed by Darin Adler.

Reset video tracks' properties when video tracks are changing rather
than the audio ones.

There should be no observable changes, resetting the audio track properties
would have been a no-op as AudioTrackPrivateAVFObjC is just a wrapper around
AVPlayerItemTrack and properties are kept in sync thorough playback.
Not calling resetPropertiesFromTrack on the video track wouldn't have mattered
as the operation is called when the track is constructed above in the
determineChangedTracksFromNewTracksAndOldItems method.
So this code only improves readability, and could be removed entirely.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):

  • platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r284769 r284770  
     12021-10-24  Jean-Yves Avenard  <jya@apple.com>
     2
     3        Fix typo in MediaPlayerPrivateAVFoundationObjC::updateVideoTracks()
     4        https://bugs.webkit.org/show_bug.cgi?id=232194
     5
     6        Reviewed by Darin Adler.
     7
     8        Reset video tracks' properties when video tracks are changing rather
     9        than the audio ones.
     10
     11        There should be no observable changes, resetting the audio track properties
     12        would have been a no-op as AudioTrackPrivateAVFObjC is just a wrapper around
     13        AVPlayerItemTrack and properties are kept in sync thorough playback.
     14        Not calling resetPropertiesFromTrack on the video track wouldn't have mattered
     15        as the operation is called when the track is constructed above in the
     16        determineChangedTracksFromNewTracksAndOldItems method.
     17        So this code only improves readability, and could be removed entirely.
     18
     19        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     20        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
     21        * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
     22
    1232021-10-24  Tyler Wilcock  <tyler_w@apple.com>
    224
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r284737 r284770  
    23772377        determineChangedTracksFromNewTracksAndOldItems(m_visualGroup.get(), m_videoTracks, Vector<String>(), &VideoTrackPrivateAVFObjC::create, player(), &MediaPlayer::removeVideoTrack, &MediaPlayer::addVideoTrack);
    23782378
    2379     for (auto& track : m_audioTracks)
     2379    for (auto& track : m_videoTracks)
    23802380        track->resetPropertiesFromTrack();
    23812381
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h

    r262695 r284770  
    7272
    7373private:
     74    friend class MediaPlayerPrivateAVFoundationObjC;
    7475    explicit VideoTrackPrivateAVFObjC(AVPlayerItemTrack*);
    7576    explicit VideoTrackPrivateAVFObjC(AVAssetTrack*);
Note: See TracChangeset for help on using the changeset viewer.