├── .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 12 | 13 | #import 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | /** 18 | * RTCVideoViewShading provides a way for apps to customize the OpenGL(ES) shaders used in 19 | * rendering for the RTCEAGLVideoView/RTCNSGLVideoView. 20 | */ 21 | RTC_EXPORT 22 | @protocol RTCVideoViewShading 23 | 24 | /** Callback for I420 frames. Each plane is given as a texture. */ 25 | - (void)applyShadingForFrameWithWidth:(int)width 26 | height:(int)height 27 | rotation:(RTCVideoRotation)rotation 28 | yPlane:(GLuint)yPlane 29 | uPlane:(GLuint)uPlane 30 | vPlane:(GLuint)vPlane; 31 | 32 | /** Callback for NV12 frames. Each plane is given as a texture. */ 33 | - (void)applyShadingForFrameWithWidth:(int)width 34 | height:(int)height 35 | rotation:(RTCVideoRotation)rotation 36 | yPlane:(GLuint)yPlane 37 | uvPlane:(GLuint)uvPlane; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /WebRTC.framework/Headers/UIDevice+RTCDevice.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 | typedef NS_ENUM(NSInteger, RTCDeviceType) { 14 | RTCDeviceTypeUnknown, 15 | RTCDeviceTypeIPhone1G, 16 | RTCDeviceTypeIPhone3G, 17 | RTCDeviceTypeIPhone3GS, 18 | RTCDeviceTypeIPhone4, 19 | RTCDeviceTypeIPhone4Verizon, 20 | RTCDeviceTypeIPhone4S, 21 | RTCDeviceTypeIPhone5GSM, 22 | RTCDeviceTypeIPhone5GSM_CDMA, 23 | RTCDeviceTypeIPhone5CGSM, 24 | RTCDeviceTypeIPhone5CGSM_CDMA, 25 | RTCDeviceTypeIPhone5SGSM, 26 | RTCDeviceTypeIPhone5SGSM_CDMA, 27 | RTCDeviceTypeIPhone6Plus, 28 | RTCDeviceTypeIPhone6, 29 | RTCDeviceTypeIPhone6S, 30 | RTCDeviceTypeIPhone6SPlus, 31 | RTCDeviceTypeIPhone7, 32 | RTCDeviceTypeIPhone7Plus, 33 | RTCDeviceTypeIPhone8, 34 | RTCDeviceTypeIPhone8Plus, 35 | RTCDeviceTypeIPhoneX, 36 | RTCDeviceTypeIPodTouch1G, 37 | RTCDeviceTypeIPodTouch2G, 38 | RTCDeviceTypeIPodTouch3G, 39 | RTCDeviceTypeIPodTouch4G, 40 | RTCDeviceTypeIPodTouch5G, 41 | RTCDeviceTypeIPad, 42 | RTCDeviceTypeIPad2Wifi, 43 | RTCDeviceTypeIPad2GSM, 44 | RTCDeviceTypeIPad2CDMA, 45 | RTCDeviceTypeIPad2Wifi2, 46 | RTCDeviceTypeIPadMiniWifi, 47 | RTCDeviceTypeIPadMiniGSM, 48 | RTCDeviceTypeIPadMiniGSM_CDMA, 49 | RTCDeviceTypeIPad3Wifi, 50 | RTCDeviceTypeIPad3GSM_CDMA, 51 | RTCDeviceTypeIPad3GSM, 52 | RTCDeviceTypeIPad4Wifi, 53 | RTCDeviceTypeIPad4GSM, 54 | RTCDeviceTypeIPad4GSM_CDMA, 55 | RTCDeviceTypeIPadAirWifi, 56 | RTCDeviceTypeIPadAirCellular, 57 | RTCDeviceTypeIPadMini2GWifi, 58 | RTCDeviceTypeIPadMini2GCellular, 59 | RTCDeviceTypeSimulatori386, 60 | RTCDeviceTypeSimulatorx86_64, 61 | }; 62 | 63 | @interface UIDevice (RTCDevice) 64 | 65 | + (RTCDeviceType)deviceType; 66 | + (BOOL)isIOS11OrLater; 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /WebRTC.framework/Headers/WebRTC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | #import 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | #import 46 | #import 47 | #import 48 | #import 49 | #import 50 | #import 51 | #import 52 | #import 53 | #import 54 | #import 55 | #import 56 | #import 57 | #import 58 | #import 59 | #import 60 | #import 61 | #import 62 | #import 63 | #import 64 | #import 65 | #import 66 | -------------------------------------------------------------------------------- /WebRTC.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zevarito/PodRTC/67f47c40a0729b09dc4121d8f881540e7c8e6fdd/WebRTC.framework/Info.plist -------------------------------------------------------------------------------- /WebRTC.framework/LICENSE.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Licenses 6 | 11 | 12 |

webrtc

