Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ let package = Package(
products: [
.library(name: "VoidDisplayApp", targets: ["VoidDisplayApp"])
],
dependencies: [
.package(url: "https://github.com/stasel/WebRTC.git", from: "140.0.0")
],
dependencies: [],
targets: [
.binaryTarget(
name: "WebRTCBinary",
url: "https://github.com/stasel/WebRTC/releases/download/147.0.0/WebRTC-M147.xcframework.zip",
checksum: "49f9b1713432c19f408e3218fc8526c7692fafca5869f7ec5f5991614276ed40"
),
.target(
name: "WebRTC",
dependencies: [
"WebRTCBinary"
],
path: "Vendor/WebRTCHeaders/M147",
publicHeadersPath: "include"
),
.target(
name: "VoidDisplayApp",
dependencies: [
Expand Down Expand Up @@ -61,7 +72,7 @@ let package = Package(
"VoidDisplayDesignSystem",
"VoidDisplayFoundation",
"VoidDisplayObservability",
.product(name: "WebRTC", package: "WebRTC")
"WebRTC"
],
resources: [
.process("Resources")
Expand Down
85 changes: 85 additions & 0 deletions Vendor/WebRTCHeaders/M147/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
a6f779223cf65891bd5964e516a340e32bba285147b8311691dfca008a724450 include/WebRTC/RTCAudioSource.h
443c3655c59902748f77299f32ab674aa9bea68928a0767e38ca73c1aea049cd include/WebRTC/RTCAudioTrack.h
bf4c5513bf9ad31a59d1896ecf2e9e2721d239ceea9a5ab28fbb96cced326c48 include/WebRTC/RTCCVPixelBuffer.h
2f9d7f7af93170e993bfc7872d0b0ed167418c86bf64c708fa2235d21c8bd451 include/WebRTC/RTCCallbackLogger.h
73a4d02c4a5a50e4faa8aa166c0c34b1a10ee234fd48a6dbe10f4cc9e929cef5 include/WebRTC/RTCCameraVideoCapturer.h
79fbb55d58fdea833e880bbacd9bb118ddb9aa545735730c5888606d6f02dcca include/WebRTC/RTCCertificate.h
2c0bfc54566e8c833a0b8641be5005ea4e2646cae863d0ff09d4052cc6790104 include/WebRTC/RTCCodecSpecificInfo.h
05fdff6dc23149c2096f0fe04f7b152be8c61e08f2e8f08def64b24de0ad790d include/WebRTC/RTCCodecSpecificInfoH264.h
da7b60c5c2532d3c9e1dc3a511567dc6c330437a296358eabfc11e14ca2fb35e include/WebRTC/RTCConfiguration.h
66b7c4047fd24c21eeef88326c9a05cf76d8e9873ab4f41aa51bf50df2af82ff include/WebRTC/RTCCryptoOptions.h
3c35ce615ce97bcb0d8cdd7d034f54b4295fc213826cd7f0f4744cbbd89d2cb0 include/WebRTC/RTCDataChannel.h
6ffb6928167fac2ca4460e1bf76e6f60048fcf5e0b2204082f63e138fc800251 include/WebRTC/RTCDataChannelConfiguration.h
217eac5c461c1cb285d2b8a477ff3b54cf8fe749db1081a8bc1518a685a46428 include/WebRTC/RTCDefaultVideoDecoderFactory.h
e95ef53e8a59fd1a0428bdee4349025ec0131658c546060ec06bc80fda0b64e4 include/WebRTC/RTCDefaultVideoEncoderFactory.h
e76921ca0a07064c9c00964d16b67c646a33c03aa004a55d1b3eb9b495993958 include/WebRTC/RTCDispatcher.h
f9cb67acb1efa1b999b79fe037a619728f31ea30fe2c525ee50ab746b8d75b97 include/WebRTC/RTCDtmfSender.h
aeaf4bb44898ce40e4fd81dadeeef48be01787b18959d713754d11a476035160 include/WebRTC/RTCEncodedImage.h
a834f3813a97283bb76b023c59c92cd6e33ebe8b94a956df9bdcdbdd623f15e6 include/WebRTC/RTCFieldTrials.h
88ef582e8976220a3513d9f837e194dc70e956c668019d172bb60f4d06733f1a include/WebRTC/RTCFileLogger.h
94232da252ed518b48209b115ab427c8b2b5e357e431348225249abc72267d9f include/WebRTC/RTCFileVideoCapturer.h
6ab2e0a76bc535aca7f340880e66826dec241c3f845e528c622028daca70e87b include/WebRTC/RTCH264ProfileLevelId.h
d868eea0c89fedc2666629b987b24852fe8603c4a131cb42572dbae0ad982389 include/WebRTC/RTCI420Buffer.h
991cafef402701603fe1bd9571e1126f1cb3ad8f5e299292d415e0000ec724fc include/WebRTC/RTCIceCandidate.h
a261299c4410bfdcf24a29289f18bb7106cd68bae20b90c3df8a87a64c7a8dd2 include/WebRTC/RTCIceCandidateErrorEvent.h
96ac29518d75b96f71c4c498843496510b8fbb297f9667921ff3bd98299dc42b include/WebRTC/RTCIceServer.h
d4e84adb391d69d0f120e1a4e3be4900ef9ae4d855fca3e824bc22cd93226f80 include/WebRTC/RTCLegacyStatsReport.h
736f070aa6eee94fd93e09a8b13b03a6ceb23950c56f1f42675899acab36b612 include/WebRTC/RTCLogging.h
85b9d39b38a2c24f4919cb9e25df254943db10458db3421c222d6e27a0113c6f include/WebRTC/RTCMTLNSVideoView.h
c5a1630f4bb0188ee5fc1eefef149af73ab666e98178252d9d3bcebf9a291094 include/WebRTC/RTCMacros.h
8f93f4f2016d48d947fab6dd64033dd12aec22eaae7f3a297f5c76f02cade1e1 include/WebRTC/RTCMediaConstraints.h
5f21eb276df3158df35a68d0e475c05708b8b0f3f5b878366269421a43ff45c5 include/WebRTC/RTCMediaSource.h
a5be4d0ce7aca440af069a6b37375ace6ac9f5a55e18be596d85c6aaf3865f4b include/WebRTC/RTCMediaStream.h
82f57eb0d0943e58f1c2de7deef19563b8705cba33d26ed37a2d33113233c827 include/WebRTC/RTCMediaStreamTrack.h
8345c18b6de97bbc55a4f6e1d9ff3cff7efe19910cf6d97f90e0f9d9ab2d0700 include/WebRTC/RTCMetrics.h
f42400721f2fc2958243d7fe67cef0f217519501d8fe9de26683691d59409c7c include/WebRTC/RTCMetricsSampleInfo.h
39acd5d401f942c0c1f4991b66cc3e103f20bb583d9b0e774791af822dcb3b7c include/WebRTC/RTCMutableI420Buffer.h
51c4d3703a10e689c8fabe099c6e7090f6d186584c52caad2b593b9fc914d354 include/WebRTC/RTCMutableYUVPlanarBuffer.h
a871e4d03b9b28a2f244cf8f44844b7d6d632feaddcc86404ab69550e203436d include/WebRTC/RTCNativeI420Buffer.h
a0402a848a3bd265fe4d837f2ad29f449efae6ea3c110c291c41ea8a3c103c34 include/WebRTC/RTCNativeMutableI420Buffer.h
98aa93523ed702e0676f76b729d8408b55f21be6ad8c266198704b35a705e765 include/WebRTC/RTCPeerConnection.h
115c2e18db5160de4b2a07559824c77eed16fa85373d48b025786bc3b9056bd5 include/WebRTC/RTCPeerConnectionFactory.h
5efecc02e6c460c420e94dcb6ba0663f594dc2d417ae749893931d7b68f55c5e include/WebRTC/RTCPeerConnectionFactoryOptions.h
20aa72bc1a0547faffa70a19026eab9b9346f08e564fd1ed0adda7c641fd4c3f include/WebRTC/RTCRtcpParameters.h
4adf327a3709926d19dc87619a55abe7a501d7eac977db49ed7029934d2a541c include/WebRTC/RTCRtpCapabilities.h
b309fb5642a1ec8e4bfda94a82c61d3ef66150606fb5bcdf30d4e3a7461b8287 include/WebRTC/RTCRtpCodecCapability.h
fe9e502253b333d8913d4e20768f63ad208aaba68bfe799f4b740cca70fe462d include/WebRTC/RTCRtpCodecParameters.h
de797b97cdc9b7b62a850cbacaca0218ec8275855e0e7d40ed9db7fd4e860642 include/WebRTC/RTCRtpEncodingParameters.h
16f4e2e0619babf6c8c06fca5e915235e27b7d754a74400fdd26dfc72c091369 include/WebRTC/RTCRtpHeaderExtension.h
a25b7cc46e39ae5ef3e0a0cbfba753efa57d5daf3329511eafc69c58a60b7475 include/WebRTC/RTCRtpHeaderExtensionCapability.h
9000c5878cef70dcf2adcd355ee1bf9634f448489bab266c2cdf4b37a555e56a include/WebRTC/RTCRtpParameters.h
c557abbd58565cb1078d8db921891655160d3a94c4f1d2f50b8bf06c02c2e770 include/WebRTC/RTCRtpReceiver.h
2dcbf3ba00dcbd5450e79a68998d082516eb96e36707d64aab0da5eeb2b9bb20 include/WebRTC/RTCRtpSender.h
e21473bc2e3e7839ce8108537575027d5e2c99f7f78ba5b890dd1de25dfd62e5 include/WebRTC/RTCRtpSource.h
817c34b07234b2c5ded843d2763a7a3eb405f8a41d58b9a2f6e68ca03ff92866 include/WebRTC/RTCRtpTransceiver.h
3c3e17c93efc321012da8d2e91f4f503433c86fa66dbca842dd2e7b115448501 include/WebRTC/RTCSSLAdapter.h
67e9ca71f36cf0dadda6f65ebcc08c0e6cc22c57d147bacc5e00450f46509f7d include/WebRTC/RTCSSLCertificateVerifier.h
e2eda0df572420144c66f517349504071ba6e31b500796c57bdcab2d115a8123 include/WebRTC/RTCSessionDescription.h
32f000f670b4ba423af55bed9f59c0e7dc59ce9c1be548233a1225093c1b706c include/WebRTC/RTCStatisticsReport.h
fb04c6178b892f3169a9750880a3a65adf696806533467943a92e0a1563998ab include/WebRTC/RTCTracing.h
4f2dd94d5e2665d8b550d6b5b31511621a7702947c59196d60244e013f147264 include/WebRTC/RTCVideoCapturer.h
433a01fce61a6ff3c617d393fcd2787a6c5bbc4e2522f923eed1ddb3baeb48e9 include/WebRTC/RTCVideoCodecInfo.h
e20a9ed8af02b17bbe5862681a89183570a3112ff29c78198b121b5552eec234 include/WebRTC/RTCVideoDecoder.h
cbeeb6b242777955a817b15c195105eac06a8769259b846c493660055d7279ef include/WebRTC/RTCVideoDecoderAV1.h
5be7d305d903c5e03d08bb7a5d2429359c262461af2936086f010c4b66fafd84 include/WebRTC/RTCVideoDecoderFactory.h
174b3f684ddeffa9ae598f56814181717ba4c6c0c166c85a3ffcfb86e33bfd4f include/WebRTC/RTCVideoDecoderFactoryH264.h
40bf172757cb04d975eac4938e3ed0b65e643550aa7f7544889b7c6b240c10e3 include/WebRTC/RTCVideoDecoderH264.h
e6499ae3ed9563d4fe11168df4280c75f38b205a8e6d3973d21a0337f0e62a45 include/WebRTC/RTCVideoDecoderVP8.h
84cb03a848022e94dd4f16f85536fb11765181127aa8e8ffc79ee6170669a45f include/WebRTC/RTCVideoDecoderVP9.h
332713da4cf565f0bda8d051448df5ddfd9602a2e90214b7f092363750430bba include/WebRTC/RTCVideoEncoder.h
b1924b25586fe281913f538f28a502d6dc02bc3261889ba7031a5d4ab11553df include/WebRTC/RTCVideoEncoderAV1.h
29ec7fff2875acd6ac1448ba2bdbb53051f732e743ffe3b5971a27be15ee8932 include/WebRTC/RTCVideoEncoderFactory.h
fd2a1f7896d370de56f764beb08eea00d96d38d0469785ccf473b2441cbb986c include/WebRTC/RTCVideoEncoderFactoryH264.h
f52d9b2d1b0343100457892fb8f56c551c1f1ca23b21e774a9945b85cd80ee40 include/WebRTC/RTCVideoEncoderH264.h
168446386b4a60e9ce12a983ac5bfe02e6b520809baa2cd47f8c90c05d1756d7 include/WebRTC/RTCVideoEncoderQpThresholds.h
9cee87a96f62bdec65cf2687c65e3105aaecbc0d67ec0c310309083d7d4b8850 include/WebRTC/RTCVideoEncoderSettings.h
5b737a7be33c396c0ed6b0e9d36356028ded87c8849ace65a0a962df934fbd38 include/WebRTC/RTCVideoEncoderVP8.h
d4855da9933266ded97924d00bb6e2dfe8f7f8b3a953135ea672a2912fc63647 include/WebRTC/RTCVideoEncoderVP9.h
f1e92e545812a09b1195649ad468360f7d9dc74fe153d97880aa54e70cd823b7 include/WebRTC/RTCVideoFrame.h
4de08bf0f0c4c0edb395922ca3f66591eb6c5ea32db716bf0016a22946832e4a include/WebRTC/RTCVideoFrameBuffer.h
3a38ff991169a6ac49026c05893f3803d48fcd12f776052f02498b025f57cc82 include/WebRTC/RTCVideoRenderer.h
f25afe454fb27aa47b37048315aa4d9fcf00fb05115715fac678e969a026fbbf include/WebRTC/RTCVideoSource.h
f6fc16b716bebd86cbe238a9e9095a30cbc9eca60504d338f5f7fcedeb39f39c include/WebRTC/RTCVideoTrack.h
547455720fa05b753fa969480ef044ac05beb66a79f4331727ad7859615f3515 include/WebRTC/RTCVideoViewShading.h
bb04f014c83e3129cf2d1e02355b5966e3966f362baa97593a37a7508b1c9350 include/WebRTC/RTCYUVPlanarBuffer.h
56011ec518b1da9aad5a0370a32d80b26f27ab371303b11ba4ab798692924d39 include/WebRTC/WebRTC.h
45 changes: 45 additions & 0 deletions Vendor/WebRTCHeaders/M147/SOURCES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# WebRTC M147 header overlay

This directory contains the local `WebRTC` wrapper target used to import the
macOS WebRTC M147 framework from `stasel/WebRTC` 147.0.0.

The binary framework is supplied by the `WebRTCBinary` SwiftPM binary target
from:

`https://github.com/stasel/WebRTC/releases/download/147.0.0/WebRTC-M147.xcframework.zip`

Expected asset SHA-256:

`49f9b1713432c19f408e3218fc8526c7692fafca5869f7ec5f5991614276ed40`

Official WebRTC source branch used for macOS-only headers:

`refs/branch-heads/7727`

## Header sources

- `include/WebRTC/WebRTC.h` comes from the M147 macOS slice:
`macos-x86_64_arm64/WebRTC.framework/Versions/A/Headers/WebRTC.h`.
- Headers directly imported by `WebRTC.h` come from the M147 iOS device slice when
the same file exists there.
- `include/WebRTC/RTCMTLNSVideoView.h` comes from official WebRTC source at
`refs/branch-heads/7727/sdk/objc/components/renderer/metal/RTCMTLNSVideoView.h`.
Its local include was normalized from `"RTCVideoRenderer.h"` to
`<WebRTC/RTCVideoRenderer.h>`.

## Regeneration outline

1. Download the 147.0.0 release zip and verify the SHA-256 listed above.
2. Copy the macOS `WebRTC.h` into `include/WebRTC/`.
3. For every `<WebRTC/...>` import in that umbrella header, copy the matching
iOS header into `include/WebRTC/`.
4. Replace `RTCMTLNSVideoView.h` with the official branch-heads/7727 source file
and normalize its WebRTC-local include.
5. Regenerate `SHA256SUMS` from `include/WebRTC/*.h`.

The static gate validates recursive imports, iOS-only header exclusions, guarded
UIKit usage, and checksum coverage.

`WebRTCHeaderOverlayAnchor.c` is an empty compilation unit that lets SwiftPM
model this directory as a C target while all public API surface comes from the
headers under `include/WebRTC/`.
1 change: 1 addition & 0 deletions Vendor/WebRTCHeaders/M147/WebRTCHeaderOverlayAnchor.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
void WebRTCHeaderOverlayAnchor(void) {}
32 changes: 32 additions & 0 deletions Vendor/WebRTCHeaders/M147/include/WebRTC/RTCAudioSource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/

#import <Foundation/Foundation.h>

#import <WebRTC/RTCMediaSource.h>
#import <WebRTC/RTCMacros.h>

NS_ASSUME_NONNULL_BEGIN

RTC_OBJC_EXPORT
@interface RTC_OBJC_TYPE (RTCAudioSource) : RTC_OBJC_TYPE(RTCMediaSource)

- (instancetype)init NS_UNAVAILABLE;

// Sets the volume for the RTCMediaSource. `volume` is a gain value in the range
// [0, 10].
// Temporary fix to be able to modify volume of remote audio tracks.
// TODO(kthelgason): Property stays here temporarily until a proper volume-api
// is available on the surface exposed by webrtc.
@property(nonatomic, assign) double volume;

@end

NS_ASSUME_NONNULL_END
28 changes: 28 additions & 0 deletions Vendor/WebRTCHeaders/M147/include/WebRTC/RTCAudioTrack.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/

#import <WebRTC/RTCMediaStreamTrack.h>
#import <WebRTC/RTCMacros.h>

NS_ASSUME_NONNULL_BEGIN

@class RTC_OBJC_TYPE(RTCAudioSource);

RTC_OBJC_EXPORT
@interface RTC_OBJC_TYPE (RTCAudioTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack)

- (instancetype)init NS_UNAVAILABLE;

/** The audio source for this audio track. */
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioSource) * source;

@end

NS_ASSUME_NONNULL_END
52 changes: 52 additions & 0 deletions Vendor/WebRTCHeaders/M147/include/WebRTC/RTCCVPixelBuffer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/

#import <AVFoundation/AVFoundation.h>

#import <WebRTC/RTCVideoFrameBuffer.h>
#import <WebRTC/RTCMacros.h>

NS_ASSUME_NONNULL_BEGIN

/** RTCVideoFrameBuffer containing a CVPixelBufferRef */
RTC_OBJC_EXPORT
@interface RTC_OBJC_TYPE (RTCCVPixelBuffer) : NSObject <RTC_OBJC_TYPE(RTCVideoFrameBuffer)>

@property(nonatomic, readonly) CVPixelBufferRef pixelBuffer;
@property(nonatomic, readonly) int cropX;
@property(nonatomic, readonly) int cropY;
@property(nonatomic, readonly) int cropWidth;
@property(nonatomic, readonly) int cropHeight;

+ (NSSet<NSNumber *> *)supportedPixelFormats;

- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer;
- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
adaptedWidth:(int)adaptedWidth
adaptedHeight:(int)adaptedHeight
cropWidth:(int)cropWidth
cropHeight:(int)cropHeight
cropX:(int)cropX
cropY:(int)cropY;

- (BOOL)requiresCropping;
- (BOOL)requiresScalingToWidth:(int)width height:(int)height;
- (int)bufferSizeForCroppingAndScalingToWidth:(int)width height:(int)height;

/** The minimum size of the `tmpBuffer` must be the number of bytes returned
* from the bufferSizeForCroppingAndScalingToWidth:height: method. If that size
* is 0, the `tmpBuffer` may be nil.
*/
- (BOOL)cropAndScaleTo:(CVPixelBufferRef)outputPixelBuffer
withTempBuffer:(nullable uint8_t *)tmpBuffer;

@end

NS_ASSUME_NONNULL_END
41 changes: 41 additions & 0 deletions Vendor/WebRTCHeaders/M147/include/WebRTC/RTCCallbackLogger.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/

#import <Foundation/Foundation.h>

#import <WebRTC/RTCLogging.h>
#import <WebRTC/RTCMacros.h>

NS_ASSUME_NONNULL_BEGIN

typedef void (^RTCCallbackLoggerMessageHandler)(NSString *message);
typedef void (^RTCCallbackLoggerMessageAndSeverityHandler)(
NSString *message, RTCLoggingSeverity severity);

// This class intercepts WebRTC logs and forwards them to a registered block.
// This class is not threadsafe.
RTC_OBJC_EXPORT
@interface RTC_OBJC_TYPE (RTCCallbackLogger) : NSObject

// The severity level to capture. The default is kRTCLoggingSeverityInfo.
@property(nonatomic, assign) RTCLoggingSeverity severity;

// The callback handler will be called on the same thread that does the
// logging, so if the logging callback can be slow it may be a good idea
// to implement dispatching to some other queue.
- (void)start:(nullable RTCCallbackLoggerMessageHandler)handler;
- (void)startWithMessageAndSeverityHandler:
(nullable RTCCallbackLoggerMessageAndSeverityHandler)handler;

- (void)stop;

@end

NS_ASSUME_NONNULL_END
Loading
Loading