@szdziedzic/sim-on 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/bin/sim-on.js +5 -0
- package/dist/simon.mjs +307 -0
- package/package.json +38 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/LiveKitWebRTC.h +113 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioBuffer.h +38 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioCustomProcessingDelegate.h +52 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioDeviceModule.h +287 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioProcessingConfig.h +37 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioProcessingModule.h +31 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioProcessingState.h +137 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioRenderer.h +35 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioSource.h +32 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCAudioTrack.h +150 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCVPixelBuffer.h +52 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCallbackLogger.h +41 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCameraVideoCapturer.h +71 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCertificate.h +47 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCodecSpecificInfo.h +24 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCodecSpecificInfoH264.h +27 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCConfiguration.h +278 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCCryptoOptions.h +66 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDataChannel.h +134 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDataChannelConfiguration.h +52 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDataPacketCryptor.h +52 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDefaultAudioProcessingModule.h +47 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDefaultVideoDecoderFactory.h +26 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDefaultVideoEncoderFactory.h +31 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDesktopCapturer.h +60 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDesktopMediaList.h +51 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDesktopSource.h +40 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDispatcher.h +46 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCDtmfSender.h +73 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCEncodedImage.h +52 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFieldTrials.h +34 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFileLogger.h +75 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFileVideoCapturer.h +51 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFrameCryptor.h +77 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCFrameCryptorKeyProvider.h +76 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCH264ProfileLevelId.h +60 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCI420Buffer.h +22 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIODevice.h +41 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIceCandidate.h +50 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIceCandidateErrorEvent.h +45 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCIceServer.h +114 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCLegacyStatsReport.h +37 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCLogging.h +66 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMTLNSVideoView.h +22 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMTLVideoView.h +63 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMacros.h +69 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaConstraints.h +47 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaSource.h +34 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaStream.h +50 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMediaStreamTrack.h +50 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMetrics.h +24 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMetricsSampleInfo.h +48 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMutableI420Buffer.h +24 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCMutableYUVPlanarBuffer.h +28 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCNativeI420Buffer.h +23 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCNativeMutableI420Buffer.h +24 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCPeerConnection.h +416 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCPeerConnectionFactory.h +159 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCPeerConnectionFactoryOptions.h +38 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtcpParameters.h +30 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpCapabilities.h +31 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpCodecCapability.h +58 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpCodecParameters.h +74 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpEncodingParameters.h +81 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpHeaderExtension.h +33 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpHeaderExtensionCapability.h +39 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpParameters.h +63 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpReceiver.h +105 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpSender.h +55 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpSource.h +66 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCRtpTransceiver.h +180 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCSSLAdapter.h +20 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCSSLCertificateVerifier.h +25 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCSessionDescription.h +48 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCStatisticsReport.h +58 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCTracing.h +21 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoCapturer.h +37 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoCodecInfo.h +43 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoder.h +41 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderAV1.h +25 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderFactory.h +33 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderFactoryH264.h +18 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderH264.h +18 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderVP8.h +25 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoDecoderVP9.h +27 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoder.h +62 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderAV1.h +34 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderFactory.h +78 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderFactoryH264.h +18 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderFactorySimulcast.h +16 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderH264.h +22 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderQpThresholds.h +29 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderSettings.h +42 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderSimulcast.h +13 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderVP8.h +30 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoEncoderVP9.h +34 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoFrame.h +86 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoFrameBuffer.h +40 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoRenderer.h +44 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoSource.h +37 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoTrack.h +41 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCVideoViewShading.h +39 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCYUVHelper.h +118 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Headers/RTCYUVPlanarBuffer.h +46 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/LiveKitWebRTC +0 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Modules/module.modulemap +6 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Resources/Info.plist +36 -0
- package/vendor/helper/LiveKitWebRTC.framework/Versions/A/Versions/A/Resources/PrivacyInfo.xcprivacy +32 -0
- package/vendor/helper/simon-helper +0 -0
- package/vendor/web/app.js +54 -0
- package/vendor/web/index.html +15 -0
- package/vendor/web/styles.css +435 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 LiveKit
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#ifndef SDK_OBJC_API_PEERCONNECTION_RTCAUDIOPROCESSINGSTATE_H_
|
|
18
|
+
#define SDK_OBJC_API_PEERCONNECTION_RTCAUDIOPROCESSINGSTATE_H_
|
|
19
|
+
|
|
20
|
+
#import <Foundation/Foundation.h>
|
|
21
|
+
|
|
22
|
+
#import <LiveKitWebRTC/RTCAudioTrack.h>
|
|
23
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
24
|
+
|
|
25
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
26
|
+
|
|
27
|
+
/** The implementation that is in effect for an audio processing component.
|
|
28
|
+
*
|
|
29
|
+
* Values must match webrtc::AudioProcessingImplementation.
|
|
30
|
+
*/
|
|
31
|
+
typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCAudioProcessingImplementation)) {
|
|
32
|
+
RTC_OBJC_TYPE(RTCAudioProcessingImplementationUnknown) = 0,
|
|
33
|
+
RTC_OBJC_TYPE(RTCAudioProcessingImplementationDisabled) = 1,
|
|
34
|
+
RTC_OBJC_TYPE(RTCAudioProcessingImplementationSoftware) = 2,
|
|
35
|
+
RTC_OBJC_TYPE(RTCAudioProcessingImplementationPlatform) = 3,
|
|
36
|
+
RTC_OBJC_TYPE(RTCAudioProcessingImplementationSoftwareAndPlatform) = 4,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** Diagnostic state of one audio processing component (echo cancellation,
|
|
40
|
+
* noise suppression, auto gain control or high-pass filter), observed at
|
|
41
|
+
* three stages of one pipeline: requested (caller intent) -> resolved (the
|
|
42
|
+
* engine's per-path decision) -> active (live truth), with `effective` as
|
|
43
|
+
* the merged verdict.
|
|
44
|
+
*
|
|
45
|
+
* Example: echo cancellation enabled with automatic mode on a device with
|
|
46
|
+
* platform AEC reads requested={YES, automatic}, isSoftwareResolved=NO,
|
|
47
|
+
* isPlatformResolved=YES, isPlatformActive=YES, effective=Platform. On a
|
|
48
|
+
* device without platform AEC the same request reads isSoftwareResolved=YES,
|
|
49
|
+
* isSoftwareActive=YES, effective=Software. isPlatformResolved=YES with
|
|
50
|
+
* isPlatformActive=NO means the OS has not finished applying the request or
|
|
51
|
+
* rejected it.
|
|
52
|
+
*/
|
|
53
|
+
RTC_OBJC_EXPORT
|
|
54
|
+
@interface RTC_OBJC_TYPE (RTCAudioProcessingComponentState) : NSObject
|
|
55
|
+
|
|
56
|
+
/** The caller's most recent request for this component, as passed to
|
|
57
|
+
* -[RTCAudioTrack setAudioProcessingOptions:] - enabled flag plus
|
|
58
|
+
* implementation mode. Nil when no audio processing options have ever been
|
|
59
|
+
* applied, which distinguishes "nobody asked" from "asked for disabled".
|
|
60
|
+
* The mode reads automatic when the request did not specify one.
|
|
61
|
+
*/
|
|
62
|
+
@property(nonatomic, readonly, nullable)
|
|
63
|
+
RTC_OBJC_TYPE(RTCAudioProcessingComponentOptions) *requested;
|
|
64
|
+
|
|
65
|
+
/** Whether the resolver decided the WebRTC software (APM) implementation
|
|
66
|
+
* should run for this component, after weighing the requested mode against
|
|
67
|
+
* platform availability, coupling, and policy. Automatic mode resolves to
|
|
68
|
+
* software exactly when the platform path is unavailable or disallowed.
|
|
69
|
+
* NO also covers "the resolver has not run yet" - check `requested` to tell
|
|
70
|
+
* the two apart.
|
|
71
|
+
*/
|
|
72
|
+
@property(nonatomic, readonly, getter=isSoftwareResolved) BOOL softwareResolved;
|
|
73
|
+
|
|
74
|
+
/** Whether APM's live configuration currently has this component enabled.
|
|
75
|
+
* Normally equals isSoftwareResolved once options are applied; differs while
|
|
76
|
+
* an apply is in flight, if applying failed, or if something else has since
|
|
77
|
+
* reconfigured the shared APM.
|
|
78
|
+
*/
|
|
79
|
+
@property(nonatomic, readonly, getter=isSoftwareActive) BOOL softwareActive;
|
|
80
|
+
|
|
81
|
+
/** Whether this device/OS offers a built-in implementation of this component
|
|
82
|
+
* at all (e.g. Apple Voice Processing I/O provides AEC and NS; no platform
|
|
83
|
+
* implements the high-pass filter). Capability only - says nothing about
|
|
84
|
+
* whether it is in use.
|
|
85
|
+
*/
|
|
86
|
+
@property(nonatomic, readonly, getter=isPlatformAvailable) BOOL platformAvailable;
|
|
87
|
+
|
|
88
|
+
/** Whether the resolver decided the platform implementation should run, as
|
|
89
|
+
* submitted to the OS. Unlike the software path, the OS owns the outcome:
|
|
90
|
+
* it can decline, defer, or couple this with another component (Apple ties
|
|
91
|
+
* AEC and NS through one Voice Processing switch).
|
|
92
|
+
*/
|
|
93
|
+
@property(nonatomic, readonly, getter=isPlatformResolved) BOOL platformResolved;
|
|
94
|
+
|
|
95
|
+
/** Whether the device reports the platform implementation actually running
|
|
96
|
+
* right now. Lags isPlatformResolved during engine transitions; stays NO if
|
|
97
|
+
* the OS rejected the request or the input path is not configured.
|
|
98
|
+
*/
|
|
99
|
+
@property(nonatomic, readonly, getter=isPlatformActive) BOOL platformActive;
|
|
100
|
+
|
|
101
|
+
/** The verdict: which implementation is in effect for this component right
|
|
102
|
+
* now. Derived from the active states (active wins over resolved when they
|
|
103
|
+
* disagree). Unknown when the pipeline state cannot be determined.
|
|
104
|
+
*/
|
|
105
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingImplementation) effective;
|
|
106
|
+
|
|
107
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
108
|
+
|
|
109
|
+
@end
|
|
110
|
+
|
|
111
|
+
/** Diagnostic snapshot of the resolved audio processing state for the shared
|
|
112
|
+
* audio processing module. The module is owned by the peer connection
|
|
113
|
+
* factory and shared engine-wide, so this reflects factory-scoped state
|
|
114
|
+
* rather than the state of a single track or peer connection.
|
|
115
|
+
*
|
|
116
|
+
* Device-level platform processing detail - topology, raw per-effect
|
|
117
|
+
* availability, Apple Voice Processing I/O state - is intentionally not
|
|
118
|
+
* embedded here; read RTCAudioDeviceModule.platformAudioProcessingState
|
|
119
|
+
* instead.
|
|
120
|
+
*/
|
|
121
|
+
RTC_OBJC_EXPORT
|
|
122
|
+
@interface RTC_OBJC_TYPE (RTCAudioProcessingState) : NSObject
|
|
123
|
+
|
|
124
|
+
@property(nonatomic, readonly) BOOL hasAudioProcessingModule;
|
|
125
|
+
|
|
126
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingComponentState) *echoCancellation;
|
|
127
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingComponentState) *noiseSuppression;
|
|
128
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingComponentState) *autoGainControl;
|
|
129
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingComponentState) *highPassFilter;
|
|
130
|
+
|
|
131
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
132
|
+
|
|
133
|
+
@end
|
|
134
|
+
|
|
135
|
+
NS_ASSUME_NONNULL_END
|
|
136
|
+
|
|
137
|
+
#endif // SDK_OBJC_API_PEERCONNECTION_RTCAUDIOPROCESSINGSTATE_H_
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 LiveKit
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#import <Foundation/Foundation.h>
|
|
18
|
+
#import <AVFoundation/AVFoundation.h>
|
|
19
|
+
#import <CoreMedia/CoreMedia.h>
|
|
20
|
+
|
|
21
|
+
#if TARGET_OS_IPHONE
|
|
22
|
+
#import <UIKit/UIKit.h>
|
|
23
|
+
#endif
|
|
24
|
+
|
|
25
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
26
|
+
|
|
27
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
28
|
+
|
|
29
|
+
RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE(RTCAudioRenderer)<NSObject>
|
|
30
|
+
|
|
31
|
+
- (void)renderPCMBuffer: (AVAudioPCMBuffer *)pcmBuffer NS_SWIFT_NAME(render(pcmBuffer:));
|
|
32
|
+
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2016 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <Foundation/Foundation.h>
|
|
12
|
+
|
|
13
|
+
#import <LiveKitWebRTC/RTCMediaSource.h>
|
|
14
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
15
|
+
|
|
16
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
17
|
+
|
|
18
|
+
RTC_OBJC_EXPORT
|
|
19
|
+
@interface RTC_OBJC_TYPE (RTCAudioSource) : RTC_OBJC_TYPE(RTCMediaSource)
|
|
20
|
+
|
|
21
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
22
|
+
|
|
23
|
+
// Sets the volume for the RTCMediaSource. `volume` is a gain value in the range
|
|
24
|
+
// [0, 10].
|
|
25
|
+
// Temporary fix to be able to modify volume of remote audio tracks.
|
|
26
|
+
// TODO(kthelgason): Property stays here temporarily until a proper volume-api
|
|
27
|
+
// is available on the surface exposed by webrtc.
|
|
28
|
+
@property(nonatomic, assign) double volume;
|
|
29
|
+
|
|
30
|
+
@end
|
|
31
|
+
|
|
32
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2015 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <LiveKitWebRTC/RTCMediaStreamTrack.h>
|
|
12
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
13
|
+
|
|
14
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
+
|
|
16
|
+
@protocol RTC_OBJC_TYPE (RTCAudioRenderer);
|
|
17
|
+
@class RTC_OBJC_TYPE(RTCAudioSource);
|
|
18
|
+
|
|
19
|
+
/** Selects the implementation for one enabled audio processing component.
|
|
20
|
+
*
|
|
21
|
+
* Disabled components do not use platform or software processing regardless of
|
|
22
|
+
* mode. Automatic uses platform processing when available and otherwise falls
|
|
23
|
+
* back to WebRTC software processing. Platform uses only platform processing, so
|
|
24
|
+
* unavailable or physically impossible platform requests are rejected. Software
|
|
25
|
+
* disables the matching platform effect and uses WebRTC software processing.
|
|
26
|
+
* Some ADMs expose coupled platform effects, such as Apple Voice Processing I/O
|
|
27
|
+
* for AEC and NS. High-pass filter has no platform implementation today.
|
|
28
|
+
*
|
|
29
|
+
* Values must match webrtc::AudioProcessingMode.
|
|
30
|
+
*/
|
|
31
|
+
typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCAudioProcessingMode)) {
|
|
32
|
+
RTC_OBJC_TYPE(RTCAudioProcessingModeAutomatic) = 0,
|
|
33
|
+
RTC_OBJC_TYPE(RTCAudioProcessingModePlatform) = 1,
|
|
34
|
+
RTC_OBJC_TYPE(RTCAudioProcessingModeSoftware) = 2,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// Values must match webrtc::AudioProcessingOptionsResultCode.
|
|
38
|
+
typedef NS_ENUM(NSInteger, RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCode)) {
|
|
39
|
+
/** Options were applied immediately by the component handling the request. */
|
|
40
|
+
RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCodeApplied) = 0,
|
|
41
|
+
/** Options were accepted and stored. Active senders reapply them separately. */
|
|
42
|
+
RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCodeStored) = 1,
|
|
43
|
+
/** The track is remote; processing options only apply to local tracks. */
|
|
44
|
+
RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCodeRejectedRemoteTrack) = 2,
|
|
45
|
+
/** The per-component modes conflict, e.g. requesting platform for one of a
|
|
46
|
+
* coupled AEC/NS pair while disabling or forcing software on the other. */
|
|
47
|
+
RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCodeRejectedInvalidCombination) = 3,
|
|
48
|
+
/** Platform mode was requested for a component this device cannot provide,
|
|
49
|
+
* or platform voice processing is disallowed by policy. */
|
|
50
|
+
RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCodeRejectedPlatformUnavailable) = 4,
|
|
51
|
+
/** The request was valid but could not be applied. */
|
|
52
|
+
RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCodeApplyFailed) = 5,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
RTC_OBJC_EXPORT
|
|
56
|
+
@interface RTC_OBJC_TYPE (RTCAudioProcessingOptionsResult) : NSObject
|
|
57
|
+
|
|
58
|
+
@property(nonatomic, readonly, getter=isSuccess) BOOL success;
|
|
59
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingOptionsResultCode) code;
|
|
60
|
+
@property(nonatomic, readonly) NSString *message;
|
|
61
|
+
|
|
62
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
63
|
+
|
|
64
|
+
@end
|
|
65
|
+
|
|
66
|
+
/** Enabled flag and implementation mode for one audio processing component. */
|
|
67
|
+
RTC_OBJC_EXPORT
|
|
68
|
+
@interface RTC_OBJC_TYPE (RTCAudioProcessingComponentOptions) : NSObject
|
|
69
|
+
|
|
70
|
+
@property(nonatomic, readonly, getter=isEnabled) BOOL enabled;
|
|
71
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingMode) mode;
|
|
72
|
+
|
|
73
|
+
- (instancetype)initWithEnabled:(BOOL)enabled;
|
|
74
|
+
|
|
75
|
+
- (instancetype)initWithEnabled:(BOOL)enabled
|
|
76
|
+
mode:(RTC_OBJC_TYPE(RTCAudioProcessingMode))mode NS_DESIGNATED_INITIALIZER;
|
|
77
|
+
|
|
78
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
79
|
+
|
|
80
|
+
@end
|
|
81
|
+
|
|
82
|
+
RTC_OBJC_EXPORT
|
|
83
|
+
@interface RTC_OBJC_TYPE (RTCAudioProcessingOptions) : NSObject
|
|
84
|
+
|
|
85
|
+
@property(nonatomic, readonly) BOOL echoCancellation;
|
|
86
|
+
@property(nonatomic, readonly) BOOL noiseSuppression;
|
|
87
|
+
@property(nonatomic, readonly) BOOL autoGainControl;
|
|
88
|
+
@property(nonatomic, readonly) BOOL highPassFilter;
|
|
89
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingMode) echoCancellationMode;
|
|
90
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingMode) noiseSuppressionMode;
|
|
91
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingMode) autoGainControlMode;
|
|
92
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioProcessingMode) highPassFilterMode;
|
|
93
|
+
|
|
94
|
+
- (instancetype)initWithEchoCancellation:(BOOL)echoCancellation
|
|
95
|
+
noiseSuppression:(BOOL)noiseSuppression
|
|
96
|
+
autoGainControl:(BOOL)autoGainControl
|
|
97
|
+
highPassFilter:(BOOL)highPassFilter;
|
|
98
|
+
|
|
99
|
+
- (instancetype)
|
|
100
|
+
initWithEchoCancellationOptions:(RTC_OBJC_TYPE(RTCAudioProcessingComponentOptions) *)echoCancellationOptions
|
|
101
|
+
noiseSuppressionOptions:(RTC_OBJC_TYPE(RTCAudioProcessingComponentOptions) *)noiseSuppressionOptions
|
|
102
|
+
autoGainControlOptions:(RTC_OBJC_TYPE(RTCAudioProcessingComponentOptions) *)autoGainControlOptions
|
|
103
|
+
highPassFilterOptions:(RTC_OBJC_TYPE(RTCAudioProcessingComponentOptions) *)highPassFilterOptions
|
|
104
|
+
NS_DESIGNATED_INITIALIZER;
|
|
105
|
+
|
|
106
|
+
+ (instancetype)communicationOptions;
|
|
107
|
+
+ (instancetype)rawOptions;
|
|
108
|
+
|
|
109
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
110
|
+
|
|
111
|
+
@end
|
|
112
|
+
|
|
113
|
+
RTC_OBJC_EXPORT
|
|
114
|
+
@interface RTC_OBJC_TYPE (RTCAudioTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack)
|
|
115
|
+
|
|
116
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
117
|
+
|
|
118
|
+
/** The audio source for this audio track. */
|
|
119
|
+
@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioSource) * source;
|
|
120
|
+
|
|
121
|
+
- (void)addRenderer:(id<RTC_OBJC_TYPE(RTCAudioRenderer)>)renderer;
|
|
122
|
+
|
|
123
|
+
- (void)removeRenderer:(id<RTC_OBJC_TYPE(RTCAudioRenderer)>)renderer;
|
|
124
|
+
|
|
125
|
+
- (void)removeAllRenderers;
|
|
126
|
+
|
|
127
|
+
/** Updates local source audio processing options without restarting capture.
|
|
128
|
+
*
|
|
129
|
+
* Returns Stored when the request was accepted and stored on the local source.
|
|
130
|
+
* This validates static platform constraints, such as Apple AEC/NS coupling and
|
|
131
|
+
* simulator support. When the factory exposes its audio device module, this also
|
|
132
|
+
* validates app-level platform policy such as
|
|
133
|
+
* RTCAudioDeviceModule.platformVoiceProcessingAllowed. Factory paths without an
|
|
134
|
+
* exposed ADM still validate statically, and runtime platform policy can make a
|
|
135
|
+
* stored platform request resolve disabled when the voice engine applies it.
|
|
136
|
+
*
|
|
137
|
+
* If the track is already being sent, active senders observe the track update
|
|
138
|
+
* and reapply the updated options through the voice engine. Rejections mean
|
|
139
|
+
* the options were not stored. Use the peer connection factory's
|
|
140
|
+
* audioProcessingState to inspect the effective software/platform state after
|
|
141
|
+
* application. The audio processing module configuration is shared by the
|
|
142
|
+
* voice engine/channel, so conflicting updates from multiple local tracks are
|
|
143
|
+
* not isolated per track.
|
|
144
|
+
*/
|
|
145
|
+
- (RTC_OBJC_TYPE(RTCAudioProcessingOptionsResult) *)setAudioProcessingOptions:
|
|
146
|
+
(RTC_OBJC_TYPE(RTCAudioProcessingOptions) *)options;
|
|
147
|
+
|
|
148
|
+
@end
|
|
149
|
+
|
|
150
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <AVFoundation/AVFoundation.h>
|
|
12
|
+
|
|
13
|
+
#import <LiveKitWebRTC/RTCVideoFrameBuffer.h>
|
|
14
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
15
|
+
|
|
16
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
17
|
+
|
|
18
|
+
/** RTCVideoFrameBuffer containing a CVPixelBufferRef */
|
|
19
|
+
RTC_OBJC_EXPORT
|
|
20
|
+
@interface RTC_OBJC_TYPE (RTCCVPixelBuffer) : NSObject <RTC_OBJC_TYPE(RTCVideoFrameBuffer)>
|
|
21
|
+
|
|
22
|
+
@property(nonatomic, readonly) CVPixelBufferRef pixelBuffer;
|
|
23
|
+
@property(nonatomic, readonly) int cropX;
|
|
24
|
+
@property(nonatomic, readonly) int cropY;
|
|
25
|
+
@property(nonatomic, readonly) int cropWidth;
|
|
26
|
+
@property(nonatomic, readonly) int cropHeight;
|
|
27
|
+
|
|
28
|
+
+ (NSSet<NSNumber *> *)supportedPixelFormats;
|
|
29
|
+
|
|
30
|
+
- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer;
|
|
31
|
+
- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
|
|
32
|
+
adaptedWidth:(int)adaptedWidth
|
|
33
|
+
adaptedHeight:(int)adaptedHeight
|
|
34
|
+
cropWidth:(int)cropWidth
|
|
35
|
+
cropHeight:(int)cropHeight
|
|
36
|
+
cropX:(int)cropX
|
|
37
|
+
cropY:(int)cropY;
|
|
38
|
+
|
|
39
|
+
- (BOOL)requiresCropping;
|
|
40
|
+
- (BOOL)requiresScalingToWidth:(int)width height:(int)height;
|
|
41
|
+
- (int)bufferSizeForCroppingAndScalingToWidth:(int)width height:(int)height;
|
|
42
|
+
|
|
43
|
+
/** The minimum size of the `tmpBuffer` must be the number of bytes returned
|
|
44
|
+
* from the bufferSizeForCroppingAndScalingToWidth:height: method. If that size
|
|
45
|
+
* is 0, the `tmpBuffer` may be nil.
|
|
46
|
+
*/
|
|
47
|
+
- (BOOL)cropAndScaleTo:(CVPixelBufferRef)outputPixelBuffer
|
|
48
|
+
withTempBuffer:(nullable uint8_t *)tmpBuffer;
|
|
49
|
+
|
|
50
|
+
@end
|
|
51
|
+
|
|
52
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <Foundation/Foundation.h>
|
|
12
|
+
|
|
13
|
+
#import <LiveKitWebRTC/RTCLogging.h>
|
|
14
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
15
|
+
|
|
16
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
17
|
+
|
|
18
|
+
typedef void (^RTCCallbackLoggerMessageHandler)(NSString *message);
|
|
19
|
+
typedef void (^RTCCallbackLoggerMessageAndSeverityHandler)(
|
|
20
|
+
NSString *message, RTC_OBJC_TYPE(RTCLoggingSeverity) severity);
|
|
21
|
+
|
|
22
|
+
// This class intercepts WebRTC logs and forwards them to a registered block.
|
|
23
|
+
// This class is not threadsafe.
|
|
24
|
+
RTC_OBJC_EXPORT
|
|
25
|
+
@interface RTC_OBJC_TYPE (RTCCallbackLogger) : NSObject
|
|
26
|
+
|
|
27
|
+
// The severity level to capture. The default is kRTCLoggingSeverityInfo.
|
|
28
|
+
@property(nonatomic, assign) RTC_OBJC_TYPE(RTCLoggingSeverity) severity;
|
|
29
|
+
|
|
30
|
+
// The callback handler will be called on the same thread that does the
|
|
31
|
+
// logging, so if the logging callback can be slow it may be a good idea
|
|
32
|
+
// to implement dispatching to some other queue.
|
|
33
|
+
- (void)start:(nullable RTCCallbackLoggerMessageHandler)handler;
|
|
34
|
+
- (void)startWithMessageAndSeverityHandler:
|
|
35
|
+
(nullable RTCCallbackLoggerMessageAndSeverityHandler)handler;
|
|
36
|
+
|
|
37
|
+
- (void)stop;
|
|
38
|
+
|
|
39
|
+
@end
|
|
40
|
+
|
|
41
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <AVFoundation/AVFoundation.h>
|
|
12
|
+
#import <Foundation/Foundation.h>
|
|
13
|
+
|
|
14
|
+
#import <LiveKitWebRTC/RTCVideoCapturer.h>
|
|
15
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
|
|
19
|
+
// Camera capture that implements RTCVideoCapturer. Delivers frames to a
|
|
20
|
+
// RTCVideoCapturerDelegate (usually RTCVideoSource).
|
|
21
|
+
RTC_OBJC_EXPORT
|
|
22
|
+
@interface RTC_OBJC_TYPE (RTCCameraVideoCapturer) : RTC_OBJC_TYPE(RTCVideoCapturer)
|
|
23
|
+
|
|
24
|
+
// Capture session that is used for capturing. Valid from initialization to dealloc.
|
|
25
|
+
@property(readonly, nonatomic) AVCaptureSession *captureSession;
|
|
26
|
+
|
|
27
|
+
// Returns list of available capture devices that support video capture.
|
|
28
|
+
+ (NSArray<AVCaptureDevice *> *)captureDevices;
|
|
29
|
+
|
|
30
|
+
// Returns list of formats that are supported by this class for this device.
|
|
31
|
+
+ (NSArray<AVCaptureDeviceFormat *> *)supportedFormatsForDevice:
|
|
32
|
+
(AVCaptureDevice *)device;
|
|
33
|
+
|
|
34
|
+
#if !TARGET_OS_VISION
|
|
35
|
+
+ (CGFloat)defaultZoomFactorForDeviceType:(AVCaptureDeviceType)deviceType;
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
- (instancetype)initWithDelegate:
|
|
39
|
+
(nullable __weak id<RTC_OBJC_TYPE(RTCVideoCapturerDelegate)>)delegate;
|
|
40
|
+
|
|
41
|
+
- (instancetype)initWithDelegate:
|
|
42
|
+
(nullable __weak id<RTC_OBJC_TYPE(RTCVideoCapturerDelegate)>)delegate
|
|
43
|
+
captureSession:(AVCaptureSession *)captureSession;
|
|
44
|
+
|
|
45
|
+
// Returns the most efficient supported output pixel format for this capturer.
|
|
46
|
+
- (FourCharCode)preferredOutputPixelFormat;
|
|
47
|
+
|
|
48
|
+
// Starts the capture session asynchronously and notifies callback on
|
|
49
|
+
// completion. The device will capture video in the format given in the `format`
|
|
50
|
+
// parameter. If the pixel format in `format` is supported by the WebRTC
|
|
51
|
+
// pipeline, the same pixel format will be used for the output. Otherwise, the
|
|
52
|
+
// format returned by `preferredOutputPixelFormat` will be used.
|
|
53
|
+
- (void)startCaptureWithDevice:(AVCaptureDevice *)device
|
|
54
|
+
format:(AVCaptureDeviceFormat *)format
|
|
55
|
+
fps:(NSInteger)fps
|
|
56
|
+
completionHandler:
|
|
57
|
+
(nullable void (^)(NSError *_Nullable))completionHandler;
|
|
58
|
+
// Stops the capture session asynchronously and notifies callback on completion.
|
|
59
|
+
- (void)stopCaptureWithCompletionHandler:
|
|
60
|
+
(nullable void (^)(void))completionHandler;
|
|
61
|
+
|
|
62
|
+
// Starts the capture session asynchronously.
|
|
63
|
+
- (void)startCaptureWithDevice:(AVCaptureDevice *)device
|
|
64
|
+
format:(AVCaptureDeviceFormat *)format
|
|
65
|
+
fps:(NSInteger)fps;
|
|
66
|
+
// Stops the capture session asynchronously.
|
|
67
|
+
- (void)stopCapture;
|
|
68
|
+
|
|
69
|
+
@end
|
|
70
|
+
|
|
71
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <Foundation/Foundation.h>
|
|
12
|
+
|
|
13
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
14
|
+
|
|
15
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
16
|
+
|
|
17
|
+
RTC_OBJC_EXPORT
|
|
18
|
+
@interface RTC_OBJC_TYPE (RTCCertificate) : NSObject <NSCopying>
|
|
19
|
+
|
|
20
|
+
/** Private key in PEM. */
|
|
21
|
+
@property(nonatomic, readonly, copy) NSString *private_key;
|
|
22
|
+
|
|
23
|
+
/** Public key in an x509 cert encoded in PEM. */
|
|
24
|
+
@property(nonatomic, readonly, copy) NSString *certificate;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Initialize an RTCCertificate with PEM strings for private_key and
|
|
28
|
+
* certificate.
|
|
29
|
+
*/
|
|
30
|
+
- (instancetype)initWithPrivateKey:(NSString *)private_key
|
|
31
|
+
certificate:(NSString *)certificate
|
|
32
|
+
NS_DESIGNATED_INITIALIZER;
|
|
33
|
+
|
|
34
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
35
|
+
|
|
36
|
+
/** Generate a new certificate for 're' use.
|
|
37
|
+
*
|
|
38
|
+
* Optional dictionary of parameters. Defaults to KeyType ECDSA if none are
|
|
39
|
+
* provided.
|
|
40
|
+
* - name: "ECDSA" or "RSASSA-PKCS1-v1_5"
|
|
41
|
+
*/
|
|
42
|
+
+ (nullable RTC_OBJC_TYPE(RTCCertificate) *)generateCertificateWithParams:
|
|
43
|
+
(NSDictionary *)params;
|
|
44
|
+
|
|
45
|
+
@end
|
|
46
|
+
|
|
47
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <Foundation/Foundation.h>
|
|
12
|
+
|
|
13
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
14
|
+
|
|
15
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
16
|
+
|
|
17
|
+
/** Implement this protocol to pass codec specific info from the encoder.
|
|
18
|
+
* Corresponds to webrtc::CodecSpecificInfo.
|
|
19
|
+
*/
|
|
20
|
+
RTC_OBJC_EXPORT
|
|
21
|
+
@protocol RTC_OBJC_TYPE
|
|
22
|
+
(RTCCodecSpecificInfo)<NSObject> @end
|
|
23
|
+
|
|
24
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by a BSD-style license
|
|
5
|
+
* that can be found in the LICENSE file in the root of the source
|
|
6
|
+
* tree. An additional intellectual property rights grant can be found
|
|
7
|
+
* in the file PATENTS. All contributing project authors may
|
|
8
|
+
* be found in the AUTHORS file in the root of the source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#import <Foundation/Foundation.h>
|
|
12
|
+
|
|
13
|
+
#import <LiveKitWebRTC/RTCCodecSpecificInfo.h>
|
|
14
|
+
#import <LiveKitWebRTC/RTCMacros.h>
|
|
15
|
+
|
|
16
|
+
/** Class for H264 specific config. */
|
|
17
|
+
typedef NS_ENUM(NSUInteger, RTC_OBJC_TYPE(RTCH264PacketizationMode)) {
|
|
18
|
+
RTC_OBJC_TYPE(RTCH264PacketizationModeNonInterleaved) = 0, // Mode 1 - STAP-A, FU-A is allowed
|
|
19
|
+
RTC_OBJC_TYPE(RTCH264PacketizationModeSingleNalUnit) // Mode 0 - only single NALU allowed
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
RTC_OBJC_EXPORT
|
|
23
|
+
@interface RTC_OBJC_TYPE (RTCCodecSpecificInfoH264) : NSObject <RTC_OBJC_TYPE(RTCCodecSpecificInfo)>
|
|
24
|
+
|
|
25
|
+
@property(nonatomic, assign) RTC_OBJC_TYPE(RTCH264PacketizationMode) packetizationMode;
|
|
26
|
+
|
|
27
|
+
@end
|