13 |
 14 | Copyright (c) 2011, The WebRTC project authors. All rights reserved.
 15 | 
 16 | Redistribution and use in source and binary forms, with or without
 17 | modification, are permitted provided that the following conditions are
 18 | met:
 19 | 
 20 |   * Redistributions of source code must retain the above copyright
 21 |     notice, this list of conditions and the following disclaimer.
 22 | 
 23 |   * Redistributions in binary form must reproduce the above copyright
 24 |     notice, this list of conditions and the following disclaimer in
 25 |     the documentation and/or other materials provided with the
 26 |     distribution.
 27 | 
 28 |   * Neither the name of Google nor the names of its contributors may
 29 |     be used to endorse or promote products derived from this software
 30 |     without specific prior written permission.
 31 | 
 32 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 33 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 34 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 35 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 36 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 37 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 38 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 39 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 40 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 41 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 42 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 43 | 
 44 | This source tree contains third party source code which is governed by third
 45 | party licenses. Paths to the files and associated licenses are collected here.
 46 | 
 47 | Files governed by third party licenses:
 48 | base/base64.cc
 49 | base/base64.h
 50 | base/md5.cc
 51 | base/md5.h
 52 | base/sha1.cc
 53 | base/sha1.h
 54 | base/sigslot.cc
 55 | base/sigslot.h
 56 | common_audio/fft4g.c
 57 | common_audio/signal_processing/spl_sqrt_floor.c
 58 | common_audio/signal_processing/spl_sqrt_floor_arm.S
 59 | modules/audio_coding/codecs/g711/main/source/g711.c
 60 | modules/audio_coding/codecs/g711/main/source/g711.h
 61 | modules/audio_coding/codecs/g722/main/source/g722_decode.c
 62 | modules/audio_coding/codecs/g722/main/source/g722_enc_dec.h
 63 | modules/audio_coding/codecs/g722/main/source/g722_encode.c
 64 | modules/audio_coding/codecs/isac/main/source/fft.c
 65 | modules/audio_device/mac/portaudio/pa_memorybarrier.h
 66 | modules/audio_device/mac/portaudio/pa_ringbuffer.c
 67 | modules/audio_device/mac/portaudio/pa_ringbuffer.h
 68 | modules/audio_processing/aec/aec_rdft.c
 69 | system_wrappers/source/condition_variable_event_win.cc
 70 | system_wrappers/source/set_thread_name_win.h
 71 | 
 72 | Individual licenses for each file:
 73 | -------------------------------------------------------------------------------
 74 | Files:
 75 | base/base64.cc
 76 | base/base64.h
 77 | 
 78 | License:
 79 | //*********************************************************************
 80 | //* Base64 - a simple base64 encoder and decoder.
 81 | //*
 82 | //*     Copyright (c) 1999, Bob Withers - bwit@pobox.com
 83 | //*
 84 | //* This code may be freely used for any purpose, either personal
 85 | //* or commercial, provided the authors copyright notice remains
 86 | //* intact.
 87 | //*
 88 | //* Enhancements by Stanley Yamane:
 89 | //*     o reverse lookup table for the decode function
 90 | //*     o reserve string buffer space in advance
 91 | //*
 92 | //*********************************************************************
 93 | -------------------------------------------------------------------------------
 94 | Files:
 95 | base/md5.cc
 96 | base/md5.h
 97 | 
 98 | License:
 99 | /*
100 |  * This code implements the MD5 message-digest algorithm.
101 |  * The algorithm is due to Ron Rivest.  This code was
102 |  * written by Colin Plumb in 1993, no copyright is claimed.
103 |  * This code is in the public domain; do with it what you wish.
104 |  *
105 | -------------------------------------------------------------------------------
106 | Files:
107 | base/sha1.cc
108 | base/sha1.h
109 | 
110 | License:
111 | /*
112 |  * SHA-1 in C
113 |  * By Steve Reid <sreid@sea-to-sky.net>
114 |  * 100% Public Domain
115 |  *
116 |  * -----------------
117 |  * Modified 7/98
118 |  * By James H. Brown <jbrown@burgoyne.com>
119 |  * Still 100% Public Domain
120 |  *
121 | -------------------------------------------------------------------------------
122 | Files:
123 | base/sigslot.cc
124 | base/sigslot.h
125 | 
126 | License:
127 | // sigslot.h: Signal/Slot classes
128 | //
129 | // Written by Sarah Thompson (sarah@telergy.com) 2002.
130 | //
131 | // License: Public domain. You are free to use this code however you like, with
132 | // the proviso that the author takes on no responsibility or liability for any
133 | // use.
134 | -------------------------------------------------------------------------------
135 | Files:
136 | common_audio/signal_processing/spl_sqrt_floor.c
137 | common_audio/signal_processing/spl_sqrt_floor_arm.S
138 | 
139 | License:
140 | /*
141 |  * Written by Wilco Dijkstra, 1996. The following email exchange establishes the
142 |  * license.
143 |  *
144 |  * From: Wilco Dijkstra <Wilco.Dijkstra@ntlworld.com>
145 |  * Date: Fri, Jun 24, 2011 at 3:20 AM
146 |  * Subject: Re: sqrt routine
147 |  * To: Kevin Ma <kma@google.com>
148 |  * Hi Kevin,
149 |  * Thanks for asking. Those routines are public domain (originally posted to
150 |  * comp.sys.arm a long time ago), so you can use them freely for any purpose.
151 |  * Cheers,
152 |  * Wilco
153 |  *
154 |  * ----- Original Message -----
155 |  * From: "Kevin Ma" <kma@google.com>
156 |  * To: <Wilco.Dijkstra@ntlworld.com>
157 |  * Sent: Thursday, June 23, 2011 11:44 PM
158 |  * Subject: Fwd: sqrt routine
159 |  * Hi Wilco,
160 |  * I saw your sqrt routine from several web sites, including
161 |  * http://www.finesse.demon.co.uk/steven/sqrt.html.
162 |  * Just wonder if there's any copyright information with your Successive
163 |  * approximation routines, or if I can freely use it for any purpose.
164 |  * Thanks.
165 |  * Kevin
166 |  */
167 | -------------------------------------------------------------------------------
168 | Files:
169 | modules/audio_coding/codecs/g711/main/source/g711.c
170 | modules/audio_coding/codecs/g711/main/source/g711.h
171 | 
172 | License:
173 | /*
174 |  * SpanDSP - a series of DSP components for telephony
175 |  *
176 |  * g711.h - In line A-law and u-law conversion routines
177 |  *
178 |  * Written by Steve Underwood <steveu@coppice.org>
179 |  *
180 |  * Copyright (C) 2001 Steve Underwood
181 |  *
182 |  *  Despite my general liking of the GPL, I place this code in the
183 |  *  public domain for the benefit of all mankind - even the slimy
184 |  *  ones who might try to proprietize my work and use it to my
185 |  *  detriment.
186 |  */
187 | -------------------------------------------------------------------------------
188 | Files:
189 | modules/audio_coding/codecs/g722/main/source/g722_decode.c
190 | modules/audio_coding/codecs/g722/main/source/g722_enc_dec.h
191 | modules/audio_coding/codecs/g722/main/source/g722_encode.c
192 | 
193 | License:
194 | /*
195 |  * SpanDSP - a series of DSP components for telephony
196 |  *
197 |  * g722_decode.c - The ITU G.722 codec, decode part.
198 |  *
199 |  * Written by Steve Underwood <steveu@coppice.org>
200 |  *
201 |  * Copyright (C) 2005 Steve Underwood
202 |  *
203 |  *  Despite my general liking of the GPL, I place my own contributions
204 |  *  to this code in the public domain for the benefit of all mankind -
205 |  *  even the slimy ones who might try to proprietize my work and use it
206 |  *  to my detriment.
207 |  *
208 |  * Based in part on a single channel G.722 codec which is:
209 |  *
210 |  * Copyright (c) CMU 1993
211 |  * Computer Science, Speech Group
212 |  * Chengxiang Lu and Alex Hauptmann
213 |  */
214 | -------------------------------------------------------------------------------
215 | Files:
216 | modules/audio_coding/codecs/isac/main/source/fft.c
217 | 
218 | License:
219 | /*
220 |  * Copyright(c)1995,97 Mark Olesen <olesen@me.QueensU.CA>
221 |  *    Queen's Univ at Kingston (Canada)
222 |  *
223 |  * Permission to use, copy, modify, and distribute this software for
224 |  * any purpose without fee is hereby granted, provided that this
225 |  * entire notice is included in all copies of any software which is
226 |  * or includes a copy or modification of this software and in all
227 |  * copies of the supporting documentation for such software.
228 |  *
229 |  * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
230 |  * IMPLIED WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR QUEEN'S
231 |  * UNIVERSITY AT KINGSTON MAKES ANY REPRESENTATION OR WARRANTY OF ANY
232 |  * KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS
233 |  * FITNESS FOR ANY PARTICULAR PURPOSE.
234 |  *
235 |  * All of which is to say that you can do what you like with this
236 |  * source code provided you don't try to sell it as your own and you
237 |  * include an unaltered copy of this message (including the
238 |  * copyright).
239 |  *
240 |  * It is also implicitly understood that bug fixes and improvements
241 |  * should make their way back to the general Internet community so
242 |  * that everyone benefits.
243 |  */
244 | -------------------------------------------------------------------------------
245 | Files:
246 | modules/audio_device/mac/portaudio/pa_memorybarrier.h
247 | modules/audio_device/mac/portaudio/pa_ringbuffer.c
248 | modules/audio_device/mac/portaudio/pa_ringbuffer.h
249 | 
250 | License:
251 | /*
252 |  * $Id: pa_memorybarrier.h 1240 2007-07-17 13:05:07Z bjornroche $
253 |  * Portable Audio I/O Library
254 |  * Memory barrier utilities
255 |  *
256 |  * Author: Bjorn Roche, XO Audio, LLC
257 |  *
258 |  * This program uses the PortAudio Portable Audio Library.
259 |  * For more information see: http://www.portaudio.com
260 |  * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
261 |  *
262 |  * Permission is hereby granted, free of charge, to any person obtaining
263 |  * a copy of this software and associated documentation files
264 |  * (the "Software"), to deal in the Software without restriction,
265 |  * including without limitation the rights to use, copy, modify, merge,
266 |  * publish, distribute, sublicense, and/or sell copies of the Software,
267 |  * and to permit persons to whom the Software is furnished to do so,
268 |  * subject to the following conditions:
269 |  *
270 |  * The above copyright notice and this permission notice shall be
271 |  * included in all copies or substantial portions of the Software.
272 |  *
273 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
274 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
275 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
276 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
277 |  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
278 |  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
279 |  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
280 |  */
281 | 
282 | /*
283 |  * The text above constitutes the entire PortAudio license; however,
284 |  * the PortAudio community also makes the following non-binding requests:
285 |  *
286 |  * Any person wishing to distribute modifications to the Software is
287 |  * requested to send the modifications to the original developer so that
288 |  * they can be incorporated into the canonical version. It is also
289 |  * requested that these non-binding requests be included along with the
290 |  * license above.
291 |  */
292 | 
293 | /*
294 |  * $Id: pa_ringbuffer.c 1421 2009-11-18 16:09:05Z bjornroche $
295 |  * Portable Audio I/O Library
296 |  * Ring Buffer utility.
297 |  *
298 |  * Author: Phil Burk, http://www.softsynth.com
299 |  * modified for SMP safety on Mac OS X by Bjorn Roche
300 |  * modified for SMP safety on Linux by Leland Lucius
301 |  * also, allowed for const where possible
302 |  * modified for multiple-byte-sized data elements by Sven Fischer
303 |  *
304 |  * Note that this is safe only for a single-thread reader and a
305 |  * single-thread writer.
306 |  *
307 |  * This program uses the PortAudio Portable Audio Library.
308 |  * For more information see: http://www.portaudio.com
309 |  * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
310 |  *
311 |  * Permission is hereby granted, free of charge, to any person obtaining
312 |  * a copy of this software and associated documentation files
313 |  * (the "Software"), to deal in the Software without restriction,
314 |  * including without limitation the rights to use, copy, modify, merge,
315 |  * publish, distribute, sublicense, and/or sell copies of the Software,
316 |  * and to permit persons to whom the Software is furnished to do so,
317 |  * subject to the following conditions:
318 |  *
319 |  * The above copyright notice and this permission notice shall be
320 |  * included in all copies or substantial portions of the Software.
321 |  *
322 |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
323 |  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
324 |  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
325 |  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
326 |  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
327 |  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
328 |  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
329 |  */
330 | 
331 | /*
332 |  * The text above constitutes the entire PortAudio license; however,
333 |  * the PortAudio community also makes the following non-binding requests:
334 |  *
335 |  * Any person wishing to distribute modifications to the Software is
336 |  * requested to send the modifications to the original developer so that
337 |  * they can be incorporated into the canonical version. It is also
338 |  * requested that these non-binding requests be included along with the
339 |  * license above.
340 |  */
341 | -------------------------------------------------------------------------------
342 | Files:
343 | common_audio/fft4g.c
344 | modules/audio_processing/aec/aec_rdft.c
345 | 
346 | License:
347 | /*
348 |  * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html
349 |  * Copyright Takuya OOURA, 1996-2001
350 |  *
351 |  * You may use, copy, modify and distribute this code for any purpose (include
352 |  * commercial use) and without fee. Please refer to this package when you modify
353 |  * this code.
354 |  */
355 | -------------------------------------------------------------------------------
356 | Files:
357 | system_wrappers/source/condition_variable_event_win.cc
358 | 
359 | Source:
360 | http://www1.cse.wustl.edu/~schmidt/ACE-copying.html
361 | 
362 | License:
363 | Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM),
364 | and CoSMIC(TM)
365 | 
366 | ACE(TM), TAO(TM), CIAO(TM), DAnCE>(TM), and CoSMIC(TM) (henceforth referred to
367 | as "DOC software") are copyrighted by Douglas C. Schmidt and his research
368 | group at Washington University, University of California, Irvine, and
369 | Vanderbilt University, Copyright (c) 1993-2009, all rights reserved. Since DOC
370 | software is open-source, freely available software, you are free to use,
371 | modify, copy, and distribute--perpetually and irrevocably--the DOC software
372 | source code and object code produced from the source, as well as copy and
373 | distribute modified versions of this software. You must, however, include this
374 | copyright statement along with any code built using DOC software that you
375 | release. No copyright statement needs to be provided if you just ship binary
376 | executables of your software products.
377 | You can use DOC software in commercial and/or binary software releases and are
378 | under no obligation to redistribute any of your source code that is built
379 | using DOC software. Note, however, that you may not misappropriate the DOC
380 | software code, such as copyrighting it yourself or claiming authorship of the
381 | DOC software code, in a way that will prevent DOC software from being
382 | distributed freely using an open-source development model. You needn't inform
383 | anyone that you're using DOC software in your software, though we encourage
384 | you to let us know so we can promote your project in the DOC software success
385 | stories.
386 | 
387 | The ACE, TAO, CIAO, DAnCE, and CoSMIC web sites are maintained by the DOC
388 | Group at the Institute for Software Integrated Systems (ISIS) and the Center
389 | for Distributed Object Computing of Washington University, St. Louis for the
390 | development of open-source software as part of the open-source software
391 | community. Submissions are provided by the submitter ``as is'' with no
392 | warranties whatsoever, including any warranty of merchantability,
393 | noninfringement of third party intellectual property, or fitness for any
394 | particular purpose. In no event shall the submitter be liable for any direct,
395 | indirect, special, exemplary, punitive, or consequential damages, including
396 | without limitation, lost profits, even if advised of the possibility of such
397 | damages. Likewise, DOC software is provided as is with no warranties of any
398 | kind, including the warranties of design, merchantability, and fitness for a
399 | particular purpose, noninfringement, or arising from a course of dealing,
400 | usage or trade practice. Washington University, UC Irvine, Vanderbilt
401 | University, their employees, and students shall have no liability with respect
402 | to the infringement of copyrights, trade secrets or any patents by DOC
403 | software or any part thereof. Moreover, in no event will Washington
404 | University, UC Irvine, or Vanderbilt University, their employees, or students
405 | be liable for any lost revenue or profits or other special, indirect and
406 | consequential damages.
407 | 
408 | DOC software is provided with no support and without any obligation on the
409 | part of Washington University, UC Irvine, Vanderbilt University, their
410 | employees, or students to assist in its use, correction, modification, or
411 | enhancement. A number of companies around the world provide commercial support
412 | for DOC software, however. DOC software is Y2K-compliant, as long as the
413 | underlying OS platform is Y2K-compliant. Likewise, DOC software is compliant
414 | with the new US daylight savings rule passed by Congress as "The Energy Policy
415 | Act of 2005," which established new daylight savings times (DST) rules for the
416 | United States that expand DST as of March 2007. Since DOC software obtains
417 | time/date and calendaring information from operating systems users will not be
418 | affected by the new DST rules as long as they upgrade their operating systems
419 | accordingly.
420 | 
421 | The names ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), CoSMIC(TM), Washington
422 | University, UC Irvine, and Vanderbilt University, may not be used to endorse
423 | or promote products or services derived from this source without express
424 | written permission from Washington University, UC Irvine, or Vanderbilt
425 | University. This license grants no permission to call products or services
426 | derived from this source ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), or CoSMIC(TM),
427 | nor does it grant permission for the name Washington University, UC Irvine, or
428 | Vanderbilt University to appear in their names.
429 | -------------------------------------------------------------------------------
430 | Files:
431 | system_wrappers/source/set_thread_name_win.h
432 | 
433 | Source:
434 | http://msdn.microsoft.com/en-us/cc300389.aspx#P
435 | 
436 | License:
437 | This license governs use of code marked as “sample” or “example” available on
438 | this web site without a license agreement, as provided under the section above
439 | titled “NOTICE SPECIFIC TO SOFTWARE AVAILABLE ON THIS WEB SITE.” If you use
440 | such code (the “software”), you accept this license. If you do not accept the
441 | license, do not use the software.
442 | 
443 | 1. Definitions
444 | 
445 | The terms “reproduce,” “reproduction,” “derivative works,” and “distribution”
446 | have the same meaning here as under U.S. copyright law.
447 | 
448 | A “contribution” is the original software, or any additions or changes to the
449 | software.
450 | 
451 | A “contributor” is any person that distributes its contribution under this
452 | license.
453 | 
454 | “Licensed patents” are a contributor’s patent claims that read directly on its
455 | contribution.
456 | 
457 | 2. Grant of Rights
458 | 
459 | (A) Copyright Grant - Subject to the terms of this license, including the
460 | license conditions and limitations in section 3, each contributor grants you a
461 | non-exclusive, worldwide, royalty-free copyright license to reproduce its
462 | contribution, prepare derivative works of its contribution, and distribute its
463 | contribution or any derivative works that you create.
464 | 
465 | (B) Patent Grant - Subject to the terms of this license, including the license
466 | conditions and limitations in section 3, each contributor grants you a
467 | non-exclusive, worldwide, royalty-free license under its licensed patents to
468 | make, have made, use, sell, offer for sale, import, and/or otherwise dispose
469 | of its contribution in the software or derivative works of the contribution in
470 | the software.
471 | 
472 | 3. Conditions and Limitations
473 | 
474 | (A) No Trademark License- This license does not grant you rights to use any
475 | contributors’ name, logo, or trademarks.
476 | 
477 | (B) If you bring a patent claim against any contributor over patents that you
478 | claim are infringed by the software, your patent license from such contributor
479 | to the software ends automatically.
480 | 
481 | (C) If you distribute any portion of the software, you must retain all
482 | copyright, patent, trademark, and attribution notices that are present in the
483 | software.
484 | 
485 | (D) If you distribute any portion of the software in source code form, you may
486 | do so only under this license by including a complete copy of this license
487 | with your distribution. If you distribute any portion of the software in
488 | compiled or object code form, you may only do so under a license that complies
489 | with this license.
490 | 
491 | (E) The software is licensed “as-is.” You bear the risk of using it. The
492 | contributors give no express warranties, guarantees or conditions. You may
493 | have additional consumer rights under your local laws which this license
494 | cannot change. To the extent permitted under your local laws, the contributors
495 | exclude the implied warranties of merchantability, fitness for a particular
496 | purpose and non-infringement.
497 | 
498 | (F) Platform Limitation - The licenses granted in sections 2(A) and 2(B)
499 | extend only to the software or derivative works that you create that run on a
500 | Microsoft Windows operating system product.
501 | 
502 | 
503 | 
504 |

