[webkit-changes] [WebKit/WebKit] 4c41ca: [visionOS] Attach a FigVideoTarget to AVPlayers wh...

aestes noreply at github.com
Fri Feb 16 21:54:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4c41ca668ae286837aa75be14f091232419d9858
      https://github.com/WebKit/WebKit/commit/4c41ca668ae286837aa75be14f091232419d9858
  Author: Andy Estes <aestes at apple.com>
  Date:   2024-02-16 (Fri, 16 Feb 2024)

  Changed paths:
    M Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.cpp
    M Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.h
    M Source/WebCore/PAL/pal/spi/cocoa/MediaToolboxSPI.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
    M Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.mm
    M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm
    M Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in
    M Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift

  Log Message:
  -----------
  [visionOS] Attach a FigVideoTarget to AVPlayers when a receiver endpoint is available
https://bugs.webkit.org/show_bug.cgi?id=269561
rdar://123073265

Reviewed by Jer Noble.

When MediaPlayer has a VideoReceiverEndpoint, use it to create a FigVideoTarget and add it to
MediaPlayerPrivateAVFoundationObjC's AVPlayer. In order for LinearMediaPlayer to emit a
VideoReceiverEndpoint, also created an Entity with a caption layer rather than an AVPlayer.

* Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.cpp:
* Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.h:
* Source/WebCore/PAL/pal/spi/cocoa/MediaToolboxSPI.h:
Declared and soft-linked FigVideoTargetCreateWithVideoReceiverEndpointID.

* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
When non-null, used the VideoReceiverEndpoint to create a FigVideoTargetRef, added it to AVPlayer,
and removed the player from the AVPlayerLayer. When null, removed the video target from the player
and re-attached the player to the AVPlayerLayer.

* Source/WebKit/Platform/ios/PlaybackSessionInterfaceLMK.mm:
Cleared the VideoReceiverEndpoint when exiting fullscreen. Drive-by fix: set m_playerDelegate as
m_player's delegate.

* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm:
Set m_player's captionLayer prior to creating a view controller.

* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in:
Allowed lookup of mach port com.apple.coremedia.videotarget.xpc.

* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift:
Stopped publishing captionLayer and used it to create an Entity instead.

Canonical link: https://commits.webkit.org/274909@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list