├── .gitignore
├── LICENSE
├── PodRTC.podspec
├── PodRTC
├── .gitignore
└── 56.17541.0.0
│ └── PodRTC.podspec
├── README.md
├── RELEASE_LOG
├── WebRTC.framework
├── Headers
│ ├── RTCAVFoundationVideoSource.h
│ ├── RTCAudioSession.h
│ ├── RTCAudioSessionConfiguration.h
│ ├── RTCAudioSource.h
│ ├── RTCAudioTrack.h
│ ├── RTCCameraPreviewView.h
│ ├── RTCCameraVideoCapturer.h
│ ├── RTCConfiguration.h
│ ├── RTCDataChannel.h
│ ├── RTCDataChannelConfiguration.h
│ ├── RTCDispatcher.h
│ ├── RTCDtmfSender.h
│ ├── RTCEAGLVideoView.h
│ ├── RTCFieldTrials.h
│ ├── RTCFileLogger.h
│ ├── RTCFileVideoCapturer.h
│ ├── RTCIceCandidate.h
│ ├── RTCIceServer.h
│ ├── RTCIntervalRange.h
│ ├── RTCLegacyStatsReport.h
│ ├── RTCLogging.h
│ ├── RTCMTLVideoView.h
│ ├── RTCMacros.h
│ ├── RTCMediaConstraints.h
│ ├── RTCMediaSource.h
│ ├── RTCMediaStream.h
│ ├── RTCMediaStreamTrack.h
│ ├── RTCMetrics.h
│ ├── RTCMetricsSampleInfo.h
│ ├── RTCPeerConnection.h
│ ├── RTCPeerConnectionFactory.h
│ ├── RTCPeerConnectionFactoryOptions.h
│ ├── RTCRtpCodecParameters.h
│ ├── RTCRtpEncodingParameters.h
│ ├── RTCRtpParameters.h
│ ├── RTCRtpReceiver.h
│ ├── RTCRtpSender.h
│ ├── RTCSSLAdapter.h
│ ├── RTCSessionDescription.h
│ ├── RTCTracing.h
│ ├── RTCVideoCapturer.h
│ ├── RTCVideoCodec.h
│ ├── RTCVideoCodecFactory.h
│ ├── RTCVideoCodecH264.h
│ ├── RTCVideoDecoderVP8.h
│ ├── RTCVideoDecoderVP9.h
│ ├── RTCVideoEncoderVP8.h
│ ├── RTCVideoEncoderVP9.h
│ ├── RTCVideoFrame.h
│ ├── RTCVideoFrameBuffer.h
│ ├── RTCVideoRenderer.h
│ ├── RTCVideoSource.h
│ ├── RTCVideoTrack.h
│ ├── RTCVideoViewShading.h
│ ├── UIDevice+RTCDevice.h
│ └── WebRTC.h
├── Info.plist
├── LICENSE.html
├── LICENSE.md
├── Modules
│ └── module.modulemap
└── WebRTC
└── patches
├── 58.19.0.1-issue2833833002_1_10001.diff
├── 59.13.0.1-issue2833833002_1_10001.diff
├── 60.4.0.1-issue7703.diff
├── 60.4.0.2-issue7703-disable-ipv6.diff
└── 61.2.0.1-issue7703-4cd599f02504e32224a688434db6d43f5c892167
/.gitignore:
--------------------------------------------------------------------------------
1 | /*
2 | !.gitignore
3 | !WebRTC.framework
4 | !README.md
5 | !RELEASE_LOG
6 | !LICENSE*
7 | !PodRTC.podspec
8 | !PodRTC
9 | !patches
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | FILENAME: LICENSE
2 |
3 | Copyright (c) 2011, The WebRTC project authors. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are
7 | met:
8 |
9 | * Redistributions of source code must retain the above copyright
10 | notice, this list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright
13 | notice, this list of conditions and the following disclaimer in
14 | the documentation and/or other materials provided with the
15 | distribution.
16 |
17 | * Neither the name of Google nor the names of its contributors may
18 | be used to endorse or promote products derived from this software
19 | without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 | ======================================================================
34 |
35 | FILENAME: PATENTS
36 |
37 | Additional IP Rights Grant (Patents)
38 |
39 | "This implementation" means the copyrightable works distributed by
40 | Google as part of the WebRTC code package.
41 |
42 | Google hereby grants to you a perpetual, worldwide, non-exclusive,
43 | no-charge, irrevocable (except as stated in this section) patent
44 | license to make, have made, use, offer to sell, sell, import,
45 | transfer, and otherwise run, modify and propagate the contents of this
46 | implementation of the WebRTC code package, where such license applies
47 | only to those patent claims, both currently owned by Google and
48 | acquired in the future, licensable by Google that are necessarily
49 | infringed by this implementation of the WebRTC code package. This
50 | grant does not include claims that would be infringed only as a
51 | consequence of further modification of this implementation. If you or
52 | your agent or exclusive licensee institute or order or agree to the
53 | institution of patent litigation against any entity (including a
54 | cross-claim or counterclaim in a lawsuit) alleging that this
55 | implementation of the WebRTC code package or any code incorporated
56 | within this implementation of the WebRTC code package constitutes
57 | direct or contributory patent infringement, or inducement of patent
58 | infringement, then any patent rights granted to you under this License
59 | for this implementation of the WebRTC code package shall terminate as
60 | of the date such litigation is filed.
61 |
62 | =======================================================================
63 |
64 | See complete information about license, patents, codecs etc. visiting:
65 |
66 |
--------------------------------------------------------------------------------
/PodRTC.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "PodRTC"
3 | s.version = "65.8.0.0"
4 | s.summary = "WebRTC for iOS"
5 | s.description = <<-DESC
6 | PodRTC is an unofficial build of WebRTC for IOS platform bundled in this Cocoapod.
7 | WebRTC is a free, open project that provides browsers and mobile applications with
8 | Real-Time Communications.
9 | DESC
10 | s.homepage = "https://github.com/zevarito/PodRTC"
11 | s.license = {
12 | type: "https://webrtc.org/license/",
13 | text: File.open("LICENSE").read
14 | }
15 | s.author = "Library: Google Inc., Build/Pod: @zevarito"
16 | s.social_media_url = "http://twitter.com/zevarito"
17 | s.source = {
18 | git: "https://github.com/zevarito/PodRTC.git",
19 | tag: s.version
20 | }
21 | s.platform = :ios, "8.0"
22 | s.vendored_frameworks = "WebRTC.framework"
23 | end
24 |
--------------------------------------------------------------------------------
/PodRTC/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zevarito/PodRTC/67f47c40a0729b09dc4121d8f881540e7c8e6fdd/PodRTC/.gitignore
--------------------------------------------------------------------------------
/PodRTC/56.17541.0.0/PodRTC.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "PodRTC"
3 | s.version = "56.17541.0.0"
4 | s.summary = "WebRTC for iOS"
5 | s.description = <<-DESC
6 | PodRTC is an unofficial build of WebRTC for IOS platform bundled in this Cocoapod.
7 | WebRTC is a free, open project that provides browsers and mobile applications with
8 | Real-Time Communications.
9 | DESC
10 | s.homepage = "https://github.com/zevarito/PodRTC"
11 | s.license = {
12 | type: "https://webrtc.org/license/",
13 | text: File.open("LICENSE").read
14 | }
15 | s.author = "Library: Google Inc., Build/Pod: @zevarito"
16 | s.social_media_url = "http://twitter.com/zevarito"
17 | s.source = {
18 | git: "https://github.com/zevarito/PodRTC.git",
19 | tag: s.version
20 | }
21 | s.platform = :ios, "8.0"
22 | s.vendored_frameworks = "WebRTC.framework"
23 | end
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PodRTC
2 |
3 | [PodRTC](http://https://cocoapods.org/pods/PodRTC) is an unofficial build of the WebRTC library for IOS platform bundled in this Cocoapod.
4 |
5 | [WebRTC](http://webrtc.org) is a free, open project that provides browsers and mobile applications with
6 | Real-Time Communications.
7 |
8 | ## Releases
9 |
10 | [Check available releases here](https://github.com/zevarito/PodRTC/releases)
11 |
12 | ## Current "stable" version
13 |
14 | There are no concept of stable version just WebRTC revision builds.
15 | Notice that not necessary the latest build, either the biggest revision number
16 | or last build from master should be considered the best revision to use.
17 |
18 | ## Usage
19 |
20 | Update your `Podfile` with the following line:
21 |
22 | `pod "PodRTC", "56.17541.0.0"`
23 |
24 | ##### Chosing version and builds:
25 |
26 | Version format corresponds to: MM.RRRRR.D.U
27 |
28 | * **MM**.
29 | Two digit representing the WebRTC branch checked out for the build.
30 | m54->54, m55->55, m56->56 ...etc
31 |
32 | * **RRRRR**.
33 | Revision number 9948, 11300, 15101 ...etc
34 |
35 | * **D**.
36 | Indicates the kind of the build.
37 |
38 | 0 -> Release
39 |
40 | 1 -> Debug
41 |
42 | * **U**.
43 | Updates to the original codebase, this may be patches applied to enable
44 | or disable features, bug fixes and so on. Updates and other build information
45 | is documented in the **RELEASE_LOG** file.
46 |
47 | ## This Pod License
48 |
49 | **MIT**
50 |
51 | ## WebRTC License
52 |
53 | Please visit [WebRTC License page](https://webrtc.org/license/) to get complete information of the license and patents that apply to piece of software.
54 |
--------------------------------------------------------------------------------
/RELEASE_LOG:
--------------------------------------------------------------------------------
1 | - 65.8.0.0
2 |
3 | commit 7ee493622bb721cc14bf45edf22a69118402f971
4 | Author: philipel
5 | Date: Fri Jan 26 15:10:57 2018 +0100
6 |
7 | Don't overwrite RTP packets in history within one second or 3x RTT.
8 |
9 | This prevents us from prematurely overwriting the packets in the history
10 | if the RTT is underestimated.
11 |
12 | (cherry picked from commit 788ac70c1f8a34bf375b09dee69a4e7d547dc4f9)
13 |
14 | Bug: webrtc:8766
15 | Change-Id: I042e8ce74cdce2a0451596f4217779fc856b51f4
16 | Reviewed-on: https://webrtc-review.googlesource.com/42960
17 | Commit-Queue: Erik Språng
18 | Reviewed-by: Danil Chapovalov
19 | Cr-Original-Commit-Position: refs/heads/master@{#21735}
20 | Reviewed-on: https://webrtc-review.googlesource.com/43863
21 | Reviewed-by: Stefan Holmer
22 | Cr-Commit-Position: refs/branch-heads/65@{#8}
23 | Cr-Branched-From: 3ac67a736bb200ecf7c116a88b2f8d5c542973c8-refs/heads/master@{#21637}
24 |
25 | - 61.4.0.0
26 |
27 | commit 371062bf35921ebeb33b3a66cdf58d1028d8e9a9
28 | Author: philipel
29 | Date: Mon Aug 14 16:51:55 2017 +0200
30 |
31 | Workaround for PacketBuffer bug.
32 |
33 | This is a merge to M61.
34 |
35 | There exist a bug in the video_coding::PacketBuffer which triggers when a
36 | frame is the same size as the buffer. A trivial workaround is to increase
37 | the start size to something big so that this never happens in practice.
38 |
39 | The bug has been fixed but to avoid non-trivial merges we use this
40 | workaround instead for M61.
41 |
42 | BUG=webrtc:8028, chromium:752886
43 | R=stefan@webrtc.org
44 |
45 | Review-Url: https://codereview.webrtc.org/3000653002 .
46 | Cr-Commit-Position: refs/branch-heads/61@{#4}
47 | Cr-Branched-From: 83dc6b6f5380d7c03f5ebfe2553bf4a3147e2d1c-refs/heads/master@{#19063}
48 |
49 | - 61.2.0.1
50 |
51 | Patches:
52 | - 61.2.0.1-issue7703-4cd599f02504e32224a688434db6d43f5c892167
53 | source: https://bugs.chromium.org/p/webrtc/issues/detail?id=7703#c28
54 |
55 | Revision:
56 | commit b0406b07dec68d05bfa223160983c24609ac1df5
57 | Author: jbudorick
58 | Date: Mon Jul 31 08:53:09 2017 -0700
59 |
60 | Add gn dependency between ana_debug_dump_proto and ana_config_proto.
61 |
62 | Merging 58f1725ff1feeb665aaa1bc222e6d36148d8fcb7 to 61.
63 |
64 | NOTRY=true # merging to branch
65 | NOPRESUBMIT=true # merging to branch
66 | TBR=minyue@webrtc.org
67 | BUG=chromium:746106
68 |
69 | Review-Url: https://codereview.webrtc.org/2984293002
70 | Cr-Commit-Position: refs/branch-heads/61@{#2}
71 | Cr-Branched-From: 83dc6b6f5380d7c03f5ebfe2553bf4a3147e2d1c-refs/heads/master@{#19063}
72 |
73 | - 60.4.0.3 - Enable VP9
74 |
75 | - 60.4.0.2 - Patched - Disable IPv6
76 |
77 | patch: 60.4.0.1-issue7703.diff
78 | patch: 60.4.0.2-issue7703-disable-ipv6.diff
79 |
80 | - 60.4.0.1 - Patched
81 |
82 | patch: 60.4.0.1-issue7703.diff
83 |
84 | commit b38e60ca061f05ed8fe9c461366d7f1a18d4c152
85 | Author: stefan
86 | Date: Tue Jun 20 02:35:53 2017 -0700
87 |
88 | Validate references of frames inserted into FrameBuffer2.
89 |
90 | BUG=chromium:730603
91 |
92 | NOPRESUBMIT=true
93 | NOTRY=true
94 |
95 | Review-Url: https://codereview.webrtc.org/2937243002
96 | Cr-Original-Commit-Position: refs/heads/master@{#18614}
97 | Review-Url: https://codereview.webrtc.org/2948733002
98 | Cr-Commit-Position: refs/branch-heads/60@{#4}
99 | Cr-Branched-From: c61bf947b4ac31f3500858ffcae6fee39d799930-refs/heads/master@{#18252}
100 |
101 | - 59.13.0.1
102 |
103 | commit ab7f856fa72a531fa5b9bdafbcc83de21888589e
104 | Author: Sergey Ulanov
105 | Date: Mon May 22 12:48:23 2017 -0700
106 |
107 | Update Packet::GetHeader() to copy playout_delay
108 |
109 | Packet::GetHeader() wasn't copying playout_delay. As result
110 | playout_delay was ignored when flexfec is enabled.
111 |
112 | Patch by Rob McCool
113 |
114 | BUG=webrtc:7590
115 |
116 | Review-Url: https://codereview.webrtc.org/2899553003
117 | Cr-Commit-Position: refs/heads/master@{#18218}
118 | (cherry picked from commit b2c001a79542050d69fa916199f51d5d98626f21)
119 |
120 | BUG=chromium:722490
121 |
122 | Review-Url: https://codereview.webrtc.org/2898813002 .
123 | Cr-Commit-Position: refs/branch-heads/59@{#13}
124 | Cr-Branched-From: 10d095d4f743bc16f8e486e156c48a6d023b32c5-refs/heads/master@{#17657}
125 |
126 | - 58.19.0.1 CVE
127 |
128 | CVE fixes. Important!
129 | [679306] High CVE-2017-5068: Race condition in WebRTC. Credit to Philipp Hancke.
130 | https://bugs.chromium.org/p/chromium/issues/detail?id=679306
131 |
132 | commit 6c9caaad7dfdea48a72a691d760ea0d89cb64816
133 | Author: Zijie He
134 | Date: Mon May 1 10:48:00 2017 -0700
135 |
136 | Check if the order of frames becomes ambiguous if we were to insert the incoming frame, and if so, clear the FrameBuffer.
137 |
138 | On behalf of Philip Eliasson (philipel@webrtc.org).
139 |
140 | BUG=chromium:679306
141 |
142 | Review-Url: https://codereview.webrtc.org/2830723002
143 | Cr-Commit-Position: refs/heads/master@{#17785}
144 | (cherry picked from commit 146a48b0fabef7e74f2a2b62fb5cb45f9b393408)
145 |
146 | Review-Url: https://codereview.webrtc.org/2848283002 .
147 | Cr-Commit-Position: refs/branch-heads/58@{#19}
148 | Cr-Branched-From: f31969a584bcafe9406c214a9d4c3afb49d19650-refs/heads/master@{#16937}
149 |
150 | patches/58.19.0.1-issue2833833002_1_10001.diff
151 | Enable builds with xcode 8.3.x.
152 |
153 | - 57.17541.0.0
154 |
155 | commit c88b5d56ada5690ae352062e69a9f984a07d228c
156 | Author: kjellander
157 | Date: Wed Apr 5 06:42:43 2017 -0700
158 |
159 | Reland of PyLint fixes for tools-webrtc and webrtc/tools (patchset #1 id:1 of https://codereview.webrtc.org/2737233003/ )
160 |
161 | Reason for revert:
162 | Fixing errors for reland. I have tested that this does not make Chromium video quality tests fail.
163 |
164 | Original issue's description:
165 | > Revert of PyLint fixes for tools-webrtc and webrtc/tools (patchset #3 id:40001 of https://codereview.webrtc.org/2736233003/ )
166 | >
167 | > Reason for revert:
168 | > Fails video quality tests in Chrome: http://build.chromium.org/p/chromium.webrtc.fyi/builders/Win10%20Tester/builds/6568
169 | > I should have looked more closer at those :(
170 | ...
171 |
172 | NOTRY=true
173 | BUG=webrtc:7312
174 |
175 | Review-Url: https://codereview.webrtc.org/2741733003
176 | Cr-Commit-Position: refs/heads/master@{#17541}
177 |
178 | - 58.16.0.0
179 |
180 | commit 5bb66b6e65e11c5031893f731b722d0d7f06c09c
181 | Author: ilnik
182 | Date: Tue Apr 4 12:15:14 2017 -0700
183 |
184 | Use simulcast for screenshare only in conference mode
185 |
186 | Also, don't crash if InitEncode fails for vp8.
187 |
188 | BUG=chromium:705505
189 | NOTRY=true
190 | NOPRESUBMIT=true
191 |
192 | Review-Url: https://codereview.webrtc.org/2779163002
193 | Cr-Commit-Position: refs/heads/master@{#17452}
194 | (cherry picked from commit fe627f30cbd3b4e0665237c7f309973cbf15e30b)
195 |
196 | Review-Url: https://codereview.webrtc.org/2795043004
197 | Cr-Commit-Position: refs/branch-heads/58@{#16}
198 | Cr-Branched-From: f31969a584bcafe9406c214a9d4c3afb49d19650-refs/heads/master@{#16937}
199 |
200 |
201 | - 56.17541.0.0
202 |
203 | commit c88b5d56ada5690ae352062e69a9f984a07d228c
204 | Author: kjellander
205 | Date: Wed Apr 5 06:42:43 2017 -0700
206 | NOTRY=true
207 | BUG=webrtc:7312
208 | Review-Url: https://codereview.webrtc.org/2741733003
209 | Cr-Commit-Position: refs/heads/master@{#17541}
210 |
211 |
212 | - 56.15101.0.0
213 |
214 | Commit: c6d5d3c3acd3f3a48e933659fd3036df3c6647d2
215 | Cr-Commit-Position: refs/branch-heads/56@{#2}
216 | Cr-Branched-From: 613152af11d6e9a4d046af3c48a7be7642dfcc68-refs/heads/master@{#15101}
217 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCAVFoundationVideoSource.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | @class AVCaptureSession;
15 | @class RTCMediaConstraints;
16 | @class RTCPeerConnectionFactory;
17 |
18 | NS_ASSUME_NONNULL_BEGIN
19 |
20 | /**
21 | * DEPRECATED Use RTCCameraVideoCapturer instead.
22 | *
23 | * RTCAVFoundationVideoSource is a video source that uses
24 | * webrtc::AVFoundationVideoCapturer. We do not currently provide a wrapper for
25 | * that capturer because cricket::VideoCapturer is not ref counted and we cannot
26 | * guarantee its lifetime. Instead, we expose its properties through the ref
27 | * counted video source interface.
28 | */
29 | RTC_EXPORT
30 | @interface RTCAVFoundationVideoSource : RTCVideoSource
31 |
32 | - (instancetype)init NS_UNAVAILABLE;
33 |
34 | /**
35 | * Calling this function will cause frames to be scaled down to the
36 | * requested resolution. Also, frames will be cropped to match the
37 | * requested aspect ratio, and frames will be dropped to match the
38 | * requested fps. The requested aspect ratio is orientation agnostic and
39 | * will be adjusted to maintain the input orientation, so it doesn't
40 | * matter if e.g. 1280x720 or 720x1280 is requested.
41 | */
42 | - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps;
43 |
44 | /** Returns whether rear-facing camera is available for use. */
45 | @property(nonatomic, readonly) BOOL canUseBackCamera;
46 |
47 | /** Switches the camera being used (either front or back). */
48 | @property(nonatomic, assign) BOOL useBackCamera;
49 |
50 | /** Returns the active capture session. */
51 | @property(nonatomic, readonly) AVCaptureSession *captureSession;
52 |
53 | @end
54 |
55 | NS_ASSUME_NONNULL_END
56 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCAudioSession.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | extern NSString * const kRTCAudioSessionErrorDomain;
19 | /** Method that requires lock was called without lock. */
20 | extern NSInteger const kRTCAudioSessionErrorLockRequired;
21 | /** Unknown configuration error occurred. */
22 | extern NSInteger const kRTCAudioSessionErrorConfiguration;
23 |
24 | @class RTCAudioSession;
25 | @class RTCAudioSessionConfiguration;
26 |
27 | // Surfaces AVAudioSession events. WebRTC will listen directly for notifications
28 | // from AVAudioSession and handle them before calling these delegate methods,
29 | // at which point applications can perform additional processing if required.
30 | RTC_EXPORT
31 | @protocol RTCAudioSessionDelegate
32 |
33 | @optional
34 | /** Called on a system notification thread when AVAudioSession starts an
35 | * interruption event.
36 | */
37 | - (void)audioSessionDidBeginInterruption:(RTCAudioSession *)session;
38 |
39 | /** Called on a system notification thread when AVAudioSession ends an
40 | * interruption event.
41 | */
42 | - (void)audioSessionDidEndInterruption:(RTCAudioSession *)session
43 | shouldResumeSession:(BOOL)shouldResumeSession;
44 |
45 | /** Called on a system notification thread when AVAudioSession changes the
46 | * route.
47 | */
48 | - (void)audioSessionDidChangeRoute:(RTCAudioSession *)session
49 | reason:(AVAudioSessionRouteChangeReason)reason
50 | previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
51 |
52 | /** Called on a system notification thread when AVAudioSession media server
53 | * terminates.
54 | */
55 | - (void)audioSessionMediaServerTerminated:(RTCAudioSession *)session;
56 |
57 | /** Called on a system notification thread when AVAudioSession media server
58 | * restarts.
59 | */
60 | - (void)audioSessionMediaServerReset:(RTCAudioSession *)session;
61 |
62 | // TODO(tkchin): Maybe handle SilenceSecondaryAudioHintNotification.
63 |
64 | - (void)audioSession:(RTCAudioSession *)session
65 | didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord;
66 |
67 | /** Called on a WebRTC thread when the audio device is notified to begin
68 | * playback or recording.
69 | */
70 | - (void)audioSessionDidStartPlayOrRecord:(RTCAudioSession *)session;
71 |
72 | /** Called on a WebRTC thread when the audio device is notified to stop
73 | * playback or recording.
74 | */
75 | - (void)audioSessionDidStopPlayOrRecord:(RTCAudioSession *)session;
76 |
77 | /** Called when the AVAudioSession output volume value changes. */
78 | - (void)audioSession:(RTCAudioSession *)audioSession
79 | didChangeOutputVolume:(float)outputVolume;
80 |
81 | /** Called when the audio device detects a playout glitch. The argument is the
82 | * number of glitches detected so far in the current audio playout session.
83 | */
84 | - (void)audioSession:(RTCAudioSession *)audioSession
85 | didDetectPlayoutGlitch:(int64_t)totalNumberOfGlitches;
86 |
87 | @end
88 |
89 | /** This is a protocol used to inform RTCAudioSession when the audio session
90 | * activation state has changed outside of RTCAudioSession. The current known use
91 | * case of this is when CallKit activates the audio session for the application
92 | */
93 | RTC_EXPORT
94 | @protocol RTCAudioSessionActivationDelegate
95 |
96 | /** Called when the audio session is activated outside of the app by iOS. */
97 | - (void)audioSessionDidActivate:(AVAudioSession *)session;
98 |
99 | /** Called when the audio session is deactivated outside of the app by iOS. */
100 | - (void)audioSessionDidDeactivate:(AVAudioSession *)session;
101 |
102 | @end
103 |
104 | /** Proxy class for AVAudioSession that adds a locking mechanism similar to
105 | * AVCaptureDevice. This is used to that interleaving configurations between
106 | * WebRTC and the application layer are avoided.
107 | *
108 | * RTCAudioSession also coordinates activation so that the audio session is
109 | * activated only once. See |setActive:error:|.
110 | */
111 | RTC_EXPORT
112 | @interface RTCAudioSession : NSObject
113 |
114 | /** Convenience property to access the AVAudioSession singleton. Callers should
115 | * not call setters on AVAudioSession directly, but other method invocations
116 | * are fine.
117 | */
118 | @property(nonatomic, readonly) AVAudioSession *session;
119 |
120 | /** Our best guess at whether the session is active based on results of calls to
121 | * AVAudioSession.
122 | */
123 | @property(nonatomic, readonly) BOOL isActive;
124 | /** Whether RTCAudioSession is currently locked for configuration. */
125 | @property(nonatomic, readonly) BOOL isLocked;
126 |
127 | /** If YES, WebRTC will not initialize the audio unit automatically when an
128 | * audio track is ready for playout or recording. Instead, applications should
129 | * call setIsAudioEnabled. If NO, WebRTC will initialize the audio unit
130 | * as soon as an audio track is ready for playout or recording.
131 | */
132 | @property(nonatomic, assign) BOOL useManualAudio;
133 |
134 | /** This property is only effective if useManualAudio is YES.
135 | * Represents permission for WebRTC to initialize the VoIP audio unit.
136 | * When set to NO, if the VoIP audio unit used by WebRTC is active, it will be
137 | * stopped and uninitialized. This will stop incoming and outgoing audio.
138 | * When set to YES, WebRTC will initialize and start the audio unit when it is
139 | * needed (e.g. due to establishing an audio connection).
140 | * This property was introduced to work around an issue where if an AVPlayer is
141 | * playing audio while the VoIP audio unit is initialized, its audio would be
142 | * either cut off completely or played at a reduced volume. By preventing
143 | * the audio unit from being initialized until after the audio has completed,
144 | * we are able to prevent the abrupt cutoff.
145 | */
146 | @property(nonatomic, assign) BOOL isAudioEnabled;
147 |
148 | // Proxy properties.
149 | @property(readonly) NSString *category;
150 | @property(readonly) AVAudioSessionCategoryOptions categoryOptions;
151 | @property(readonly) NSString *mode;
152 | @property(readonly) BOOL secondaryAudioShouldBeSilencedHint;
153 | @property(readonly) AVAudioSessionRouteDescription *currentRoute;
154 | @property(readonly) NSInteger maximumInputNumberOfChannels;
155 | @property(readonly) NSInteger maximumOutputNumberOfChannels;
156 | @property(readonly) float inputGain;
157 | @property(readonly) BOOL inputGainSettable;
158 | @property(readonly) BOOL inputAvailable;
159 | @property(readonly, nullable)
160 | NSArray * inputDataSources;
161 | @property(readonly, nullable)
162 | AVAudioSessionDataSourceDescription *inputDataSource;
163 | @property(readonly, nullable)
164 | NSArray * outputDataSources;
165 | @property(readonly, nullable)
166 | AVAudioSessionDataSourceDescription *outputDataSource;
167 | @property(readonly) double sampleRate;
168 | @property(readonly) double preferredSampleRate;
169 | @property(readonly) NSInteger inputNumberOfChannels;
170 | @property(readonly) NSInteger outputNumberOfChannels;
171 | @property(readonly) float outputVolume;
172 | @property(readonly) NSTimeInterval inputLatency;
173 | @property(readonly) NSTimeInterval outputLatency;
174 | @property(readonly) NSTimeInterval IOBufferDuration;
175 | @property(readonly) NSTimeInterval preferredIOBufferDuration;
176 |
177 | /** Default constructor. */
178 | + (instancetype)sharedInstance;
179 | - (instancetype)init NS_UNAVAILABLE;
180 |
181 | /** Adds a delegate, which is held weakly. */
182 | - (void)addDelegate:(id)delegate;
183 | /** Removes an added delegate. */
184 | - (void)removeDelegate:(id)delegate;
185 |
186 | /** Request exclusive access to the audio session for configuration. This call
187 | * will block if the lock is held by another object.
188 | */
189 | - (void)lockForConfiguration;
190 | /** Relinquishes exclusive access to the audio session. */
191 | - (void)unlockForConfiguration;
192 |
193 | /** If |active|, activates the audio session if it isn't already active.
194 | * Successful calls must be balanced with a setActive:NO when activation is no
195 | * longer required. If not |active|, deactivates the audio session if one is
196 | * active and this is the last balanced call. When deactivating, the
197 | * AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation option is passed to
198 | * AVAudioSession.
199 | */
200 | - (BOOL)setActive:(BOOL)active
201 | error:(NSError **)outError;
202 |
203 | // The following methods are proxies for the associated methods on
204 | // AVAudioSession. |lockForConfiguration| must be called before using them
205 | // otherwise they will fail with kRTCAudioSessionErrorLockRequired.
206 |
207 | - (BOOL)setCategory:(NSString *)category
208 | withOptions:(AVAudioSessionCategoryOptions)options
209 | error:(NSError **)outError;
210 | - (BOOL)setMode:(NSString *)mode error:(NSError **)outError;
211 | - (BOOL)setInputGain:(float)gain error:(NSError **)outError;
212 | - (BOOL)setPreferredSampleRate:(double)sampleRate error:(NSError **)outError;
213 | - (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration
214 | error:(NSError **)outError;
215 | - (BOOL)setPreferredInputNumberOfChannels:(NSInteger)count
216 | error:(NSError **)outError;
217 | - (BOOL)setPreferredOutputNumberOfChannels:(NSInteger)count
218 | error:(NSError **)outError;
219 | - (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride
220 | error:(NSError **)outError;
221 | - (BOOL)setPreferredInput:(AVAudioSessionPortDescription *)inPort
222 | error:(NSError **)outError;
223 | - (BOOL)setInputDataSource:(AVAudioSessionDataSourceDescription *)dataSource
224 | error:(NSError **)outError;
225 | - (BOOL)setOutputDataSource:(AVAudioSessionDataSourceDescription *)dataSource
226 | error:(NSError **)outError;
227 | @end
228 |
229 | @interface RTCAudioSession (Configuration)
230 |
231 | /** Applies the configuration to the current session. Attempts to set all
232 | * properties even if previous ones fail. Only the last error will be
233 | * returned.
234 | * |lockForConfiguration| must be called first.
235 | */
236 | - (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration
237 | error:(NSError **)outError;
238 |
239 | /** Convenience method that calls both setConfiguration and setActive.
240 | * |lockForConfiguration| must be called first.
241 | */
242 | - (BOOL)setConfiguration:(RTCAudioSessionConfiguration *)configuration
243 | active:(BOOL)active
244 | error:(NSError **)outError;
245 |
246 | @end
247 |
248 | NS_ASSUME_NONNULL_END
249 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import "WebRTC/RTCMacros.h"
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | extern const int kRTCAudioSessionPreferredNumberOfChannels;
19 | extern const double kRTCAudioSessionHighPerformanceSampleRate;
20 | extern const double kRTCAudioSessionLowComplexitySampleRate;
21 | extern const double kRTCAudioSessionHighPerformanceIOBufferDuration;
22 | extern const double kRTCAudioSessionLowComplexityIOBufferDuration;
23 |
24 | // Struct to hold configuration values.
25 | RTC_EXPORT
26 | @interface RTCAudioSessionConfiguration : NSObject
27 |
28 | @property(nonatomic, strong) NSString *category;
29 | @property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions;
30 | @property(nonatomic, strong) NSString *mode;
31 | @property(nonatomic, assign) double sampleRate;
32 | @property(nonatomic, assign) NSTimeInterval ioBufferDuration;
33 | @property(nonatomic, assign) NSInteger inputNumberOfChannels;
34 | @property(nonatomic, assign) NSInteger outputNumberOfChannels;
35 |
36 | /** Initializes configuration to defaults. */
37 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
38 |
39 | /** Returns the current configuration of the audio session. */
40 | + (instancetype)currentConfiguration;
41 | /** Returns the configuration that WebRTC needs. */
42 | + (instancetype)webRTCConfiguration;
43 | /** Provide a way to override the default configuration. */
44 | + (void)setWebRTCConfiguration:(RTCAudioSessionConfiguration *)configuration;
45 |
46 | @end
47 |
48 | NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCAudioSource.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | RTC_EXPORT
19 | @interface RTCAudioSource : 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
33 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCAudioTrack.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @class RTCAudioSource;
17 |
18 | RTC_EXPORT
19 | @interface RTCAudioTrack : RTCMediaStreamTrack
20 |
21 | - (instancetype)init NS_UNAVAILABLE;
22 |
23 | /** The audio source for this audio track. */
24 | @property(nonatomic, readonly) RTCAudioSource *source;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCCameraPreviewView.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import
15 |
16 | @class AVCaptureSession;
17 | @class RTCAVFoundationVideoSource;
18 |
19 | /** RTCCameraPreviewView is a view that renders local video from an
20 | * AVCaptureSession.
21 | */
22 | RTC_EXPORT
23 | @interface RTCCameraPreviewView : UIView
24 |
25 | /** The capture session being rendered in the view. Capture session
26 | * is assigned to AVCaptureVideoPreviewLayer async in the same
27 | * queue that the AVCaptureSession is started/stopped.
28 | */
29 | @property(nonatomic, strong) AVCaptureSession *captureSession;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCCameraVideoCapturer.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import
15 | #import
16 |
17 | NS_ASSUME_NONNULL_BEGIN
18 |
19 | RTC_EXPORT
20 | // Camera capture that implements RTCVideoCapturer. Delivers frames to a RTCVideoCapturerDelegate
21 | // (usually RTCVideoSource).
22 | @interface RTCCameraVideoCapturer : 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 *)captureDevices;
29 | // Returns list of formats that are supported by this class for this device.
30 | + (NSArray *)supportedFormatsForDevice:(AVCaptureDevice *)device;
31 |
32 | // Returns the most efficient supported output pixel format for this capturer.
33 | - (FourCharCode)preferredOutputPixelFormat;
34 |
35 | // Starts the capture session asynchronously and notifies callback on completion.
36 | // The device will capture video in the format given in the `format` parameter. If the pixel format
37 | // in `format` is supported by the WebRTC pipeline, the same pixel format will be used for the
38 | // output. Otherwise, the format returned by `preferredOutputPixelFormat` will be used.
39 | - (void)startCaptureWithDevice:(AVCaptureDevice *)device
40 | format:(AVCaptureDeviceFormat *)format
41 | fps:(NSInteger)fps
42 | completionHandler:(nullable void (^)(NSError *))completionHandler;
43 | // Stops the capture session asynchronously and notifies callback on completion.
44 | - (void)stopCaptureWithCompletionHandler:(nullable void (^)())completionHandler;
45 |
46 | // Starts the capture session asynchronously.
47 | - (void)startCaptureWithDevice:(AVCaptureDevice *)device
48 | format:(AVCaptureDeviceFormat *)format
49 | fps:(NSInteger)fps;
50 | // Stops the capture session asynchronously.
51 | - (void)stopCapture;
52 |
53 | @end
54 |
55 | NS_ASSUME_NONNULL_END
56 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCConfiguration.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | @class RTCIceServer;
16 | @class RTCIntervalRange;
17 |
18 | /**
19 | * Represents the ice transport policy. This exposes the same states in C++,
20 | * which include one more state than what exists in the W3C spec.
21 | */
22 | typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) {
23 | RTCIceTransportPolicyNone,
24 | RTCIceTransportPolicyRelay,
25 | RTCIceTransportPolicyNoHost,
26 | RTCIceTransportPolicyAll
27 | };
28 |
29 | /** Represents the bundle policy. */
30 | typedef NS_ENUM(NSInteger, RTCBundlePolicy) {
31 | RTCBundlePolicyBalanced,
32 | RTCBundlePolicyMaxCompat,
33 | RTCBundlePolicyMaxBundle
34 | };
35 |
36 | /** Represents the rtcp mux policy. */
37 | typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) {
38 | RTCRtcpMuxPolicyNegotiate,
39 | RTCRtcpMuxPolicyRequire
40 | };
41 |
42 | /** Represents the tcp candidate policy. */
43 | typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) {
44 | RTCTcpCandidatePolicyEnabled,
45 | RTCTcpCandidatePolicyDisabled
46 | };
47 |
48 | /** Represents the candidate network policy. */
49 | typedef NS_ENUM(NSInteger, RTCCandidateNetworkPolicy) {
50 | RTCCandidateNetworkPolicyAll,
51 | RTCCandidateNetworkPolicyLowCost
52 | };
53 |
54 | /** Represents the continual gathering policy. */
55 | typedef NS_ENUM(NSInteger, RTCContinualGatheringPolicy) {
56 | RTCContinualGatheringPolicyGatherOnce,
57 | RTCContinualGatheringPolicyGatherContinually
58 | };
59 |
60 | /** Represents the encryption key type. */
61 | typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) {
62 | RTCEncryptionKeyTypeRSA,
63 | RTCEncryptionKeyTypeECDSA,
64 | };
65 |
66 | NS_ASSUME_NONNULL_BEGIN
67 |
68 | RTC_EXPORT
69 | @interface RTCConfiguration : NSObject
70 |
71 | /** An array of Ice Servers available to be used by ICE. */
72 | @property(nonatomic, copy) NSArray *iceServers;
73 |
74 | /** Which candidates the ICE agent is allowed to use. The W3C calls it
75 | * |iceTransportPolicy|, while in C++ it is called |type|. */
76 | @property(nonatomic, assign) RTCIceTransportPolicy iceTransportPolicy;
77 |
78 | /** The media-bundling policy to use when gathering ICE candidates. */
79 | @property(nonatomic, assign) RTCBundlePolicy bundlePolicy;
80 |
81 | /** The rtcp-mux policy to use when gathering ICE candidates. */
82 | @property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy;
83 | @property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy;
84 | @property(nonatomic, assign) RTCCandidateNetworkPolicy candidateNetworkPolicy;
85 | @property(nonatomic, assign)
86 | RTCContinualGatheringPolicy continualGatheringPolicy;
87 |
88 | /** By default, the PeerConnection will use a limited number of IPv6 network
89 | * interfaces, in order to avoid too many ICE candidate pairs being created
90 | * and delaying ICE completion.
91 | *
92 | * Can be set to INT_MAX to effectively disable the limit.
93 | */
94 | @property(nonatomic, assign) int maxIPv6Networks;
95 |
96 | @property(nonatomic, assign) int audioJitterBufferMaxPackets;
97 | @property(nonatomic, assign) BOOL audioJitterBufferFastAccelerate;
98 | @property(nonatomic, assign) int iceConnectionReceivingTimeout;
99 | @property(nonatomic, assign) int iceBackupCandidatePairPingInterval;
100 |
101 | /** Key type used to generate SSL identity. Default is ECDSA. */
102 | @property(nonatomic, assign) RTCEncryptionKeyType keyType;
103 |
104 | /** ICE candidate pool size as defined in JSEP. Default is 0. */
105 | @property(nonatomic, assign) int iceCandidatePoolSize;
106 |
107 | /** Prune turn ports on the same network to the same turn server.
108 | * Default is NO.
109 | */
110 | @property(nonatomic, assign) BOOL shouldPruneTurnPorts;
111 |
112 | /** If set to YES, this means the ICE transport should presume TURN-to-TURN
113 | * candidate pairs will succeed, even before a binding response is received.
114 | */
115 | @property(nonatomic, assign) BOOL shouldPresumeWritableWhenFullyRelayed;
116 |
117 | /** If set to non-nil, controls the minimal interval between consecutive ICE
118 | * check packets.
119 | */
120 | @property(nonatomic, copy, nullable) NSNumber *iceCheckMinInterval;
121 |
122 | /** ICE Periodic Regathering
123 | * If set, WebRTC will periodically create and propose candidates without
124 | * starting a new ICE generation. The regathering happens continuously with
125 | * interval specified in milliseconds by the uniform distribution [a, b].
126 | */
127 | @property(nonatomic, strong, nullable) RTCIntervalRange *iceRegatherIntervalRange;
128 |
129 | - (instancetype)init;
130 |
131 | @end
132 |
133 | NS_ASSUME_NONNULL_END
134 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCDataChannel.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | RTC_EXPORT
19 | @interface RTCDataBuffer : NSObject
20 |
21 | /** NSData representation of the underlying buffer. */
22 | @property(nonatomic, readonly) NSData *data;
23 |
24 | /** Indicates whether |data| contains UTF-8 or binary data. */
25 | @property(nonatomic, readonly) BOOL isBinary;
26 |
27 | - (instancetype)init NS_UNAVAILABLE;
28 |
29 | /**
30 | * Initialize an RTCDataBuffer from NSData. |isBinary| indicates whether |data|
31 | * contains UTF-8 or binary data.
32 | */
33 | - (instancetype)initWithData:(NSData *)data isBinary:(BOOL)isBinary;
34 |
35 | @end
36 |
37 |
38 | @class RTCDataChannel;
39 | RTC_EXPORT
40 | @protocol RTCDataChannelDelegate
41 |
42 | /** The data channel state changed. */
43 | - (void)dataChannelDidChangeState:(RTCDataChannel *)dataChannel;
44 |
45 | /** The data channel successfully received a data buffer. */
46 | - (void)dataChannel:(RTCDataChannel *)dataChannel
47 | didReceiveMessageWithBuffer:(RTCDataBuffer *)buffer;
48 |
49 | @optional
50 | /** The data channel's |bufferedAmount| changed. */
51 | - (void)dataChannel:(RTCDataChannel *)dataChannel
52 | didChangeBufferedAmount:(uint64_t)amount;
53 |
54 | @end
55 |
56 |
57 | /** Represents the state of the data channel. */
58 | typedef NS_ENUM(NSInteger, RTCDataChannelState) {
59 | RTCDataChannelStateConnecting,
60 | RTCDataChannelStateOpen,
61 | RTCDataChannelStateClosing,
62 | RTCDataChannelStateClosed,
63 | };
64 |
65 | RTC_EXPORT
66 | @interface RTCDataChannel : NSObject
67 |
68 | /**
69 | * A label that can be used to distinguish this data channel from other data
70 | * channel objects.
71 | */
72 | @property(nonatomic, readonly) NSString *label;
73 |
74 | /** Whether the data channel can send messages in unreliable mode. */
75 | @property(nonatomic, readonly) BOOL isReliable DEPRECATED_ATTRIBUTE;
76 |
77 | /** Returns whether this data channel is ordered or not. */
78 | @property(nonatomic, readonly) BOOL isOrdered;
79 |
80 | /** Deprecated. Use maxPacketLifeTime. */
81 | @property(nonatomic, readonly) NSUInteger maxRetransmitTime
82 | DEPRECATED_ATTRIBUTE;
83 |
84 | /**
85 | * The length of the time window (in milliseconds) during which transmissions
86 | * and retransmissions may occur in unreliable mode.
87 | */
88 | @property(nonatomic, readonly) uint16_t maxPacketLifeTime;
89 |
90 | /**
91 | * The maximum number of retransmissions that are attempted in unreliable mode.
92 | */
93 | @property(nonatomic, readonly) uint16_t maxRetransmits;
94 |
95 | /**
96 | * The name of the sub-protocol used with this data channel, if any. Otherwise
97 | * this returns an empty string.
98 | */
99 | @property(nonatomic, readonly) NSString *protocol;
100 |
101 | /**
102 | * Returns whether this data channel was negotiated by the application or not.
103 | */
104 | @property(nonatomic, readonly) BOOL isNegotiated;
105 |
106 | /** Deprecated. Use channelId. */
107 | @property(nonatomic, readonly) NSInteger streamId DEPRECATED_ATTRIBUTE;
108 |
109 | /** The identifier for this data channel. */
110 | @property(nonatomic, readonly) int channelId;
111 |
112 | /** The state of the data channel. */
113 | @property(nonatomic, readonly) RTCDataChannelState readyState;
114 |
115 | /**
116 | * The number of bytes of application data that have been queued using
117 | * |sendData:| but that have not yet been transmitted to the network.
118 | */
119 | @property(nonatomic, readonly) uint64_t bufferedAmount;
120 |
121 | /** The delegate for this data channel. */
122 | @property(nonatomic, weak) id delegate;
123 |
124 | - (instancetype)init NS_UNAVAILABLE;
125 |
126 | /** Closes the data channel. */
127 | - (void)close;
128 |
129 | /** Attempt to send |data| on this data channel's underlying data transport. */
130 | - (BOOL)sendData:(RTCDataBuffer *)data;
131 |
132 | @end
133 |
134 | NS_ASSUME_NONNULL_END
135 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCDataChannelConfiguration.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | RTC_EXPORT
19 | @interface RTCDataChannelConfiguration : NSObject
20 |
21 | /** Set to YES if ordered delivery is required. */
22 | @property(nonatomic, assign) BOOL isOrdered;
23 |
24 | /** Deprecated. Use maxPacketLifeTime. */
25 | @property(nonatomic, assign) NSInteger maxRetransmitTimeMs DEPRECATED_ATTRIBUTE;
26 |
27 | /**
28 | * Max period in milliseconds in which retransmissions will be sent. After this
29 | * time, no more retransmissions will be sent. -1 if unset.
30 | */
31 | @property(nonatomic, assign) int maxPacketLifeTime;
32 |
33 | /** The max number of retransmissions. -1 if unset. */
34 | @property(nonatomic, assign) int maxRetransmits;
35 |
36 | /** Set to YES if the channel has been externally negotiated and we do not send
37 | * an in-band signalling in the form of an "open" message.
38 | */
39 | @property(nonatomic, assign) BOOL isNegotiated;
40 |
41 | /** Deprecated. Use channelId. */
42 | @property(nonatomic, assign) int streamId DEPRECATED_ATTRIBUTE;
43 |
44 | /** The id of the data channel. */
45 | @property(nonatomic, assign) int channelId;
46 |
47 | /** Set by the application and opaque to the WebRTC implementation. */
48 | @property(nonatomic) NSString *protocol;
49 |
50 | @end
51 |
52 | NS_ASSUME_NONNULL_END
53 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCDispatcher.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | typedef NS_ENUM(NSInteger, RTCDispatcherQueueType) {
16 | // Main dispatcher queue.
17 | RTCDispatcherTypeMain,
18 | // Used for starting/stopping AVCaptureSession, and assigning
19 | // capture session to AVCaptureVideoPreviewLayer.
20 | RTCDispatcherTypeCaptureSession,
21 | // Used for operations on AVAudioSession.
22 | RTCDispatcherTypeAudioSession,
23 | };
24 |
25 | /** Dispatcher that asynchronously dispatches blocks to a specific
26 | * shared dispatch queue.
27 | */
28 | RTC_EXPORT
29 | @interface RTCDispatcher : NSObject
30 |
31 | - (instancetype)init NS_UNAVAILABLE;
32 |
33 | /** Dispatch the block asynchronously on the queue for dispatchType.
34 | * @param dispatchType The queue type to dispatch on.
35 | * @param block The block to dispatch asynchronously.
36 | */
37 | + (void)dispatchAsyncOnType:(RTCDispatcherQueueType)dispatchType
38 | block:(dispatch_block_t)block;
39 |
40 | /** Returns YES if run on queue for the dispatchType otherwise NO.
41 | * Useful for asserting that a method is run on a correct queue.
42 | */
43 | + (BOOL)isOnQueueForType:(RTCDispatcherQueueType)dispatchType;
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCDtmfSender.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | RTC_EXPORT
18 | @protocol RTCDtmfSender
19 |
20 | /**
21 | * Returns true if this RTCDtmfSender is capable of sending DTMF. Otherwise
22 | * returns false. To be able to send DTMF, the associated RTCRtpSender must be
23 | * able to send packets, and a "telephone-event" codec must be negotiated.
24 | */
25 | @property(nonatomic, readonly) BOOL canInsertDtmf;
26 |
27 | /**
28 | * Queues a task that sends the DTMF tones. The tones parameter is treated
29 | * as a series of characters. The characters 0 through 9, A through D, #, and *
30 | * generate the associated DTMF tones. The characters a to d are equivalent
31 | * to A to D. The character ',' indicates a delay of 2 seconds before
32 | * processing the next character in the tones parameter.
33 | *
34 | * Unrecognized characters are ignored.
35 | *
36 | * @param duration The parameter indicates the duration to use for each
37 | * character passed in the tones parameter. The duration cannot be more
38 | * than 6000 or less than 70 ms.
39 | *
40 | * @param interToneGap The parameter indicates the gap between tones.
41 | * This parameter must be at least 50 ms but should be as short as
42 | * possible.
43 | *
44 | * If InsertDtmf is called on the same object while an existing task for this
45 | * object to generate DTMF is still running, the previous task is canceled.
46 | * Returns true on success and false on failure.
47 | */
48 | - (BOOL)insertDtmf:(nonnull NSString *)tones
49 | duration:(NSTimeInterval)duration
50 | interToneGap:(NSTimeInterval)interToneGap;
51 |
52 | /** The tones remaining to be played out */
53 | - (nonnull NSString *)remainingTones;
54 |
55 | /**
56 | * The current tone duration value. This value will be the value last set via the
57 | * insertDtmf method, or the default value of 100 ms if insertDtmf was never called.
58 | */
59 | - (NSTimeInterval)duration;
60 |
61 | /**
62 | * The current value of the between-tone gap. This value will be the value last set
63 | * via the insertDtmf() method, or the default value of 50 ms if insertDtmf() was never
64 | * called.
65 | */
66 | - (NSTimeInterval)interToneGap;
67 |
68 | @end
69 |
70 | NS_ASSUME_NONNULL_END
71 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCEAGLVideoView.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import
15 | #import
16 | #import
17 |
18 | NS_ASSUME_NONNULL_BEGIN
19 |
20 | @class RTCEAGLVideoView;
21 | RTC_EXPORT
22 | @protocol RTCEAGLVideoViewDelegate
23 |
24 | - (void)videoView:(RTCEAGLVideoView *)videoView didChangeVideoSize:(CGSize)size;
25 |
26 | @end
27 |
28 | /**
29 | * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames in its
30 | * bounds using OpenGLES 2.0 or OpenGLES 3.0.
31 | */
32 | RTC_EXPORT
33 | @interface RTCEAGLVideoView : UIView
34 |
35 | @property(nonatomic, weak) id delegate;
36 |
37 | - (instancetype)initWithFrame:(CGRect)frame
38 | shader:(id)shader NS_DESIGNATED_INITIALIZER;
39 |
40 | - (instancetype)initWithCoder:(NSCoder *)aDecoder
41 | shader:(id)shader NS_DESIGNATED_INITIALIZER;
42 |
43 | @end
44 |
45 | NS_ASSUME_NONNULL_END
46 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCFieldTrials.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | /** The only valid value for the following if set is kRTCFieldTrialEnabledValue. */
16 | RTC_EXTERN NSString * const kRTCFieldTrialAudioSendSideBweKey;
17 | RTC_EXTERN NSString * const kRTCFieldTrialSendSideBweWithOverheadKey;
18 | RTC_EXTERN NSString * const kRTCFieldTrialFlexFec03AdvertisedKey;
19 | RTC_EXTERN NSString * const kRTCFieldTrialFlexFec03Key;
20 | RTC_EXTERN NSString * const kRTCFieldTrialImprovedBitrateEstimateKey;
21 | RTC_EXTERN NSString * const kRTCFieldTrialH264HighProfileKey;
22 | RTC_EXTERN NSString * const kRTCFieldTrialMinimizeResamplingOnMobileKey;
23 |
24 | /** The valid value for field trials above. */
25 | RTC_EXTERN NSString * const kRTCFieldTrialEnabledValue;
26 |
27 | /** Use a string returned by RTCFieldTrialMedianSlopeFilterValue as the value. */
28 | RTC_EXTERN NSString * const kRTCFieldTrialMedianSlopeFilterKey;
29 | RTC_EXTERN NSString *RTCFieldTrialMedianSlopeFilterValue(
30 | size_t windowSize, double thresholdGain);
31 |
32 | /** Use a string returned by RTCFieldTrialTrendlineFilterValue as the value. */
33 | RTC_EXTERN NSString * const kRTCFieldTrialTrendlineFilterKey;
34 | /** Returns a valid value for kRTCFieldTrialTrendlineFilterKey. */
35 | RTC_EXTERN NSString *RTCFieldTrialTrendlineFilterValue(
36 | size_t windowSize, double smoothingCoeff, double thresholdGain);
37 |
38 | /** Initialize field trials using a dictionary mapping field trial keys to their values. See above
39 | * for valid keys and values.
40 | * Must be called before any other call into WebRTC. See:
41 | * webrtc/system_wrappers/include/field_trial_default.h
42 | */
43 | RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials);
44 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCFileLogger.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | typedef NS_ENUM(NSUInteger, RTCFileLoggerSeverity) {
16 | RTCFileLoggerSeverityVerbose,
17 | RTCFileLoggerSeverityInfo,
18 | RTCFileLoggerSeverityWarning,
19 | RTCFileLoggerSeverityError
20 | };
21 |
22 | typedef NS_ENUM(NSUInteger, RTCFileLoggerRotationType) {
23 | RTCFileLoggerTypeCall,
24 | RTCFileLoggerTypeApp,
25 | };
26 |
27 | NS_ASSUME_NONNULL_BEGIN
28 |
29 | // This class intercepts WebRTC logs and saves them to a file. The file size
30 | // will not exceed the given maximum bytesize. When the maximum bytesize is
31 | // reached, logs are rotated according to the rotationType specified.
32 | // For kRTCFileLoggerTypeCall, logs from the beginning and the end
33 | // are preserved while the middle section is overwritten instead.
34 | // For kRTCFileLoggerTypeApp, the oldest log is overwritten.
35 | // This class is not threadsafe.
36 | RTC_EXPORT
37 | @interface RTCFileLogger : NSObject
38 |
39 | // The severity level to capture. The default is kRTCFileLoggerSeverityInfo.
40 | @property(nonatomic, assign) RTCFileLoggerSeverity severity;
41 |
42 | // The rotation type for this file logger. The default is
43 | // kRTCFileLoggerTypeCall.
44 | @property(nonatomic, readonly) RTCFileLoggerRotationType rotationType;
45 |
46 | // Disables buffering disk writes. Should be set before |start|. Buffering
47 | // is enabled by default for performance.
48 | @property(nonatomic, assign) BOOL shouldDisableBuffering;
49 |
50 | // Default constructor provides default settings for dir path, file size and
51 | // rotation type.
52 | - (instancetype)init;
53 |
54 | // Create file logger with default rotation type.
55 | - (instancetype)initWithDirPath:(NSString *)dirPath
56 | maxFileSize:(NSUInteger)maxFileSize;
57 |
58 | - (instancetype)initWithDirPath:(NSString *)dirPath
59 | maxFileSize:(NSUInteger)maxFileSize
60 | rotationType:(RTCFileLoggerRotationType)rotationType
61 | NS_DESIGNATED_INITIALIZER;
62 |
63 | // Starts writing WebRTC logs to disk if not already started. Overwrites any
64 | // existing file(s).
65 | - (void)start;
66 |
67 | // Stops writing WebRTC logs to disk. This method is also called on dealloc.
68 | - (void)stop;
69 |
70 | // Returns the current contents of the logs, or nil if start has been called
71 | // without a stop.
72 | - (nullable NSData *)logData;
73 |
74 | @end
75 |
76 | NS_ASSUME_NONNULL_END
77 |
78 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCFileVideoCapturer.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | /**
17 | * Error passing block.
18 | */
19 | typedef void (^RTCFileVideoCapturerErrorBlock)(NSError *error);
20 |
21 | /**
22 | * Captures buffers from bundled video file.
23 | *
24 | * See @c RTCVideoCapturer for more info on capturers.
25 | */
26 | RTC_EXPORT
27 |
28 | NS_CLASS_AVAILABLE_IOS(10)
29 | @interface RTCFileVideoCapturer : RTCVideoCapturer
30 |
31 | /**
32 | * Starts asynchronous capture of frames from video file.
33 | *
34 | * Capturing is not started if error occurs. Underlying error will be
35 | * relayed in the errorBlock if one is provided.
36 | * Successfully captured video frames will be passed to the delegate.
37 | *
38 | * @param nameOfFile The name of the bundled video file to be read.
39 | * @errorBlock block to be executed upon error.
40 | */
41 | - (void)startCapturingFromFileNamed:(NSString *)nameOfFile
42 | onError:(__nullable RTCFileVideoCapturerErrorBlock)errorBlock;
43 |
44 | /**
45 | * Immediately stops capture.
46 | */
47 | - (void)stopCapture;
48 | @end
49 |
50 | NS_ASSUME_NONNULL_END
51 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCIceCandidate.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | RTC_EXPORT
18 | @interface RTCIceCandidate : NSObject
19 |
20 | /**
21 | * If present, the identifier of the "media stream identification" for the media
22 | * component this candidate is associated with.
23 | */
24 | @property(nonatomic, readonly, nullable) NSString *sdpMid;
25 |
26 | /**
27 | * The index (starting at zero) of the media description this candidate is
28 | * associated with in the SDP.
29 | */
30 | @property(nonatomic, readonly) int sdpMLineIndex;
31 |
32 | /** The SDP string for this candidate. */
33 | @property(nonatomic, readonly) NSString *sdp;
34 |
35 | /** The URL of the ICE server which this candidate is gathered from. */
36 | @property(nonatomic, readonly, nullable) NSString *serverUrl;
37 |
38 | - (instancetype)init NS_UNAVAILABLE;
39 |
40 | /**
41 | * Initialize an RTCIceCandidate from SDP.
42 | */
43 | - (instancetype)initWithSdp:(NSString *)sdp
44 | sdpMLineIndex:(int)sdpMLineIndex
45 | sdpMid:(nullable NSString *)sdpMid
46 | NS_DESIGNATED_INITIALIZER;
47 |
48 | @end
49 |
50 | NS_ASSUME_NONNULL_END
51 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCIceServer.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | typedef NS_ENUM(NSUInteger, RTCTlsCertPolicy) {
16 | RTCTlsCertPolicySecure,
17 | RTCTlsCertPolicyInsecureNoCheck
18 | };
19 |
20 | NS_ASSUME_NONNULL_BEGIN
21 |
22 | RTC_EXPORT
23 | @interface RTCIceServer : NSObject
24 |
25 | /** URI(s) for this server represented as NSStrings. */
26 | @property(nonatomic, readonly) NSArray *urlStrings;
27 |
28 | /** Username to use if this RTCIceServer object is a TURN server. */
29 | @property(nonatomic, readonly, nullable) NSString *username;
30 |
31 | /** Credential to use if this RTCIceServer object is a TURN server. */
32 | @property(nonatomic, readonly, nullable) NSString *credential;
33 |
34 | /**
35 | * TLS certificate policy to use if this RTCIceServer object is a TURN server.
36 | */
37 | @property(nonatomic, readonly) RTCTlsCertPolicy tlsCertPolicy;
38 |
39 | /**
40 | If the URIs in |urls| only contain IP addresses, this field can be used
41 | to indicate the hostname, which may be necessary for TLS (using the SNI
42 | extension). If |urls| itself contains the hostname, this isn't necessary.
43 | */
44 | @property(nonatomic, readonly, nullable) NSString *hostname;
45 |
46 | /** List of protocols to be used in the TLS ALPN extension. */
47 | @property(nonatomic, readonly) NSArray *tlsAlpnProtocols;
48 |
49 | /**
50 | List elliptic curves to be used in the TLS elliptic curves extension.
51 | Only curve names supported by OpenSSL should be used (eg. "P-256","X25519").
52 | */
53 | @property(nonatomic, readonly) NSArray *tlsEllipticCurves;
54 |
55 | - (nonnull instancetype)init NS_UNAVAILABLE;
56 |
57 | /** Convenience initializer for a server with no authentication (e.g. STUN). */
58 | - (instancetype)initWithURLStrings:(NSArray *)urlStrings;
59 |
60 | /**
61 | * Initialize an RTCIceServer with its associated URLs, optional username,
62 | * optional credential, and credentialType.
63 | */
64 | - (instancetype)initWithURLStrings:(NSArray *)urlStrings
65 | username:(nullable NSString *)username
66 | credential:(nullable NSString *)credential;
67 |
68 | /**
69 | * Initialize an RTCIceServer with its associated URLs, optional username,
70 | * optional credential, and TLS cert policy.
71 | */
72 | - (instancetype)initWithURLStrings:(NSArray *)urlStrings
73 | username:(nullable NSString *)username
74 | credential:(nullable NSString *)credential
75 | tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy;
76 |
77 | /**
78 | * Initialize an RTCIceServer with its associated URLs, optional username,
79 | * optional credential, TLS cert policy and hostname.
80 | */
81 | - (instancetype)initWithURLStrings:(NSArray *)urlStrings
82 | username:(nullable NSString *)username
83 | credential:(nullable NSString *)credential
84 | tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy
85 | hostname:(nullable NSString *)hostname;
86 |
87 | /**
88 | * Initialize an RTCIceServer with its associated URLs, optional username,
89 | * optional credential, TLS cert policy, hostname and ALPN protocols.
90 | */
91 | - (instancetype)initWithURLStrings:(NSArray *)urlStrings
92 | username:(nullable NSString *)username
93 | credential:(nullable NSString *)credential
94 | tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy
95 | hostname:(nullable NSString *)hostname
96 | tlsAlpnProtocols:(NSArray *)tlsAlpnProtocols;
97 |
98 | /**
99 | * Initialize an RTCIceServer with its associated URLs, optional username,
100 | * optional credential, TLS cert policy, hostname, ALPN protocols and
101 | * elliptic curves.
102 | */
103 | - (instancetype)initWithURLStrings:(NSArray *)urlStrings
104 | username:(nullable NSString *)username
105 | credential:(nullable NSString *)credential
106 | tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy
107 | hostname:(nullable NSString *)hostname
108 | tlsAlpnProtocols:(nullable NSArray *)tlsAlpnProtocols
109 | tlsEllipticCurves:(nullable NSArray *)tlsEllipticCurves
110 | NS_DESIGNATED_INITIALIZER;
111 |
112 | @end
113 |
114 | NS_ASSUME_NONNULL_END
115 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCIntervalRange.h:
--------------------------------------------------------------------------------
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
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface RTCIntervalRange : NSObject
16 |
17 | @property(nonatomic, readonly) NSInteger min;
18 | @property(nonatomic, readonly) NSInteger max;
19 |
20 | - (instancetype)init;
21 | - (instancetype)initWithMin:(NSInteger)min
22 | max:(NSInteger)max
23 | NS_DESIGNATED_INITIALIZER;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
29 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCLegacyStatsReport.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | /** This does not currently conform to the spec. */
18 | RTC_EXPORT
19 | @interface RTCLegacyStatsReport : NSObject
20 |
21 | /** Time since 1970-01-01T00:00:00Z in milliseconds. */
22 | @property(nonatomic, readonly) CFTimeInterval timestamp;
23 |
24 | /** The type of stats held by this object. */
25 | @property(nonatomic, readonly) NSString *type;
26 |
27 | /** The identifier for this object. */
28 | @property(nonatomic, readonly) NSString *reportId;
29 |
30 | /** A dictionary holding the actual stats. */
31 | @property(nonatomic, readonly) NSDictionary *values;
32 |
33 | - (instancetype)init NS_UNAVAILABLE;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCLogging.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | // Subset of rtc::LoggingSeverity.
16 | typedef NS_ENUM(NSInteger, RTCLoggingSeverity) {
17 | RTCLoggingSeverityVerbose,
18 | RTCLoggingSeverityInfo,
19 | RTCLoggingSeverityWarning,
20 | RTCLoggingSeverityError,
21 | };
22 |
23 | // Wrapper for C++ RTC_LOG(sev) macros.
24 | // Logs the log string to the webrtc logstream for the given severity.
25 | RTC_EXTERN void RTCLogEx(RTCLoggingSeverity severity, NSString* log_string);
26 |
27 | // Wrapper for rtc::LogMessage::LogToDebug.
28 | // Sets the minimum severity to be logged to console.
29 | RTC_EXTERN void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity);
30 |
31 | // Returns the filename with the path prefix removed.
32 | RTC_EXTERN NSString* RTCFileName(const char* filePath);
33 |
34 | // Some convenience macros.
35 |
36 | #define RTCLogString(format, ...) \
37 | [NSString stringWithFormat:@"(%@:%d %s): " format, \
38 | RTCFileName(__FILE__), \
39 | __LINE__, \
40 | __FUNCTION__, \
41 | ##__VA_ARGS__]
42 |
43 | #define RTCLogFormat(severity, format, ...) \
44 | do { \
45 | NSString* log_string = RTCLogString(format, ##__VA_ARGS__); \
46 | RTCLogEx(severity, log_string); \
47 | } while (false)
48 |
49 | #define RTCLogVerbose(format, ...) \
50 | RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) \
51 |
52 | #define RTCLogInfo(format, ...) \
53 | RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) \
54 |
55 | #define RTCLogWarning(format, ...) \
56 | RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) \
57 |
58 | #define RTCLogError(format, ...) \
59 | RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) \
60 |
61 | #if !defined(NDEBUG)
62 | #define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
63 | #else
64 | #define RTCLogDebug(format, ...) \
65 | do { \
66 | } while (false)
67 | #endif
68 |
69 | #define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__)
70 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMTLVideoView.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import "WebRTC/RTCVideoRenderer.h"
14 |
15 | // Check if metal is supported in WebRTC.
16 | // NOTE: Currently arm64 == Metal.
17 | #if defined(__aarch64__)
18 | #define RTC_SUPPORTS_METAL
19 | #endif
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | /**
24 | * RTCMTLVideoView is thin wrapper around MTKView.
25 | *
26 | * It has id property that renders video frames in the view's
27 | * bounds using Metal.
28 | * NOTE: always check if metal is available on the running device via
29 | * RTC_SUPPORTS_METAL macro before initializing this class.
30 | */
31 | NS_CLASS_AVAILABLE_IOS(9)
32 |
33 | RTC_EXPORT
34 | @interface RTCMTLVideoView : UIView
35 |
36 | @end
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMacros.h:
--------------------------------------------------------------------------------
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 | #ifndef SDK_OBJC_FRAMEWORK_HEADERS_WEBRTC_RTCMACROS_H_
12 | #define SDK_OBJC_FRAMEWORK_HEADERS_WEBRTC_RTCMACROS_H_
13 |
14 | #define RTC_EXPORT __attribute__((visibility("default")))
15 |
16 | #if defined(__cplusplus)
17 | #define RTC_EXTERN extern "C" RTC_EXPORT
18 | #else
19 | #define RTC_EXTERN extern RTC_EXPORT
20 | #endif
21 |
22 | #ifdef __OBJC__
23 | #define RTC_FWD_DECL_OBJC_CLASS(classname) @class classname
24 | #else
25 | #define RTC_FWD_DECL_OBJC_CLASS(classname) typedef struct objc_object classname
26 | #endif
27 |
28 | #endif // SDK_OBJC_FRAMEWORK_HEADERS_WEBRTC_RTCMACROS_H_
29 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMediaConstraints.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | /** Constraint keys for media sources. */
18 | RTC_EXTERN NSString * const kRTCMediaConstraintsMinAspectRatio;
19 | RTC_EXTERN NSString * const kRTCMediaConstraintsMaxAspectRatio;
20 | RTC_EXTERN NSString * const kRTCMediaConstraintsMaxWidth;
21 | RTC_EXTERN NSString * const kRTCMediaConstraintsMinWidth;
22 | RTC_EXTERN NSString * const kRTCMediaConstraintsMaxHeight;
23 | RTC_EXTERN NSString * const kRTCMediaConstraintsMinHeight;
24 | RTC_EXTERN NSString * const kRTCMediaConstraintsMaxFrameRate;
25 | RTC_EXTERN NSString * const kRTCMediaConstraintsMinFrameRate;
26 | RTC_EXTERN NSString * const kRTCMediaConstraintsLevelControl;
27 | /** The value for this key should be a base64 encoded string containing
28 | * the data from the serialized configuration proto.
29 | */
30 | RTC_EXTERN NSString * const kRTCMediaConstraintsAudioNetworkAdaptorConfig;
31 |
32 | /** Constraint keys for generating offers and answers. */
33 | RTC_EXTERN NSString * const kRTCMediaConstraintsIceRestart;
34 | RTC_EXTERN NSString * const kRTCMediaConstraintsOfferToReceiveAudio;
35 | RTC_EXTERN NSString * const kRTCMediaConstraintsOfferToReceiveVideo;
36 | RTC_EXTERN NSString * const kRTCMediaConstraintsVoiceActivityDetection;
37 |
38 | /** Constraint values for Boolean parameters. */
39 | RTC_EXTERN NSString * const kRTCMediaConstraintsValueTrue;
40 | RTC_EXTERN NSString * const kRTCMediaConstraintsValueFalse;
41 |
42 | RTC_EXPORT
43 | @interface RTCMediaConstraints : NSObject
44 |
45 | - (instancetype)init NS_UNAVAILABLE;
46 |
47 | /** Initialize with mandatory and/or optional constraints. */
48 | - (instancetype)initWithMandatoryConstraints:
49 | (nullable NSDictionary *)mandatory
50 | optionalConstraints:
51 | (nullable NSDictionary *)optional
52 | NS_DESIGNATED_INITIALIZER;
53 |
54 | @end
55 |
56 | NS_ASSUME_NONNULL_END
57 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMediaSource.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | typedef NS_ENUM(NSInteger, RTCSourceState) {
16 | RTCSourceStateInitializing,
17 | RTCSourceStateLive,
18 | RTCSourceStateEnded,
19 | RTCSourceStateMuted,
20 | };
21 |
22 | NS_ASSUME_NONNULL_BEGIN
23 |
24 | RTC_EXPORT
25 | @interface RTCMediaSource : NSObject
26 |
27 | /** The current state of the RTCMediaSource. */
28 | @property(nonatomic, readonly) RTCSourceState state;
29 |
30 | - (instancetype)init NS_UNAVAILABLE;
31 |
32 | @end
33 |
34 | NS_ASSUME_NONNULL_END
35 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMediaStream.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | @class RTCAudioTrack;
18 | @class RTCPeerConnectionFactory;
19 | @class RTCVideoTrack;
20 |
21 | RTC_EXPORT
22 | @interface RTCMediaStream : NSObject
23 |
24 | /** The audio tracks in this stream. */
25 | @property(nonatomic, strong, readonly) NSArray *audioTracks;
26 |
27 | /** The video tracks in this stream. */
28 | @property(nonatomic, strong, readonly) NSArray *videoTracks;
29 |
30 | /** An identifier for this media stream. */
31 | @property(nonatomic, readonly) NSString *streamId;
32 |
33 | - (instancetype)init NS_UNAVAILABLE;
34 |
35 | /** Adds the given audio track to this media stream. */
36 | - (void)addAudioTrack:(RTCAudioTrack *)audioTrack;
37 |
38 | /** Adds the given video track to this media stream. */
39 | - (void)addVideoTrack:(RTCVideoTrack *)videoTrack;
40 |
41 | /** Removes the given audio track to this media stream. */
42 | - (void)removeAudioTrack:(RTCAudioTrack *)audioTrack;
43 |
44 | /** Removes the given video track to this media stream. */
45 | - (void)removeVideoTrack:(RTCVideoTrack *)videoTrack;
46 |
47 | @end
48 |
49 | NS_ASSUME_NONNULL_END
50 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMediaStreamTrack.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | /**
16 | * Represents the state of the track. This exposes the same states in C++.
17 | */
18 | typedef NS_ENUM(NSInteger, RTCMediaStreamTrackState) {
19 | RTCMediaStreamTrackStateLive,
20 | RTCMediaStreamTrackStateEnded
21 | };
22 |
23 | NS_ASSUME_NONNULL_BEGIN
24 |
25 | RTC_EXTERN NSString * const kRTCMediaStreamTrackKindAudio;
26 | RTC_EXTERN NSString * const kRTCMediaStreamTrackKindVideo;
27 |
28 | RTC_EXPORT
29 | @interface RTCMediaStreamTrack : NSObject
30 |
31 | /**
32 | * The kind of track. For example, "audio" if this track represents an audio
33 | * track and "video" if this track represents a video track.
34 | */
35 | @property(nonatomic, readonly) NSString *kind;
36 |
37 | /** An identifier string. */
38 | @property(nonatomic, readonly) NSString *trackId;
39 |
40 | /** The enabled state of the track. */
41 | @property(nonatomic, assign) BOOL isEnabled;
42 |
43 | /** The state of the track. */
44 | @property(nonatomic, readonly) RTCMediaStreamTrackState readyState;
45 |
46 | - (instancetype)init NS_UNAVAILABLE;
47 |
48 | @end
49 |
50 | NS_ASSUME_NONNULL_END
51 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMetrics.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | /**
17 | * Enables gathering of metrics (which can be fetched with
18 | * RTCGetAndResetMetrics). Must be called before any other call into WebRTC.
19 | */
20 | RTC_EXTERN void RTCEnableMetrics();
21 |
22 | /** Gets and clears native histograms. */
23 | RTC_EXTERN NSArray *RTCGetAndResetMetrics();
24 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCMetricsSampleInfo.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | RTC_EXPORT
18 | @interface RTCMetricsSampleInfo : NSObject
19 |
20 | /**
21 | * Example of RTCMetricsSampleInfo:
22 | * name: "WebRTC.Video.InputFramesPerSecond"
23 | * min: 1
24 | * max: 100
25 | * bucketCount: 50
26 | * samples: [29]:2 [30]:1
27 | */
28 |
29 | /** The name of the histogram. */
30 | @property(nonatomic, readonly) NSString *name;
31 |
32 | /** The minimum bucket value. */
33 | @property(nonatomic, readonly) int min;
34 |
35 | /** The maximum bucket value. */
36 | @property(nonatomic, readonly) int max;
37 |
38 | /** The number of buckets. */
39 | @property(nonatomic, readonly) int bucketCount;
40 |
41 | /** A dictionary holding the samples . */
42 | @property(nonatomic, readonly) NSDictionary *samples;
43 |
44 | - (instancetype)init NS_UNAVAILABLE;
45 |
46 | @end
47 |
48 | NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCPeerConnection.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | @class RTCConfiguration;
16 | @class RTCDataChannel;
17 | @class RTCDataChannelConfiguration;
18 | @class RTCIceCandidate;
19 | @class RTCMediaConstraints;
20 | @class RTCMediaStream;
21 | @class RTCMediaStreamTrack;
22 | @class RTCPeerConnectionFactory;
23 | @class RTCRtpReceiver;
24 | @class RTCRtpSender;
25 | @class RTCSessionDescription;
26 | @class RTCLegacyStatsReport;
27 |
28 | NS_ASSUME_NONNULL_BEGIN
29 |
30 | extern NSString * const kRTCPeerConnectionErrorDomain;
31 | extern int const kRTCSessionDescriptionErrorCode;
32 |
33 | /** Represents the signaling state of the peer connection. */
34 | typedef NS_ENUM(NSInteger, RTCSignalingState) {
35 | RTCSignalingStateStable,
36 | RTCSignalingStateHaveLocalOffer,
37 | RTCSignalingStateHaveLocalPrAnswer,
38 | RTCSignalingStateHaveRemoteOffer,
39 | RTCSignalingStateHaveRemotePrAnswer,
40 | // Not an actual state, represents the total number of states.
41 | RTCSignalingStateClosed,
42 | };
43 |
44 | /** Represents the ice connection state of the peer connection. */
45 | typedef NS_ENUM(NSInteger, RTCIceConnectionState) {
46 | RTCIceConnectionStateNew,
47 | RTCIceConnectionStateChecking,
48 | RTCIceConnectionStateConnected,
49 | RTCIceConnectionStateCompleted,
50 | RTCIceConnectionStateFailed,
51 | RTCIceConnectionStateDisconnected,
52 | RTCIceConnectionStateClosed,
53 | RTCIceConnectionStateCount,
54 | };
55 |
56 | /** Represents the ice gathering state of the peer connection. */
57 | typedef NS_ENUM(NSInteger, RTCIceGatheringState) {
58 | RTCIceGatheringStateNew,
59 | RTCIceGatheringStateGathering,
60 | RTCIceGatheringStateComplete,
61 | };
62 |
63 | /** Represents the stats output level. */
64 | typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) {
65 | RTCStatsOutputLevelStandard,
66 | RTCStatsOutputLevelDebug,
67 | };
68 |
69 | @class RTCPeerConnection;
70 |
71 | RTC_EXPORT
72 | @protocol RTCPeerConnectionDelegate
73 |
74 | /** Called when the SignalingState changed. */
75 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
76 | didChangeSignalingState:(RTCSignalingState)stateChanged;
77 |
78 | /** Called when media is received on a new stream from remote peer. */
79 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
80 | didAddStream:(RTCMediaStream *)stream;
81 |
82 | /** Called when a remote peer closes a stream. */
83 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
84 | didRemoveStream:(RTCMediaStream *)stream;
85 |
86 | /** Called when negotiation is needed, for example ICE has restarted. */
87 | - (void)peerConnectionShouldNegotiate:(RTCPeerConnection *)peerConnection;
88 |
89 | /** Called any time the IceConnectionState changes. */
90 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
91 | didChangeIceConnectionState:(RTCIceConnectionState)newState;
92 |
93 | /** Called any time the IceGatheringState changes. */
94 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
95 | didChangeIceGatheringState:(RTCIceGatheringState)newState;
96 |
97 | /** New ice candidate has been found. */
98 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
99 | didGenerateIceCandidate:(RTCIceCandidate *)candidate;
100 |
101 | /** Called when a group of local Ice candidates have been removed. */
102 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
103 | didRemoveIceCandidates:(NSArray *)candidates;
104 |
105 | /** New data channel has been opened. */
106 | - (void)peerConnection:(RTCPeerConnection *)peerConnection
107 | didOpenDataChannel:(RTCDataChannel *)dataChannel;
108 |
109 | @end
110 |
111 | RTC_EXPORT
112 | @interface RTCPeerConnection : NSObject
113 |
114 | /** The object that will be notifed about events such as state changes and
115 | * streams being added or removed.
116 | */
117 | @property(nonatomic, weak, nullable) id delegate;
118 | @property(nonatomic, readonly) NSArray *localStreams;
119 | @property(nonatomic, readonly, nullable)
120 | RTCSessionDescription *localDescription;
121 | @property(nonatomic, readonly, nullable)
122 | RTCSessionDescription *remoteDescription;
123 | @property(nonatomic, readonly) RTCSignalingState signalingState;
124 | @property(nonatomic, readonly) RTCIceConnectionState iceConnectionState;
125 | @property(nonatomic, readonly) RTCIceGatheringState iceGatheringState;
126 | @property(nonatomic, readonly, copy) RTCConfiguration *configuration;
127 |
128 | /** Gets all RTCRtpSenders associated with this peer connection.
129 | * Note: reading this property returns different instances of RTCRtpSender.
130 | * Use isEqual: instead of == to compare RTCRtpSender instances.
131 | */
132 | @property(nonatomic, readonly) NSArray *senders;
133 |
134 | /** Gets all RTCRtpReceivers associated with this peer connection.
135 | * Note: reading this property returns different instances of RTCRtpReceiver.
136 | * Use isEqual: instead of == to compare RTCRtpReceiver instances.
137 | */
138 | @property(nonatomic, readonly) NSArray *receivers;
139 |
140 | - (instancetype)init NS_UNAVAILABLE;
141 |
142 | /** Sets the PeerConnection's global configuration to |configuration|.
143 | * Any changes to STUN/TURN servers or ICE candidate policy will affect the
144 | * next gathering phase, and cause the next call to createOffer to generate
145 | * new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies
146 | * cannot be changed with this method.
147 | */
148 | - (BOOL)setConfiguration:(RTCConfiguration *)configuration;
149 |
150 | /** Terminate all media and close the transport. */
151 | - (void)close;
152 |
153 | /** Provide a remote candidate to the ICE Agent. */
154 | - (void)addIceCandidate:(RTCIceCandidate *)candidate;
155 |
156 | /** Remove a group of remote candidates from the ICE Agent. */
157 | - (void)removeIceCandidates:(NSArray *)candidates;
158 |
159 | /** Add a new media stream to be sent on this peer connection. */
160 | - (void)addStream:(RTCMediaStream *)stream;
161 |
162 | /** Remove the given media stream from this peer connection. */
163 | - (void)removeStream:(RTCMediaStream *)stream;
164 |
165 | /** Generate an SDP offer. */
166 | - (void)offerForConstraints:(RTCMediaConstraints *)constraints
167 | completionHandler:(nullable void (^)
168 | (RTCSessionDescription * _Nullable sdp,
169 | NSError * _Nullable error))completionHandler;
170 |
171 | /** Generate an SDP answer. */
172 | - (void)answerForConstraints:(RTCMediaConstraints *)constraints
173 | completionHandler:(nullable void (^)
174 | (RTCSessionDescription * _Nullable sdp,
175 | NSError * _Nullable error))completionHandler;
176 |
177 | /** Apply the supplied RTCSessionDescription as the local description. */
178 | - (void)setLocalDescription:(RTCSessionDescription *)sdp
179 | completionHandler:
180 | (nullable void (^)(NSError * _Nullable error))completionHandler;
181 |
182 | /** Apply the supplied RTCSessionDescription as the remote description. */
183 | - (void)setRemoteDescription:(RTCSessionDescription *)sdp
184 | completionHandler:
185 | (nullable void (^)(NSError * _Nullable error))completionHandler;
186 |
187 | /** Limits the bandwidth allocated for all RTP streams sent by this
188 | * PeerConnection. Nil parameters will be unchanged. Setting
189 | * |currentBitrateBps| will force the available bitrate estimate to the given
190 | * value. Returns YES if the parameters were successfully updated.
191 | */
192 | - (BOOL)setBweMinBitrateBps:(nullable NSNumber *)minBitrateBps
193 | currentBitrateBps:(nullable NSNumber *)currentBitrateBps
194 | maxBitrateBps:(nullable NSNumber *)maxBitrateBps;
195 |
196 | /** Start or stop recording an Rtc EventLog. */
197 | - (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath
198 | maxSizeInBytes:(int64_t)maxSizeInBytes;
199 | - (void)stopRtcEventLog;
200 |
201 | @end
202 |
203 | @interface RTCPeerConnection (Media)
204 |
205 | /** Create an RTCRtpSender with the specified kind and media stream ID.
206 | * See RTCMediaStreamTrack.h for available kinds.
207 | */
208 | - (RTCRtpSender *)senderWithKind:(NSString *)kind streamId:(NSString *)streamId;
209 |
210 | @end
211 |
212 | @interface RTCPeerConnection (DataChannel)
213 |
214 | /** Create a new data channel with the given label and configuration. */
215 | - (nullable RTCDataChannel *)dataChannelForLabel:(NSString *)label
216 | configuration:(RTCDataChannelConfiguration *)configuration;
217 |
218 | @end
219 |
220 | @interface RTCPeerConnection (Stats)
221 |
222 | /** Gather stats for the given RTCMediaStreamTrack. If |mediaStreamTrack| is nil
223 | * statistics are gathered for all tracks.
224 | */
225 | - (void)statsForTrack:
226 | (nullable RTCMediaStreamTrack *)mediaStreamTrack
227 | statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel
228 | completionHandler:
229 | (nullable void (^)(NSArray *stats))completionHandler;
230 |
231 | @end
232 |
233 | NS_ASSUME_NONNULL_END
234 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCPeerConnectionFactory.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | @class RTCAVFoundationVideoSource;
18 | @class RTCAudioSource;
19 | @class RTCAudioTrack;
20 | @class RTCConfiguration;
21 | @class RTCMediaConstraints;
22 | @class RTCMediaStream;
23 | @class RTCPeerConnection;
24 | @class RTCVideoSource;
25 | @class RTCVideoTrack;
26 | @class RTCPeerConnectionFactoryOptions;
27 | @protocol RTCPeerConnectionDelegate;
28 | @protocol RTCVideoDecoderFactory;
29 | @protocol RTCVideoEncoderFactory;
30 |
31 | RTC_EXPORT
32 | @interface RTCPeerConnectionFactory : NSObject
33 |
34 | /* Initialize object with default H264 video encoder/decoder factories */
35 | - (instancetype)init;
36 |
37 | /* Initialize object with injectable video encoder/decoder factories */
38 | - (instancetype)initWithEncoderFactory:(nullable id)encoderFactory
39 | decoderFactory:(nullable id)decoderFactory;
40 |
41 | /** Initialize an RTCAudioSource with constraints. */
42 | - (RTCAudioSource *)audioSourceWithConstraints:(nullable RTCMediaConstraints *)constraints;
43 |
44 | /** Initialize an RTCAudioTrack with an id. Convenience ctor to use an audio source with no
45 | * constraints.
46 | */
47 | - (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId;
48 |
49 | /** Initialize an RTCAudioTrack with a source and an id. */
50 | - (RTCAudioTrack *)audioTrackWithSource:(RTCAudioSource *)source
51 | trackId:(NSString *)trackId;
52 |
53 | /** Initialize an RTCAVFoundationVideoSource with constraints. */
54 | - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints:
55 | (nullable RTCMediaConstraints *)constraints;
56 |
57 | /** Initialize a generic RTCVideoSource. The RTCVideoSource should be passed to a RTCVideoCapturer
58 | * implementation, e.g. RTCCameraVideoCapturer, in order to produce frames.
59 | */
60 | - (RTCVideoSource *)videoSource;
61 |
62 | /** Initialize an RTCVideoTrack with a source and an id. */
63 | - (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source
64 | trackId:(NSString *)trackId;
65 |
66 | /** Initialize an RTCMediaStream with an id. */
67 | - (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId;
68 |
69 | /** Initialize an RTCPeerConnection with a configuration, constraints, and
70 | * delegate.
71 | */
72 | - (RTCPeerConnection *)peerConnectionWithConfiguration:
73 | (RTCConfiguration *)configuration
74 | constraints:
75 | (RTCMediaConstraints *)constraints
76 | delegate:
77 | (nullable id)delegate;
78 |
79 | /** Set the options to be used for subsequently created RTCPeerConnections */
80 | - (void)setOptions:(nonnull RTCPeerConnectionFactoryOptions *)options;
81 |
82 | /** Start an AecDump recording. This API call will likely change in the future. */
83 | - (BOOL)startAecDumpWithFilePath:(NSString *)filePath
84 | maxSizeInBytes:(int64_t)maxSizeInBytes;
85 |
86 | /* Stop an active AecDump recording */
87 | - (void)stopAecDump;
88 |
89 | @end
90 |
91 | NS_ASSUME_NONNULL_END
92 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | RTC_EXPORT
18 | @interface RTCPeerConnectionFactoryOptions : NSObject
19 |
20 | @property(nonatomic, assign) BOOL disableEncryption;
21 |
22 | @property(nonatomic, assign) BOOL disableNetworkMonitor;
23 |
24 | @property(nonatomic, assign) BOOL ignoreLoopbackNetworkAdapter;
25 |
26 | @property(nonatomic, assign) BOOL ignoreVPNNetworkAdapter;
27 |
28 | @property(nonatomic, assign) BOOL ignoreCellularNetworkAdapter;
29 |
30 | @property(nonatomic, assign) BOOL ignoreWiFiNetworkAdapter;
31 |
32 | @property(nonatomic, assign) BOOL ignoreEthernetNetworkAdapter;
33 |
34 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
35 |
36 | @end
37 |
38 | NS_ASSUME_NONNULL_END
39 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCRtpCodecParameters.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | RTC_EXTERN const NSString * const kRTCRtxCodecName;
18 | RTC_EXTERN const NSString * const kRTCRedCodecName;
19 | RTC_EXTERN const NSString * const kRTCUlpfecCodecName;
20 | RTC_EXTERN const NSString * const kRTCFlexfecCodecName;
21 | RTC_EXTERN const NSString * const kRTCOpusCodecName;
22 | RTC_EXTERN const NSString * const kRTCIsacCodecName;
23 | RTC_EXTERN const NSString * const kRTCL16CodecName;
24 | RTC_EXTERN const NSString * const kRTCG722CodecName;
25 | RTC_EXTERN const NSString * const kRTCIlbcCodecName;
26 | RTC_EXTERN const NSString * const kRTCPcmuCodecName;
27 | RTC_EXTERN const NSString * const kRTCPcmaCodecName;
28 | RTC_EXTERN const NSString * const kRTCDtmfCodecName;
29 | RTC_EXTERN const NSString * const kRTCComfortNoiseCodecName;
30 | RTC_EXTERN const NSString * const kRTCVp8CodecName;
31 | RTC_EXTERN const NSString * const kRTCVp9CodecName;
32 | RTC_EXTERN const NSString * const kRTCH264CodecName;
33 |
34 | /** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTCRtpCodecParameters */
35 | RTC_EXPORT
36 | @interface RTCRtpCodecParameters : NSObject
37 |
38 | /** The RTP payload type. */
39 | @property(nonatomic, assign) int payloadType;
40 |
41 | /**
42 | * The codec MIME subtype. Valid types are listed in:
43 | * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2
44 | *
45 | * Several supported types are represented by the constants above.
46 | */
47 | @property(nonatomic, readonly, nonnull) NSString *name;
48 |
49 | /**
50 | * The media type of this codec. Equivalent to MIME top-level type.
51 | *
52 | * Valid values are kRTCMediaStreamTrackKindAudio and
53 | * kRTCMediaStreamTrackKindVideo.
54 | */
55 | @property(nonatomic, readonly, nonnull) NSString *kind;
56 |
57 | /** The codec clock rate expressed in Hertz. */
58 | @property(nonatomic, readonly, nullable) NSNumber *clockRate;
59 |
60 | /**
61 | * The number of channels (mono=1, stereo=2).
62 | * Set to null for video codecs.
63 | **/
64 | @property(nonatomic, readonly, nullable) NSNumber *numChannels;
65 |
66 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
67 |
68 | @end
69 |
70 | NS_ASSUME_NONNULL_END
71 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCRtpEncodingParameters.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | RTC_EXPORT
18 | @interface RTCRtpEncodingParameters : NSObject
19 |
20 | /** Controls whether the encoding is currently transmitted. */
21 | @property(nonatomic, assign) BOOL isActive;
22 |
23 | /** The maximum bitrate to use for the encoding, or nil if there is no
24 | * limit.
25 | */
26 | @property(nonatomic, copy, nullable) NSNumber *maxBitrateBps;
27 |
28 | /** The SSRC being used by this encoding. */
29 | @property(nonatomic, readonly, nullable) NSNumber *ssrc;
30 |
31 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
32 |
33 | @end
34 |
35 | NS_ASSUME_NONNULL_END
36 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCRtpParameters.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 | #import
16 |
17 | NS_ASSUME_NONNULL_BEGIN
18 |
19 | RTC_EXPORT
20 | @interface RTCRtpParameters : NSObject
21 |
22 | /** The currently active encodings in the order of preference. */
23 | @property(nonatomic, copy) NSArray *encodings;
24 |
25 | /** The negotiated set of send codecs in order of preference. */
26 | @property(nonatomic, copy) NSArray *codecs;
27 |
28 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
29 |
30 | @end
31 |
32 | NS_ASSUME_NONNULL_END
33 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCRtpReceiver.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 | #import
16 |
17 | NS_ASSUME_NONNULL_BEGIN
18 |
19 | /** Represents the media type of the RtpReceiver. */
20 | typedef NS_ENUM(NSInteger, RTCRtpMediaType) {
21 | RTCRtpMediaTypeAudio,
22 | RTCRtpMediaTypeVideo,
23 | RTCRtpMediaTypeData,
24 | };
25 |
26 | @class RTCRtpReceiver;
27 |
28 | RTC_EXPORT
29 | @protocol RTCRtpReceiverDelegate
30 |
31 | /** Called when the first RTP packet is received.
32 | *
33 | * Note: Currently if there are multiple RtpReceivers of the same media type,
34 | * they will all call OnFirstPacketReceived at once.
35 | *
36 | * For example, if we create three audio receivers, A/B/C, they will listen to
37 | * the same signal from the underneath network layer. Whenever the first audio packet
38 | * is received, the underneath signal will be fired. All the receivers A/B/C will be
39 | * notified and the callback of the receiver's delegate will be called.
40 | *
41 | * The process is the same for video receivers.
42 | */
43 | - (void)rtpReceiver:(RTCRtpReceiver *)rtpReceiver
44 | didReceiveFirstPacketForMediaType:(RTCRtpMediaType)mediaType;
45 |
46 | @end
47 |
48 | RTC_EXPORT
49 | @protocol RTCRtpReceiver
50 |
51 | /** A unique identifier for this receiver. */
52 | @property(nonatomic, readonly) NSString *receiverId;
53 |
54 | /** The currently active RTCRtpParameters, as defined in
55 | * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters.
56 | *
57 | * The WebRTC specification only defines RTCRtpParameters in terms of senders,
58 | * but this API also applies them to receivers, similar to ORTC:
59 | * http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*.
60 | */
61 | @property(nonatomic, readonly) RTCRtpParameters *parameters;
62 |
63 | /** The RTCMediaStreamTrack associated with the receiver.
64 | * Note: reading this property returns a new instance of
65 | * RTCMediaStreamTrack. Use isEqual: instead of == to compare
66 | * RTCMediaStreamTrack instances.
67 | */
68 | @property(nonatomic, readonly, nullable) RTCMediaStreamTrack *track;
69 |
70 | /** The delegate for this RtpReceiver. */
71 | @property(nonatomic, weak) id delegate;
72 |
73 | @end
74 |
75 | RTC_EXPORT
76 | @interface RTCRtpReceiver : NSObject
77 |
78 | - (instancetype)init NS_UNAVAILABLE;
79 |
80 | @end
81 |
82 | NS_ASSUME_NONNULL_END
83 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCRtpSender.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 | #import
16 | #import
17 |
18 | NS_ASSUME_NONNULL_BEGIN
19 |
20 | RTC_EXPORT
21 | @protocol RTCRtpSender
22 |
23 | /** A unique identifier for this sender. */
24 | @property(nonatomic, readonly) NSString *senderId;
25 |
26 | /** The currently active RTCRtpParameters, as defined in
27 | * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters.
28 | */
29 | @property(nonatomic, copy) RTCRtpParameters *parameters;
30 |
31 | /** The RTCMediaStreamTrack associated with the sender.
32 | * Note: reading this property returns a new instance of
33 | * RTCMediaStreamTrack. Use isEqual: instead of == to compare
34 | * RTCMediaStreamTrack instances.
35 | */
36 | @property(nonatomic, copy, nullable) RTCMediaStreamTrack *track;
37 |
38 | /** The RTCDtmfSender accociated with the RTP sender. */
39 | @property(nonatomic, readonly, nullable) id dtmfSender;
40 |
41 | @end
42 |
43 | RTC_EXPORT
44 | @interface RTCRtpSender : NSObject
45 |
46 | - (instancetype)init NS_UNAVAILABLE;
47 |
48 | @end
49 |
50 | NS_ASSUME_NONNULL_END
51 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCSSLAdapter.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | /**
16 | * Initialize and clean up the SSL library. Failure is fatal. These call the
17 | * corresponding functions in webrtc/rtc_base/ssladapter.h.
18 | */
19 | RTC_EXTERN BOOL RTCInitializeSSL();
20 | RTC_EXTERN BOOL RTCCleanupSSL();
21 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCSessionDescription.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | /**
16 | * Represents the session description type. This exposes the same types that are
17 | * in C++, which doesn't include the rollback type that is in the W3C spec.
18 | */
19 | typedef NS_ENUM(NSInteger, RTCSdpType) {
20 | RTCSdpTypeOffer,
21 | RTCSdpTypePrAnswer,
22 | RTCSdpTypeAnswer,
23 | };
24 |
25 | NS_ASSUME_NONNULL_BEGIN
26 |
27 | RTC_EXPORT
28 | @interface RTCSessionDescription : NSObject
29 |
30 | /** The type of session description. */
31 | @property(nonatomic, readonly) RTCSdpType type;
32 |
33 | /** The SDP string representation of this session description. */
34 | @property(nonatomic, readonly) NSString *sdp;
35 |
36 | - (instancetype)init NS_UNAVAILABLE;
37 |
38 | /** Initialize a session description with a type and SDP string. */
39 | - (instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp
40 | NS_DESIGNATED_INITIALIZER;
41 |
42 | + (NSString *)stringForType:(RTCSdpType)type;
43 |
44 | + (RTCSdpType)typeForString:(NSString *)string;
45 |
46 | @end
47 |
48 | NS_ASSUME_NONNULL_END
49 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCTracing.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | RTC_EXTERN void RTCSetupInternalTracer();
16 | /** Starts capture to specified file. Must be a valid writable path.
17 | * Returns YES if capture starts.
18 | */
19 | RTC_EXTERN BOOL RTCStartInternalCapture(NSString *filePath);
20 | RTC_EXTERN void RTCStopInternalCapture();
21 | RTC_EXTERN void RTCShutdownInternalTracer();
22 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoCapturer.h:
--------------------------------------------------------------------------------
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
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @class RTCVideoCapturer;
16 |
17 | RTC_EXPORT
18 | @protocol RTCVideoCapturerDelegate
19 | - (void)capturer:(RTCVideoCapturer *)capturer didCaptureVideoFrame:(RTCVideoFrame *)frame;
20 | @end
21 |
22 | RTC_EXPORT
23 | @interface RTCVideoCapturer : NSObject
24 |
25 | @property(nonatomic, readonly, weak) id delegate;
26 |
27 | - (instancetype)initWithDelegate:(id)delegate;
28 |
29 | @end
30 |
31 | NS_ASSUME_NONNULL_END
32 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoCodec.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | RTC_EXPORT extern NSString *const kRTCVideoCodecVp8Name;
19 | RTC_EXPORT extern NSString *const kRTCVideoCodecVp9Name;
20 | RTC_EXPORT extern NSString *const kRTCVideoCodecH264Name;
21 | RTC_EXPORT extern NSString *const kRTCLevel31ConstrainedHigh;
22 | RTC_EXPORT extern NSString *const kRTCLevel31ConstrainedBaseline;
23 |
24 | /** Represents an encoded frame's type. */
25 | typedef NS_ENUM(NSUInteger, RTCFrameType) {
26 | RTCFrameTypeEmptyFrame = 0,
27 | RTCFrameTypeAudioFrameSpeech = 1,
28 | RTCFrameTypeAudioFrameCN = 2,
29 | RTCFrameTypeVideoFrameKey = 3,
30 | RTCFrameTypeVideoFrameDelta = 4,
31 | };
32 |
33 | typedef NS_ENUM(NSUInteger, RTCVideoContentType) {
34 | RTCVideoContentTypeUnspecified,
35 | RTCVideoContentTypeScreenshare,
36 | };
37 |
38 | /** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */
39 | RTC_EXPORT
40 | @interface RTCEncodedImage : NSObject
41 |
42 | @property(nonatomic, strong) NSData *buffer;
43 | @property(nonatomic, assign) int32_t encodedWidth;
44 | @property(nonatomic, assign) int32_t encodedHeight;
45 | @property(nonatomic, assign) uint32_t timeStamp;
46 | @property(nonatomic, assign) int64_t captureTimeMs;
47 | @property(nonatomic, assign) int64_t ntpTimeMs;
48 | @property(nonatomic, assign) uint8_t flags;
49 | @property(nonatomic, assign) int64_t encodeStartMs;
50 | @property(nonatomic, assign) int64_t encodeFinishMs;
51 | @property(nonatomic, assign) RTCFrameType frameType;
52 | @property(nonatomic, assign) RTCVideoRotation rotation;
53 | @property(nonatomic, assign) BOOL completeFrame;
54 | @property(nonatomic, strong) NSNumber *qp;
55 | @property(nonatomic, assign) RTCVideoContentType contentType;
56 |
57 | @end
58 |
59 | /** Information for header. Corresponds to webrtc::RTPFragmentationHeader. */
60 | RTC_EXPORT
61 | @interface RTCRtpFragmentationHeader : NSObject
62 |
63 | @property(nonatomic, strong) NSArray *fragmentationOffset;
64 | @property(nonatomic, strong) NSArray *fragmentationLength;
65 | @property(nonatomic, strong) NSArray *fragmentationTimeDiff;
66 | @property(nonatomic, strong) NSArray *fragmentationPlType;
67 |
68 | @end
69 |
70 | /** Implement this protocol to pass codec specific info from the encoder.
71 | * Corresponds to webrtc::CodecSpecificInfo.
72 | */
73 | RTC_EXPORT
74 | @protocol RTCCodecSpecificInfo
75 |
76 | @end
77 |
78 | /** Callback block for encoder. */
79 | typedef BOOL (^RTCVideoEncoderCallback)(RTCEncodedImage *frame,
80 | id info,
81 | RTCRtpFragmentationHeader *header);
82 |
83 | /** Callback block for decoder. */
84 | typedef void (^RTCVideoDecoderCallback)(RTCVideoFrame *frame);
85 |
86 | typedef NS_ENUM(NSUInteger, RTCVideoCodecMode) {
87 | RTCVideoCodecModeRealtimeVideo,
88 | RTCVideoCodecModeScreensharing,
89 | };
90 |
91 | /** Holds information to identify a codec. Corresponds to cricket::VideoCodec. */
92 | RTC_EXPORT
93 | @interface RTCVideoCodecInfo : NSObject
94 |
95 | - (instancetype)init NS_UNAVAILABLE;
96 |
97 | - (instancetype)initWithName:(NSString *)name;
98 |
99 | - (instancetype)initWithName:(NSString *)name
100 | parameters:(nullable NSDictionary *)parameters
101 | NS_DESIGNATED_INITIALIZER;
102 |
103 | - (BOOL)isEqualToCodecInfo:(RTCVideoCodecInfo *)info;
104 |
105 | @property(nonatomic, readonly) NSString *name;
106 | @property(nonatomic, readonly) NSDictionary *parameters;
107 |
108 | @end
109 |
110 | /** Settings for encoder. Corresponds to webrtc::VideoCodec. */
111 | RTC_EXPORT
112 | @interface RTCVideoEncoderSettings : NSObject
113 |
114 | @property(nonatomic, strong) NSString *name;
115 |
116 | @property(nonatomic, assign) unsigned short width;
117 | @property(nonatomic, assign) unsigned short height;
118 |
119 | @property(nonatomic, assign) unsigned int startBitrate; // kilobits/sec.
120 | @property(nonatomic, assign) unsigned int maxBitrate;
121 | @property(nonatomic, assign) unsigned int minBitrate;
122 | @property(nonatomic, assign) unsigned int targetBitrate;
123 |
124 | @property(nonatomic, assign) uint32_t maxFramerate;
125 |
126 | @property(nonatomic, assign) unsigned int qpMax;
127 | @property(nonatomic, assign) RTCVideoCodecMode mode;
128 |
129 | @end
130 |
131 | /** QP thresholds for encoder. Corresponds to webrtc::VideoEncoder::QpThresholds. */
132 | RTC_EXPORT
133 | @interface RTCVideoEncoderQpThresholds : NSObject
134 |
135 | - (instancetype)initWithThresholdsLow:(NSInteger)low high:(NSInteger)high;
136 |
137 | @property(nonatomic, readonly) NSInteger low;
138 | @property(nonatomic, readonly) NSInteger high;
139 |
140 | @end
141 |
142 | /** Protocol for encoder implementations. */
143 | RTC_EXPORT
144 | @protocol RTCVideoEncoder
145 |
146 | - (void)setCallback:(RTCVideoEncoderCallback)callback;
147 | - (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings
148 | numberOfCores:(int)numberOfCores;
149 | - (NSInteger)releaseEncoder;
150 | - (NSInteger)encode:(RTCVideoFrame *)frame
151 | codecSpecificInfo:(nullable id)info
152 | frameTypes:(NSArray *)frameTypes;
153 | - (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate;
154 | - (NSString *)implementationName;
155 |
156 | /** Returns QP scaling settings for encoder. The quality scaler adjusts the resolution in order to
157 | * keep the QP from the encoded images within the given range. Returning nil from this function
158 | * disables quality scaling. */
159 | - (RTCVideoEncoderQpThresholds *)scalingSettings;
160 |
161 | @end
162 |
163 | /** Protocol for decoder implementations. */
164 | RTC_EXPORT
165 | @protocol RTCVideoDecoder
166 |
167 | - (void)setCallback:(RTCVideoDecoderCallback)callback;
168 | - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
169 | numberOfCores:(int)numberOfCores;
170 | - (NSInteger)releaseDecoder;
171 | - (NSInteger)decode:(RTCEncodedImage *)encodedImage
172 | missingFrames:(BOOL)missingFrames
173 | fragmentationHeader:(RTCRtpFragmentationHeader *)fragmentationHeader
174 | codecSpecificInfo:(nullable id)info
175 | renderTimeMs:(int64_t)renderTimeMs;
176 | - (NSString *)implementationName;
177 |
178 | @end
179 |
180 | NS_ASSUME_NONNULL_END
181 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoCodecFactory.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | /** RTCVideoEncoderFactory is an Objective-C version of webrtc::VideoEncoderFactory. */
19 | RTC_EXPORT
20 | @protocol RTCVideoEncoderFactory
21 |
22 | - (nullable id)createEncoder:(RTCVideoCodecInfo *)info;
23 | - (NSArray *)supportedCodecs; // TODO(andersc): "supportedFormats" instead?
24 |
25 | @end
26 |
27 | /** RTCVideoDecoderFactory is an Objective-C version of webrtc::VideoDecoderFactory. */
28 | RTC_EXPORT
29 | @protocol RTCVideoDecoderFactory
30 |
31 | - (nullable id)createDecoder:(RTCVideoCodecInfo *)info;
32 | - (NSArray *)supportedCodecs; // TODO(andersc): "supportedFormats" instead?
33 |
34 | @end
35 |
36 | #pragma mark - Default factories
37 |
38 | /** These codec factories include support for all codecs bundled with WebRTC. If using custom
39 | * codecs, create custom implementations of RTCVideoEncoderFactory and RTCVideoDecoderFactory.
40 | */
41 | RTC_EXPORT
42 | @interface RTCDefaultVideoEncoderFactory : NSObject
43 |
44 | @property(nonatomic, retain) RTCVideoCodecInfo *preferredCodec;
45 |
46 | + (NSArray *)supportedCodecs;
47 |
48 | @end
49 |
50 | RTC_EXPORT
51 | @interface RTCDefaultVideoDecoderFactory : NSObject
52 | @end
53 |
54 | NS_ASSUME_NONNULL_END
55 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoCodecH264.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | /** Class for H264 specific config. */
17 | typedef NS_ENUM(NSUInteger, RTCH264PacketizationMode) {
18 | RTCH264PacketizationModeNonInterleaved = 0, // Mode 1 - STAP-A, FU-A is allowed
19 | RTCH264PacketizationModeSingleNalUnit // Mode 0 - only single NALU allowed
20 | };
21 |
22 | RTC_EXPORT
23 | @interface RTCCodecSpecificInfoH264 : NSObject
24 |
25 | @property(nonatomic, assign) RTCH264PacketizationMode packetizationMode;
26 |
27 | @end
28 |
29 | /** Encoder. */
30 | RTC_EXPORT
31 | @interface RTCVideoEncoderH264 : NSObject
32 |
33 | - (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo;
34 |
35 | @end
36 |
37 | /** Decoder. */
38 | RTC_EXPORT
39 | @interface RTCVideoDecoderH264 : NSObject
40 | @end
41 |
42 | /** Encoder factory. */
43 | RTC_EXPORT
44 | @interface RTCVideoEncoderFactoryH264 : NSObject
45 | @end
46 |
47 | /** Decoder factory. */
48 | RTC_EXPORT
49 | @interface RTCVideoDecoderFactoryH264 : NSObject
50 | @end
51 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoDecoderVP8.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | RTC_EXPORT
17 | @interface RTCVideoDecoderVP8 : NSObject
18 |
19 | /* This returns a VP8 decoder that can be returned from a RTCVideoDecoderFactory injected into
20 | * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be
21 | * used independently from the RTCPeerConnectionFactory.
22 | */
23 | + (id)vp8Decoder;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoDecoderVP9.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | RTC_EXPORT
17 | @interface RTCVideoDecoderVP9 : NSObject
18 |
19 | /* This returns a VP9 decoder that can be returned from a RTCVideoDecoderFactory injected into
20 | * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be
21 | * used independently from the RTCPeerConnectionFactory.
22 | */
23 | + (id)vp9Decoder;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoEncoderVP8.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | RTC_EXPORT
17 | @interface RTCVideoEncoderVP8 : NSObject
18 |
19 | /* This returns a VP8 encoder that can be returned from a RTCVideoEncoderFactory injected into
20 | * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be
21 | * used independently from the RTCPeerConnectionFactory.
22 | */
23 | + (id)vp8Encoder;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoEncoderVP9.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 |
16 | RTC_EXPORT
17 | @interface RTCVideoEncoderVP9 : NSObject
18 |
19 | /* This returns a VP9 encoder that can be returned from a RTCVideoEncoderFactory injected into
20 | * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be
21 | * used independently from the RTCPeerConnectionFactory.
22 | */
23 | + (id)vp9Encoder;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoFrame.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | #import
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | typedef NS_ENUM(NSInteger, RTCVideoRotation) {
19 | RTCVideoRotation_0 = 0,
20 | RTCVideoRotation_90 = 90,
21 | RTCVideoRotation_180 = 180,
22 | RTCVideoRotation_270 = 270,
23 | };
24 |
25 | @protocol RTCVideoFrameBuffer;
26 |
27 | // RTCVideoFrame is an ObjectiveC version of webrtc::VideoFrame.
28 | RTC_EXPORT
29 | @interface RTCVideoFrame : NSObject
30 |
31 | /** Width without rotation applied. */
32 | @property(nonatomic, readonly) int width;
33 |
34 | /** Height without rotation applied. */
35 | @property(nonatomic, readonly) int height;
36 | @property(nonatomic, readonly) RTCVideoRotation rotation;
37 |
38 | /** Timestamp in nanoseconds. */
39 | @property(nonatomic, readonly) int64_t timeStampNs;
40 |
41 | /** Timestamp 90 kHz. */
42 | @property(nonatomic, assign) int32_t timeStamp;
43 |
44 | @property(nonatomic, readonly) id buffer;
45 |
46 | - (instancetype)init NS_UNAVAILABLE;
47 | - (instancetype)new NS_UNAVAILABLE;
48 |
49 | /** Initialize an RTCVideoFrame from a pixel buffer, rotation, and timestamp.
50 | * Deprecated - initialize with a RTCCVPixelBuffer instead
51 | */
52 | - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
53 | rotation:(RTCVideoRotation)rotation
54 | timeStampNs:(int64_t)timeStampNs
55 | DEPRECATED_MSG_ATTRIBUTE("use initWithBuffer instead");
56 |
57 | /** Initialize an RTCVideoFrame from a pixel buffer combined with cropping and
58 | * scaling. Cropping will be applied first on the pixel buffer, followed by
59 | * scaling to the final resolution of scaledWidth x scaledHeight.
60 | */
61 | - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
62 | scaledWidth:(int)scaledWidth
63 | scaledHeight:(int)scaledHeight
64 | cropWidth:(int)cropWidth
65 | cropHeight:(int)cropHeight
66 | cropX:(int)cropX
67 | cropY:(int)cropY
68 | rotation:(RTCVideoRotation)rotation
69 | timeStampNs:(int64_t)timeStampNs
70 | DEPRECATED_MSG_ATTRIBUTE("use initWithBuffer instead");
71 |
72 | /** Initialize an RTCVideoFrame from a frame buffer, rotation, and timestamp.
73 | */
74 | - (instancetype)initWithBuffer:(id)frameBuffer
75 | rotation:(RTCVideoRotation)rotation
76 | timeStampNs:(int64_t)timeStampNs;
77 |
78 | /** Return a frame that is guaranteed to be I420, i.e. it is possible to access
79 | * the YUV data on it.
80 | */
81 | - (RTCVideoFrame *)newI420VideoFrame;
82 |
83 | @end
84 |
85 | NS_ASSUME_NONNULL_END
86 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoFrameBuffer.h:
--------------------------------------------------------------------------------
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
12 | #import
13 |
14 | NS_ASSUME_NONNULL_BEGIN
15 |
16 | @protocol RTCI420Buffer;
17 |
18 | // RTCVideoFrameBuffer is an ObjectiveC version of webrtc::VideoFrameBuffer.
19 | RTC_EXPORT
20 | @protocol RTCVideoFrameBuffer
21 |
22 | @property(nonatomic, readonly) int width;
23 | @property(nonatomic, readonly) int height;
24 |
25 | - (id)toI420;
26 |
27 | @end
28 |
29 | /** Protocol for RTCVideoFrameBuffers containing YUV planar data. */
30 | @protocol RTCYUVPlanarBuffer
31 |
32 | @property(nonatomic, readonly) int chromaWidth;
33 | @property(nonatomic, readonly) int chromaHeight;
34 | @property(nonatomic, readonly) const uint8_t *dataY;
35 | @property(nonatomic, readonly) const uint8_t *dataU;
36 | @property(nonatomic, readonly) const uint8_t *dataV;
37 | @property(nonatomic, readonly) int strideY;
38 | @property(nonatomic, readonly) int strideU;
39 | @property(nonatomic, readonly) int strideV;
40 |
41 | - (instancetype)initWithWidth:(int)width height:(int)height;
42 | - (instancetype)initWithWidth:(int)width
43 | height:(int)height
44 | strideY:(int)strideY
45 | strideU:(int)strideU
46 | strideV:(int)strideV;
47 |
48 | @end
49 |
50 | /** Extension of the YUV planar data buffer with mutable data access */
51 | @protocol RTCMutableYUVPlanarBuffer
52 |
53 | @property(nonatomic, readonly) uint8_t *mutableDataY;
54 | @property(nonatomic, readonly) uint8_t *mutableDataU;
55 | @property(nonatomic, readonly) uint8_t *mutableDataV;
56 |
57 | @end
58 |
59 | /** Protocol for RTCYUVPlanarBuffers containing I420 data */
60 | @protocol RTCI420Buffer
61 | @end
62 |
63 | /** Extension of the I420 buffer with mutable data access */
64 | @protocol RTCMutableI420Buffer
65 | @end
66 |
67 | /** RTCVideoFrameBuffer containing a CVPixelBufferRef */
68 | RTC_EXPORT
69 | @interface RTCCVPixelBuffer : NSObject
70 |
71 | @property(nonatomic, readonly) CVPixelBufferRef pixelBuffer;
72 | @property(nonatomic, readonly) int cropX;
73 | @property(nonatomic, readonly) int cropY;
74 |
75 | + (NSSet *)supportedPixelFormats;
76 |
77 | - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer;
78 | - (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer
79 | adaptedWidth:(int)adaptedWidth
80 | adaptedHeight:(int)adaptedHeight
81 | cropWidth:(int)cropWidth
82 | cropHeight:(int)cropHeight
83 | cropX:(int)cropX
84 | cropY:(int)cropY;
85 |
86 | - (BOOL)requiresCropping;
87 | - (BOOL)requiresScalingToWidth:(int)width height:(int)height;
88 | - (int)bufferSizeForCroppingAndScalingToWidth:(int)width height:(int)height;
89 | /** The minimum size of the |tmpBuffer| must be the number of bytes returned from the
90 | * bufferSizeForCroppingAndScalingToWidth:height: method.
91 | */
92 | - (BOOL)cropAndScaleTo:(CVPixelBufferRef)outputPixelBuffer withTempBuffer:(uint8_t *)tmpBuffer;
93 |
94 | @end
95 |
96 | /** RTCI420Buffer implements the RTCI420Buffer protocol */
97 | RTC_EXPORT
98 | @interface RTCI420Buffer : NSObject
99 | @end
100 |
101 | /** Mutable version of RTCI420Buffer */
102 | RTC_EXPORT
103 | @interface RTCMutableI420Buffer : RTCI420Buffer
104 | @end
105 |
106 | NS_ASSUME_NONNULL_END
107 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoRenderer.h:
--------------------------------------------------------------------------------
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
12 | #if TARGET_OS_IPHONE
13 | #import
14 | #endif
15 |
16 | #import
17 |
18 | NS_ASSUME_NONNULL_BEGIN
19 |
20 | @class RTCVideoFrame;
21 |
22 | RTC_EXPORT
23 | @protocol RTCVideoRenderer
24 |
25 | /** The size of the frame. */
26 | - (void)setSize:(CGSize)size;
27 |
28 | /** The frame to be displayed. */
29 | - (void)renderFrame:(nullable RTCVideoFrame *)frame;
30 |
31 | @end
32 |
33 | NS_ASSUME_NONNULL_END
34 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoSource.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 | #import
15 | #import
16 |
17 | NS_ASSUME_NONNULL_BEGIN
18 |
19 | RTC_EXPORT
20 |
21 | @interface RTCVideoSource : RTCMediaSource
22 |
23 | - (instancetype)init NS_UNAVAILABLE;
24 |
25 | /**
26 | * Calling this function will cause frames to be scaled down to the
27 | * requested resolution. Also, frames will be cropped to match the
28 | * requested aspect ratio, and frames will be dropped to match the
29 | * requested fps. The requested aspect ratio is orientation agnostic and
30 | * will be adjusted to maintain the input orientation, so it doesn't
31 | * matter if e.g. 1280x720 or 720x1280 is requested.
32 | */
33 | - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoTrack.h:
--------------------------------------------------------------------------------
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
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | @protocol RTCVideoRenderer;
18 | @class RTCPeerConnectionFactory;
19 | @class RTCVideoSource;
20 |
21 | RTC_EXPORT
22 | @interface RTCVideoTrack : RTCMediaStreamTrack
23 |
24 | /** The video source for this video track. */
25 | @property(nonatomic, readonly) RTCVideoSource *source;
26 |
27 | - (instancetype)init NS_UNAVAILABLE;
28 |
29 | /** Register a renderer that will render all frames received on this track. */
30 | - (void)addRenderer:(id)renderer;
31 |
32 | /** Deregister a renderer. */
33 | - (void)removeRenderer:(id)renderer;
34 |
35 | @end
36 |
37 | NS_ASSUME_NONNULL_END
38 |
--------------------------------------------------------------------------------
/WebRTC.framework/Headers/RTCVideoViewShading.h:
--------------------------------------------------------------------------------
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