boringssl

505 |
506 | BoringSSL is a fork of OpenSSL. As such, large parts of it fall under OpenSSL
507 | licensing. Files that are completely new have a Google copyright and an ISC
508 | license. This license is reproduced at the bottom of this file.
509 | 
510 | Contributors to BoringSSL are required to follow the CLA rules for Chromium:
511 | https://cla.developers.google.com/clas
512 | 
513 | Some files from Intel are under yet another license, which is also included
514 | underneath.
515 | 
516 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the
517 | OpenSSL License and the original SSLeay license apply to the toolkit. See below
518 | for the actual license texts. Actually both licenses are BSD-style Open Source
519 | licenses. In case of any license issues related to OpenSSL please contact
520 | openssl-core@openssl.org.
521 | 
522 | The following are Google-internal bug numbers where explicit permission from
523 | some authors is recorded for use of their work. (This is purely for our own
524 | record keeping.)
525 |   27287199
526 |   27287880
527 |   27287883
528 | 
529 |   OpenSSL License
530 |   ---------------
531 | 
532 | /* ====================================================================
533 |  * Copyright (c) 1998-2011 The OpenSSL Project.  All rights reserved.
534 |  *
535 |  * Redistribution and use in source and binary forms, with or without
536 |  * modification, are permitted provided that the following conditions
537 |  * are met:
538 |  *
539 |  * 1. Redistributions of source code must retain the above copyright
540 |  *    notice, this list of conditions and the following disclaimer. 
541 |  *
542 |  * 2. Redistributions in binary form must reproduce the above copyright
543 |  *    notice, this list of conditions and the following disclaimer in
544 |  *    the documentation and/or other materials provided with the
545 |  *    distribution.
546 |  *
547 |  * 3. All advertising materials mentioning features or use of this
548 |  *    software must display the following acknowledgment:
549 |  *    "This product includes software developed by the OpenSSL Project
550 |  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
551 |  *
552 |  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
553 |  *    endorse or promote products derived from this software without
554 |  *    prior written permission. For written permission, please contact
555 |  *    openssl-core@openssl.org.
556 |  *
557 |  * 5. Products derived from this software may not be called "OpenSSL"
558 |  *    nor may "OpenSSL" appear in their names without prior written
559 |  *    permission of the OpenSSL Project.
560 |  *
561 |  * 6. Redistributions of any form whatsoever must retain the following
562 |  *    acknowledgment:
563 |  *    "This product includes software developed by the OpenSSL Project
564 |  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
565 |  *
566 |  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
567 |  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
568 |  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
569 |  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
570 |  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
571 |  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
572 |  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
573 |  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
574 |  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
575 |  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
576 |  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
577 |  * OF THE POSSIBILITY OF SUCH DAMAGE.
578 |  * ====================================================================
579 |  *
580 |  * This product includes cryptographic software written by Eric Young
581 |  * (eay@cryptsoft.com).  This product includes software written by Tim
582 |  * Hudson (tjh@cryptsoft.com).
583 |  *
584 |  */
585 | 
586 |  Original SSLeay License
587 |  -----------------------
588 | 
589 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
590 |  * All rights reserved.
591 |  *
592 |  * This package is an SSL implementation written
593 |  * by Eric Young (eay@cryptsoft.com).
594 |  * The implementation was written so as to conform with Netscapes SSL.
595 |  * 
596 |  * This library is free for commercial and non-commercial use as long as
597 |  * the following conditions are aheared to.  The following conditions
598 |  * apply to all code found in this distribution, be it the RC4, RSA,
599 |  * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
600 |  * included with this distribution is covered by the same copyright terms
601 |  * except that the holder is Tim Hudson (tjh@cryptsoft.com).
602 |  * 
603 |  * Copyright remains Eric Young's, and as such any Copyright notices in
604 |  * the code are not to be removed.
605 |  * If this package is used in a product, Eric Young should be given attribution
606 |  * as the author of the parts of the library used.
607 |  * This can be in the form of a textual message at program startup or
608 |  * in documentation (online or textual) provided with the package.
609 |  * 
610 |  * Redistribution and use in source and binary forms, with or without
611 |  * modification, are permitted provided that the following conditions
612 |  * are met:
613 |  * 1. Redistributions of source code must retain the copyright
614 |  *    notice, this list of conditions and the following disclaimer.
615 |  * 2. Redistributions in binary form must reproduce the above copyright
616 |  *    notice, this list of conditions and the following disclaimer in the
617 |  *    documentation and/or other materials provided with the distribution.
618 |  * 3. All advertising materials mentioning features or use of this software
619 |  *    must display the following acknowledgement:
620 |  *    "This product includes cryptographic software written by
621 |  *     Eric Young (eay@cryptsoft.com)"
622 |  *    The word 'cryptographic' can be left out if the rouines from the library
623 |  *    being used are not cryptographic related :-).
624 |  * 4. If you include any Windows specific code (or a derivative thereof) from 
625 |  *    the apps directory (application code) you must include an acknowledgement:
626 |  *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
627 |  * 
628 |  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
629 |  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
630 |  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
631 |  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
632 |  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
633 |  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
634 |  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
635 |  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
636 |  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
637 |  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
638 |  * SUCH DAMAGE.
639 |  * 
640 |  * The licence and distribution terms for any publically available version or
641 |  * derivative of this code cannot be changed.  i.e. this code cannot simply be
642 |  * copied and put under another distribution licence
643 |  * [including the GNU Public Licence.]
644 |  */
645 | 
646 | 
647 | ISC license used for completely new code in BoringSSL:
648 | 
649 | /* Copyright (c) 2015, Google Inc.
650 |  *
651 |  * Permission to use, copy, modify, and/or distribute this software for any
652 |  * purpose with or without fee is hereby granted, provided that the above
653 |  * copyright notice and this permission notice appear in all copies.
654 |  *
655 |  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
656 |  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
657 |  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
658 |  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
659 |  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
660 |  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
661 |  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
662 | 
663 | 
664 | Some files from Intel carry the following license:
665 | 
666 | # Copyright (c) 2012, Intel Corporation
667 | #
668 | # All rights reserved.
669 | #
670 | # Redistribution and use in source and binary forms, with or without
671 | # modification, are permitted provided that the following conditions are
672 | # met:
673 | #
674 | # *  Redistributions of source code must retain the above copyright
675 | #    notice, this list of conditions and the following disclaimer.
676 | #
677 | # *  Redistributions in binary form must reproduce the above copyright
678 | #    notice, this list of conditions and the following disclaimer in the
679 | #    documentation and/or other materials provided with the
680 | #    distribution.
681 | #
682 | # *  Neither the name of the Intel Corporation nor the names of its
683 | #    contributors may be used to endorse or promote products derived from
684 | #    this software without specific prior written permission.
685 | #
686 | #
687 | # THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""AS IS"" AND ANY
688 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
689 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
690 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION OR
691 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
692 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
693 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
694 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
695 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
696 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
697 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
698 | 
699 | 
700 |

libsrtp

701 |
702 | /*
703 |  *	
704 |  * Copyright (c) 2001-2017 Cisco Systems, Inc.
705 |  * All rights reserved.
706 |  * 
707 |  * Redistribution and use in source and binary forms, with or without
708 |  * modification, are permitted provided that the following conditions
709 |  * are met:
710 |  * 
711 |  *   Redistributions of source code must retain the above copyright
712 |  *   notice, this list of conditions and the following disclaimer.
713 |  * 
714 |  *   Redistributions in binary form must reproduce the above
715 |  *   copyright notice, this list of conditions and the following
716 |  *   disclaimer in the documentation and/or other materials provided
717 |  *   with the distribution.
718 |  * 
719 |  *   Neither the name of the Cisco Systems, Inc. nor the names of its
720 |  *   contributors may be used to endorse or promote products derived
721 |  *   from this software without specific prior written permission.
722 |  * 
723 |  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
724 |  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
725 |  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
726 |  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
727 |  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
728 |  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
729 |  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
730 |  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
731 |  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
732 |  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
733 |  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
734 |  * OF THE POSSIBILITY OF SUCH DAMAGE.
735 |  *
736 |  */
737 | 
738 | 
739 |

