Skip to content

Commit

Permalink
[iOS] Use finer-grained media services when available
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=249033
<rdar://100435873>

Reviewed by Per Arne Vollan.

Use more specific mach services for media features on platforms that support them.
This will allow us to narrow the scope to only those endpoints required for
web-related media tasks.

No change in behavior.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb.in:

Canonical link: https://commits.webkit.org/257653@main
  • Loading branch information
brentfulgham authored and Brent Fulgham committed Dec 10, 2022
1 parent 59e644d commit 6cbeaff
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/WTF/wtf/PlatformHave.h
Expand Up @@ -1372,3 +1372,9 @@
#if PLATFORM(COCOA) && !PLATFORM(IOS_SIMULATOR) && __has_include(<apfs/apfs_fsctl.h>)
#define HAVE_APFS_CACHEDELETE_PURGEABLE 1
#endif

#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 170000) \
|| PLATFORM(WATCHOS) \
|| PLATFORM(APPLETV)
#define HAVE_MEDIAPLAYBACKD 1
#endif
Expand Up @@ -93,6 +93,32 @@
(global-name "com.apple.coremedia.visualcontext.xpc")
(global-name "com.apple.coremedia.volumecontroller.xpc"))

#if HAVE(MEDIAPLAYBACKD)
(allow mach-lookup
(global-name
"com.apple.coremedia.mediaplaybackd.asset.xpc"
"com.apple.coremedia.mediaplaybackd.assetimagegenerator.xpc"
"com.apple.coremedia.mediaplaybackd.audiodeviceclock.xpc"
"com.apple.coremedia.mediaplaybackd.audioprocessingtap.xpc"
"com.apple.coremedia.mediaplaybackd.cpe.xpc"
"com.apple.coremedia.mediaplaybackd.cpeprotector.xpc"
"com.apple.coremedia.mediaplaybackd.customurlloader.xpc"
"com.apple.coremedia.mediaplaybackd.figcontentkeysession.xpc"
"com.apple.coremedia.mediaplaybackd.figcpecryptor.xpc"
"com.apple.coremedia.mediaplaybackd.formatreader.xpc"
"com.apple.coremedia.mediaplaybackd.player.xpc"
"com.apple.coremedia.mediaplaybackd.remaker.xpc"
"com.apple.coremedia.mediaplaybackd.samplebufferaudiorenderer.xpc"
"com.apple.coremedia.mediaplaybackd.samplebufferrendersynchronizer.xpc"
"com.apple.coremedia.mediaplaybackd.sandboxserver.xpc"
"com.apple.coremedia.mediaplaybackd.visualcontext.xpc"
"com.apple.coremedia.mediaplaybackd.videoqueue"
"com.apple.coremedia.videocodecd.compressionsession"
"com.apple.coremedia.videocodecd.compressionsession.xpc"
"com.apple.coremedia.videocodecd.decompressionsession"
"com.apple.coremedia.videocodecd.decompressionsession.xpc"))
#endif

(allow mach-lookup (with report) (with telemetry)
(global-name "com.apple.coremedia.cpeprotector.xpc")
(global-name "com.apple.coremedia.endpoint.xpc")
Expand Down

0 comments on commit 6cbeaff

Please sign in to comment.