libvpx

740 |
741 | Copyright (c) 2010, The WebM Project authors. All rights reserved.
742 | 
743 | Redistribution and use in source and binary forms, with or without
744 | modification, are permitted provided that the following conditions are
745 | met:
746 | 
747 |   * Redistributions of source code must retain the above copyright
748 |     notice, this list of conditions and the following disclaimer.
749 | 
750 |   * Redistributions in binary form must reproduce the above copyright
751 |     notice, this list of conditions and the following disclaimer in
752 |     the documentation and/or other materials provided with the
753 |     distribution.
754 | 
755 |   * Neither the name of Google, nor the WebM Project, nor the names
756 |     of its contributors may be used to endorse or promote products
757 |     derived from this software without specific prior written
758 |     permission.
759 | 
760 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
761 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
762 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
763 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
764 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
765 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
766 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
767 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
768 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
769 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
770 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
771 | 
772 | 
773 | 
774 |

libyuv

775 |
776 | Copyright 2011 The LibYuv Project Authors. All rights reserved.
777 | 
778 | Redistribution and use in source and binary forms, with or without
779 | modification, are permitted provided that the following conditions are
780 | met:
781 | 
782 |   * Redistributions of source code must retain the above copyright
783 |     notice, this list of conditions and the following disclaimer.
784 | 
785 |   * Redistributions in binary form must reproduce the above copyright
786 |     notice, this list of conditions and the following disclaimer in
787 |     the documentation and/or other materials provided with the
788 |     distribution.
789 | 
790 |   * Neither the name of Google nor the names of its contributors may
791 |     be used to endorse or promote products derived from this software
792 |     without specific prior written permission.
793 | 
794 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
795 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
796 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
797 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
798 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
799 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
800 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
801 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
802 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
803 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
804 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
805 | 
806 | 
807 |

opus

808 |
809 | Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
810 |                     Jean-Marc Valin, Timothy B. Terriberry,
811 |                     CSIRO, Gregory Maxwell, Mark Borgerding,
812 |                     Erik de Castro Lopo
813 | 
814 | Redistribution and use in source and binary forms, with or without
815 | modification, are permitted provided that the following conditions
816 | are met:
817 | 
818 | - Redistributions of source code must retain the above copyright
819 | notice, this list of conditions and the following disclaimer.
820 | 
821 | - Redistributions in binary form must reproduce the above copyright
822 | notice, this list of conditions and the following disclaimer in the
823 | documentation and/or other materials provided with the distribution.
824 | 
825 | - Neither the name of Internet Society, IETF or IETF Trust, nor the
826 | names of specific contributors, may be used to endorse or promote
827 | products derived from this software without specific prior written
828 | permission.
829 | 
830 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
831 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
832 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
833 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
834 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
835 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
836 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
837 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
838 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
839 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
840 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
841 | 
842 | Opus is subject to the royalty-free patent licenses which are
843 | specified at:
844 | 
845 | Xiph.Org Foundation:
846 | https://datatracker.ietf.org/ipr/1524/
847 | 
848 | Microsoft Corporation:
849 | https://datatracker.ietf.org/ipr/1914/
850 | 
851 | Broadcom Corporation:
852 | https://datatracker.ietf.org/ipr/1526/
853 | 
854 | 
855 |

protobuf

856 |
857 | This license applies to all parts of Protocol Buffers except the following:
858 | 
859 |   - Atomicops support for generic gcc, located in
860 |     src/google/protobuf/stubs/atomicops_internals_generic_gcc.h.
861 |     This file is copyrighted by Red Hat Inc.
862 | 
863 |   - Atomicops support for AIX/POWER, located in
864 |     src/google/protobuf/stubs/atomicops_internals_power.h.
865 |     This file is copyrighted by Bloomberg Finance LP.
866 | 
867 | Copyright 2014, Google Inc.  All rights reserved.
868 | 
869 | Redistribution and use in source and binary forms, with or without
870 | modification, are permitted provided that the following conditions are
871 | met:
872 | 
873 |     * Redistributions of source code must retain the above copyright
874 | notice, this list of conditions and the following disclaimer.
875 |     * Redistributions in binary form must reproduce the above
876 | copyright notice, this list of conditions and the following disclaimer
877 | in the documentation and/or other materials provided with the
878 | distribution.
879 |     * Neither the name of Google Inc. nor the names of its
880 | contributors may be used to endorse or promote products derived from
881 | this software without specific prior written permission.
882 | 
883 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
884 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
885 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
886 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
887 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
888 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
889 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
890 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
891 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
892 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
893 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
894 | 
895 | Code generated by the Protocol Buffer compiler is owned by the owner
896 | of the input file used when generating it.  This code is not
897 | standalone and requires a support library to be linked with it.  This
898 | support library is itself covered by the above license.
899 | 
900 | 
901 |

usrsctp

902 |
903 | (Copied from the COPYRIGHT file of
904 | https://code.google.com/p/sctp-refimpl/source/browse/trunk/COPYRIGHT)
905 | --------------------------------------------------------------------------------
906 | 
907 | Copyright (c) 2001, 2002 Cisco Systems, Inc.
908 | Copyright (c) 2002-12 Randall R. Stewart
909 | Copyright (c) 2002-12 Michael Tuexen
910 | All rights reserved.
911 | 
912 | Redistribution and use in source and binary forms, with or without
913 | modification, are permitted provided that the following conditions
914 | are met:
915 | 
916 | 1. Redistributions of source code must retain the above copyright
917 |    notice, this list of conditions and the following disclaimer.
918 | 2. Redistributions in binary form must reproduce the above copyright
919 |    notice, this list of conditions and the following disclaimer in the
920 |    documentation and/or other materials provided with the distribution.
921 | 
922 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
923 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
924 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
925 | ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
926 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
927 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
928 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
929 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
930 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
931 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
932 | SUCH DAMAGE.
933 | 
934 | 
935 | 936 | -------------------------------------------------------------------------------- /WebRTC.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module WebRTC { 2 | umbrella header "WebRTC.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /WebRTC.framework/WebRTC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zevarito/PodRTC/67f47c40a0729b09dc4121d8f881540e7c8e6fdd/WebRTC.framework/WebRTC -------------------------------------------------------------------------------- /patches/58.19.0.1-issue2833833002_1_10001.diff: -------------------------------------------------------------------------------- 1 | Index: build/config/compiler/BUILD.gn 2 | diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn 3 | index 630db84f14be471ba134fa4bb559c5808e25cbff..1cf6669ed4f6933d88fb03205914dbcf5c310fb9 100644 4 | --- a/build/config/compiler/BUILD.gn 5 | +++ b/build/config/compiler/BUILD.gn 6 | @@ -20,6 +20,9 @@ if (current_cpu == "mipsel" || current_cpu == "mips64el") { 7 | if (is_mac) { 8 | import("//build/config/mac/symbols.gni") 9 | } 10 | +if (is_ios) { 11 | + import("//build/config/ios/ios_sdk.gni") 12 | +} 13 | 14 | declare_args() { 15 | # Default to warnings as errors for default workflow, where we catch 16 | @@ -1102,6 +1105,17 @@ config("default_warnings") { 17 | # TODO(thakis ): https://crbug.com/683349 18 | "-Wno-user-defined-warnings", 19 | ] 20 | + } else if (use_xcode_clang && 21 | + (xcode_version == "0830" || xcode_version == "0831" || 22 | + xcode_version == "0832")) { 23 | + # This is necessary to allow a progressive transition from using xcode 8 to 8.3. Remove when all bots are migrated to 8.3. 24 | + cflags += [ 25 | + # TODO(thakis): https://crbug.com/604888 26 | + "-Wno-undefined-var-template", 27 | + 28 | + # TODO(hans): https://crbug.com/637306 29 | + "-Wno-address-of-packed-member", 30 | + ] 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /patches/59.13.0.1-issue2833833002_1_10001.diff: -------------------------------------------------------------------------------- 1 | Index: build/config/compiler/BUILD.gn 2 | diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn 3 | index 630db84f14be471ba134fa4bb559c5808e25cbff..1cf6669ed4f6933d88fb03205914dbcf5c310fb9 100644 4 | --- a/build/config/compiler/BUILD.gn 5 | +++ b/build/config/compiler/BUILD.gn 6 | @@ -20,6 +20,9 @@ if (current_cpu == "mipsel" || current_cpu == "mips64el") { 7 | if (is_mac) { 8 | import("//build/config/mac/symbols.gni") 9 | } 10 | +if (is_ios) { 11 | + import("//build/config/ios/ios_sdk.gni") 12 | +} 13 | 14 | declare_args() { 15 | # Default to warnings as errors for default workflow, where we catch 16 | @@ -1102,6 +1105,17 @@ config("default_warnings") { 17 | # TODO(thakis ): https://crbug.com/683349 18 | "-Wno-user-defined-warnings", 19 | ] 20 | + } else if (use_xcode_clang && 21 | + (xcode_version == "0830" || xcode_version == "0831" || 22 | + xcode_version == "0832")) { 23 | + # This is necessary to allow a progressive transition from using xcode 8 to 8.3. Remove when all bots are migrated to 8.3. 24 | + cflags += [ 25 | + # TODO(thakis): https://crbug.com/604888 26 | + "-Wno-undefined-var-template", 27 | + 28 | + # TODO(hans): https://crbug.com/637306 29 | + "-Wno-address-of-packed-member", 30 | + ] 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /patches/60.4.0.1-issue7703.diff: -------------------------------------------------------------------------------- 1 | diff --git a/webrtc/base/network.cc b/webrtc/base/network.cc 2 | index 69dc28ccd..c43856a07 100644 3 | --- a/webrtc/base/network.cc 4 | +++ b/webrtc/base/network.cc 5 | @@ -93,7 +93,7 @@ bool SortNetworks(const Network* a, const Network* b) { 6 | // TODO(mallinath) - Add VPN and Link speed conditions while sorting. 7 | 8 | // Networks are sorted last by key. 9 | - return a->key() > b->key(); 10 | + return a->key() < b->key(); 11 | } 12 | 13 | std::string AdapterTypeToString(AdapterType type) { 14 | diff --git a/webrtc/base/networkmonitor.h b/webrtc/base/networkmonitor.h 15 | index 72b07b449..3c739b261 100644 16 | --- a/webrtc/base/networkmonitor.h 17 | +++ b/webrtc/base/networkmonitor.h 18 | @@ -29,7 +29,7 @@ enum class NetworkBindingResult { 19 | 20 | enum AdapterType { 21 | // This enum resembles the one in Chromium net::ConnectionType. 22 | - ADAPTER_TYPE_UNKNOWN = 0, 23 | + ADAPTER_TYPE_UNKNOWN = 1 << 5, 24 | ADAPTER_TYPE_ETHERNET = 1 << 0, 25 | ADAPTER_TYPE_WIFI = 1 << 1, 26 | ADAPTER_TYPE_CELLULAR = 1 << 2, 27 | -------------------------------------------------------------------------------- /patches/60.4.0.2-issue7703-disable-ipv6.diff: -------------------------------------------------------------------------------- 1 | diff --git a/webrtc/base/network.h b/webrtc/base/network.h 2 | index 52d7d35a2..aff145dc3 100644 3 | --- a/webrtc/base/network.h 4 | +++ b/webrtc/base/network.h 5 | @@ -144,7 +144,7 @@ class NetworkManagerBase : public NetworkManager { 6 | void GetNetworks(NetworkList* networks) const override; 7 | void GetAnyAddressNetworks(NetworkList* networks) override; 8 | // Defaults to true. 9 | - bool ipv6_enabled() const { return ipv6_enabled_; } 10 | + bool ipv6_enabled() const { return false; } 11 | void set_ipv6_enabled(bool enabled) { ipv6_enabled_ = enabled; } 12 | 13 | void set_max_ipv6_networks(int networks) { max_ipv6_networks_ = networks; } 14 | -------------------------------------------------------------------------------- /patches/61.2.0.1-issue7703-4cd599f02504e32224a688434db6d43f5c892167: -------------------------------------------------------------------------------- 1 | commit 4cd599f02504e32224a688434db6d43f5c892167 2 | Author: deadbeef 3 | Date: Thu Jul 27 15:05:29 2017 -0700 4 | 5 | If adapter type is unknown and interface name is "ipsec", treat as VPN. 6 | 7 | This will result in the ipsec interfaces being prioritized below Wi-Fi 8 | and cell interfaces. This makes the most difference when we hit the 9 | default limit for IPv6 interfaces (5), and there are lots of ipsec 10 | interfaces for whatever reason, resulting in the "real" interfaces that 11 | would actually succeed not being used. See the linked bug 7703. 12 | 13 | BUG=webrtc:7703, webrtc:3149 14 | 15 | Review-Url: https://codereview.webrtc.org/2985133002 16 | Cr-Commit-Position: refs/heads/master@{#19175} 17 | 18 | diff --git a/webrtc/rtc_base/network.cc b/webrtc/rtc_base/network.cc 19 | index 26d6520e2..f2a1b87e3 100644 20 | --- a/webrtc/rtc_base/network.cc 21 | +++ b/webrtc/rtc_base/network.cc 22 | @@ -785,6 +785,9 @@ AdapterType BasicNetworkManager::GetAdapterTypeFromName( 23 | return type; 24 | } 25 | } 26 | + if (strncmp(network_name, "ipsec", 5) == 0) { 27 | + return ADAPTER_TYPE_VPN; 28 | + } 29 | #if defined(WEBRTC_IOS) 30 | // Cell networks are pdp_ipN on iOS. 31 | if (strncmp(network_name, "pdp_ip", 6) == 0) { 32 | diff --git a/webrtc/rtc_base/network_unittest.cc b/webrtc/rtc_base/network_unittest.cc 33 | index 521e3dc9e..b5c5912aa 100644 34 | --- a/webrtc/rtc_base/network_unittest.cc 35 | +++ b/webrtc/rtc_base/network_unittest.cc 36 | @@ -828,11 +828,17 @@ TEST_F(NetworkTest, TestGetAdapterTypeFromNameMatching) { 37 | std::string ipv6_mask = "FFFF:FFFF:FFFF:FFFF::"; 38 | BasicNetworkManager manager; 39 | 40 | -#if defined(WEBRTC_IOS) 41 | - char if_name[20] = "pdp_ip0"; 42 | + // IPSec interface; name is in form "ipsec". 43 | + char if_name[20] = "ipsec11"; 44 | ifaddrs* addr_list = 45 | InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 46 | + EXPECT_EQ(ADAPTER_TYPE_VPN, GetAdapterType(manager)); 47 | + ClearNetworks(manager); 48 | + ReleaseIfAddrs(addr_list); 49 | 50 | +#if defined(WEBRTC_IOS) 51 | + strcpy(if_name, "pdp_ip0"); 52 | + addr_list = InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 53 | EXPECT_EQ(ADAPTER_TYPE_CELLULAR, GetAdapterType(manager)); 54 | ClearNetworks(manager); 55 | ReleaseIfAddrs(addr_list); 56 | @@ -844,10 +850,8 @@ TEST_F(NetworkTest, TestGetAdapterTypeFromNameMatching) { 57 | ReleaseIfAddrs(addr_list); 58 | 59 | #elif defined(WEBRTC_ANDROID) 60 | - char if_name[20] = "rmnet0"; 61 | - ifaddrs* addr_list = 62 | - InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 63 | - 64 | + strcpy(if_name, "rmnet0"); 65 | + addr_list = InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 66 | EXPECT_EQ(ADAPTER_TYPE_CELLULAR, GetAdapterType(manager)); 67 | ClearNetworks(manager); 68 | ReleaseIfAddrs(addr_list); 69 | @@ -864,9 +868,10 @@ TEST_F(NetworkTest, TestGetAdapterTypeFromNameMatching) { 70 | ClearNetworks(manager); 71 | ReleaseIfAddrs(addr_list); 72 | #else 73 | - char if_name[20] = "wlan0"; 74 | - ifaddrs* addr_list = 75 | - InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 76 | + // TODO(deadbeef): If not iOS or Android, "wlan0" should be treated as 77 | + // "unknown"? Why? This should be fixed if there's no good reason. 78 | + strcpy(if_name, "wlan0"); 79 | + addr_list = InstallIpv6Network(if_name, ipv6_address1, ipv6_mask, manager); 80 | 81 | EXPECT_EQ(ADAPTER_TYPE_UNKNOWN, GetAdapterType(manager)); 82 | ClearNetworks(manager); 83 | --------------------------------------------------------------------------------