diff --git a/Frameworks/WebRTC.xcframework/Info.plist b/Frameworks/WebRTC.xcframework/Info.plist new file mode 100644 index 0000000..1bc27c9 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/Info.plist @@ -0,0 +1,48 @@ + + + + + AvailableLibraries + + + BinaryPath + WebRTC.framework/WebRTC + DebugSymbolsPath + dSYMs + LibraryIdentifier + ios-arm64 + LibraryPath + WebRTC.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + WebRTC.framework/WebRTC + DebugSymbolsPath + dSYMs + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + WebRTC.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/Frameworks/WebRTC.xcframework/LICENSE.md b/Frameworks/WebRTC.xcframework/LICENSE.md new file mode 100644 index 0000000..ce081c1 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/LICENSE.md @@ -0,0 +1,2185 @@ +# webrtc +``` +Copyright (c) 2011, The WebRTC project authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + +# abseil-cpp +``` + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +``` + +# boringssl +``` + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +Licenses for support code +------------------------- + +Parts of the TLS test suite are under the Go license. This code is not included +in BoringSSL (i.e. libcrypto and libssl) when compiled, however, so +distributing code linked against BoringSSL does not trigger this license: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + +# dav1d +``` +Copyright © 2018, VideoLAN and dav1d authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + +# fft +``` +/* + * Copyright(c)1995,97 Mark Olesen <olesen@me.QueensU.CA> + * Queen's Univ at Kingston (Canada) + * + * Permission to use, copy, modify, and distribute this software for + * any purpose without fee is hereby granted, provided that this + * entire notice is included in all copies of any software which is + * or includes a copy or modification of this software and in all + * copies of the supporting documentation for such software. + * + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR QUEEN'S + * UNIVERSITY AT KINGSTON MAKES ANY REPRESENTATION OR WARRANTY OF ANY + * KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS + * FITNESS FOR ANY PARTICULAR PURPOSE. + * + * All of which is to say that you can do what you like with this + * source code provided you don't try to sell it as your own and you + * include an unaltered copy of this message (including the + * copyright). + * + * It is also implicitly understood that bug fixes and improvements + * should make their way back to the general Internet community so + * that everyone benefits. + */ + +``` + +# fiat +``` +The Apache License, Version 2.0 (Apache-2.0) + +Copyright 2015-2020 the fiat-crypto authors (see the AUTHORS file) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +``` + +# g711 +``` +/* + * SpanDSP - a series of DSP components for telephony + * + * g711.h - In line A-law and u-law conversion routines + * + * Written by Steve Underwood <steveu@coppice.org> + * + * Copyright (C) 2001 Steve Underwood + * + * Despite my general liking of the GPL, I place this code in the + * public domain for the benefit of all mankind - even the slimy + * ones who might try to proprietize my work and use it to my + * detriment. + */ + +``` + +# g722 +``` +/* + * SpanDSP - a series of DSP components for telephony + * + * g722_decode.c - The ITU G.722 codec, decode part. + * + * Written by Steve Underwood <steveu@coppice.org> + * + * Copyright (C) 2005 Steve Underwood + * + * Despite my general liking of the GPL, I place my own contributions + * to this code in the public domain for the benefit of all mankind - + * even the slimy ones who might try to proprietize my work and use it + * to my detriment. + * + * Based in part on a single channel G.722 codec which is: + * + * Copyright (c) CMU 1993 + * Computer Science, Speech Group + * Chengxiang Lu and Alex Hauptmann + */ + +``` + +# libaom +``` +Copyright (c) 2016, Alliance for Open Media. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +``` + +# libc++ +``` +============================================================================== +The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: +============================================================================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + +============================================================================== +Software from third parties included in the LLVM Project: +============================================================================== +The LLVM Project contains third party software which is under different license +terms. All such code will be identified clearly using at least one of two +mechanisms: +1) It will be in a separate directory tree with its own `LICENSE.txt` or + `LICENSE` file at the top containing the specific license and restrictions + which apply to that software, or +2) It will contain specific license and restriction terms at the top of every + file. + +============================================================================== +Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy): +============================================================================== + +The libc++ library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +``` + +# libc++abi +``` +============================================================================== +The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: +============================================================================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + +============================================================================== +Software from third parties included in the LLVM Project: +============================================================================== +The LLVM Project contains third party software which is under different license +terms. All such code will be identified clearly using at least one of two +mechanisms: +1) It will be in a separate directory tree with its own `LICENSE.txt` or + `LICENSE` file at the top containing the specific license and restrictions + which apply to that software, or +2) It will contain specific license and restriction terms at the top of every + file. + +============================================================================== +Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy): +============================================================================== + +The libc++abi library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +``` + +# libsrtp +``` +/* + * + * Copyright (c) 2001-2017 Cisco Systems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * Neither the name of the Cisco Systems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +``` + +# libvpx +``` +Copyright (c) 2010, The WebM Project authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google, nor the WebM Project, nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +``` + +# libyuv +``` +Copyright 2011 The LibYuv Project Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + +# llvm-libc +``` +============================================================================== +The LLVM Project is under the Apache License v2.0 with LLVM Exceptions: +============================================================================== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +---- LLVM Exceptions to the Apache 2.0 License ---- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into an Object form of such source code, you +may redistribute such embedded portions in such Object form without complying +with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + +In addition, if you combine or link compiled forms of this Software with +software that is licensed under the GPLv2 ("Combined Software") and if a +court of competent jurisdiction determines that the patent provision (Section +3), the indemnity provision (Section 9) or other Section of the License +conflicts with the conditions of the GPLv2, you may retroactively and +prospectively choose to deem waived or otherwise exclude such Section(s) of +the License, but only in their entirety and only with respect to the Combined +Software. + +============================================================================== +Software from third parties included in the LLVM Project: +============================================================================== +The LLVM Project contains third party software which is under different license +terms. All such code will be identified clearly using at least one of two +mechanisms: +1) It will be in a separate directory tree with its own `LICENSE.txt` or + `LICENSE` file at the top containing the specific license and restrictions + which apply to that software, or +2) It will contain specific license and restriction terms at the top of every + file. + +============================================================================== +Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy): +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2007-2019 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +``` + +# nasm +``` +NASM is now licensed under the 2-clause BSD license, also known as the +simplified BSD license. + + Copyright 1996-2010 the NASM Authors - All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following + conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + +# ooura +``` +/* + * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html + * Copyright Takuya OOURA, 1996-2001 + * + * You may use, copy, modify and distribute this code for any purpose (include + * commercial use) and without fee. Please refer to this package when you modify + * this code. + */ + +``` + +# opus +``` +Copyright 2001-2023 Xiph.Org, Skype Limited, Octasic, + Jean-Marc Valin, Timothy B. Terriberry, + CSIRO, Gregory Maxwell, Mark Borgerding, + Erik de Castro Lopo, Mozilla, Amazon + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Opus is subject to the royalty-free patent licenses which are +specified at: + +Xiph.Org Foundation: +https://datatracker.ietf.org/ipr/1524/ + +Microsoft Corporation: +https://datatracker.ietf.org/ipr/1914/ + +Broadcom Corporation: +https://datatracker.ietf.org/ipr/1526/ + +``` + +# perfetto +``` + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +------------------ + +Files: * except those files noted below + + Copyright (c) 2017, The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +------------------ + +Files: src/trace_processor/perfetto_sql/stdlib/chromium/*, protos/third_party/chromium/*, test/trace_processor/diff_tests/stdlib/chrome/* + + Copyright 2015 The Chromium Authors + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------ + +Files: src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.{c, h} + +The author disclaims copyright to this source code. In place of a legal notice, here is a blessing: + +May you do good and not evil. +May you find forgiveness for yourself and forgive others. +May you share freely, never taking more than you give. + + +------------------ + +Files: src/base/intrusive_tree.cc + +$OpenBSD: tree.h,v 1.31 2023/03/08 04:43:09 guenther Exp $ + +Copyright 2002 Niels Provos <provos@citi.umich.edu> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + +# pffft +``` +Copyright (c) 2013 Julien Pommier ( pommier@modartt.com ) + +Based on original fortran 77 code from FFTPACKv4 from NETLIB, +authored by Dr Paul Swarztrauber of NCAR, in 1985. + +As confirmed by the NCAR fftpack software curators, the following +FFTPACKv5 license applies to FFTPACKv4 sources. My changes are +released under the same terms. + +FFTPACK license: + +http://www.cisl.ucar.edu/css/software/fftpack5/ftpk.html + +Copyright (c) 2004 the University Corporation for Atmospheric +Research ("UCAR"). All rights reserved. Developed by NCAR's +Computational and Information Systems Laboratory, UCAR, +www.cisl.ucar.edu. + +Redistribution and use of the Software in source and binary forms, +with or without modification, is permitted provided that the +following conditions are met: + +- Neither the names of NCAR's Computational and Information Systems +Laboratory, the University Corporation for Atmospheric Research, +nor the names of its sponsors or contributors may be used to +endorse or promote products derived from this Software without +specific prior written permission. + +- Redistributions of source code must retain the above copyright +notices, this list of conditions, and the disclaimer below. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions, and the disclaimer below in the +documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +``` + +# protobuf +``` +Copyright 2008 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. + +``` + +# rnnoise +``` +Copyright (c) 2017, Mozilla +Copyright (c) 2007-2017, Jean-Marc Valin +Copyright (c) 2005-2017, Xiph.Org Foundation +Copyright (c) 2003-2004, Mark Borgerding + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.Org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + +# spl_sqrt_floor +``` +/* + * Written by Wilco Dijkstra, 1996. The following email exchange establishes the + * license. + * + * From: Wilco Dijkstra <Wilco.Dijkstra@ntlworld.com> + * Date: Fri, Jun 24, 2011 at 3:20 AM + * Subject: Re: sqrt routine + * To: Kevin Ma <kma@google.com> + * Hi Kevin, + * Thanks for asking. Those routines are public domain (originally posted to + * comp.sys.arm a long time ago), so you can use them freely for any purpose. + * Cheers, + * Wilco + * + * ----- Original Message ----- + * From: "Kevin Ma" <kma@google.com> + * To: <Wilco.Dijkstra@ntlworld.com> + * Sent: Thursday, June 23, 2011 11:44 PM + * Subject: Fwd: sqrt routine + * Hi Wilco, + * I saw your sqrt routine from several web sites, including + * http://www.finesse.demon.co.uk/steven/sqrt.html. + * Just wonder if there's any copyright information with your Successive + * approximation routines, or if I can freely use it for any purpose. + * Thanks. + * Kevin + */ + +``` + diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioDevice.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioDevice.h new file mode 100644 index 0000000..c28076c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioDevice.h @@ -0,0 +1,335 @@ +/* + * Copyright 2022 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef OSStatus (^RTC_OBJC_TYPE(RTCAudioDeviceGetPlayoutDataBlock))( + AudioUnitRenderActionFlags *_Nonnull actionFlags, + const AudioTimeStamp *_Nonnull timestamp, + NSInteger inputBusNumber, + UInt32 frameCount, + AudioBufferList *_Nonnull outputData); + +typedef OSStatus (^RTC_OBJC_TYPE(RTCAudioDeviceRenderRecordedDataBlock))( + AudioUnitRenderActionFlags *_Nonnull actionFlags, + const AudioTimeStamp *_Nonnull timestamp, + NSInteger inputBusNumber, + UInt32 frameCount, + AudioBufferList *_Nonnull inputData, + void *_Nullable renderContext); + +typedef OSStatus (^RTC_OBJC_TYPE(RTCAudioDeviceDeliverRecordedDataBlock))( + AudioUnitRenderActionFlags *_Nonnull actionFlags, + const AudioTimeStamp *_Nonnull timestamp, + NSInteger inputBusNumber, + UInt32 frameCount, + const AudioBufferList *_Nullable inputData, + void *_Nullable renderContext, + NS_NOESCAPE RTC_OBJC_TYPE( + RTCAudioDeviceRenderRecordedDataBlock) _Nullable renderBlock); + +/** + * Delegate object provided by native ADM during RTCAudioDevice initialization. + * Provides blocks to poll playback audio samples from native ADM and to feed + * recorded audio samples into native ADM. + */ +RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE +(RTCAudioDeviceDelegate) + /** + * Implementation of RTCAudioSource should call this block to feed recorded + * PCM (16-bit integer) into native ADM. Stereo data is expected to be + * interleaved starting with the left channel. Either `inputData` with + * pre-filled audio data must be provided during block call or `renderBlock` + * must be provided which must fill provided audio buffer with recorded + * samples. + * + * NOTE: Implementation of RTCAudioDevice is expected to call the block on + * the same thread until `notifyAudioInterrupted` is called. When + * `notifyAudioInterrupted` is called implementation can call the block on a + * different thread. + */ + @property(readonly, nonnull) + RTC_OBJC_TYPE(RTCAudioDeviceDeliverRecordedDataBlock) + deliverRecordedData; + +/** + * Provides input sample rate preference as it preferred by native ADM. + */ +@property(readonly) double preferredInputSampleRate; + +/** + * Provides input IO buffer duration preference as it preferred by native ADM. + */ +@property(readonly) NSTimeInterval preferredInputIOBufferDuration; + +/** + * Provides output sample rate preference as it preferred by native ADM. + */ +@property(readonly) double preferredOutputSampleRate; + +/** + * Provides output IO buffer duration preference as it preferred by native ADM. + */ +@property(readonly) NSTimeInterval preferredOutputIOBufferDuration; + +/** + * Implementation of RTCAudioDevice should call this block to request PCM + * (16-bit integer) from native ADM to play. Stereo data is interleaved starting + * with the left channel. + * + * NOTE: Implementation of RTCAudioDevice is expected to invoke of this block on + * the same thread until `notifyAudioInterrupted` is called. When + * `notifyAudioInterrupted` is called implementation can call the block from a + * different thread. + */ +@property(readonly, nonnull) RTC_OBJC_TYPE(RTCAudioDeviceGetPlayoutDataBlock) + getPlayoutData; + +/** + * Notifies native ADM that some of the audio input parameters of RTCAudioDevice + * like samle rate and/or IO buffer duration and/or IO latency had possibly + * changed. Native ADM will adjust its audio input buffer to match current + * parameters of audio device. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioInputParametersChange; + +/** + * Notifies native ADM that some of the audio output parameters of + * RTCAudioDevice like samle rate and/or IO buffer duration and/or IO latency + * had possibly changed. Native ADM will adjust its audio output buffer to match + * current parameters of audio device. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioOutputParametersChange; + +/** + * Notifies native ADM that audio input is interrupted and further audio playout + * and recording might happen on a different thread. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioInputInterrupted; + +/** + * Notifies native ADM that audio output is interrupted and further audio + * playout and recording might happen on a different thread. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioOutputInterrupted; + +/** + * Asynchronously execute block of code within the context of + * thread which owns native ADM. + * + * NOTE: Intended to be used to invoke `notifyAudioInputParametersChange`, + * `notifyAudioOutputParametersChange`, `notifyAudioInputInterrupted`, + * `notifyAudioOutputInterrupted` on native ADM thread. + * Also could be used by `RTCAudioDevice` implementation to tie + * mutations of underlying audio objects (AVAudioEngine, AudioUnit, etc) + * to the native ADM thread. Could be useful to handle events like audio route + * change, which could lead to audio parameters change. + */ +- (void)dispatchAsync:(dispatch_block_t)block; + +/** + * Synchronously execute block of code within the context of + * thread which owns native ADM. Allows reentrancy. + * + * NOTE: Intended to be used to invoke `notifyAudioInputParametersChange`, + * `notifyAudioOutputParametersChange`, `notifyAudioInputInterrupted`, + * `notifyAudioOutputInterrupted` on native ADM thread and make sure + * aforementioned is completed before `dispatchSync` returns. Could be useful + * when implementation of `RTCAudioDevice` tie mutation to underlying audio + * objects (AVAudioEngine, AudioUnit, etc) to own thread to satisfy requirement + * that native ADM audio parameters must be kept in sync with current audio + * parameters before audio is actually played or recorded. + */ +- (void)dispatchSync:(dispatch_block_t)block; + +@end + +/** + * Protocol to abstract platform specific ways to implement playback and + * recording. + * + * NOTE: All the members of protocol are called by native ADM from the same + * thread between calls to `initializeWithDelegate` and `terminate`. NOTE: + * Implementation is fully responsible for configuring application's + * AVAudioSession. An example implementation of RTCAudioDevice: + * https://github.com/mstyura/RTCAudioDevice + * TODO(yura.yaroshevich): Implement custom RTCAudioDevice for AppRTCMobile demo + * app. + */ +RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE +(RTCAudioDevice) + + /** + * Indicates current sample rate of audio recording. Changes to this + * property must be notified back to native ADM via + * `-[RTCAudioDeviceDelegate notifyAudioParametersChange]`. + */ + @property(readonly) double deviceInputSampleRate; + +/** + * Indicates current size of record buffer. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSTimeInterval inputIOBufferDuration; + +/** + * Indicates current number of recorded audio channels. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSInteger inputNumberOfChannels; + +/** + * Indicates current input latency + */ +@property(readonly) NSTimeInterval inputLatency; + +/** + * Indicates current sample rate of audio playback. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) double deviceOutputSampleRate; + +/** + * Indicates current size of playback buffer. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSTimeInterval outputIOBufferDuration; + +/** + * Indicates current number of playback audio channels. Changes to this property + * must be notified back to WebRTC via `[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSInteger outputNumberOfChannels; + +/** + * Indicates current output latency + */ +@property(readonly) NSTimeInterval outputLatency; + +/** + * Indicates if invocation of `initializeWithDelegate` required before usage of + * RTCAudioDevice. YES indicates that `initializeWithDelegate` was called + * earlier without subsequent call to `terminate`. NO indicates that either + * `initializeWithDelegate` not called or `terminate` called. + */ +@property(readonly) BOOL isInitialized; + +/** + * Initializes RTCAudioDevice with RTCAudioDeviceDelegate. + * Implementation must return YES if RTCAudioDevice initialized successfully and + * NO otherwise. + */ +- (BOOL)initializeWithDelegate: + (id)delegate; + +/** + * De-initializes RTCAudioDevice. Implementation should forget about `delegate` + * provided in `initializeWithDelegate`. + */ +- (BOOL)terminateDevice; + +/** + * Property to indicate if `initializePlayout` call required before invocation + * of `startPlayout`. YES indicates that `initializePlayout` was successfully + * invoked earlier or not necessary, NO indicates that `initializePlayout` + * invocation required. + */ +@property(readonly) BOOL isPlayoutInitialized; + +/** + * Prepares RTCAudioDevice to play audio. + * Called by native ADM before invocation of `startPlayout`. + * Implementation is expected to return YES in case of successful playout + * initialization and NO otherwise. + */ +- (BOOL)initializePlayout; + +/** + * Property to indicate if RTCAudioDevice should be playing according to + * earlier calls of `startPlayout` and `stopPlayout`. + */ +@property(readonly) BOOL isPlaying; + +/** + * Method is called when native ADM wants to play audio. + * Implementation is expected to return YES if playback start request + * successfully handled and NO otherwise. + */ +- (BOOL)startPlayout; + +/** + * Method is called when native ADM no longer needs to play audio. + * Implementation is expected to return YES if playback stop request + * successfully handled and NO otherwise. + */ +- (BOOL)stopPlayout; + +/** + * Property to indicate if `initializeRecording` call required before usage of + * `startRecording`. YES indicates that `initializeRecording` was successfully + * invoked earlier or not necessary, NO indicates that `initializeRecording` + * invocation required. + */ +@property(readonly) BOOL isRecordingInitialized; + +/** + * Prepares RTCAudioDevice to record audio. + * Called by native ADM before invocation of `startRecording`. + * Implementation may use this method to prepare resources required to record + * audio. Implementation is expected to return YES in case of successful record + * initialization and NO otherwise. + */ +- (BOOL)initializeRecording; + +/** + * Property to indicate if RTCAudioDevice should record audio according to + * earlier calls to `startRecording` and `stopRecording`. + */ +@property(readonly) BOOL isRecording; + +/** + * Method is called when native ADM wants to record audio. + * Implementation is expected to return YES if recording start request + * successfully handled and NO otherwise. + */ +- (BOOL)startRecording; + +/** + * Method is called when native ADM no longer needs to record audio. + * Implementation is expected to return YES if recording stop request + * successfully handled and NO otherwise. + */ +- (BOOL)stopRecording; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSession.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSession.h new file mode 100644 index 0000000..08ecabf --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSession.h @@ -0,0 +1,289 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const kRTCAudioSessionErrorDomain; +/** Method that requires lock was called without lock. */ +extern NSInteger const kRTCAudioSessionErrorLockRequired; +/** Unknown configuration error occurred. */ +extern NSInteger const kRTCAudioSessionErrorConfiguration; + +@class RTC_OBJC_TYPE(RTCAudioSession); +@class RTC_OBJC_TYPE(RTCAudioSessionConfiguration); + +// Surfaces AVAudioSession events. WebRTC will listen directly for notifications +// from AVAudioSession and handle them before calling these delegate methods, +// at which point applications can perform additional processing if required. +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCAudioSessionDelegate) + + @optional +/** Called on a system notification thread when AVAudioSession starts an + * interruption event. + */ +- (void)audioSessionDidBeginInterruption: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called on a system notification thread when AVAudioSession ends an + * interruption event. + */ +- (void)audioSessionDidEndInterruption:(RTC_OBJC_TYPE(RTCAudioSession) *)session + shouldResumeSession:(BOOL)shouldResumeSession; + +/** Called on a system notification thread when AVAudioSession changes the + * route. + */ +- (void)audioSessionDidChangeRoute:(RTC_OBJC_TYPE(RTCAudioSession) *)session + reason:(AVAudioSessionRouteChangeReason)reason + previousRoute: + (AVAudioSessionRouteDescription *)previousRoute; + +/** Called on a system notification thread when AVAudioSession media server + * terminates. + */ +- (void)audioSessionMediaServerTerminated: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called on a system notification thread when AVAudioSession media server + * restarts. + */ +- (void)audioSessionMediaServerReset:(RTC_OBJC_TYPE(RTCAudioSession) *)session; + +// TODO(tkchin): Maybe handle SilenceSecondaryAudioHintNotification. + +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)session + didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord; + +/** Called on a WebRTC thread when the audio device is notified to begin + * playback or recording. + */ +- (void)audioSessionDidStartPlayOrRecord: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called on a WebRTC thread when the audio device is notified to stop + * playback or recording. + */ +- (void)audioSessionDidStopPlayOrRecord: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called when the AVAudioSession output volume value changes. */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + didChangeOutputVolume:(float)outputVolume; + +/** Called when the audio device detects a playout glitch. The argument is the + * number of glitches detected so far in the current audio playout session. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + didDetectPlayoutGlitch:(int64_t)totalNumberOfGlitches; + +/** Called when the audio session is about to change the active state. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + willSetActive:(BOOL)active; + +/** Called after the audio session sucessfully changed the active state. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + didSetActive:(BOOL)active; + +/** Called after the audio session failed to change the active state. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + failedToSetActive:(BOOL)active + error:(NSError *)error; + +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + audioUnitStartFailedWithError:(NSError *)error; + +@end + +/** This is a protocol used to inform RTCAudioSession when the audio session + * activation state has changed outside of RTCAudioSession. The current known + * use case of this is when CallKit activates the audio session for the + * application + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCAudioSessionActivationDelegate) + + /** Called when the audio session is activated outside of the app by iOS. */ + - (void)audioSessionDidActivate : (AVAudioSession *)session; + +/** Called when the audio session is deactivated outside of the app by iOS. */ +- (void)audioSessionDidDeactivate:(AVAudioSession *)session; + +@end + +/** Proxy class for AVAudioSession that adds a locking mechanism similar to + * AVCaptureDevice. This is used to that interleaving configurations between + * WebRTC and the application layer are avoided. + * + * RTCAudioSession also coordinates activation so that the audio session is + * activated only once. See `setActive:error:`. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioSession) : NSObject + +/** Convenience property to access the AVAudioSession singleton. Callers should + * not call setters on AVAudioSession directly, but other method invocations + * are fine. + */ +@property(nonatomic, readonly) AVAudioSession *session; + +/** Our best guess at whether the session is active based on results of calls to + * AVAudioSession. + */ +@property(nonatomic, readonly) BOOL isActive; + +/** If YES, WebRTC will not initialize the audio unit automatically when an + * audio track is ready for playout or recording. Instead, applications should + * call setIsAudioEnabled. If NO, WebRTC will initialize the audio unit + * as soon as an audio track is ready for playout or recording. + */ +@property(nonatomic, assign) BOOL useManualAudio; + +/** This property is only effective if useManualAudio is YES. + * Represents permission for WebRTC to initialize the VoIP audio unit. + * When set to NO, if the VoIP audio unit used by WebRTC is active, it will be + * stopped and uninitialized. This will stop incoming and outgoing audio. + * When set to YES, WebRTC will initialize and start the audio unit when it is + * needed (e.g. due to establishing an audio connection). + * This property was introduced to work around an issue where if an AVPlayer is + * playing audio while the VoIP audio unit is initialized, its audio would be + * either cut off completely or played at a reduced volume. By preventing + * the audio unit from being initialized until after the audio has completed, + * we are able to prevent the abrupt cutoff. + */ +@property(nonatomic, assign) BOOL isAudioEnabled; + +// Proxy properties. +@property(readonly) NSString *category; +@property(readonly) AVAudioSessionCategoryOptions categoryOptions; +@property(readonly) NSString *mode; +@property(readonly) BOOL secondaryAudioShouldBeSilencedHint; +@property(readonly) AVAudioSessionRouteDescription *currentRoute; +@property(readonly) NSInteger maximumInputNumberOfChannels; +@property(readonly) NSInteger maximumOutputNumberOfChannels; +@property(readonly) float inputGain; +@property(readonly) BOOL inputGainSettable; +@property(readonly) BOOL inputAvailable; +@property(readonly, nullable) + NSArray *inputDataSources; +@property(readonly, nullable) + AVAudioSessionDataSourceDescription *inputDataSource; +@property(readonly, nullable) + NSArray *outputDataSources; +@property(readonly, nullable) + AVAudioSessionDataSourceDescription *outputDataSource; +@property(readonly) double sampleRate; +@property(readonly) double preferredSampleRate; +@property(readonly) NSInteger inputNumberOfChannels; +@property(readonly) NSInteger outputNumberOfChannels; +@property(readonly) float outputVolume; +@property(readonly) NSTimeInterval inputLatency; +@property(readonly) NSTimeInterval outputLatency; +@property(readonly) NSTimeInterval IOBufferDuration; +@property(readonly) NSTimeInterval preferredIOBufferDuration; + +/** + When YES, calls to -setConfiguration:error: and -setConfiguration:active:error: + ignore errors in configuring the audio session's "preferred" attributes (e.g. + preferredInputNumberOfChannels). Typically, configurations to preferred + attributes are optimizations, and ignoring this type of configuration error + allows code flow to continue along the happy path when these optimization are + not available. The default value of this property is NO. + */ +@property(nonatomic) BOOL ignoresPreferredAttributeConfigurationErrors; + +/** Default constructor. */ ++ (instancetype)sharedInstance; +- (instancetype)init NS_UNAVAILABLE; + +/** Adds a delegate, which is held weakly. */ +- (void)addDelegate:(id)delegate; +/** Removes an added delegate. */ +- (void)removeDelegate:(id)delegate; + +/** Request exclusive access to the audio session for configuration. This call + * will block if the lock is held by another object. + */ +- (void)lockForConfiguration; +/** Relinquishes exclusive access to the audio session. */ +- (void)unlockForConfiguration; + +/** If `active`, activates the audio session if it isn't already active. + * Successful calls must be balanced with a setActive:NO when activation is no + * longer required. If not `active`, deactivates the audio session if one is + * active and this is the last balanced call. When deactivating, the + * AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation option is passed to + * AVAudioSession. + */ +- (BOOL)setActive:(BOOL)active error:(NSError **)outError; + +// The following methods are proxies for the associated methods on +// AVAudioSession. `lockForConfiguration` must be called before using them +// otherwise they will fail with kRTCAudioSessionErrorLockRequired. + +- (BOOL)setCategory:(AVAudioSessionCategory)category + mode:(AVAudioSessionMode)mode + options:(AVAudioSessionCategoryOptions)options + error:(NSError **)outError; +- (BOOL)setCategory:(AVAudioSessionCategory)category + withOptions:(AVAudioSessionCategoryOptions)options + error:(NSError **)outError; +- (BOOL)setMode:(AVAudioSessionMode)mode error:(NSError **)outError; +- (BOOL)setInputGain:(float)gain error:(NSError **)outError; +- (BOOL)setPreferredSampleRate:(double)sampleRate error:(NSError **)outError; +- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration + error:(NSError **)outError; +- (BOOL)setPreferredInputNumberOfChannels:(NSInteger)count + error:(NSError **)outError; +- (BOOL)setPreferredOutputNumberOfChannels:(NSInteger)count + error:(NSError **)outError; +- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride + error:(NSError **)outError; +- (BOOL)setPreferredInput:(AVAudioSessionPortDescription *)inPort + error:(NSError **)outError; +- (BOOL)setInputDataSource:(AVAudioSessionDataSourceDescription *)dataSource + error:(NSError **)outError; +- (BOOL)setOutputDataSource:(AVAudioSessionDataSourceDescription *)dataSource + error:(NSError **)outError; +@end + +@interface RTC_OBJC_TYPE (RTCAudioSession) +(Configuration) + + /** Applies the configuration to the current session. Attempts to set all + * properties even if previous ones fail. Only the last error will be + * returned. + * `lockForConfiguration` must be called first. + */ + - (BOOL)setConfiguration + : (RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration error + : (NSError **)outError; + +/** Convenience method that calls both setConfiguration and setActive. + * `lockForConfiguration` must be called first. + */ +- (BOOL)setConfiguration: + (RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration + active:(BOOL)active + error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h new file mode 100644 index 0000000..b937f16 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h @@ -0,0 +1,47 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_EXTERN const int kRTCAudioSessionPreferredNumberOfChannels; +RTC_EXTERN const double kRTCAudioSessionHighPerformanceSampleRate; +RTC_EXTERN const double kRTCAudioSessionHighPerformanceIOBufferDuration; + +// Struct to hold configuration values. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioSessionConfiguration) : NSObject + +@property(nonatomic, strong) NSString *category; +@property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; +@property(nonatomic, strong) NSString *mode; +@property(nonatomic, assign) double sampleRate; +@property(nonatomic, assign) NSTimeInterval ioBufferDuration; +@property(nonatomic, assign) NSInteger inputNumberOfChannels; +@property(nonatomic, assign) NSInteger outputNumberOfChannels; + +/** Initializes configuration to defaults. */ +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +/** Returns the current configuration of the audio session. */ ++ (instancetype)currentConfiguration; +/** Returns the configuration that WebRTC needs. */ ++ (instancetype)webRTCConfiguration; +/** Provide a way to override the default configuration. */ ++ (void)setWebRTCConfiguration: + (RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSource.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSource.h new file mode 100644 index 0000000..784864a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioSource.h @@ -0,0 +1,32 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioSource) : RTC_OBJC_TYPE(RTCMediaSource) + +- (instancetype)init NS_UNAVAILABLE; + +// Sets the volume for the RTCMediaSource. `volume` is a gain value in the range +// [0, 10]. +// Temporary fix to be able to modify volume of remote audio tracks. +// TODO(kthelgason): Property stays here temporarily until a proper volume-api +// is available on the surface exposed by webrtc. +@property(nonatomic, assign) double volume; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioTrack.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioTrack.h new file mode 100644 index 0000000..3c6d1dc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCAudioTrack.h @@ -0,0 +1,28 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCAudioSource); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack) + +- (instancetype)init NS_UNAVAILABLE; + +/** The audio source for this audio track. */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioSource) * source; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCVPixelBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCVPixelBuffer.h new file mode 100644 index 0000000..dd112b4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCVPixelBuffer.h @@ -0,0 +1,52 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCVideoFrameBuffer containing a CVPixelBufferRef */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCVPixelBuffer) : NSObject + +@property(nonatomic, readonly) CVPixelBufferRef pixelBuffer; +@property(nonatomic, readonly) int cropX; +@property(nonatomic, readonly) int cropY; +@property(nonatomic, readonly) int cropWidth; +@property(nonatomic, readonly) int cropHeight; + ++ (NSSet *)supportedPixelFormats; + +- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer; +- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer + adaptedWidth:(int)adaptedWidth + adaptedHeight:(int)adaptedHeight + cropWidth:(int)cropWidth + cropHeight:(int)cropHeight + cropX:(int)cropX + cropY:(int)cropY; + +- (BOOL)requiresCropping; +- (BOOL)requiresScalingToWidth:(int)width height:(int)height; +- (int)bufferSizeForCroppingAndScalingToWidth:(int)width height:(int)height; + +/** The minimum size of the `tmpBuffer` must be the number of bytes returned + * from the bufferSizeForCroppingAndScalingToWidth:height: method. If that size + * is 0, the `tmpBuffer` may be nil. + */ +- (BOOL)cropAndScaleTo:(CVPixelBufferRef)outputPixelBuffer + withTempBuffer:(nullable uint8_t *)tmpBuffer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCallbackLogger.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCallbackLogger.h new file mode 100644 index 0000000..7e2745b --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCallbackLogger.h @@ -0,0 +1,41 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^RTCCallbackLoggerMessageHandler)(NSString *message); +typedef void (^RTCCallbackLoggerMessageAndSeverityHandler)( + NSString *message, RTCLoggingSeverity severity); + +// This class intercepts WebRTC logs and forwards them to a registered block. +// This class is not threadsafe. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCallbackLogger) : NSObject + +// The severity level to capture. The default is kRTCLoggingSeverityInfo. +@property(nonatomic, assign) RTCLoggingSeverity severity; + +// The callback handler will be called on the same thread that does the +// logging, so if the logging callback can be slow it may be a good idea +// to implement dispatching to some other queue. +- (void)start:(nullable RTCCallbackLoggerMessageHandler)handler; +- (void)startWithMessageAndSeverityHandler: + (nullable RTCCallbackLoggerMessageAndSeverityHandler)handler; + +- (void)stop; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCameraPreviewView.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCameraPreviewView.h new file mode 100644 index 0000000..710f2e7 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCameraPreviewView.h @@ -0,0 +1,30 @@ +/* + * Copyright 2015 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +@class AVCaptureSession; + +/** RTCCameraPreviewView is a view that renders local video from an + * AVCaptureSession. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCameraPreviewView) : UIView + +/** The capture session being rendered in the view. Capture session + * is assigned to AVCaptureVideoPreviewLayer async in the same + * queue that the AVCaptureSession is started/stopped. + */ +@property(nonatomic, strong) AVCaptureSession* captureSession; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCameraVideoCapturer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCameraVideoCapturer.h new file mode 100644 index 0000000..de69c5d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCameraVideoCapturer.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +// Camera capture that implements RTCVideoCapturer. Delivers frames to a +// RTCVideoCapturerDelegate (usually RTCVideoSource). +NS_EXTENSION_UNAVAILABLE_IOS("Camera not available in app extensions.") +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCameraVideoCapturer) : RTC_OBJC_TYPE(RTCVideoCapturer) + +// Capture session that is used for capturing. Valid from initialization to dealloc. +@property(readonly, nonatomic) AVCaptureSession *captureSession; + +// Returns list of available capture devices that support video capture. ++ (NSArray *)captureDevices; +// Returns list of formats that are supported by this class for this device. ++ (NSArray *)supportedFormatsForDevice: + (AVCaptureDevice *)device; + +// Returns the most efficient supported output pixel format for this capturer. +- (FourCharCode)preferredOutputPixelFormat; + +// Starts the capture session asynchronously and notifies callback on +// completion. The device will capture video in the format given in the `format` +// parameter. If the pixel format in `format` is supported by the WebRTC +// pipeline, the same pixel format will be used for the output. Otherwise, the +// format returned by `preferredOutputPixelFormat` will be used. +- (void)startCaptureWithDevice:(AVCaptureDevice *)device + format:(AVCaptureDeviceFormat *)format + fps:(NSInteger)fps + completionHandler: + (nullable void (^)(NSError *_Nullable))completionHandler; +// Stops the capture session asynchronously and notifies callback on completion. +- (void)stopCaptureWithCompletionHandler: + (nullable void (^)(void))completionHandler; + +// Starts the capture session asynchronously. +- (void)startCaptureWithDevice:(AVCaptureDevice *)device + format:(AVCaptureDeviceFormat *)format + fps:(NSInteger)fps; +// Stops the capture session asynchronously. +- (void)stopCapture; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCertificate.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCertificate.h new file mode 100644 index 0000000..e300feb --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCertificate.h @@ -0,0 +1,47 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCertificate) : NSObject + +/** Private key in PEM. */ +@property(nonatomic, readonly, copy) NSString *private_key; + +/** Public key in an x509 cert encoded in PEM. */ +@property(nonatomic, readonly, copy) NSString *certificate; + +/** + * Initialize an RTCCertificate with PEM strings for private_key and + * certificate. + */ +- (instancetype)initWithPrivateKey:(NSString *)private_key + certificate:(NSString *)certificate + NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/** Generate a new certificate for 're' use. + * + * Optional dictionary of parameters. Defaults to KeyType ECDSA if none are + * provided. + * - name: "ECDSA" or "RSASSA-PKCS1-v1_5" + */ ++ (nullable RTC_OBJC_TYPE(RTCCertificate) *)generateCertificateWithParams: + (NSDictionary *)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCodecSpecificInfo.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCodecSpecificInfo.h new file mode 100644 index 0000000..39f7c18 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCodecSpecificInfo.h @@ -0,0 +1,24 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Implement this protocol to pass codec specific info from the encoder. + * Corresponds to webrtc::CodecSpecificInfo. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCCodecSpecificInfo) @end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h new file mode 100644 index 0000000..b6f34a5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h @@ -0,0 +1,28 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +/** Class for H264 specific config. */ +typedef NS_ENUM(NSUInteger, RTCH264PacketizationMode) { + RTCH264PacketizationModeNonInterleaved = + 0, // Mode 1 - STAP-A, FU-A is allowed + RTCH264PacketizationModeSingleNalUnit // Mode 0 - only single NALU allowed +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCodecSpecificInfoH264) : NSObject + +@property(nonatomic, assign) RTCH264PacketizationMode packetizationMode; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCConfiguration.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCConfiguration.h new file mode 100644 index 0000000..21f12fc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCConfiguration.h @@ -0,0 +1,268 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +@class RTC_OBJC_TYPE(RTCIceServer); + +/** + * Represents the ice transport policy. This exposes the same states in C++, + * which include one more state than what exists in the W3C spec. + */ +typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) { + RTCIceTransportPolicyNone, + RTCIceTransportPolicyRelay, + RTCIceTransportPolicyNoHost, + RTCIceTransportPolicyAll +}; + +/** Represents the bundle policy. */ +typedef NS_ENUM(NSInteger, RTCBundlePolicy) { + RTCBundlePolicyBalanced, + RTCBundlePolicyMaxCompat, + RTCBundlePolicyMaxBundle +}; + +/** Represents the rtcp mux policy. */ +typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) { + RTCRtcpMuxPolicyNegotiate, + RTCRtcpMuxPolicyRequire +}; + +/** Represents the tcp candidate policy. */ +typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) { + RTCTcpCandidatePolicyEnabled, + RTCTcpCandidatePolicyDisabled +}; + +/** Represents the candidate network policy. */ +typedef NS_ENUM(NSInteger, RTCCandidateNetworkPolicy) { + RTCCandidateNetworkPolicyAll, + RTCCandidateNetworkPolicyLowCost +}; + +/** Represents the continual gathering policy. */ +typedef NS_ENUM(NSInteger, RTCContinualGatheringPolicy) { + RTCContinualGatheringPolicyGatherOnce, + RTCContinualGatheringPolicyGatherContinually +}; + +/** Represents the encryption key type. */ +typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) { + RTCEncryptionKeyTypeRSA, + RTCEncryptionKeyTypeECDSA, +}; + +/** Represents the chosen SDP semantics for the RTCPeerConnection. */ +typedef NS_ENUM(NSInteger, RTCSdpSemantics) { + // TODO(https://crbug.com/webrtc/13528): Remove support for Plan B. + RTCSdpSemanticsPlanB, + RTCSdpSemanticsUnifiedPlan, +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCConfiguration) : NSObject + +/** If true, allows DSCP codes to be set on outgoing packets, configured using + * networkPriority field of RTCRtpEncodingParameters. Defaults to false. + */ +@property(nonatomic, assign) BOOL enableDscp; + +/** An array of Ice Servers available to be used by ICE. */ +@property(nonatomic, copy) NSArray *iceServers; + +/** An RTCCertificate for 're' use. */ +@property(nonatomic, nullable) RTC_OBJC_TYPE(RTCCertificate) * certificate; + +/** Which candidates the ICE agent is allowed to use. The W3C calls it + * `iceTransportPolicy`, while in C++ it is called `type`. */ +@property(nonatomic, assign) RTCIceTransportPolicy iceTransportPolicy; + +/** The media-bundling policy to use when gathering ICE candidates. */ +@property(nonatomic, assign) RTCBundlePolicy bundlePolicy; + +/** The rtcp-mux policy to use when gathering ICE candidates. */ +@property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy; +@property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy; +@property(nonatomic, assign) RTCCandidateNetworkPolicy candidateNetworkPolicy; +@property(nonatomic, assign) + RTCContinualGatheringPolicy continualGatheringPolicy; + +/** If set to YES, don't gather IPv6 ICE candidates on Wi-Fi. + * Only intended to be used on specific devices. Certain phones disable IPv6 + * when the screen is turned off and it would be better to just disable the + * IPv6 ICE candidates on Wi-Fi in those cases. + * Default is NO. + */ +@property(nonatomic, assign) BOOL disableIPV6OnWiFi; + +/** By default, the PeerConnection will use a limited number of IPv6 network + * interfaces, in order to avoid too many ICE candidate pairs being created + * and delaying ICE completion. + * + * Can be set to INT_MAX to effectively disable the limit. + */ +@property(nonatomic, assign) int maxIPv6Networks; + +/** Exclude link-local network interfaces + * from considertaion for gathering ICE candidates. + * Defaults to NO. + */ +@property(nonatomic, assign) BOOL disableLinkLocalNetworks; + +@property(nonatomic, assign) int audioJitterBufferMaxPackets; +@property(nonatomic, assign) BOOL audioJitterBufferFastAccelerate; +@property(nonatomic, assign) int iceConnectionReceivingTimeout; +@property(nonatomic, assign) int iceBackupCandidatePairPingInterval; + +/** Key type used to generate SSL identity. Default is ECDSA. */ +@property(nonatomic, assign) RTCEncryptionKeyType keyType; + +/** ICE candidate pool size as defined in JSEP. Default is 0. */ +@property(nonatomic, assign) int iceCandidatePoolSize; + +/** Prune turn ports on the same network to the same turn server. + * Default is NO. + */ +@property(nonatomic, assign) BOOL shouldPruneTurnPorts; + +/** If set to YES, this means the ICE transport should presume TURN-to-TURN + * candidate pairs will succeed, even before a binding response is received. + */ +@property(nonatomic, assign) BOOL shouldPresumeWritableWhenFullyRelayed; + +/* This flag is only effective when `continualGatheringPolicy` is + * RTCContinualGatheringPolicyGatherContinually. + * + * If YES, after the ICE transport type is changed such that new types of + * ICE candidates are allowed by the new transport type, e.g. from + * RTCIceTransportPolicyRelay to RTCIceTransportPolicyAll, candidates that + * have been gathered by the ICE transport but not matching the previous + * transport type and as a result not observed by PeerConnectionDelegateAdapter, + * will be surfaced to the delegate. + */ +@property(nonatomic, assign) + BOOL shouldSurfaceIceCandidatesOnIceTransportTypeChanged; + +/** If set to non-nil, controls the minimal interval between consecutive ICE + * check packets. + */ +@property(nonatomic, copy, nullable) NSNumber *iceCheckMinInterval; + +/** + * Configure the SDP semantics used by this PeerConnection. By default, this + * is RTCSdpSemanticsUnifiedPlan which is compliant to the WebRTC 1.0 + * specification. It is possible to overrwite this to the deprecated + * RTCSdpSemanticsPlanB SDP format, but note that RTCSdpSemanticsPlanB will be + * deleted at some future date, see https://crbug.com/webrtc/13528. + * + * RTCSdpSemanticsUnifiedPlan will cause RTCPeerConnection to create offers and + * answers with multiple m= sections where each m= section maps to one + * RTCRtpSender and one RTCRtpReceiver (an RTCRtpTransceiver), either both audio + * or both video. This will also cause RTCPeerConnection to ignore all but the + * first a=ssrc lines that form a Plan B stream. + * + * RTCSdpSemanticsPlanB will cause RTCPeerConnection to create offers and + * answers with at most one audio and one video m= section with multiple + * RTCRtpSenders and RTCRtpReceivers specified as multiple a=ssrc lines within + * the section. This will also cause RTCPeerConnection to ignore all but the + * first m= section of the same media type. + */ +@property(nonatomic, assign) RTCSdpSemantics sdpSemantics; + +/** Actively reset the SRTP parameters when the DTLS transports underneath are + * changed after offer/answer negotiation. This is only intended to be a + * workaround for crbug.com/835958 + */ +@property(nonatomic, assign) BOOL activeResetSrtpParams; + +/** + * Defines advanced optional cryptographic settings related to SRTP and + * frame encryption for native WebRTC. Setting this will overwrite any + * options set through the PeerConnectionFactory (which is deprecated). + */ +@property(nonatomic, nullable) RTC_OBJC_TYPE(RTCCryptoOptions) * cryptoOptions; + +/** + * An optional string that will be attached to the TURN_ALLOCATE_REQUEST which + * which can be used to correlate client logs with backend logs. + */ +@property(nonatomic, nullable, copy) NSString *turnLoggingId; + +/** + * Time interval between audio RTCP reports. + */ +@property(nonatomic, assign) int rtcpAudioReportIntervalMs; + +/** + * Time interval between video RTCP reports. + */ +@property(nonatomic, assign) int rtcpVideoReportIntervalMs; + +/** + * Allow implicit rollback of local description when remote description + * conflicts with local description. + * See: https://w3c.github.io/webrtc-pc/#dom-peerconnection-setremotedescription + */ +@property(nonatomic, assign) BOOL enableImplicitRollback; + +/** + * Control if "a=extmap-allow-mixed" is included in the offer. + * See: https://www.chromestatus.com/feature/6269234631933952 + */ +@property(nonatomic, assign) BOOL offerExtmapAllowMixed; + +/** + * Defines the interval applied to ALL candidate pairs + * when ICE is strongly connected, and it overrides the + * default value of this interval in the ICE implementation; + */ +@property(nonatomic, copy, nullable) + NSNumber *iceCheckIntervalStrongConnectivity; + +/** + * Defines the counterpart for ALL pairs when ICE is + * weakly connected, and it overrides the default value of + * this interval in the ICE implementation + */ +@property(nonatomic, copy, nullable) NSNumber *iceCheckIntervalWeakConnectivity; + +/** + * The min time period for which a candidate pair must wait for response to + * connectivity checks before it becomes unwritable. This parameter + * overrides the default value in the ICE implementation if set. + */ +@property(nonatomic, copy, nullable) NSNumber *iceUnwritableTimeout; + +/** + * The min number of connectivity checks that a candidate pair must sent + * without receiving response before it becomes unwritable. This parameter + * overrides the default value in the ICE implementation if set. + */ +@property(nonatomic, copy, nullable) NSNumber *iceUnwritableMinChecks; + +/** + * The min time period for which a candidate pair must wait for response to + * connectivity checks it becomes inactive. This parameter overrides the + * default value in the ICE implementation if set. + */ +@property(nonatomic, copy, nullable) NSNumber *iceInactiveTimeout; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCryptoOptions.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCryptoOptions.h new file mode 100644 index 0000000..a4c85d7 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCCryptoOptions.h @@ -0,0 +1,66 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * Objective-C bindings for webrtc::CryptoOptions. This API had to be flattened + * as Objective-C doesn't support nested structures. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCryptoOptions) : NSObject + +/** + * Enable GCM crypto suites from RFC 7714 for SRTP. GCM will only be used + * if both sides enable it + */ +@property(nonatomic, assign) BOOL srtpEnableGcmCryptoSuites; +/** + * If set to true, the (potentially insecure) crypto cipher + * kSrtpAes128CmSha1_32 will be included in the list of supported ciphers + * during negotiation. It will only be used if both peers support it and no + * other ciphers get preferred. + */ +@property(nonatomic, assign) BOOL srtpEnableAes128Sha1_32CryptoCipher; +/** + * If set to true, encrypted RTP header extensions as defined in RFC 6904 + * will be negotiated. They will only be used if both peers support them. + */ +@property(nonatomic, assign) BOOL srtpEnableEncryptedRtpHeaderExtensions; + +/** + * If set all RtpSenders must have an FrameEncryptor attached to them before + * they are allowed to send packets. All RtpReceivers must have a + * FrameDecryptor attached to them before they are able to receive packets. + */ +@property(nonatomic, assign) BOOL sframeRequireFrameEncryption; + +/** + * Initializes CryptoOptions with all possible options set explicitly. This + * is done when converting from a native RTCConfiguration.crypto_options. + */ +- (instancetype) + initWithSrtpEnableGcmCryptoSuites:(BOOL)srtpEnableGcmCryptoSuites + srtpEnableAes128Sha1_32CryptoCipher: + (BOOL)srtpEnableAes128Sha1_32CryptoCipher + srtpEnableEncryptedRtpHeaderExtensions: + (BOOL)srtpEnableEncryptedRtpHeaderExtensions + sframeRequireFrameEncryption:(BOOL)sframeRequireFrameEncryption + NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDataChannel.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDataChannel.h new file mode 100644 index 0000000..c5c2c9a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDataChannel.h @@ -0,0 +1,134 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDataBuffer) : NSObject + +/** NSData representation of the underlying buffer. */ +@property(nonatomic, readonly) NSData *data; + +/** Indicates whether `data` contains UTF-8 or binary data. */ +@property(nonatomic, readonly) BOOL isBinary; + +- (instancetype)init NS_UNAVAILABLE; + +/** + * Initialize an RTCDataBuffer from NSData. `isBinary` indicates whether `data` + * contains UTF-8 or binary data. + */ +- (instancetype)initWithData:(NSData *)data isBinary:(BOOL)isBinary; + +@end + +@class RTC_OBJC_TYPE(RTCDataChannel); +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCDataChannelDelegate) + + /** The data channel state changed. */ + - (void)dataChannelDidChangeState + : (RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel; + +/** The data channel successfully received a data buffer. */ +- (void)dataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel + didReceiveMessageWithBuffer:(RTC_OBJC_TYPE(RTCDataBuffer) *)buffer; + +@optional +/** The data channel's `bufferedAmount` changed. */ +- (void)dataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel + didChangeBufferedAmount:(uint64_t)amount; + +@end + +/** Represents the state of the data channel. */ +typedef NS_ENUM(NSInteger, RTCDataChannelState) { + RTCDataChannelStateConnecting, + RTCDataChannelStateOpen, + RTCDataChannelStateClosing, + RTCDataChannelStateClosed, +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDataChannel) : NSObject + +/** + * A label that can be used to distinguish this data channel from other data + * channel objects. + */ +@property(nonatomic, readonly) NSString *label; + +/** Whether the data channel can send messages in unreliable mode. */ +@property(nonatomic, readonly) BOOL isReliable DEPRECATED_ATTRIBUTE; + +/** Returns whether this data channel is ordered or not. */ +@property(nonatomic, readonly) BOOL isOrdered; + +/** Deprecated. Use maxPacketLifeTime. */ +@property(nonatomic, readonly) + NSUInteger maxRetransmitTime DEPRECATED_ATTRIBUTE; + +/** + * The length of the time window (in milliseconds) during which transmissions + * and retransmissions may occur in unreliable mode. + */ +@property(nonatomic, readonly) uint16_t maxPacketLifeTime; + +/** + * The maximum number of retransmissions that are attempted in unreliable mode. + */ +@property(nonatomic, readonly) uint16_t maxRetransmits; + +/** + * The name of the sub-protocol used with this data channel, if any. Otherwise + * this returns an empty string. + */ +@property(nonatomic, readonly) NSString *protocol; + +/** + * Returns whether this data channel was negotiated by the application or not. + */ +@property(nonatomic, readonly) BOOL isNegotiated; + +/** Deprecated. Use channelId. */ +@property(nonatomic, readonly) NSInteger streamId DEPRECATED_ATTRIBUTE; + +/** The identifier for this data channel. */ +@property(nonatomic, readonly) int channelId; + +/** The state of the data channel. */ +@property(nonatomic, readonly) RTCDataChannelState readyState; + +/** + * The number of bytes of application data that have been queued using + * `sendData:` but that have not yet been transmitted to the network. + */ +@property(nonatomic, readonly) uint64_t bufferedAmount; + +/** The delegate for this data channel. */ +@property(nonatomic, weak) id delegate; + +- (instancetype)init NS_UNAVAILABLE; + +/** Closes the data channel. */ +- (void)close; + +/** Attempt to send `data` on this data channel's underlying data transport. */ +- (BOOL)sendData:(RTC_OBJC_TYPE(RTCDataBuffer) *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDataChannelConfiguration.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDataChannelConfiguration.h new file mode 100644 index 0000000..b1d8d77 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDataChannelConfiguration.h @@ -0,0 +1,52 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDataChannelConfiguration) : NSObject + +/** Set to YES if ordered delivery is required. */ +@property(nonatomic, assign) BOOL isOrdered; + +/** Deprecated. Use maxPacketLifeTime. */ +@property(nonatomic, assign) NSInteger maxRetransmitTimeMs DEPRECATED_ATTRIBUTE; + +/** + * Max period in milliseconds in which retransmissions will be sent. After this + * time, no more retransmissions will be sent. -1 if unset. + */ +@property(nonatomic, assign) int maxPacketLifeTime; + +/** The max number of retransmissions. -1 if unset. */ +@property(nonatomic, assign) int maxRetransmits; + +/** Set to YES if the channel has been externally negotiated and we do not send + * an in-band signalling in the form of an "open" message. + */ +@property(nonatomic, assign) BOOL isNegotiated; + +/** Deprecated. Use channelId. */ +@property(nonatomic, assign) int streamId DEPRECATED_ATTRIBUTE; + +/** The id of the data channel. */ +@property(nonatomic, assign) int channelId; + +/** Set by the application and opaque to the WebRTC implementation. */ +@property(nonatomic) NSString* protocol; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h new file mode 100644 index 0000000..88b1d9c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h @@ -0,0 +1,26 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This decoder factory include support for all codecs bundled with WebRTC. If + * using custom codecs, create custom implementations of RTCVideoEncoderFactory + * and RTCVideoDecoderFactory. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDefaultVideoDecoderFactory) : NSObject +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h new file mode 100644 index 0000000..6defc80 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h @@ -0,0 +1,31 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This encoder factory include support for all codecs bundled with WebRTC. If + * using custom codecs, create custom implementations of RTCVideoEncoderFactory + * and RTCVideoDecoderFactory. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDefaultVideoEncoderFactory) : NSObject + +@property(nonatomic, retain) RTC_OBJC_TYPE(RTCVideoCodecInfo) *preferredCodec; + ++ (NSArray *)supportedCodecs; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDispatcher.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDispatcher.h new file mode 100644 index 0000000..bc44b47 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDispatcher.h @@ -0,0 +1,47 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, RTCDispatcherQueueType) { + // Main dispatcher queue. + RTCDispatcherTypeMain, + // Used for starting/stopping AVCaptureSession, and assigning + // capture session to AVCaptureVideoPreviewLayer. + RTCDispatcherTypeCaptureSession, + // Used for operations on AVAudioSession. + RTCDispatcherTypeAudioSession, + // Used for operations on NWPathMonitor. + RTCDispatcherTypeNetworkMonitor, +}; + +/** Dispatcher that asynchronously dispatches blocks to a specific + * shared dispatch queue. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDispatcher) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Dispatch the block asynchronously on the queue for dispatchType. + * @param dispatchType The queue type to dispatch on. + * @param block The block to dispatch asynchronously. + */ ++ (void)dispatchAsyncOnType:(RTCDispatcherQueueType)dispatchType + block:(dispatch_block_t)block; + +/** Returns YES if run on queue for the dispatchType otherwise NO. + * Useful for asserting that a method is run on a correct queue. + */ ++ (BOOL)isOnQueueForType:(RTCDispatcherQueueType)dispatchType; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDtmfSender.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDtmfSender.h new file mode 100644 index 0000000..33d98c5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCDtmfSender.h @@ -0,0 +1,73 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCDtmfSender) + + /** + * Returns true if this RTCDtmfSender is capable of sending DTMF. Otherwise + * returns false. To be able to send DTMF, the associated RTCRtpSender must + * be able to send packets, and a "telephone-event" codec must be + * negotiated. + */ + @property(nonatomic, readonly) BOOL canInsertDtmf; + +/** + * Queues a task that sends the DTMF tones. The tones parameter is treated + * as a series of characters. The characters 0 through 9, A through D, #, and * + * generate the associated DTMF tones. The characters a to d are equivalent + * to A to D. The character ',' indicates a delay of 2 seconds before + * processing the next character in the tones parameter. + * + * Unrecognized characters are ignored. + * + * @param duration The parameter indicates the duration to use for each + * character passed in the tones parameter. The duration cannot be more + * than 6000 or less than 70 ms. + * + * @param interToneGap The parameter indicates the gap between tones. + * This parameter must be at least 50 ms but should be as short as + * possible. + * + * If InsertDtmf is called on the same object while an existing task for this + * object to generate DTMF is still running, the previous task is canceled. + * Returns true on success and false on failure. + */ +- (BOOL)insertDtmf:(nonnull NSString *)tones + duration:(NSTimeInterval)duration + interToneGap:(NSTimeInterval)interToneGap; + +/** The tones remaining to be played out */ +- (nonnull NSString *)remainingTones; + +/** + * The current tone duration value. This value will be the value last set via + * the insertDtmf method, or the default value of 100 ms if insertDtmf was never + * called. + */ +- (NSTimeInterval)duration; + +/** + * The current value of the between-tone gap. This value will be the value last + * set via the insertDtmf() method, or the default value of 50 ms if + * insertDtmf() was never called. + */ +- (NSTimeInterval)interToneGap; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCEAGLVideoView.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCEAGLVideoView.h new file mode 100644 index 0000000..75cf9ae --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCEAGLVideoView.h @@ -0,0 +1,45 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCEAGLVideoView); + +/** + * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames + * in its bounds using OpenGLES 2.0 or OpenGLES 3.0. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Rendering not available in app extensions.") +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCEAGLVideoView) : UIView + +@property(nonatomic, weak) id delegate; + +- (instancetype)initWithFrame:(CGRect)frame + shader:(id)shader + NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithCoder:(NSCoder *)aDecoder + shader:(id)shader + NS_DESIGNATED_INITIALIZER; + +/** @abstract Wrapped RTCVideoRotation, or nil. + */ +@property(nonatomic, nullable) NSValue *rotationOverride; +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCEncodedImage.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCEncodedImage.h new file mode 100644 index 0000000..97f29ed --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCEncodedImage.h @@ -0,0 +1,52 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Represents an encoded frame's type. */ +typedef NS_ENUM(NSUInteger, RTCFrameType) { + RTCFrameTypeEmptyFrame = 0, + RTCFrameTypeAudioFrameSpeech = 1, + RTCFrameTypeAudioFrameCN = 2, + RTCFrameTypeVideoFrameKey = 3, + RTCFrameTypeVideoFrameDelta = 4, +}; + +typedef NS_ENUM(NSUInteger, RTCVideoContentType) { + RTCVideoContentTypeUnspecified, + RTCVideoContentTypeScreenshare, +}; + +/** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCEncodedImage) : NSObject + +@property(nonatomic, strong) NSData *buffer; +@property(nonatomic, assign) int32_t encodedWidth; +@property(nonatomic, assign) int32_t encodedHeight; +@property(nonatomic, assign) uint32_t timeStamp; +@property(nonatomic, assign) int64_t captureTimeMs; +@property(nonatomic, assign) int64_t ntpTimeMs; +@property(nonatomic, assign) uint8_t flags; +@property(nonatomic, assign) int64_t encodeStartMs; +@property(nonatomic, assign) int64_t encodeFinishMs; +@property(nonatomic, assign) RTCFrameType frameType; +@property(nonatomic, assign) RTCVideoRotation rotation; +@property(nonatomic, strong) NSNumber *qp; +@property(nonatomic, assign) RTCVideoContentType contentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFieldTrials.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFieldTrials.h new file mode 100644 index 0000000..fa27322 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFieldTrials.h @@ -0,0 +1,34 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** The only valid value for the following if set is kRTCFieldTrialEnabledValue. + */ +RTC_EXTERN NSString *const kRTCFieldTrialAudioForceABWENoTWCCKey; +RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03AdvertisedKey; +RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03Key; +RTC_EXTERN NSString *const kRTCFieldTrialH264HighProfileKey; +RTC_EXTERN NSString *const kRTCFieldTrialMinimizeResamplingOnMobileKey; +RTC_EXTERN NSString *const kRTCFieldTrialUseNWPathMonitor; + +/** The valid value for field trials above. */ +RTC_EXTERN NSString *const kRTCFieldTrialEnabledValue; + +/** Initialize field trials using a dictionary mapping field trial keys to their + * values. See above for valid keys and values. Must be called before any other + * call into WebRTC. See: webrtc/system_wrappers/include/field_trial.h + */ +// TODO: bugs.webrtc.org/42220378 - Delete after January 1, 2026. +RTC_OBJC_DEPRECATED("Pass field trials when building PeerConnectionFactory") +RTC_EXTERN void RTCInitFieldTrialDictionary( + NSDictionary *fieldTrials); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFileLogger.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFileLogger.h new file mode 100644 index 0000000..551a895 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFileLogger.h @@ -0,0 +1,76 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSUInteger, RTCFileLoggerSeverity) { + RTCFileLoggerSeverityVerbose, + RTCFileLoggerSeverityInfo, + RTCFileLoggerSeverityWarning, + RTCFileLoggerSeverityError +}; + +typedef NS_ENUM(NSUInteger, RTCFileLoggerRotationType) { + RTCFileLoggerTypeCall, + RTCFileLoggerTypeApp, +}; + +NS_ASSUME_NONNULL_BEGIN + +// This class intercepts WebRTC logs and saves them to a file. The file size +// will not exceed the given maximum bytesize. When the maximum bytesize is +// reached, logs are rotated according to the rotationType specified. +// For kRTCFileLoggerTypeCall, logs from the beginning and the end +// are preserved while the middle section is overwritten instead. +// For kRTCFileLoggerTypeApp, the oldest log is overwritten. +// This class is not threadsafe. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCFileLogger) : NSObject + +// The severity level to capture. The default is kRTCFileLoggerSeverityInfo. +@property(nonatomic, assign) RTCFileLoggerSeverity severity; + +// The rotation type for this file logger. The default is +// kRTCFileLoggerTypeCall. +@property(nonatomic, readonly) RTCFileLoggerRotationType rotationType; + +// Disables buffering disk writes. Should be set before `start`. Buffering +// is enabled by default for performance. +@property(nonatomic, assign) BOOL shouldDisableBuffering; + +// Default constructor provides default settings for dir path, file size and +// rotation type. +- (instancetype)init; + +// Create file logger with default rotation type. +- (instancetype)initWithDirPath:(NSString *)dirPath + maxFileSize:(NSUInteger)maxFileSize; + +- (instancetype)initWithDirPath:(NSString *)dirPath + maxFileSize:(NSUInteger)maxFileSize + rotationType:(RTCFileLoggerRotationType)rotationType + NS_DESIGNATED_INITIALIZER; + +// Starts writing WebRTC logs to disk if not already started. Overwrites any +// existing file(s). +- (void)start; + +// Stops writing WebRTC logs to disk. This method is also called on dealloc. +- (void)stop; + +// Returns the current contents of the logs, or nil if start has been called +// without a stop. +- (nullable NSData *)logData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFileVideoCapturer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFileVideoCapturer.h new file mode 100644 index 0000000..38f65f8 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCFileVideoCapturer.h @@ -0,0 +1,51 @@ +/* + * Copyright 2017 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * Error passing block. + */ +typedef void (^RTCFileVideoCapturerErrorBlock)(NSError *error); + +/** + * Captures buffers from bundled video file. + * + * See @c RTCVideoCapturer for more info on capturers. + */ +RTC_OBJC_EXPORT + +NS_CLASS_AVAILABLE_IOS(10) +@interface RTC_OBJC_TYPE (RTCFileVideoCapturer) : RTC_OBJC_TYPE(RTCVideoCapturer) + +/** + * Starts asynchronous capture of frames from video file. + * + * Capturing is not started if error occurs. Underlying error will be + * relayed in the errorBlock if one is provided. + * Successfully captured video frames will be passed to the delegate. + * + * @param nameOfFile The name of the bundled video file to be read. + * @errorBlock block to be executed upon error. + */ +- (void)startCapturingFromFileNamed:(NSString *)nameOfFile + onError:(__nullable RTCFileVideoCapturerErrorBlock)errorBlock; + +/** + * Immediately stops capture. + */ +- (void)stopCapture; +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCH264ProfileLevelId.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCH264ProfileLevelId.h new file mode 100644 index 0000000..67bcae1 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCH264ProfileLevelId.h @@ -0,0 +1,61 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +RTC_EXTERN NSString *const kRTCVideoCodecH264Name; +RTC_EXTERN NSString *const kRTCLevel31ConstrainedHigh; +RTC_EXTERN NSString *const kRTCLevel31ConstrainedBaseline; +RTC_EXTERN NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedHigh; +RTC_EXTERN NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedBaseline; + +/** H264 Profiles and levels. */ +typedef NS_ENUM(NSUInteger, RTCH264Profile) { + RTCH264ProfileConstrainedBaseline, + RTCH264ProfileBaseline, + RTCH264ProfileMain, + RTCH264ProfileConstrainedHigh, + RTCH264ProfileHigh, +}; + +typedef NS_ENUM(NSUInteger, RTCH264Level) { + RTCH264Level1_b = 0, + RTCH264Level1 = 10, + RTCH264Level1_1 = 11, + RTCH264Level1_2 = 12, + RTCH264Level1_3 = 13, + RTCH264Level2 = 20, + RTCH264Level2_1 = 21, + RTCH264Level2_2 = 22, + RTCH264Level3 = 30, + RTCH264Level3_1 = 31, + RTCH264Level3_2 = 32, + RTCH264Level4 = 40, + RTCH264Level4_1 = 41, + RTCH264Level4_2 = 42, + RTCH264Level5 = 50, + RTCH264Level5_1 = 51, + RTCH264Level5_2 = 52 +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCH264ProfileLevelId) : NSObject + +@property(nonatomic, readonly) RTCH264Profile profile; +@property(nonatomic, readonly) RTCH264Level level; +@property(nonatomic, readonly) NSString *hexString; + +- (instancetype)initWithHexString:(NSString *)hexString; +- (instancetype)initWithProfile:(RTCH264Profile)profile + level:(RTCH264Level)level; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCI420Buffer.h new file mode 100644 index 0000000..54c3240 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCI420Buffer.h @@ -0,0 +1,22 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Protocol for RTCYUVPlanarBuffers containing I420 data */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCI420Buffer) @end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceCandidate.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceCandidate.h new file mode 100644 index 0000000..23b4fec --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceCandidate.h @@ -0,0 +1,50 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCIceCandidate) : NSObject + +/** + * If present, the identifier of the "media stream identification" for the media + * component this candidate is associated with. + */ +@property(nonatomic, readonly, nullable) NSString *sdpMid; + +/** + * The index (starting at zero) of the media description this candidate is + * associated with in the SDP. + */ +@property(nonatomic, readonly) int sdpMLineIndex; + +/** The SDP string for this candidate. */ +@property(nonatomic, readonly) NSString *sdp; + +/** The URL of the ICE server which this candidate is gathered from. */ +@property(nonatomic, readonly, nullable) NSString *serverUrl; + +- (instancetype)init NS_UNAVAILABLE; + +/** + * Initialize an RTCIceCandidate from SDP. + */ +- (instancetype)initWithSdp:(NSString *)sdp + sdpMLineIndex:(int)sdpMLineIndex + sdpMid:(nullable NSString *)sdpMid + NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceCandidateErrorEvent.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceCandidateErrorEvent.h new file mode 100644 index 0000000..fb8e853 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceCandidateErrorEvent.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCIceCandidateErrorEvent) : NSObject + +/** The local IP address used to communicate with the STUN or TURN server. */ +@property(nonatomic, readonly) NSString *address; + +/** The port used to communicate with the STUN or TURN server. */ +@property(nonatomic, readonly) int port; + +/** The STUN or TURN URL that identifies the STUN or TURN server for which the + * failure occurred. */ +@property(nonatomic, readonly) NSString *url; + +/** The numeric STUN error code returned by the STUN or TURN server. If no host + * candidate can reach the server, errorCode will be set to the value 701 which + * is outside the STUN error code range. This error is only fired once per + * server URL while in the RTCIceGatheringState of "gathering". */ +@property(nonatomic, readonly) int errorCode; + +/** The STUN reason text returned by the STUN or TURN server. If the server + * could not be reached, errorText will be set to an implementation-specific + * value providing details about the error. */ +@property(nonatomic, readonly) NSString *errorText; + +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceServer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceServer.h new file mode 100644 index 0000000..6f6c7ea --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCIceServer.h @@ -0,0 +1,115 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSUInteger, RTCTlsCertPolicy) { + RTCTlsCertPolicySecure, + RTCTlsCertPolicyInsecureNoCheck +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCIceServer) : NSObject + +/** URI(s) for this server represented as NSStrings. */ +@property(nonatomic, readonly) NSArray *urlStrings; + +/** Username to use if this RTCIceServer object is a TURN server. */ +@property(nonatomic, readonly, nullable) NSString *username; + +/** Credential to use if this RTCIceServer object is a TURN server. */ +@property(nonatomic, readonly, nullable) NSString *credential; + +/** + * TLS certificate policy to use if this RTCIceServer object is a TURN server. + */ +@property(nonatomic, readonly) RTCTlsCertPolicy tlsCertPolicy; + +/** + If the URIs in `urls` only contain IP addresses, this field can be used + to indicate the hostname, which may be necessary for TLS (using the SNI + extension). If `urls` itself contains the hostname, this isn't necessary. + */ +@property(nonatomic, readonly, nullable) NSString *hostname; + +/** List of protocols to be used in the TLS ALPN extension. */ +@property(nonatomic, readonly) NSArray *tlsAlpnProtocols; + +/** + List elliptic curves to be used in the TLS elliptic curves extension. + Only curve names supported by OpenSSL should be used (eg. "P-256","X25519"). + */ +@property(nonatomic, readonly) NSArray *tlsEllipticCurves; + +- (nonnull instancetype)init NS_UNAVAILABLE; + +/** Convenience initializer for a server with no authentication (e.g. STUN). */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, and credentialType. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, and TLS cert policy. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, TLS cert policy and hostname. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy + hostname:(nullable NSString *)hostname; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, TLS cert policy, hostname and ALPN protocols. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy + hostname:(nullable NSString *)hostname + tlsAlpnProtocols:(NSArray *)tlsAlpnProtocols; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, TLS cert policy, hostname, ALPN protocols and + * elliptic curves. + */ +- (instancetype) + initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy + hostname:(nullable NSString *)hostname + tlsAlpnProtocols:(nullable NSArray *)tlsAlpnProtocols + tlsEllipticCurves:(nullable NSArray *)tlsEllipticCurves + NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCLegacyStatsReport.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCLegacyStatsReport.h new file mode 100644 index 0000000..c9ce8e3 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCLegacyStatsReport.h @@ -0,0 +1,37 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This does not currently conform to the spec. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCLegacyStatsReport) : NSObject + +/** Time since 1970-01-01T00:00:00Z in milliseconds. */ +@property(nonatomic, readonly) CFTimeInterval timestamp; + +/** The type of stats held by this object. */ +@property(nonatomic, readonly) NSString *type; + +/** The identifier for this object. */ +@property(nonatomic, readonly) NSString *reportId; + +/** A dictionary holding the actual stats. */ +@property(nonatomic, readonly) NSDictionary *values; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCLogging.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCLogging.h new file mode 100644 index 0000000..4cc2901 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCLogging.h @@ -0,0 +1,70 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +// Subset of webrtc::LoggingSeverity. +typedef NS_ENUM(NSInteger, RTCLoggingSeverity) { + RTCLoggingSeverityVerbose, + RTCLoggingSeverityInfo, + RTCLoggingSeverityWarning, + RTCLoggingSeverityError, + RTCLoggingSeverityNone, +}; + +// Wrapper for C++ RTC_LOG(sev) macros. +// Logs the log string to the webrtc logstream for the given severity. +RTC_EXTERN void RTCLogEx(RTCLoggingSeverity severity, NSString* log_string); + +// Wrapper for webrtc::LogMessage::LogToDebug. +// Sets the minimum severity to be logged to console. +RTC_EXTERN void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity); + +// Returns the filename with the path prefix removed. +RTC_EXTERN NSString* RTCFileName(const char* filePath); + +// Some convenience macros. + +#define RTCLogString(format, ...) \ + [NSString stringWithFormat:@"(%@:%d %s): " format, \ + RTCFileName(__FILE__), \ + __LINE__, \ + __FUNCTION__, \ + ##__VA_ARGS__] + +#define RTCLogFormat(severity, format, ...) \ + do { \ + NSString* log_string = RTCLogString(format, ##__VA_ARGS__); \ + RTCLogEx(severity, log_string); \ + } while (false) + +#define RTCLogVerbose(format, ...) \ + RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) + +#define RTCLogInfo(format, ...) \ + RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) + +#define RTCLogWarning(format, ...) \ + RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) + +#define RTCLogError(format, ...) \ + RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) + +#if !defined(NDEBUG) +#define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) +#else +#define RTCLogDebug(format, ...) \ + do { \ + } while (false) +#endif + +#define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__) diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMTLVideoView.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMTLVideoView.h new file mode 100644 index 0000000..f93ab59 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMTLVideoView.h @@ -0,0 +1,44 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * RTCMTLVideoView is thin wrapper around MTKView. + * + * It has id property that renders video frames in the view's + * bounds using Metal. + */ +NS_CLASS_AVAILABLE_IOS(9) + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMTLVideoView) : UIView + +@property(nonatomic, weak) id delegate; + +@property(nonatomic) UIViewContentMode videoContentMode; + +/** @abstract Enables/disables rendering. + */ +@property(nonatomic, getter=isEnabled) BOOL enabled; + +/** @abstract Wrapped RTCVideoRotation, or nil. + */ +@property(nonatomic, nullable) NSValue* rotationOverride; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMacros.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMacros.h new file mode 100644 index 0000000..cb943b4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMacros.h @@ -0,0 +1,67 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef SDK_OBJC_BASE_RTCMACROS_H_ +#define SDK_OBJC_BASE_RTCMACROS_H_ + +#ifdef WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT + +#if defined(WEBRTC_LIBRARY_IMPL) +#define RTC_OBJC_EXPORT __attribute__((visibility("default"))) +#endif + +#endif // WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT + +#ifndef RTC_OBJC_EXPORT +#define RTC_OBJC_EXPORT +#endif + +// Macro used to mark a function as deprecated. +#define RTC_OBJC_DEPRECATED(msg) __attribute__((deprecated(msg))) + +// Internal macros used to correctly concatenate symbols. +#define RTC_SYMBOL_CONCAT_HELPER(a, b) a##b +#define RTC_SYMBOL_CONCAT(a, b) RTC_SYMBOL_CONCAT_HELPER(a, b) + +// RTC_OBJC_TYPE_PREFIX +// +// Macro used to prepend a prefix to the API types that are exported with +// RTC_OBJC_EXPORT. +// +// Clients can patch the definition of this macro locally and build +// WebRTC.framework with their own prefix in case symbol clashing is a +// problem. +// +// This macro must be defined uniformily across all the translation units. +#ifndef RTC_OBJC_TYPE_PREFIX +#define RTC_OBJC_TYPE_PREFIX +#endif + +// RCT_OBJC_TYPE +// +// Macro used internally to declare API types. Declaring an API type without +// using this macro will not include the declared type in the set of types +// that will be affected by the configurable RTC_OBJC_TYPE_PREFIX. +#define RTC_OBJC_TYPE(type_name) \ + RTC_SYMBOL_CONCAT(RTC_OBJC_TYPE_PREFIX, type_name) + +#if defined(__cplusplus) +#define RTC_EXTERN extern "C" RTC_OBJC_EXPORT +#else +#define RTC_EXTERN extern RTC_OBJC_EXPORT +#endif + +#ifdef __OBJC__ +#define RTC_FWD_DECL_OBJC_CLASS(classname) @class classname +#else +#define RTC_FWD_DECL_OBJC_CLASS(classname) typedef struct objc_object classname +#endif + +#endif // SDK_OBJC_BASE_RTCMACROS_H_ diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaConstraints.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaConstraints.h new file mode 100644 index 0000000..8d002b9 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaConstraints.h @@ -0,0 +1,47 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Constraint keys for media sources. */ +/** The value for this key should be a base64 encoded string containing + * the data from the serialized configuration proto. + */ +RTC_EXTERN NSString *const kRTCMediaConstraintsAudioNetworkAdaptorConfig; + +/** Constraint keys for generating offers and answers. */ +RTC_EXTERN NSString *const kRTCMediaConstraintsIceRestart; +RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveAudio; +RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveVideo; +RTC_EXTERN NSString *const kRTCMediaConstraintsVoiceActivityDetection; + +/** Constraint values for Boolean parameters. */ +RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue; +RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaConstraints) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initialize with mandatory and/or optional constraints. */ +- (instancetype)initWithMandatoryConstraints: + (nullable NSDictionary *)mandatory + optionalConstraints: + (nullable NSDictionary *) + optional NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaSource.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaSource.h new file mode 100644 index 0000000..51ceb60 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaSource.h @@ -0,0 +1,34 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, RTCSourceState) { + RTCSourceStateInitializing, + RTCSourceStateLive, + RTCSourceStateEnded, + RTCSourceStateMuted, +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaSource) : NSObject + +/** The current state of the RTCMediaSource. */ +@property(nonatomic, readonly) RTCSourceState state; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaStream.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaStream.h new file mode 100644 index 0000000..ce3eec5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaStream.h @@ -0,0 +1,50 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCAudioTrack); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); +@class RTC_OBJC_TYPE(RTCVideoTrack); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaStream) : NSObject + +/** The audio tracks in this stream. */ +@property(nonatomic, strong, readonly) NSArray *audioTracks; + +/** The video tracks in this stream. */ +@property(nonatomic, strong, readonly) + NSArray *videoTracks; + +/** An identifier for this media stream. */ +@property(nonatomic, readonly) NSString *streamId; + +- (instancetype)init NS_UNAVAILABLE; + +/** Adds the given audio track to this media stream. */ +- (void)addAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack; + +/** Adds the given video track to this media stream. */ +- (void)addVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack; + +/** Removes the given audio track to this media stream. */ +- (void)removeAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack; + +/** Removes the given video track to this media stream. */ +- (void)removeVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaStreamTrack.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaStreamTrack.h new file mode 100644 index 0000000..5265879 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMediaStreamTrack.h @@ -0,0 +1,50 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** + * Represents the state of the track. This exposes the same states in C++. + */ +typedef NS_ENUM(NSInteger, RTCMediaStreamTrackState) { + RTCMediaStreamTrackStateLive, + RTCMediaStreamTrackStateEnded +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_EXTERN NSString *const kRTCMediaStreamTrackKindAudio; +RTC_EXTERN NSString *const kRTCMediaStreamTrackKindVideo; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaStreamTrack) : NSObject + +/** + * The kind of track. For example, "audio" if this track represents an audio + * track and "video" if this track represents a video track. + */ +@property(nonatomic, readonly) NSString *kind; + +/** An identifier string. */ +@property(nonatomic, readonly) NSString *trackId; + +/** The enabled state of the track. */ +@property(nonatomic, assign) BOOL isEnabled; + +/** The state of the track. */ +@property(nonatomic, readonly) RTCMediaStreamTrackState readyState; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMetrics.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMetrics.h new file mode 100644 index 0000000..fffb451 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMetrics.h @@ -0,0 +1,24 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +/** + * Enables gathering of metrics (which can be fetched with + * RTCGetAndResetMetrics). Must be called before any other call into WebRTC. + */ +RTC_EXTERN void RTCEnableMetrics(void); + +/** Gets and clears native histograms. */ +RTC_EXTERN NSArray* + RTCGetAndResetMetrics(void); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMetricsSampleInfo.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMetricsSampleInfo.h new file mode 100644 index 0000000..18afdc0 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMetricsSampleInfo.h @@ -0,0 +1,48 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMetricsSampleInfo) : NSObject + +/** + * Example of RTCMetricsSampleInfo: + * name: "WebRTC.Video.InputFramesPerSecond" + * min: 1 + * max: 100 + * bucketCount: 50 + * samples: [29]:2 [30]:1 + */ + +/** The name of the histogram. */ +@property(nonatomic, readonly) NSString *name; + +/** The minimum bucket value. */ +@property(nonatomic, readonly) int min; + +/** The maximum bucket value. */ +@property(nonatomic, readonly) int max; + +/** The number of buckets. */ +@property(nonatomic, readonly) int bucketCount; + +/** A dictionary holding the samples . */ +@property(nonatomic, readonly) NSDictionary *samples; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMutableI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMutableI420Buffer.h new file mode 100644 index 0000000..7685234 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMutableI420Buffer.h @@ -0,0 +1,24 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Extension of the I420 buffer with mutable data access */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCMutableI420Buffer) @end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h new file mode 100644 index 0000000..feb7417 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h @@ -0,0 +1,28 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Extension of the YUV planar data buffer with mutable data access */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCMutableYUVPlanarBuffer) + + @property(nonatomic, readonly) uint8_t *mutableDataY; +@property(nonatomic, readonly) uint8_t *mutableDataU; +@property(nonatomic, readonly) uint8_t *mutableDataV; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNativeI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNativeI420Buffer.h new file mode 100644 index 0000000..c5a0ddf --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNativeI420Buffer.h @@ -0,0 +1,23 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCI420Buffer implements the RTCI420Buffer protocol */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCI420Buffer) : NSObject +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h new file mode 100644 index 0000000..b300731 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h @@ -0,0 +1,24 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Mutable version of RTCI420Buffer */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMutableI420Buffer) : RTC_OBJC_TYPE(RTCI420Buffer) +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNetworkMonitor.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNetworkMonitor.h new file mode 100644 index 0000000..21d22f5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCNetworkMonitor.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Listens for NWPathMonitor updates and forwards the results to a C++ + * observer. + */ +@interface RTCNetworkMonitor : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnection.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnection.h new file mode 100644 index 0000000..7ddb5ba --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnection.h @@ -0,0 +1,422 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +@class RTC_OBJC_TYPE(RTCConfiguration); +@class RTC_OBJC_TYPE(RTCDataChannel); +@class RTC_OBJC_TYPE(RTCDataChannelConfiguration); +@class RTC_OBJC_TYPE(RTCIceCandidate); +@class RTC_OBJC_TYPE(RTCIceCandidateErrorEvent); +@class RTC_OBJC_TYPE(RTCMediaConstraints); +@class RTC_OBJC_TYPE(RTCMediaStream); +@class RTC_OBJC_TYPE(RTCMediaStreamTrack); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); +@class RTC_OBJC_TYPE(RTCRtpReceiver); +@class RTC_OBJC_TYPE(RTCRtpSender); +@class RTC_OBJC_TYPE(RTCRtpTransceiver); +@class RTC_OBJC_TYPE(RTCRtpTransceiverInit); +@class RTC_OBJC_TYPE(RTCSessionDescription); +@class RTC_OBJC_TYPE(RTCStatisticsReport); +@class RTC_OBJC_TYPE(RTCLegacyStatsReport); + +typedef NS_ENUM(NSInteger, RTCRtpMediaType); + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const kRTCPeerConnectionErrorDomain; +extern int const kRTCSessionDescriptionErrorCode; + +/** Represents the signaling state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCSignalingState) { + RTCSignalingStateStable, + RTCSignalingStateHaveLocalOffer, + RTCSignalingStateHaveLocalPrAnswer, + RTCSignalingStateHaveRemoteOffer, + RTCSignalingStateHaveRemotePrAnswer, + // Not an actual state, represents the total number of states. + RTCSignalingStateClosed, +}; + +/** Represents the ice connection state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCIceConnectionState) { + RTCIceConnectionStateNew, + RTCIceConnectionStateChecking, + RTCIceConnectionStateConnected, + RTCIceConnectionStateCompleted, + RTCIceConnectionStateFailed, + RTCIceConnectionStateDisconnected, + RTCIceConnectionStateClosed, + RTCIceConnectionStateCount, +}; + +/** Represents the combined ice+dtls connection state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCPeerConnectionState) { + RTCPeerConnectionStateNew, + RTCPeerConnectionStateConnecting, + RTCPeerConnectionStateConnected, + RTCPeerConnectionStateDisconnected, + RTCPeerConnectionStateFailed, + RTCPeerConnectionStateClosed, +}; + +/** Represents the ice gathering state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCIceGatheringState) { + RTCIceGatheringStateNew, + RTCIceGatheringStateGathering, + RTCIceGatheringStateComplete, +}; + +/** Represents the stats output level. */ +typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) { + RTCStatsOutputLevelStandard, + RTCStatsOutputLevelDebug, +}; + +typedef void (^RTCCreateSessionDescriptionCompletionHandler)( + RTC_OBJC_TYPE(RTCSessionDescription) *_Nullable sdp, + NSError *_Nullable error); + +typedef void (^RTCSetSessionDescriptionCompletionHandler)( + NSError *_Nullable error); + +@class RTC_OBJC_TYPE(RTCPeerConnection); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCPeerConnectionDelegate) + + /** Called when the SignalingState changed. */ + - (void)peerConnection + : (RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection didChangeSignalingState + : (RTCSignalingState)stateChanged; + +/** Called when media is received on a new stream from remote peer. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didAddStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Called when a remote peer closes a stream. + * This is not called when RTCSdpSemanticsUnifiedPlan is specified. + */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didRemoveStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Called when negotiation is needed, for example ICE has restarted. */ +- (void)peerConnectionShouldNegotiate: + (RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection; + +/** Called any time the IceConnectionState changes. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeIceConnectionState:(RTCIceConnectionState)newState; + +/** Called any time the IceGatheringState changes. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeIceGatheringState:(RTCIceGatheringState)newState; + +/** New ice candidate has been found. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didGenerateIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate; + +/** Called when a group of local Ice candidates have been removed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didRemoveIceCandidates: + (NSArray *)candidates; + +/** New data channel has been opened. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didOpenDataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel; + +/** Called when signaling indicates a transceiver will be receiving media from + * the remote endpoint. + * This is only called with RTCSdpSemanticsUnifiedPlan specified. + */ +@optional +/** Called any time the IceConnectionState changes following standardized + * transition. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeStandardizedIceConnectionState:(RTCIceConnectionState)newState; + +/** Called any time the PeerConnectionState changes. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeConnectionState:(RTCPeerConnectionState)newState; + +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didStartReceivingOnTransceiver: + (RTC_OBJC_TYPE(RTCRtpTransceiver) *)transceiver; + +/** Called when a receiver and its track are created. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didAddReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver + streams:(NSArray *)mediaStreams; + +/** Called when the receiver and its track are removed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didRemoveReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver; + +/** Called when the selected ICE candidate pair is changed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeLocalCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)local + remoteCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)remote + lastReceivedMs:(int)lastDataReceivedMs + changeReason:(NSString *)reason; + +/** Called when gathering of an ICE candidate failed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didFailToGatherIceCandidate: + (RTC_OBJC_TYPE(RTCIceCandidateErrorEvent) *)event; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCPeerConnection) : NSObject + +/** The object that will be notifed about events such as state changes and + * streams being added or removed. + */ +@property(nonatomic, weak, nullable) id delegate; +/** This property is not available with RTCSdpSemanticsUnifiedPlan. Please use + * `senders` instead. + */ +@property(nonatomic, readonly) + NSArray *localStreams; +@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCSessionDescription) * + localDescription; +@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCSessionDescription) * + remoteDescription; +@property(nonatomic, readonly) RTCSignalingState signalingState; +@property(nonatomic, readonly) RTCIceConnectionState iceConnectionState; +@property(nonatomic, readonly) RTCPeerConnectionState connectionState; +@property(nonatomic, readonly) RTCIceGatheringState iceGatheringState; +@property(nonatomic, readonly, copy) RTC_OBJC_TYPE(RTCConfiguration) * + configuration; + +/** Gets all RTCRtpSenders associated with this peer connection. + * Note: reading this property returns different instances of RTCRtpSender. + * Use isEqual: instead of == to compare RTCRtpSender instances. + */ +@property(nonatomic, readonly) NSArray *senders; + +/** Gets all RTCRtpReceivers associated with this peer connection. + * Note: reading this property returns different instances of RTCRtpReceiver. + * Use isEqual: instead of == to compare RTCRtpReceiver instances. + */ +@property(nonatomic, readonly) + NSArray *receivers; + +/** Gets all RTCRtpTransceivers associated with this peer connection. + * Note: reading this property returns different instances of + * RTCRtpTransceiver. Use isEqual: instead of == to compare + * RTCRtpTransceiver instances. This is only available with + * RTCSdpSemanticsUnifiedPlan specified. + */ +@property(nonatomic, readonly) + NSArray *transceivers; + +- (instancetype)init NS_UNAVAILABLE; + +/** Sets the PeerConnection's global configuration to `configuration`. + * Any changes to STUN/TURN servers or ICE candidate policy will affect the + * next gathering phase, and cause the next call to createOffer to generate + * new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies + * cannot be changed with this method. + */ +- (BOOL)setConfiguration:(RTC_OBJC_TYPE(RTCConfiguration) *)configuration; + +/** Terminate all media and close the transport. */ +- (void)close; + +/** Provide a remote candidate to the ICE Agent. */ +- (void)addIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate + DEPRECATED_MSG_ATTRIBUTE( + "Please use addIceCandidate:completionHandler: instead"); + +/** Provide a remote candidate to the ICE Agent. */ +- (void)addIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate + completionHandler:(void (^)(NSError *_Nullable error))completionHandler; + +/** Remove a group of remote candidates from the ICE Agent. */ +- (void)removeIceCandidates: + (NSArray *)candidates; + +/** Add a new media stream to be sent on this peer connection. + * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use + * addTrack instead. + */ +- (void)addStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Remove the given media stream from this peer connection. + * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use + * removeTrack instead. + */ +- (void)removeStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Add a new media stream track to be sent on this peer connection, and return + * the newly created RTCRtpSender. The RTCRtpSender will be + * associated with the streams specified in the `streamIds` list. + * + * Errors: If an error occurs, returns nil. An error can occur if: + * - A sender already exists for the track. + * - The peer connection is closed. + */ +- (nullable RTC_OBJC_TYPE(RTCRtpSender) *) + addTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track + streamIds:(NSArray *)streamIds; + +/** With PlanB semantics, removes an RTCRtpSender from this peer connection. + * + * With UnifiedPlan semantics, sets sender's track to null and removes the + * send component from the associated RTCRtpTransceiver's direction. + * + * Returns YES on success. + */ +- (BOOL)removeTrack:(RTC_OBJC_TYPE(RTCRtpSender) *)sender; + +/** addTransceiver creates a new RTCRtpTransceiver and adds it to the set of + * transceivers. Adding a transceiver will cause future calls to CreateOffer + * to add a media description for the corresponding transceiver. + * + * The initial value of `mid` in the returned transceiver is nil. Setting a + * new session description may change it to a non-nil value. + * + * https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtransceiver + * + * Optionally, an RtpTransceiverInit structure can be specified to configure + * the transceiver from construction. If not specified, the transceiver will + * default to having a direction of kSendRecv and not be part of any streams. + * + * These methods are only available when Unified Plan is enabled (see + * RTCConfiguration). + */ + +/** Adds a transceiver with a sender set to transmit the given track. The kind + * of the transceiver (and sender/receiver) will be derived from the kind of + * the track. + */ +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *)addTransceiverWithTrack: + (RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track; +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *) + addTransceiverWithTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track + init:(RTC_OBJC_TYPE(RTCRtpTransceiverInit) *)init; + +/** Adds a transceiver with the given kind. Can either be RTCRtpMediaTypeAudio + * or RTCRtpMediaTypeVideo. + */ +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *)addTransceiverOfType: + (RTCRtpMediaType)mediaType; +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *) + addTransceiverOfType:(RTCRtpMediaType)mediaType + init:(RTC_OBJC_TYPE(RTCRtpTransceiverInit) *)init; + +/** Tells the PeerConnection that ICE should be restarted. This triggers a need + * for negotiation and subsequent offerForConstraints:completionHandler call + * will act as if RTCOfferAnswerOptions::ice_restart is true. + */ +- (void)restartIce; + +/** Generate an SDP offer. */ +- (void)offerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + completionHandler: + (RTCCreateSessionDescriptionCompletionHandler)completionHandler; + +/** Generate an SDP answer. */ +- (void)answerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + completionHandler: + (RTCCreateSessionDescriptionCompletionHandler)completionHandler; + +/** Apply the supplied RTCSessionDescription as the local description. */ +- (void)setLocalDescription:(RTC_OBJC_TYPE(RTCSessionDescription) *)sdp + completionHandler: + (RTCSetSessionDescriptionCompletionHandler)completionHandler; + +/** Creates an offer or answer (depending on current signaling state) and sets + * it as the local session description. */ +- (void)setLocalDescriptionWithCompletionHandler: + (RTCSetSessionDescriptionCompletionHandler)completionHandler; + +/** Apply the supplied RTCSessionDescription as the remote description. */ +- (void)setRemoteDescription:(RTC_OBJC_TYPE(RTCSessionDescription) *)sdp + completionHandler: + (RTCSetSessionDescriptionCompletionHandler)completionHandler; + +/** Limits the bandwidth allocated for all RTP streams sent by this + * PeerConnection. Nil parameters will be unchanged. Setting + * `currentBitrateBps` will force the available bitrate estimate to the given + * value. Returns YES if the parameters were successfully updated. + */ +- (BOOL)setBweMinBitrateBps:(nullable NSNumber *)minBitrateBps + currentBitrateBps:(nullable NSNumber *)currentBitrateBps + maxBitrateBps:(nullable NSNumber *)maxBitrateBps; + +/** Start or stop recording an Rtc EventLog. */ +- (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath + maxSizeInBytes:(int64_t)maxSizeInBytes; +- (void)stopRtcEventLog; + +@end + +@interface RTC_OBJC_TYPE (RTCPeerConnection) +(Media) + + /** Create an RTCRtpSender with the specified kind and media stream ID. + * See RTCMediaStreamTrack.h for available kinds. + * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use + * addTransceiver instead. + */ + - (RTC_OBJC_TYPE(RTCRtpSender) *)senderWithKind : (NSString *)kind streamId + : (NSString *)streamId; + +@end + +@interface RTC_OBJC_TYPE (RTCPeerConnection) +(DataChannel) + + /** Create a new data channel with the given label and configuration. */ + - (nullable RTC_OBJC_TYPE(RTCDataChannel) *)dataChannelForLabel + : (NSString *)label configuration + : (RTC_OBJC_TYPE(RTCDataChannelConfiguration) *)configuration; + +@end + +typedef void (^RTCStatisticsCompletionHandler)( + RTC_OBJC_TYPE(RTCStatisticsReport) *); + +@interface RTC_OBJC_TYPE (RTCPeerConnection) +(Stats) + + /** Gather stats for the given RTCMediaStreamTrack. If `mediaStreamTrack` is + * nil statistics are gathered for all tracks. + */ + - (void)statsForTrack : (nullable RTC_OBJC_TYPE(RTCMediaStreamTrack) *) + mediaStreamTrack statsOutputLevel + : (RTCStatsOutputLevel)statsOutputLevel completionHandler + : (nullable void (^)(NSArray *stats)) + completionHandler; + +/** Gather statistic through the v2 statistics API. */ +- (void)statisticsWithCompletionHandler: + (RTCStatisticsCompletionHandler)completionHandler; + +/** Spec-compliant getStats() performing the stats selection algorithm with the + * sender. + */ +- (void)statisticsForSender:(RTC_OBJC_TYPE(RTCRtpSender) *)sender + completionHandler:(RTCStatisticsCompletionHandler)completionHandler; + +/** Spec-compliant getStats() performing the stats selection algorithm with the + * receiver. + */ +- (void)statisticsForReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)receiver + completionHandler:(RTCStatisticsCompletionHandler)completionHandler; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnectionFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnectionFactory.h new file mode 100644 index 0000000..7396bea --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnectionFactory.h @@ -0,0 +1,147 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCRtpCapabilities); +@class RTC_OBJC_TYPE(RTCAudioSource); +@class RTC_OBJC_TYPE(RTCAudioTrack); +@class RTC_OBJC_TYPE(RTCConfiguration); +@class RTC_OBJC_TYPE(RTCMediaConstraints); +@class RTC_OBJC_TYPE(RTCMediaStream); +@class RTC_OBJC_TYPE(RTCPeerConnection); +@class RTC_OBJC_TYPE(RTCVideoSource); +@class RTC_OBJC_TYPE(RTCVideoTrack); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactoryOptions); +@protocol RTC_OBJC_TYPE +(RTCPeerConnectionDelegate); +@protocol RTC_OBJC_TYPE +(RTCVideoDecoderFactory); +@protocol RTC_OBJC_TYPE +(RTCVideoEncoderFactory); +@protocol RTC_OBJC_TYPE +(RTCSSLCertificateVerifier); +@protocol RTC_OBJC_TYPE +(RTCAudioDevice); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCPeerConnectionFactory) : NSObject + +/* Initialize object with default H264 video encoder/decoder factories and default ADM */ +- (instancetype)init; + +/* Initialize object with injectable video encoder/decoder factories and default + * ADM */ +- (instancetype) + initWithEncoderFactory: + (nullable id)encoderFactory + decoderFactory:(nullable id) + decoderFactory; + +/* Initialize object with injectable video encoder/decoder factories and + * injectable ADM */ +- (instancetype) + initWithEncoderFactory: + (nullable id)encoderFactory + decoderFactory:(nullable id) + decoderFactory + audioDevice: + (nullable id)audioDevice; + +/** + * Valid kind values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +- (RTC_OBJC_TYPE(RTCRtpCapabilities) *)rtpSenderCapabilitiesForKind: + (NSString *)kind; + +/** + * Valid kind values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +- (RTC_OBJC_TYPE(RTCRtpCapabilities) *)rtpReceiverCapabilitiesForKind: + (NSString *)kind; + +/** Initialize an RTCAudioSource with constraints. */ +- (RTC_OBJC_TYPE(RTCAudioSource) *)audioSourceWithConstraints: + (nullable RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints; + +/** Initialize an RTCAudioTrack with an id. Convenience ctor to use an audio + * source with no constraints. + */ +- (RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrackWithTrackId:(NSString *)trackId; + +/** Initialize an RTCAudioTrack with a source and an id. */ +- (RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrackWithSource: + (RTC_OBJC_TYPE(RTCAudioSource) *)source + trackId:(NSString *)trackId; + +/** Initialize a generic RTCVideoSource. The RTCVideoSource should be + * passed to a RTCVideoCapturer implementation, e.g. + * RTCCameraVideoCapturer, in order to produce frames. + */ +- (RTC_OBJC_TYPE(RTCVideoSource) *)videoSource; + +/** Initialize a generic RTCVideoSource with he posibility of marking + * it as usable for screen sharing. The RTCVideoSource should be + * passed to a RTCVideoCapturer implementation, e.g. + * RTCCameraVideoCapturer, in order to produce frames. + */ +- (RTC_OBJC_TYPE(RTCVideoSource) *)videoSourceForScreenCast:(BOOL)forScreenCast; + +/** Initialize an RTCVideoTrack with a source and an id. */ +- (RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrackWithSource: + (RTC_OBJC_TYPE(RTCVideoSource) *)source + trackId:(NSString *)trackId; + +/** Initialize an RTCMediaStream with an id. */ +- (RTC_OBJC_TYPE(RTCMediaStream) *)mediaStreamWithStreamId:(NSString *)streamId; + +/** Initialize an RTCPeerConnection with a configuration, constraints, and + * delegate. + */ +- (nullable RTC_OBJC_TYPE(RTCPeerConnection) *) + peerConnectionWithConfiguration: + (RTC_OBJC_TYPE(RTCConfiguration) *)configuration + constraints: + (RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + delegate:(nullable id)delegate; + +- (nullable RTC_OBJC_TYPE(RTCPeerConnection) *) + peerConnectionWithConfiguration: + (RTC_OBJC_TYPE(RTCConfiguration) *)configuration + constraints: + (RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + certificateVerifier: + (id) + certificateVerifier + delegate:(nullable id)delegate; + +/** Set the options to be used for subsequently created RTCPeerConnections */ +- (void)setOptions: + (nonnull RTC_OBJC_TYPE(RTCPeerConnectionFactoryOptions) *)options; + +/** Start an AecDump recording. This API call will likely change in the future. + */ +- (BOOL)startAecDumpWithFilePath:(NSString *)filePath + maxSizeInBytes:(int64_t)maxSizeInBytes; + +/* Stop an active AecDump recording */ +- (void)stopAecDump; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h new file mode 100644 index 0000000..1c7a10d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h @@ -0,0 +1,38 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCPeerConnectionFactoryOptions) : NSObject + +@property(nonatomic, assign) BOOL disableEncryption; + +@property(nonatomic, assign) BOOL disableNetworkMonitor; + +@property(nonatomic, assign) BOOL ignoreLoopbackNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreVPNNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreCellularNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreWiFiNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreEthernetNetworkAdapter; + +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtcpParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtcpParameters.h new file mode 100644 index 0000000..8449500 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtcpParameters.h @@ -0,0 +1,30 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtcpParameters) : NSObject + +/** The Canonical Name used by RTCP. */ +@property(nonatomic, readonly, copy) NSString *cname; + +/** Whether reduced size RTCP is configured or compound RTCP. */ +@property(nonatomic, assign) BOOL isReducedSize; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCapabilities.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCapabilities.h new file mode 100644 index 0000000..c44d0b8 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCapabilities.h @@ -0,0 +1,31 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCRtpCodecCapability); +@class RTC_OBJC_TYPE(RTCRtpHeaderExtensionCapability); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpCapabilities) : NSObject + +@property(nonatomic, copy) NSArray *codecs; +@property(nonatomic, copy) + NSArray *headerExtensions; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCodecCapability.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCodecCapability.h new file mode 100644 index 0000000..ee953e1 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCodecCapability.h @@ -0,0 +1,58 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpCodecCapability) : NSObject + +/** The preferred RTP payload type. */ +@property(nonatomic, readonly, nullable) NSNumber *preferredPayloadType; + +/** + * The codec MIME subtype. Valid types are listed in: + * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2 + * + * Several supported types are represented by the constants above. + */ +@property(nonatomic, readonly) NSString *name; + +/** + * The media type of this codec. Equivalent to MIME top-level type. + * + * Valid values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +@property(nonatomic, readonly) NSString *kind; + +/** The codec clock rate expressed in Hertz. */ +@property(nonatomic, readonly, nullable) NSNumber *clockRate; + +/** + * The number of audio channels (mono=1, stereo=2). + * Set to null for video codecs. + **/ +@property(nonatomic, readonly, nullable) NSNumber *numChannels; + +/** The "format specific parameters" field from the "a=fmtp" line in the SDP */ +@property(nonatomic, readonly) NSDictionary *parameters; + +/** The MIME type of the codec. */ +@property(nonatomic, readonly) NSString *mimeType; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCodecParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCodecParameters.h new file mode 100644 index 0000000..9f96220 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpCodecParameters.h @@ -0,0 +1,72 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_EXTERN const NSString *const kRTCRtxCodecName; +RTC_EXTERN const NSString *const kRTCRedCodecName; +RTC_EXTERN const NSString *const kRTCUlpfecCodecName; +RTC_EXTERN const NSString *const kRTCFlexfecCodecName; +RTC_EXTERN const NSString *const kRTCOpusCodecName; +RTC_EXTERN const NSString *const kRTCIsacCodecName; +RTC_EXTERN const NSString *const kRTCL16CodecName; +RTC_EXTERN const NSString *const kRTCG722CodecName; +RTC_EXTERN const NSString *const kRTCPcmuCodecName; +RTC_EXTERN const NSString *const kRTCPcmaCodecName; +RTC_EXTERN const NSString *const kRTCDtmfCodecName; +RTC_EXTERN const NSString *const kRTCComfortNoiseCodecName; +RTC_EXTERN const NSString *const kRTCVp8CodecName; +RTC_EXTERN const NSString *const kRTCVp9CodecName; +RTC_EXTERN const NSString *const kRTCH264CodecName; + +/** Defined in https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcodecparameters */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpCodecParameters) : NSObject + +/** The RTP payload type. */ +@property(nonatomic, assign) int payloadType; + +/** + * The codec MIME subtype. Valid types are listed in: + * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2 + * + * Several supported types are represented by the constants above. + */ +@property(nonatomic, readonly, nonnull) NSString *name; + +/** + * The media type of this codec. Equivalent to MIME top-level type. + * + * Valid values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +@property(nonatomic, readonly, nonnull) NSString *kind; + +/** The codec clock rate expressed in Hertz. */ +@property(nonatomic, readonly, nullable) NSNumber *clockRate; + +/** + * The number of channels (mono=1, stereo=2). + * Set to null for video codecs. + **/ +@property(nonatomic, readonly, nullable) NSNumber *numChannels; + +/** The "format specific parameters" field from the "a=fmtp" line in the SDP */ +@property(nonatomic, readonly, nonnull) NSDictionary *parameters; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpEncodingParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpEncodingParameters.h new file mode 100644 index 0000000..a4ad10a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpEncodingParameters.h @@ -0,0 +1,77 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Corresponds to webrtc::Priority. */ +typedef NS_ENUM(NSInteger, RTCPriority) { + RTCPriorityVeryLow, + RTCPriorityLow, + RTCPriorityMedium, + RTCPriorityHigh +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpEncodingParameters) : NSObject + +/** The idenfifier for the encoding layer. This is used in simulcast. */ +@property(nonatomic, copy, nullable) NSString *rid; + +/** Controls whether the encoding is currently transmitted. */ +@property(nonatomic, assign) BOOL isActive; + +/** The maximum bitrate to use for the encoding, or nil if there is no + * limit. + */ +@property(nonatomic, copy, nullable) NSNumber *maxBitrateBps; + +/** The minimum bitrate to use for the encoding, or nil if there is no + * limit. + */ +@property(nonatomic, copy, nullable) NSNumber *minBitrateBps; + +/** The maximum framerate to use for the encoding, or nil if there is no + * limit. + */ +@property(nonatomic, copy, nullable) NSNumber *maxFramerate; + +/** The requested number of temporal layers to use for the encoding, or nil + * if the default should be used. + */ +@property(nonatomic, copy, nullable) NSNumber *numTemporalLayers; + +/** Scale the width and height down by this factor for video. If nil, + * implementation default scaling factor will be used. + */ +@property(nonatomic, copy, nullable) NSNumber *scaleResolutionDownBy; + +/** The SSRC being used by this encoding. */ +@property(nonatomic, readonly, nullable) NSNumber *ssrc; + +/** The relative bitrate priority. */ +@property(nonatomic, assign) double bitratePriority; + +/** The relative DiffServ Code Point priority. */ +@property(nonatomic, assign) RTCPriority networkPriority; + +/** Allow dynamic frame length changes for audio: + https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-adaptiveptime + */ +@property(nonatomic, assign) BOOL adaptiveAudioPacketTime; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpHeaderExtension.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpHeaderExtension.h new file mode 100644 index 0000000..d3f1fda --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpHeaderExtension.h @@ -0,0 +1,33 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpHeaderExtension) : NSObject + +/** The URI of the RTP header extension, as defined in RFC5285. */ +@property(nonatomic, readonly, copy) NSString *uri; + +/** The value put in the RTP packet to identify the header extension. */ +@property(nonatomic, readonly) int id; + +/** Whether the header extension is encrypted or not. */ +@property(nonatomic, readonly, getter=isEncrypted) BOOL encrypted; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpHeaderExtensionCapability.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpHeaderExtensionCapability.h new file mode 100644 index 0000000..2fbcce3 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpHeaderExtensionCapability.h @@ -0,0 +1,39 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, RTCRtpTransceiverDirection); + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpHeaderExtensionCapability) : NSObject + +/** The URI of the RTP header extension, as defined in RFC5285. */ +@property(nonatomic, readonly, copy) NSString *uri; + +/** The value put in the RTP packet to identify the header extension. */ +@property(nonatomic, readonly, nullable) NSNumber* preferredId; + +/** Whether the header extension is encrypted or not. */ +@property(nonatomic, readonly, getter=isPreferredEncrypted) + BOOL preferredEncrypted; + +/** Direction of the header extension. */ +@property(nonatomic) RTCRtpTransceiverDirection direction; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpParameters.h new file mode 100644 index 0000000..0e97364 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpParameters.h @@ -0,0 +1,65 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Corresponds to webrtc::DegradationPreference. */ +typedef NS_ENUM(NSInteger, RTCDegradationPreference) { + RTCDegradationPreferenceMaintainFramerateAndResolution, + // TODO(webrtc:450044904): Switch downstream projects to + // RTCDegradationPreferenceMaintainFramerateAndResolution and remove + // RTCDegradationPreferenceDisabled. + RTCDegradationPreferenceDisabled = + RTCDegradationPreferenceMaintainFramerateAndResolution, + RTCDegradationPreferenceMaintainFramerate, + RTCDegradationPreferenceMaintainResolution, + RTCDegradationPreferenceBalanced +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpParameters) : NSObject + +/** A unique identifier for the last set of parameters applied. */ +@property(nonatomic, copy) NSString *transactionId; + +/** Parameters used for RTCP. */ +@property(nonatomic, readonly, copy) RTC_OBJC_TYPE(RTCRtcpParameters) * rtcp; + +/** An array containing parameters for RTP header extensions. */ +@property(nonatomic, readonly, copy) + NSArray *headerExtensions; + +/** The currently active encodings in the order of preference. */ +@property(nonatomic, copy) + NSArray *encodings; + +/** The negotiated set of send codecs in order of preference. */ +@property(nonatomic, copy) + NSArray *codecs; + +/** + * Degradation preference in case of CPU adaptation or constrained bandwidth. + * If nil, implementation default degradation preference will be used. + */ +@property(nonatomic, copy, nullable) NSNumber *degradationPreference; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpReceiver.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpReceiver.h new file mode 100644 index 0000000..ad5a6c1 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpReceiver.h @@ -0,0 +1,105 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Represents the media type of the RtpReceiver. */ +typedef NS_ENUM(NSInteger, RTCRtpMediaType) { + RTCRtpMediaTypeAudio, + RTCRtpMediaTypeVideo, + RTCRtpMediaTypeData, + RTCRtpMediaTypeUnsupported, + RTCRtpMediaTypeAny, +}; + +@class RTC_OBJC_TYPE(RTCRtpReceiver); +@class RTC_OBJC_TYPE(RTCRtpSource); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpReceiverDelegate) + + /** Called when the first RTP packet is received. + * + * Note: Currently if there are multiple RtpReceivers of the same media + * type, they will all call OnFirstPacketReceived at once. + * + * For example, if we create three audio receivers, A/B/C, they will listen + * to the same signal from the underneath network layer. Whenever the first + * audio packet is received, the underneath signal will be fired. All the + * receivers A/B/C will be notified and the callback of the receiver's + * delegate will be called. + * + * The process is the same for video receivers. + */ + - (void)rtpReceiver : (RTC_OBJC_TYPE(RTCRtpReceiver) *) + rtpReceiver didReceiveFirstPacketForMediaType + : (RTCRtpMediaType)mediaType; +/** Called when the first RTP packet is received after a change in + * receptiveness. + */ +// TODO: crbug.com/40821064 - remove @optional. +@optional +- (void)rtpReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver + didReceiveFirstPacketForMediaTypeAfterReceptiveChange: + (RTCRtpMediaType)mediaType; + +@end + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpReceiver) + + /** A unique identifier for this receiver. */ + @property(nonatomic, readonly) NSString *receiverId; + +/** The currently active RTCRtpParameters, as defined in + * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. + * + * The WebRTC specification only defines RTCRtpParameters in terms of senders, + * but this API also applies them to receivers, similar to ORTC: + * http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. + */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpParameters) * parameters; + +/** The RTCMediaStreamTrack associated with the receiver. + * Note: reading this property returns a new instance of + * RTCMediaStreamTrack. Use isEqual: instead of == to compare + * RTCMediaStreamTrack instances. + */ +@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) * + track; + +/** +Returns an array that contains an object for each unique SSRC (synchronization +source) identifier and for each unique CSRC (contributing source) received by +the current RTCRtpReceiver in the last ten seconds. +*/ +@property(nonatomic, readonly) NSArray *sources; + +/** The delegate for this RtpReceiver. */ +@property(nonatomic, weak) id delegate; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpReceiver) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpSender.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpSender.h new file mode 100644 index 0000000..841a65e --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpSender.h @@ -0,0 +1,55 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpSender) + + /** A unique identifier for this sender. */ + @property(nonatomic, readonly) NSString *senderId; + +/** The currently active RTCRtpParameters, as defined in + * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. + */ +@property(nonatomic, copy) RTC_OBJC_TYPE(RTCRtpParameters) * parameters; + +/** The RTCMediaStreamTrack associated with the sender. + * Note: reading this property returns a new instance of + * RTCMediaStreamTrack. Use isEqual: instead of == to compare + * RTCMediaStreamTrack instances. + */ +@property(nonatomic, copy, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) * track; + +/** IDs of streams associated with the RTP sender */ +@property(nonatomic, copy) NSArray *streamIds; + +/** The RTCDtmfSender accociated with the RTP sender. */ +@property(nonatomic, readonly, nullable) id + dtmfSender; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpSender) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpSource.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpSource.h new file mode 100644 index 0000000..a36a0bc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpSource.h @@ -0,0 +1,66 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Represents the source type of received media. */ +typedef NS_ENUM(NSInteger, RTCRtpSourceType) { + RTCRtpSourceTypeSSRC, + RTCRtpSourceTypeCSRC, +}; + +@class RTC_OBJC_TYPE(RTCRtpSource); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpSource) + + /** + A positive integer value specifying the CSRC identifier of the contributing + source or SSRC identifier of the synchronization source. This uniquely + identifies the source of the particular stream RTP packets. */ + @property(nonatomic, readonly) uint32_t sourceId; + +@property(nonatomic, readonly) RTCRtpSourceType sourceType; + +/** +A floating-point value between 0.0 and 1.0 specifying the audio level contained +in the last RTP packet played from the contributing source. +*/ +@property(nonatomic, readonly, nullable) NSNumber *audioLevel; + +/** +A timestamp indicating the most recent time at which a frame originating from +this source was delivered to the receiver's track +*/ +@property(nonatomic, readonly) CFTimeInterval timestampUs; + +/** +The RTP timestamp of the media. This source-generated timestamp indicates the +time at which the media in this packet, scheduled for play out at the time +indicated by timestamp, was initially sampled or generated. It may be useful for +sequencing and synchronization purposes. +*/ +@property(nonatomic, readonly) uint32_t rtpTimestamp; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpSource) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpTransceiver.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpTransceiver.h new file mode 100644 index 0000000..2c5084b --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCRtpTransceiver.h @@ -0,0 +1,177 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const kRTCRtpTransceiverErrorDomain; + +/** https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverdirection */ +typedef NS_ENUM(NSInteger, RTCRtpTransceiverDirection) { + RTCRtpTransceiverDirectionSendRecv, + RTCRtpTransceiverDirectionSendOnly, + RTCRtpTransceiverDirectionRecvOnly, + RTCRtpTransceiverDirectionInactive, + RTCRtpTransceiverDirectionStopped +}; + +/** Structure for initializing an RTCRtpTransceiver in a call to + * RTCPeerConnection.addTransceiver. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverinit + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpTransceiverInit) : NSObject + +/** Direction of the RTCRtpTransceiver. See RTCRtpTransceiver.direction. */ +@property(nonatomic) RTCRtpTransceiverDirection direction; + +/** The added RTCRtpTransceiver will be added to these streams. */ +@property(nonatomic) NSArray *streamIds; + +/** TODO(bugs.webrtc.org/7600): Not implemented. */ +@property(nonatomic) + NSArray *sendEncodings; + +@end + +@class RTC_OBJC_TYPE(RTCRtpTransceiver); +@class RTC_OBJC_TYPE(RTCRtpCodecCapability); +@class RTC_OBJC_TYPE(RTCRtpHeaderExtensionCapability); + +/** The RTCRtpTransceiver maps to the RTCRtpTransceiver defined by the + * WebRTC specification. A transceiver represents a combination of an + * RTCRtpSender and an RTCRtpReceiver that share a common mid. As defined in + * JSEP, an RTCRtpTransceiver is said to be associated with a media description + * if its mid property is non-nil; otherwise, it is said to be disassociated. + * JSEP: https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24 + * + * Note that RTCRtpTransceivers are only supported when using + * RTCPeerConnection with Unified Plan SDP. + * + * WebRTC specification for RTCRtpTransceiver, the JavaScript analog: + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpTransceiver) + + /** Media type of the transceiver. The sender and receiver will also have + * this type. + */ + @property(nonatomic, readonly) RTCRtpMediaType mediaType; + +/** The mid attribute is the mid negotiated and present in the local and + * remote descriptions. Before negotiation is complete, the mid value may be + * nil. After rollbacks, the value may change from a non-nil value to nil. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-mid + */ +@property(nonatomic, readonly) NSString *mid; + +/** The sender attribute exposes the RTCRtpSender corresponding to the RTP + * media that may be sent with the transceiver's mid. The sender is always + * present, regardless of the direction of media. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-sender + */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpSender) * sender; + +/** The receiver attribute exposes the RTCRtpReceiver corresponding to the RTP + * media that may be received with the transceiver's mid. The receiver is + * always present, regardless of the direction of media. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-receiver + */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpReceiver) * receiver; + +/** The isStopped attribute indicates that the sender of this transceiver will + * no longer send, and that the receiver will no longer receive. It is true if + * either stop has been called or if setting the local or remote description + * has caused the RTCRtpTransceiver to be stopped. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stopped + */ +@property(nonatomic, readonly) BOOL isStopped; + +/** The direction attribute indicates the preferred direction of this + * transceiver, which will be used in calls to createOffer and createAnswer. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction + */ +@property(nonatomic, readonly) RTCRtpTransceiverDirection direction; + +/** It will contain all the RTP header extensions that are supported. + * The direction attribute for all extensions that are mandatory to use MUST be + * initialized to an appropriate value other than + * RTCRtpTransceiverDirectionStopped. The direction attribute for extensions + * that will not be offered by default in an initial offer MUST be initialized + * to RTCRtpTransceiverDirectionStopped. + */ +@property(nonatomic, readonly, copy) + NSArray + *headerExtensionsToNegotiate; +@property(nonatomic, readonly, copy) + NSArray + *negotiatedHeaderExtensions; + +/** The currentDirection attribute indicates the current direction negotiated + * for this transceiver. If this transceiver has never been represented in an + * offer/answer exchange, or if the transceiver is stopped, the value is not + * present and this method returns NO. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-currentdirection + */ +- (BOOL)currentDirection:(RTCRtpTransceiverDirection *)currentDirectionOut; + +/** The stop method irreversibly stops the RTCRtpTransceiver. The sender of + * this transceiver will no longer send, the receiver will no longer receive. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stop + */ +- (void)stopInternal; + +/** The setCodecPreferences method overrides the default codec preferences used + * by WebRTC for this transceiver. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences + */ +- (BOOL)setCodecPreferences: + (NSArray *_Nullable)codecs + error:(NSError **_Nullable)error; + +/** Deprecated version of [RTCRtpTransceiver setCodecPreferences:error:] */ +- (void)setCodecPreferences: + (NSArray *_Nullable)codecs + RTC_OBJC_DEPRECATED("Use setCodecPreferences:error: instead."); + +/** The setHeaderExtensionsToNegotiate method overrides the default header + * extensions used by WebRTC for this transceiver. + * https://w3c.github.io/webrtc-extensions/#ref-for-dom-rtcrtptransceiver-setheaderextensionstonegotiate + */ +- (BOOL)setHeaderExtensionsToNegotiate: + (NSArray *) + extensions + error:(NSError **)error; + +/** An update of directionality does not take effect immediately. Instead, + * future calls to createOffer and createAnswer mark the corresponding media + * descriptions as sendrecv, sendonly, recvonly, or inactive. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction + */ +- (void)setDirection:(RTCRtpTransceiverDirection)direction + error:(NSError **)error; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpTransceiver) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSSLAdapter.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSSLAdapter.h new file mode 100644 index 0000000..a0da827 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSSLAdapter.h @@ -0,0 +1,20 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** + * Initialize and clean up the SSL library. Failure is fatal. These call the + * corresponding functions in webrtc/rtc_base/ssladapter.h. + */ +RTC_EXTERN BOOL RTCInitializeSSL(void); +RTC_EXTERN BOOL RTCCleanupSSL(void); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSSLCertificateVerifier.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSSLCertificateVerifier.h new file mode 100644 index 0000000..d5acafa --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSSLCertificateVerifier.h @@ -0,0 +1,25 @@ +/* + * Copyright 2022 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE +(RTCSSLCertificateVerifier) + + /** The certificate to verify */ + - (BOOL)verify : (NSData *)derCertificate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSessionDescription.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSessionDescription.h new file mode 100644 index 0000000..e513c16 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCSessionDescription.h @@ -0,0 +1,49 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** + * Represents the session description type. This exposes the same types that are + * in C++, which doesn't include the rollback type that is in the W3C spec. + */ +typedef NS_ENUM(NSInteger, RTCSdpType) { + RTCSdpTypeOffer, + RTCSdpTypePrAnswer, + RTCSdpTypeAnswer, + RTCSdpTypeRollback, +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCSessionDescription) : NSObject + +/** The type of session description. */ +@property(nonatomic, readonly) RTCSdpType type; + +/** The SDP string representation of this session description. */ +@property(nonatomic, readonly) NSString *sdp; + +- (instancetype)init NS_UNAVAILABLE; + +/** Initialize a session description with a type and SDP string. */ +- (instancetype)initWithType:(RTCSdpType)type + sdp:(NSString *)sdp NS_DESIGNATED_INITIALIZER; + ++ (NSString *)stringForType:(RTCSdpType)type; + ++ (RTCSdpType)typeForString:(NSString *)string; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCStatisticsReport.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCStatisticsReport.h new file mode 100644 index 0000000..785d949 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCStatisticsReport.h @@ -0,0 +1,58 @@ +/* + * Copyright 2019 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +@class RTC_OBJC_TYPE(RTCStatistics); + +NS_ASSUME_NONNULL_BEGIN + +/** A statistics report. Encapsulates a number of RTCStatistics objects. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCStatisticsReport) : NSObject + +/** The timestamp of the report in microseconds since 1970-01-01T00:00:00Z. */ +@property(nonatomic, readonly) CFTimeInterval timestamp_us; + +/** RTCStatistics objects by id. */ +@property(nonatomic, readonly) + NSDictionary *statistics; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +/** A part of a report (a subreport) covering a certain area. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCStatistics) : NSObject + +/** The id of this subreport, e.g. "RTCMediaStreamTrack_receiver_2". */ +@property(nonatomic, readonly) NSString *id; + +/** The timestamp of the subreport in microseconds since 1970-01-01T00:00:00Z. + */ +@property(nonatomic, readonly) CFTimeInterval timestamp_us; + +/** The type of the subreport, e.g. "track", "codec". */ +@property(nonatomic, readonly) NSString *type; + +/** The keys and values of the subreport, e.g. "totalFramesDuration = 5.551". + The values are either NSNumbers or NSStrings or NSArrays encapsulating + NSNumbers or NSStrings, or NSDictionary of NSString keys to NSNumber values. + */ +@property(nonatomic, readonly) NSDictionary *values; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCTracing.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCTracing.h new file mode 100644 index 0000000..899a570 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCTracing.h @@ -0,0 +1,21 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +RTC_EXTERN void RTCSetupInternalTracer(void); +/** Starts capture to specified file. Must be a valid writable path. + * Returns YES if capture starts. + */ +RTC_EXTERN BOOL RTCStartInternalCapture(NSString* filePath); +RTC_EXTERN void RTCStopInternalCapture(void); +RTC_EXTERN void RTCShutdownInternalTracer(void); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCapturer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCapturer.h new file mode 100644 index 0000000..78b1bef --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCapturer.h @@ -0,0 +1,37 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCVideoCapturer); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoCapturerDelegate) - + (void)capturer + : (RTC_OBJC_TYPE(RTCVideoCapturer) *)capturer didCaptureVideoFrame + : (RTC_OBJC_TYPE(RTCVideoFrame) *)frame; +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoCapturer) : NSObject + +@property(nonatomic, weak) id delegate; + +- (instancetype)initWithDelegate: + (id)delegate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCodecConstants.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCodecConstants.h new file mode 100644 index 0000000..0277bfc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCodecConstants.h @@ -0,0 +1,17 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +RTC_EXTERN NSString* const kRTCVideoCodecVp8Name; +RTC_EXTERN NSString* const kRTCVideoCodecVp9Name; +RTC_EXTERN NSString* const kRTCVideoCodecAv1Name; diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCodecInfo.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCodecInfo.h new file mode 100644 index 0000000..0a2c285 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoCodecInfo.h @@ -0,0 +1,43 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Holds information to identify a codec. Corresponds to + * webrtc::SdpVideoFormat. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoCodecInfo) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +- (instancetype)initWithName:(NSString *)name; + +- (instancetype)initWithName:(NSString *)name + parameters:(nullable NSDictionary *) + parameters; + +- (instancetype)initWithName:(NSString *)name + parameters:(NSDictionary *)parameters + scalabilityModes:(NSArray *)scalabilityModes + NS_DESIGNATED_INITIALIZER; + +- (BOOL)isEqualToCodecInfo:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; + +@property(nonatomic, readonly) NSString *name; +@property(nonatomic, readonly) NSDictionary *parameters; +@property(nonatomic, readonly) NSArray *scalabilityModes; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoder.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoder.h new file mode 100644 index 0000000..e7bd636 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoder.h @@ -0,0 +1,41 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Callback block for decoder. */ +typedef void (^RTCVideoDecoderCallback)(RTC_OBJC_TYPE(RTCVideoFrame) * frame); + +/** Protocol for decoder implementations. */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoDecoder) + + - (void)setCallback : (RTCVideoDecoderCallback)callback; +- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores; +- (NSInteger)releaseDecoder; +// TODO(bugs.webrtc.org/15444): Remove obsolete missingFrames param. +- (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage + missingFrames:(BOOL)missingFrames + codecSpecificInfo:(nullable id)info + renderTimeMs:(int64_t)renderTimeMs; +- (NSString *)implementationName; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderAV1.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderAV1.h new file mode 100644 index 0000000..c6cb38c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderAV1.h @@ -0,0 +1,25 @@ +/* + * Copyright 2021 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderAV1) : NSObject + +/* This returns a AV1 decoder that can be returned from a RTCVideoDecoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (id)av1Decoder; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderFactory.h new file mode 100644 index 0000000..5eb598a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderFactory.h @@ -0,0 +1,33 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCVideoDecoderFactory is an Objective-C version of + * webrtc::VideoDecoderFactory. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoDecoderFactory) + + - (nullable id)createDecoder + : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; +- (NSArray *) + supportedCodecs; // TODO(andersc): "supportedFormats" instead? + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h new file mode 100644 index 0000000..d5ce05e --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h @@ -0,0 +1,18 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderFactoryH264) : NSObject +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderH264.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderH264.h new file mode 100644 index 0000000..f1c8468 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderH264.h @@ -0,0 +1,18 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderH264) : NSObject +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderVP8.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderVP8.h new file mode 100644 index 0000000..9e3af0d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderVP8.h @@ -0,0 +1,25 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderVP8) : NSObject + +/* This returns a VP8 decoder that can be returned from a RTCVideoDecoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (id)vp8Decoder; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderVP9.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderVP9.h new file mode 100644 index 0000000..6c76eba --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoDecoderVP9.h @@ -0,0 +1,27 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderVP9) : NSObject + +/* This returns a VP9 decoder that can be returned from a RTCVideoDecoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (id)vp9Decoder; + ++ (bool)isSupported; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoder.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoder.h new file mode 100644 index 0000000..1b0a16d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoder.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Callback block for encoder. */ +typedef BOOL (^RTCVideoEncoderCallback)( + RTC_OBJC_TYPE(RTCEncodedImage) * frame, + id info); + +/** Protocol for encoder implementations. */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoEncoder) + + - (void)setCallback : (nullable RTCVideoEncoderCallback)callback; +- (NSInteger)startEncodeWithSettings: + (RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings + numberOfCores:(int)numberOfCores; +- (NSInteger)releaseEncoder; +- (NSInteger)encode:(RTC_OBJC_TYPE(RTCVideoFrame) *)frame + codecSpecificInfo:(nullable id)info + frameTypes:(NSArray *)frameTypes; +- (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate; +- (NSString *)implementationName; + +/** Returns QP scaling settings for encoder. The quality scaler adjusts the + * resolution in order to keep the QP from the encoded images within the given + * range. Returning nil from this function disables quality scaling. */ +- (nullable RTC_OBJC_TYPE(RTCVideoEncoderQpThresholds) *)scalingSettings; + +/** Resolutions should be aligned to this value. */ +@property(nonatomic, readonly) NSInteger resolutionAlignment; + +/** If enabled, resolution alignment is applied to all simulcast layers + simultaneously so that when scaled, all resolutions comply with + 'resolutionAlignment'. */ +@property(nonatomic, readonly) BOOL applyAlignmentToAllSimulcastLayers; + +/** If YES, the receiver is expected to resample/scale the source texture to the + expected output size. */ +@property(nonatomic, readonly) BOOL supportsNativeHandle; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderAV1.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderAV1.h new file mode 100644 index 0000000..4c97563 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderAV1.h @@ -0,0 +1,32 @@ +/* + * Copyright 2021 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderAV1) : NSObject + +/* This returns a AV1 encoder that can be returned from a RTCVideoEncoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (nonnull id)av1Encoder; + +/* Returns list of scalability modes supported by the encoder that can be + * created with `av1Encoder` method above. + */ ++ (nonnull NSArray*)supportedScalabilityModes; + ++ (bool)isSupported; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderFactory.h new file mode 100644 index 0000000..8574545 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderFactory.h @@ -0,0 +1,78 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCVideoEncoderFactory is an Objective-C version of + webrtc::VideoEncoderFactory::VideoEncoderSelector. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoEncoderSelector) + + - (void)registerCurrentEncoderInfo + : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; +- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBitrate: + (NSInteger)bitrate; +- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBrokenEncoder; + +@optional +- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForResolutionChangeBySize: + (CGSize)size; + +@end + +/** RTCVideoEncoderCodecSupport is an Objective-C version of + * webrtc::VideoEncoderFactory::CodecSupport. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderCodecSupport) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +- (instancetype)initWithSupported:(bool)isSupported; +- (instancetype)initWithSupported:(bool)isSupported + isPowerEfficient:(bool)isPowerEfficient + NS_DESIGNATED_INITIALIZER; + +@property(nonatomic, readonly) bool isSupported; +@property(nonatomic, readonly) bool isPowerEfficient; + +@end + +/** RTCVideoEncoderFactory is an Objective-C version of + * webrtc::VideoEncoderFactory. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoEncoderFactory) + + - (nullable id)createEncoder + : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; +- (NSArray *) + supportedCodecs; // TODO(andersc): "supportedFormats" instead? + +@optional +- (NSArray *)implementations; +- (nullable id)encoderSelector; +/* TODO: b/299588022 - move to non-optional section when implemented by all + * derived classes. */ +- (RTC_OBJC_TYPE(RTCVideoEncoderCodecSupport) *) + queryCodecSupport:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info + scalabilityMode:(nullable NSString *)scalabilityMode; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h new file mode 100644 index 0000000..ac9bac8 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h @@ -0,0 +1,18 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderFactoryH264) : NSObject +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderH264.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderH264.h new file mode 100644 index 0000000..37ff4e4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderH264.h @@ -0,0 +1,22 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderH264) : NSObject + +- (instancetype)initWithCodecInfo:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)codecInfo; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h new file mode 100644 index 0000000..818c272 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h @@ -0,0 +1,29 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** QP thresholds for encoder. Corresponds to + * webrtc::VideoEncoder::QpThresholds. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderQpThresholds) : NSObject + +- (instancetype)initWithThresholdsLow:(NSInteger)low high:(NSInteger)high; + +@property(nonatomic, readonly) NSInteger low; +@property(nonatomic, readonly) NSInteger high; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderSettings.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderSettings.h new file mode 100644 index 0000000..efbdb5e --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderSettings.h @@ -0,0 +1,42 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, RTCVideoCodecMode) { + RTCVideoCodecModeRealtimeVideo, + RTCVideoCodecModeScreensharing, +}; + +/** Settings for encoder. Corresponds to webrtc::VideoCodec. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderSettings) : NSObject + +@property(nonatomic, strong) NSString *name; + +@property(nonatomic, assign) unsigned short width; +@property(nonatomic, assign) unsigned short height; + +@property(nonatomic, assign) unsigned int startBitrate; // kilobits/sec. +@property(nonatomic, assign) unsigned int maxBitrate; +@property(nonatomic, assign) unsigned int minBitrate; + +@property(nonatomic, assign) uint32_t maxFramerate; + +@property(nonatomic, assign) unsigned int qpMax; +@property(nonatomic, assign) RTCVideoCodecMode mode; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderVP8.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderVP8.h new file mode 100644 index 0000000..789ae28 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderVP8.h @@ -0,0 +1,30 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderVP8) : NSObject + +/* This returns a VP8 encoder that can be returned from a RTCVideoEncoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (nonnull id)vp8Encoder; + +/* Returns list of scalability modes supported by the encoder that can be + * created with `vp8Encoder` method above. + */ ++ (nonnull NSArray*)supportedScalabilityModes; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderVP9.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderVP9.h new file mode 100644 index 0000000..86c3ddf --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoEncoderVP9.h @@ -0,0 +1,32 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderVP9) : NSObject + +/* This returns a VP9 encoder that can be returned from a RTCVideoEncoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (nullable id)vp9Encoder; + +/* Returns list of scalability modes supported by the encoder that can be + * created with `vp9Encoder` method above. + */ ++ (nonnull NSArray*)supportedScalabilityModes; + ++ (bool)isSupported; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoFrame.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoFrame.h new file mode 100644 index 0000000..c9f7cfc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoFrame.h @@ -0,0 +1,64 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, RTCVideoRotation) { + RTCVideoRotation_0 = 0, + RTCVideoRotation_90 = 90, + RTCVideoRotation_180 = 180, + RTCVideoRotation_270 = 270, +}; + +@protocol RTC_OBJC_TYPE +(RTCVideoFrameBuffer); + +// RTCVideoFrame is an ObjectiveC version of webrtc::VideoFrame. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoFrame) : NSObject + +/** Width without rotation applied. */ +@property(nonatomic, readonly) int width; + +/** Height without rotation applied. */ +@property(nonatomic, readonly) int height; +@property(nonatomic, readonly) RTCVideoRotation rotation; + +/** Timestamp in nanoseconds. */ +@property(nonatomic, readonly) int64_t timeStampNs; + +/** Timestamp 90 kHz. */ +@property(nonatomic, assign) int32_t timeStamp; + +@property(nonatomic, readonly) id buffer; + +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)new NS_UNAVAILABLE; + +/** Initialize an RTCVideoFrame from a frame buffer, rotation, and timestamp. + */ +- (instancetype)initWithBuffer: + (id)frameBuffer + rotation:(RTCVideoRotation)rotation + timeStampNs:(int64_t)timeStampNs; + +/** Return a frame that is guaranteed to be I420, i.e. it is possible to access + * the YUV data on it. + */ +- (RTC_OBJC_TYPE(RTCVideoFrame) *)newI420VideoFrame; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoFrameBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoFrameBuffer.h new file mode 100644 index 0000000..7efbd2b --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoFrameBuffer.h @@ -0,0 +1,40 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol RTC_OBJC_TYPE +(RTCI420Buffer); + +// RTCVideoFrameBuffer is an ObjectiveC version of webrtc::VideoFrameBuffer. +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoFrameBuffer) + + @property(nonatomic, readonly) int width; +@property(nonatomic, readonly) int height; + +- (id)toI420; + +@optional +- (id)cropAndScaleWith:(int)offsetX + offsetY:(int)offsetY + cropWidth:(int)cropWidth + cropHeight:(int)cropHeight + scaleWidth:(int)scaleWidth + scaleHeight:(int)scaleHeight; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoRenderer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoRenderer.h new file mode 100644 index 0000000..1182844 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoRenderer.h @@ -0,0 +1,44 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#if TARGET_OS_IPHONE +#import +#endif + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCVideoFrame); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoRenderer) + + /** The size of the frame. */ + - (void)setSize : (CGSize)size; + +/** The frame to be displayed. */ +- (void)renderFrame:(nullable RTC_OBJC_TYPE(RTCVideoFrame) *)frame; + +@end + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoViewDelegate) + + - (void)videoView + : (id)videoView didChangeVideoSize + : (CGSize)size; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoSource.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoSource.h new file mode 100644 index 0000000..2428527 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoSource.h @@ -0,0 +1,37 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT + +@interface RTC_OBJC_TYPE (RTCVideoSource) : RTC_OBJC_TYPE(RTCMediaSource) + +- (instancetype)init NS_UNAVAILABLE; + +/** + * Calling this function will cause frames to be scaled down to the + * requested resolution. Also, frames will be cropped to match the + * requested aspect ratio, and frames will be dropped to match the + * requested fps. The requested aspect ratio is orientation agnostic and + * will be adjusted to maintain the input orientation, so it doesn't + * matter if e.g. 1280x720 or 720x1280 is requested. + */ +- (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoTrack.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoTrack.h new file mode 100644 index 0000000..1836816 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoTrack.h @@ -0,0 +1,38 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol RTC_OBJC_TYPE +(RTCVideoRenderer); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); +@class RTC_OBJC_TYPE(RTCVideoSource); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack) + +/** The video source for this video track. */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCVideoSource) *source; + +- (instancetype)init NS_UNAVAILABLE; + +/** Register a renderer that will render all frames received on this track. */ +- (void)addRenderer:(id)renderer; + +/** Deregister a renderer. */ +- (void)removeRenderer:(id)renderer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoViewShading.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoViewShading.h new file mode 100644 index 0000000..afba015 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCVideoViewShading.h @@ -0,0 +1,39 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * RTCVideoViewShading provides a way for apps to customize the OpenGL(ES + * shaders used in rendering for the RTCEAGLVideoView/RTCNSGLVideoView. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoViewShading) + + /** Callback for I420 frames. Each plane is given as a texture. */ + - (void)applyShadingForFrameWithWidth : (int)width height + : (int)height rotation : (RTCVideoRotation)rotation yPlane + : (GLuint)yPlane uPlane : (GLuint)uPlane vPlane : (GLuint)vPlane; + +/** Callback for NV12 frames. Each plane is given as a texture. */ +- (void)applyShadingForFrameWithWidth:(int)width + height:(int)height + rotation:(RTCVideoRotation)rotation + yPlane:(GLuint)yPlane + uvPlane:(GLuint)uvPlane; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h new file mode 100644 index 0000000..20a154c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h @@ -0,0 +1,46 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Protocol for RTCVideoFrameBuffers containing YUV planar data. */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCYUVPlanarBuffer) + + @property(nonatomic, readonly) int chromaWidth; +@property(nonatomic, readonly) int chromaHeight; +@property(nonatomic, readonly) const uint8_t *dataY; +@property(nonatomic, readonly) const uint8_t *dataU; +@property(nonatomic, readonly) const uint8_t *dataV; +@property(nonatomic, readonly) int strideY; +@property(nonatomic, readonly) int strideU; +@property(nonatomic, readonly) int strideV; + +- (instancetype)initWithWidth:(int)width + height:(int)height + dataY:(const uint8_t *)dataY + dataU:(const uint8_t *)dataU + dataV:(const uint8_t *)dataV; +- (instancetype)initWithWidth:(int)width height:(int)height; +- (instancetype)initWithWidth:(int)width + height:(int)height + strideY:(int)strideY + strideU:(int)strideU + strideV:(int)strideV; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/UIDevice+RTCDevice.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/UIDevice+RTCDevice.h new file mode 100644 index 0000000..4d04f38 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/UIDevice+RTCDevice.h @@ -0,0 +1,17 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +@interface UIDevice (RTCDevice) + ++ (NSString *)machineName; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/WebRTC.h b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/WebRTC.h new file mode 100644 index 0000000..1f88aeb --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Headers/WebRTC.h @@ -0,0 +1,102 @@ +/* + * Copyright 2026 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Info.plist b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Info.plist new file mode 100644 index 0000000..f727a63 Binary files /dev/null and b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Info.plist differ diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Modules/module.modulemap b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Modules/module.modulemap new file mode 100644 index 0000000..cd485a4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module WebRTC { + umbrella header "WebRTC.h" + + export * + module * { export * } +} diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/PrivacyInfo.xcprivacy b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..a1f6725 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/PrivacyInfo.xcprivacy @@ -0,0 +1,32 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + 8FFB.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + + diff --git a/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/WebRTC b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/WebRTC new file mode 100755 index 0000000..a7a3eb9 Binary files /dev/null and b/Frameworks/WebRTC.xcframework/ios-arm64/WebRTC.framework/WebRTC differ diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioDevice.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioDevice.h new file mode 100644 index 0000000..c28076c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioDevice.h @@ -0,0 +1,335 @@ +/* + * Copyright 2022 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef OSStatus (^RTC_OBJC_TYPE(RTCAudioDeviceGetPlayoutDataBlock))( + AudioUnitRenderActionFlags *_Nonnull actionFlags, + const AudioTimeStamp *_Nonnull timestamp, + NSInteger inputBusNumber, + UInt32 frameCount, + AudioBufferList *_Nonnull outputData); + +typedef OSStatus (^RTC_OBJC_TYPE(RTCAudioDeviceRenderRecordedDataBlock))( + AudioUnitRenderActionFlags *_Nonnull actionFlags, + const AudioTimeStamp *_Nonnull timestamp, + NSInteger inputBusNumber, + UInt32 frameCount, + AudioBufferList *_Nonnull inputData, + void *_Nullable renderContext); + +typedef OSStatus (^RTC_OBJC_TYPE(RTCAudioDeviceDeliverRecordedDataBlock))( + AudioUnitRenderActionFlags *_Nonnull actionFlags, + const AudioTimeStamp *_Nonnull timestamp, + NSInteger inputBusNumber, + UInt32 frameCount, + const AudioBufferList *_Nullable inputData, + void *_Nullable renderContext, + NS_NOESCAPE RTC_OBJC_TYPE( + RTCAudioDeviceRenderRecordedDataBlock) _Nullable renderBlock); + +/** + * Delegate object provided by native ADM during RTCAudioDevice initialization. + * Provides blocks to poll playback audio samples from native ADM and to feed + * recorded audio samples into native ADM. + */ +RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE +(RTCAudioDeviceDelegate) + /** + * Implementation of RTCAudioSource should call this block to feed recorded + * PCM (16-bit integer) into native ADM. Stereo data is expected to be + * interleaved starting with the left channel. Either `inputData` with + * pre-filled audio data must be provided during block call or `renderBlock` + * must be provided which must fill provided audio buffer with recorded + * samples. + * + * NOTE: Implementation of RTCAudioDevice is expected to call the block on + * the same thread until `notifyAudioInterrupted` is called. When + * `notifyAudioInterrupted` is called implementation can call the block on a + * different thread. + */ + @property(readonly, nonnull) + RTC_OBJC_TYPE(RTCAudioDeviceDeliverRecordedDataBlock) + deliverRecordedData; + +/** + * Provides input sample rate preference as it preferred by native ADM. + */ +@property(readonly) double preferredInputSampleRate; + +/** + * Provides input IO buffer duration preference as it preferred by native ADM. + */ +@property(readonly) NSTimeInterval preferredInputIOBufferDuration; + +/** + * Provides output sample rate preference as it preferred by native ADM. + */ +@property(readonly) double preferredOutputSampleRate; + +/** + * Provides output IO buffer duration preference as it preferred by native ADM. + */ +@property(readonly) NSTimeInterval preferredOutputIOBufferDuration; + +/** + * Implementation of RTCAudioDevice should call this block to request PCM + * (16-bit integer) from native ADM to play. Stereo data is interleaved starting + * with the left channel. + * + * NOTE: Implementation of RTCAudioDevice is expected to invoke of this block on + * the same thread until `notifyAudioInterrupted` is called. When + * `notifyAudioInterrupted` is called implementation can call the block from a + * different thread. + */ +@property(readonly, nonnull) RTC_OBJC_TYPE(RTCAudioDeviceGetPlayoutDataBlock) + getPlayoutData; + +/** + * Notifies native ADM that some of the audio input parameters of RTCAudioDevice + * like samle rate and/or IO buffer duration and/or IO latency had possibly + * changed. Native ADM will adjust its audio input buffer to match current + * parameters of audio device. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioInputParametersChange; + +/** + * Notifies native ADM that some of the audio output parameters of + * RTCAudioDevice like samle rate and/or IO buffer duration and/or IO latency + * had possibly changed. Native ADM will adjust its audio output buffer to match + * current parameters of audio device. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioOutputParametersChange; + +/** + * Notifies native ADM that audio input is interrupted and further audio playout + * and recording might happen on a different thread. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioInputInterrupted; + +/** + * Notifies native ADM that audio output is interrupted and further audio + * playout and recording might happen on a different thread. + * + * NOTE: Must be called within block executed via `dispatchAsync` or + * `dispatchSync`. + */ +- (void)notifyAudioOutputInterrupted; + +/** + * Asynchronously execute block of code within the context of + * thread which owns native ADM. + * + * NOTE: Intended to be used to invoke `notifyAudioInputParametersChange`, + * `notifyAudioOutputParametersChange`, `notifyAudioInputInterrupted`, + * `notifyAudioOutputInterrupted` on native ADM thread. + * Also could be used by `RTCAudioDevice` implementation to tie + * mutations of underlying audio objects (AVAudioEngine, AudioUnit, etc) + * to the native ADM thread. Could be useful to handle events like audio route + * change, which could lead to audio parameters change. + */ +- (void)dispatchAsync:(dispatch_block_t)block; + +/** + * Synchronously execute block of code within the context of + * thread which owns native ADM. Allows reentrancy. + * + * NOTE: Intended to be used to invoke `notifyAudioInputParametersChange`, + * `notifyAudioOutputParametersChange`, `notifyAudioInputInterrupted`, + * `notifyAudioOutputInterrupted` on native ADM thread and make sure + * aforementioned is completed before `dispatchSync` returns. Could be useful + * when implementation of `RTCAudioDevice` tie mutation to underlying audio + * objects (AVAudioEngine, AudioUnit, etc) to own thread to satisfy requirement + * that native ADM audio parameters must be kept in sync with current audio + * parameters before audio is actually played or recorded. + */ +- (void)dispatchSync:(dispatch_block_t)block; + +@end + +/** + * Protocol to abstract platform specific ways to implement playback and + * recording. + * + * NOTE: All the members of protocol are called by native ADM from the same + * thread between calls to `initializeWithDelegate` and `terminate`. NOTE: + * Implementation is fully responsible for configuring application's + * AVAudioSession. An example implementation of RTCAudioDevice: + * https://github.com/mstyura/RTCAudioDevice + * TODO(yura.yaroshevich): Implement custom RTCAudioDevice for AppRTCMobile demo + * app. + */ +RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE +(RTCAudioDevice) + + /** + * Indicates current sample rate of audio recording. Changes to this + * property must be notified back to native ADM via + * `-[RTCAudioDeviceDelegate notifyAudioParametersChange]`. + */ + @property(readonly) double deviceInputSampleRate; + +/** + * Indicates current size of record buffer. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSTimeInterval inputIOBufferDuration; + +/** + * Indicates current number of recorded audio channels. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSInteger inputNumberOfChannels; + +/** + * Indicates current input latency + */ +@property(readonly) NSTimeInterval inputLatency; + +/** + * Indicates current sample rate of audio playback. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) double deviceOutputSampleRate; + +/** + * Indicates current size of playback buffer. Changes to this property + * must be notified back to native ADM via `-[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSTimeInterval outputIOBufferDuration; + +/** + * Indicates current number of playback audio channels. Changes to this property + * must be notified back to WebRTC via `[RTCAudioDeviceDelegate + * notifyAudioParametersChange]`. + */ +@property(readonly) NSInteger outputNumberOfChannels; + +/** + * Indicates current output latency + */ +@property(readonly) NSTimeInterval outputLatency; + +/** + * Indicates if invocation of `initializeWithDelegate` required before usage of + * RTCAudioDevice. YES indicates that `initializeWithDelegate` was called + * earlier without subsequent call to `terminate`. NO indicates that either + * `initializeWithDelegate` not called or `terminate` called. + */ +@property(readonly) BOOL isInitialized; + +/** + * Initializes RTCAudioDevice with RTCAudioDeviceDelegate. + * Implementation must return YES if RTCAudioDevice initialized successfully and + * NO otherwise. + */ +- (BOOL)initializeWithDelegate: + (id)delegate; + +/** + * De-initializes RTCAudioDevice. Implementation should forget about `delegate` + * provided in `initializeWithDelegate`. + */ +- (BOOL)terminateDevice; + +/** + * Property to indicate if `initializePlayout` call required before invocation + * of `startPlayout`. YES indicates that `initializePlayout` was successfully + * invoked earlier or not necessary, NO indicates that `initializePlayout` + * invocation required. + */ +@property(readonly) BOOL isPlayoutInitialized; + +/** + * Prepares RTCAudioDevice to play audio. + * Called by native ADM before invocation of `startPlayout`. + * Implementation is expected to return YES in case of successful playout + * initialization and NO otherwise. + */ +- (BOOL)initializePlayout; + +/** + * Property to indicate if RTCAudioDevice should be playing according to + * earlier calls of `startPlayout` and `stopPlayout`. + */ +@property(readonly) BOOL isPlaying; + +/** + * Method is called when native ADM wants to play audio. + * Implementation is expected to return YES if playback start request + * successfully handled and NO otherwise. + */ +- (BOOL)startPlayout; + +/** + * Method is called when native ADM no longer needs to play audio. + * Implementation is expected to return YES if playback stop request + * successfully handled and NO otherwise. + */ +- (BOOL)stopPlayout; + +/** + * Property to indicate if `initializeRecording` call required before usage of + * `startRecording`. YES indicates that `initializeRecording` was successfully + * invoked earlier or not necessary, NO indicates that `initializeRecording` + * invocation required. + */ +@property(readonly) BOOL isRecordingInitialized; + +/** + * Prepares RTCAudioDevice to record audio. + * Called by native ADM before invocation of `startRecording`. + * Implementation may use this method to prepare resources required to record + * audio. Implementation is expected to return YES in case of successful record + * initialization and NO otherwise. + */ +- (BOOL)initializeRecording; + +/** + * Property to indicate if RTCAudioDevice should record audio according to + * earlier calls to `startRecording` and `stopRecording`. + */ +@property(readonly) BOOL isRecording; + +/** + * Method is called when native ADM wants to record audio. + * Implementation is expected to return YES if recording start request + * successfully handled and NO otherwise. + */ +- (BOOL)startRecording; + +/** + * Method is called when native ADM no longer needs to record audio. + * Implementation is expected to return YES if recording stop request + * successfully handled and NO otherwise. + */ +- (BOOL)stopRecording; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSession.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSession.h new file mode 100644 index 0000000..08ecabf --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSession.h @@ -0,0 +1,289 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const kRTCAudioSessionErrorDomain; +/** Method that requires lock was called without lock. */ +extern NSInteger const kRTCAudioSessionErrorLockRequired; +/** Unknown configuration error occurred. */ +extern NSInteger const kRTCAudioSessionErrorConfiguration; + +@class RTC_OBJC_TYPE(RTCAudioSession); +@class RTC_OBJC_TYPE(RTCAudioSessionConfiguration); + +// Surfaces AVAudioSession events. WebRTC will listen directly for notifications +// from AVAudioSession and handle them before calling these delegate methods, +// at which point applications can perform additional processing if required. +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCAudioSessionDelegate) + + @optional +/** Called on a system notification thread when AVAudioSession starts an + * interruption event. + */ +- (void)audioSessionDidBeginInterruption: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called on a system notification thread when AVAudioSession ends an + * interruption event. + */ +- (void)audioSessionDidEndInterruption:(RTC_OBJC_TYPE(RTCAudioSession) *)session + shouldResumeSession:(BOOL)shouldResumeSession; + +/** Called on a system notification thread when AVAudioSession changes the + * route. + */ +- (void)audioSessionDidChangeRoute:(RTC_OBJC_TYPE(RTCAudioSession) *)session + reason:(AVAudioSessionRouteChangeReason)reason + previousRoute: + (AVAudioSessionRouteDescription *)previousRoute; + +/** Called on a system notification thread when AVAudioSession media server + * terminates. + */ +- (void)audioSessionMediaServerTerminated: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called on a system notification thread when AVAudioSession media server + * restarts. + */ +- (void)audioSessionMediaServerReset:(RTC_OBJC_TYPE(RTCAudioSession) *)session; + +// TODO(tkchin): Maybe handle SilenceSecondaryAudioHintNotification. + +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)session + didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord; + +/** Called on a WebRTC thread when the audio device is notified to begin + * playback or recording. + */ +- (void)audioSessionDidStartPlayOrRecord: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called on a WebRTC thread when the audio device is notified to stop + * playback or recording. + */ +- (void)audioSessionDidStopPlayOrRecord: + (RTC_OBJC_TYPE(RTCAudioSession) *)session; + +/** Called when the AVAudioSession output volume value changes. */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + didChangeOutputVolume:(float)outputVolume; + +/** Called when the audio device detects a playout glitch. The argument is the + * number of glitches detected so far in the current audio playout session. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + didDetectPlayoutGlitch:(int64_t)totalNumberOfGlitches; + +/** Called when the audio session is about to change the active state. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + willSetActive:(BOOL)active; + +/** Called after the audio session sucessfully changed the active state. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + didSetActive:(BOOL)active; + +/** Called after the audio session failed to change the active state. + */ +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + failedToSetActive:(BOOL)active + error:(NSError *)error; + +- (void)audioSession:(RTC_OBJC_TYPE(RTCAudioSession) *)audioSession + audioUnitStartFailedWithError:(NSError *)error; + +@end + +/** This is a protocol used to inform RTCAudioSession when the audio session + * activation state has changed outside of RTCAudioSession. The current known + * use case of this is when CallKit activates the audio session for the + * application + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCAudioSessionActivationDelegate) + + /** Called when the audio session is activated outside of the app by iOS. */ + - (void)audioSessionDidActivate : (AVAudioSession *)session; + +/** Called when the audio session is deactivated outside of the app by iOS. */ +- (void)audioSessionDidDeactivate:(AVAudioSession *)session; + +@end + +/** Proxy class for AVAudioSession that adds a locking mechanism similar to + * AVCaptureDevice. This is used to that interleaving configurations between + * WebRTC and the application layer are avoided. + * + * RTCAudioSession also coordinates activation so that the audio session is + * activated only once. See `setActive:error:`. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioSession) : NSObject + +/** Convenience property to access the AVAudioSession singleton. Callers should + * not call setters on AVAudioSession directly, but other method invocations + * are fine. + */ +@property(nonatomic, readonly) AVAudioSession *session; + +/** Our best guess at whether the session is active based on results of calls to + * AVAudioSession. + */ +@property(nonatomic, readonly) BOOL isActive; + +/** If YES, WebRTC will not initialize the audio unit automatically when an + * audio track is ready for playout or recording. Instead, applications should + * call setIsAudioEnabled. If NO, WebRTC will initialize the audio unit + * as soon as an audio track is ready for playout or recording. + */ +@property(nonatomic, assign) BOOL useManualAudio; + +/** This property is only effective if useManualAudio is YES. + * Represents permission for WebRTC to initialize the VoIP audio unit. + * When set to NO, if the VoIP audio unit used by WebRTC is active, it will be + * stopped and uninitialized. This will stop incoming and outgoing audio. + * When set to YES, WebRTC will initialize and start the audio unit when it is + * needed (e.g. due to establishing an audio connection). + * This property was introduced to work around an issue where if an AVPlayer is + * playing audio while the VoIP audio unit is initialized, its audio would be + * either cut off completely or played at a reduced volume. By preventing + * the audio unit from being initialized until after the audio has completed, + * we are able to prevent the abrupt cutoff. + */ +@property(nonatomic, assign) BOOL isAudioEnabled; + +// Proxy properties. +@property(readonly) NSString *category; +@property(readonly) AVAudioSessionCategoryOptions categoryOptions; +@property(readonly) NSString *mode; +@property(readonly) BOOL secondaryAudioShouldBeSilencedHint; +@property(readonly) AVAudioSessionRouteDescription *currentRoute; +@property(readonly) NSInteger maximumInputNumberOfChannels; +@property(readonly) NSInteger maximumOutputNumberOfChannels; +@property(readonly) float inputGain; +@property(readonly) BOOL inputGainSettable; +@property(readonly) BOOL inputAvailable; +@property(readonly, nullable) + NSArray *inputDataSources; +@property(readonly, nullable) + AVAudioSessionDataSourceDescription *inputDataSource; +@property(readonly, nullable) + NSArray *outputDataSources; +@property(readonly, nullable) + AVAudioSessionDataSourceDescription *outputDataSource; +@property(readonly) double sampleRate; +@property(readonly) double preferredSampleRate; +@property(readonly) NSInteger inputNumberOfChannels; +@property(readonly) NSInteger outputNumberOfChannels; +@property(readonly) float outputVolume; +@property(readonly) NSTimeInterval inputLatency; +@property(readonly) NSTimeInterval outputLatency; +@property(readonly) NSTimeInterval IOBufferDuration; +@property(readonly) NSTimeInterval preferredIOBufferDuration; + +/** + When YES, calls to -setConfiguration:error: and -setConfiguration:active:error: + ignore errors in configuring the audio session's "preferred" attributes (e.g. + preferredInputNumberOfChannels). Typically, configurations to preferred + attributes are optimizations, and ignoring this type of configuration error + allows code flow to continue along the happy path when these optimization are + not available. The default value of this property is NO. + */ +@property(nonatomic) BOOL ignoresPreferredAttributeConfigurationErrors; + +/** Default constructor. */ ++ (instancetype)sharedInstance; +- (instancetype)init NS_UNAVAILABLE; + +/** Adds a delegate, which is held weakly. */ +- (void)addDelegate:(id)delegate; +/** Removes an added delegate. */ +- (void)removeDelegate:(id)delegate; + +/** Request exclusive access to the audio session for configuration. This call + * will block if the lock is held by another object. + */ +- (void)lockForConfiguration; +/** Relinquishes exclusive access to the audio session. */ +- (void)unlockForConfiguration; + +/** If `active`, activates the audio session if it isn't already active. + * Successful calls must be balanced with a setActive:NO when activation is no + * longer required. If not `active`, deactivates the audio session if one is + * active and this is the last balanced call. When deactivating, the + * AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation option is passed to + * AVAudioSession. + */ +- (BOOL)setActive:(BOOL)active error:(NSError **)outError; + +// The following methods are proxies for the associated methods on +// AVAudioSession. `lockForConfiguration` must be called before using them +// otherwise they will fail with kRTCAudioSessionErrorLockRequired. + +- (BOOL)setCategory:(AVAudioSessionCategory)category + mode:(AVAudioSessionMode)mode + options:(AVAudioSessionCategoryOptions)options + error:(NSError **)outError; +- (BOOL)setCategory:(AVAudioSessionCategory)category + withOptions:(AVAudioSessionCategoryOptions)options + error:(NSError **)outError; +- (BOOL)setMode:(AVAudioSessionMode)mode error:(NSError **)outError; +- (BOOL)setInputGain:(float)gain error:(NSError **)outError; +- (BOOL)setPreferredSampleRate:(double)sampleRate error:(NSError **)outError; +- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration + error:(NSError **)outError; +- (BOOL)setPreferredInputNumberOfChannels:(NSInteger)count + error:(NSError **)outError; +- (BOOL)setPreferredOutputNumberOfChannels:(NSInteger)count + error:(NSError **)outError; +- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride + error:(NSError **)outError; +- (BOOL)setPreferredInput:(AVAudioSessionPortDescription *)inPort + error:(NSError **)outError; +- (BOOL)setInputDataSource:(AVAudioSessionDataSourceDescription *)dataSource + error:(NSError **)outError; +- (BOOL)setOutputDataSource:(AVAudioSessionDataSourceDescription *)dataSource + error:(NSError **)outError; +@end + +@interface RTC_OBJC_TYPE (RTCAudioSession) +(Configuration) + + /** Applies the configuration to the current session. Attempts to set all + * properties even if previous ones fail. Only the last error will be + * returned. + * `lockForConfiguration` must be called first. + */ + - (BOOL)setConfiguration + : (RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration error + : (NSError **)outError; + +/** Convenience method that calls both setConfiguration and setActive. + * `lockForConfiguration` must be called first. + */ +- (BOOL)setConfiguration: + (RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration + active:(BOOL)active + error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h new file mode 100644 index 0000000..b937f16 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSessionConfiguration.h @@ -0,0 +1,47 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_EXTERN const int kRTCAudioSessionPreferredNumberOfChannels; +RTC_EXTERN const double kRTCAudioSessionHighPerformanceSampleRate; +RTC_EXTERN const double kRTCAudioSessionHighPerformanceIOBufferDuration; + +// Struct to hold configuration values. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioSessionConfiguration) : NSObject + +@property(nonatomic, strong) NSString *category; +@property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; +@property(nonatomic, strong) NSString *mode; +@property(nonatomic, assign) double sampleRate; +@property(nonatomic, assign) NSTimeInterval ioBufferDuration; +@property(nonatomic, assign) NSInteger inputNumberOfChannels; +@property(nonatomic, assign) NSInteger outputNumberOfChannels; + +/** Initializes configuration to defaults. */ +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +/** Returns the current configuration of the audio session. */ ++ (instancetype)currentConfiguration; +/** Returns the configuration that WebRTC needs. */ ++ (instancetype)webRTCConfiguration; +/** Provide a way to override the default configuration. */ ++ (void)setWebRTCConfiguration: + (RTC_OBJC_TYPE(RTCAudioSessionConfiguration) *)configuration; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSource.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSource.h new file mode 100644 index 0000000..784864a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioSource.h @@ -0,0 +1,32 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioSource) : RTC_OBJC_TYPE(RTCMediaSource) + +- (instancetype)init NS_UNAVAILABLE; + +// Sets the volume for the RTCMediaSource. `volume` is a gain value in the range +// [0, 10]. +// Temporary fix to be able to modify volume of remote audio tracks. +// TODO(kthelgason): Property stays here temporarily until a proper volume-api +// is available on the surface exposed by webrtc. +@property(nonatomic, assign) double volume; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioTrack.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioTrack.h new file mode 100644 index 0000000..3c6d1dc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCAudioTrack.h @@ -0,0 +1,28 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCAudioSource); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCAudioTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack) + +- (instancetype)init NS_UNAVAILABLE; + +/** The audio source for this audio track. */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCAudioSource) * source; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCVPixelBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCVPixelBuffer.h new file mode 100644 index 0000000..dd112b4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCVPixelBuffer.h @@ -0,0 +1,52 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCVideoFrameBuffer containing a CVPixelBufferRef */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCVPixelBuffer) : NSObject + +@property(nonatomic, readonly) CVPixelBufferRef pixelBuffer; +@property(nonatomic, readonly) int cropX; +@property(nonatomic, readonly) int cropY; +@property(nonatomic, readonly) int cropWidth; +@property(nonatomic, readonly) int cropHeight; + ++ (NSSet *)supportedPixelFormats; + +- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer; +- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer + adaptedWidth:(int)adaptedWidth + adaptedHeight:(int)adaptedHeight + cropWidth:(int)cropWidth + cropHeight:(int)cropHeight + cropX:(int)cropX + cropY:(int)cropY; + +- (BOOL)requiresCropping; +- (BOOL)requiresScalingToWidth:(int)width height:(int)height; +- (int)bufferSizeForCroppingAndScalingToWidth:(int)width height:(int)height; + +/** The minimum size of the `tmpBuffer` must be the number of bytes returned + * from the bufferSizeForCroppingAndScalingToWidth:height: method. If that size + * is 0, the `tmpBuffer` may be nil. + */ +- (BOOL)cropAndScaleTo:(CVPixelBufferRef)outputPixelBuffer + withTempBuffer:(nullable uint8_t *)tmpBuffer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCallbackLogger.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCallbackLogger.h new file mode 100644 index 0000000..7e2745b --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCallbackLogger.h @@ -0,0 +1,41 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^RTCCallbackLoggerMessageHandler)(NSString *message); +typedef void (^RTCCallbackLoggerMessageAndSeverityHandler)( + NSString *message, RTCLoggingSeverity severity); + +// This class intercepts WebRTC logs and forwards them to a registered block. +// This class is not threadsafe. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCallbackLogger) : NSObject + +// The severity level to capture. The default is kRTCLoggingSeverityInfo. +@property(nonatomic, assign) RTCLoggingSeverity severity; + +// The callback handler will be called on the same thread that does the +// logging, so if the logging callback can be slow it may be a good idea +// to implement dispatching to some other queue. +- (void)start:(nullable RTCCallbackLoggerMessageHandler)handler; +- (void)startWithMessageAndSeverityHandler: + (nullable RTCCallbackLoggerMessageAndSeverityHandler)handler; + +- (void)stop; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCameraPreviewView.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCameraPreviewView.h new file mode 100644 index 0000000..710f2e7 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCameraPreviewView.h @@ -0,0 +1,30 @@ +/* + * Copyright 2015 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +@class AVCaptureSession; + +/** RTCCameraPreviewView is a view that renders local video from an + * AVCaptureSession. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCameraPreviewView) : UIView + +/** The capture session being rendered in the view. Capture session + * is assigned to AVCaptureVideoPreviewLayer async in the same + * queue that the AVCaptureSession is started/stopped. + */ +@property(nonatomic, strong) AVCaptureSession* captureSession; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCameraVideoCapturer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCameraVideoCapturer.h new file mode 100644 index 0000000..de69c5d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCameraVideoCapturer.h @@ -0,0 +1,60 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +// Camera capture that implements RTCVideoCapturer. Delivers frames to a +// RTCVideoCapturerDelegate (usually RTCVideoSource). +NS_EXTENSION_UNAVAILABLE_IOS("Camera not available in app extensions.") +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCameraVideoCapturer) : RTC_OBJC_TYPE(RTCVideoCapturer) + +// Capture session that is used for capturing. Valid from initialization to dealloc. +@property(readonly, nonatomic) AVCaptureSession *captureSession; + +// Returns list of available capture devices that support video capture. ++ (NSArray *)captureDevices; +// Returns list of formats that are supported by this class for this device. ++ (NSArray *)supportedFormatsForDevice: + (AVCaptureDevice *)device; + +// Returns the most efficient supported output pixel format for this capturer. +- (FourCharCode)preferredOutputPixelFormat; + +// Starts the capture session asynchronously and notifies callback on +// completion. The device will capture video in the format given in the `format` +// parameter. If the pixel format in `format` is supported by the WebRTC +// pipeline, the same pixel format will be used for the output. Otherwise, the +// format returned by `preferredOutputPixelFormat` will be used. +- (void)startCaptureWithDevice:(AVCaptureDevice *)device + format:(AVCaptureDeviceFormat *)format + fps:(NSInteger)fps + completionHandler: + (nullable void (^)(NSError *_Nullable))completionHandler; +// Stops the capture session asynchronously and notifies callback on completion. +- (void)stopCaptureWithCompletionHandler: + (nullable void (^)(void))completionHandler; + +// Starts the capture session asynchronously. +- (void)startCaptureWithDevice:(AVCaptureDevice *)device + format:(AVCaptureDeviceFormat *)format + fps:(NSInteger)fps; +// Stops the capture session asynchronously. +- (void)stopCapture; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCertificate.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCertificate.h new file mode 100644 index 0000000..e300feb --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCertificate.h @@ -0,0 +1,47 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCertificate) : NSObject + +/** Private key in PEM. */ +@property(nonatomic, readonly, copy) NSString *private_key; + +/** Public key in an x509 cert encoded in PEM. */ +@property(nonatomic, readonly, copy) NSString *certificate; + +/** + * Initialize an RTCCertificate with PEM strings for private_key and + * certificate. + */ +- (instancetype)initWithPrivateKey:(NSString *)private_key + certificate:(NSString *)certificate + NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +/** Generate a new certificate for 're' use. + * + * Optional dictionary of parameters. Defaults to KeyType ECDSA if none are + * provided. + * - name: "ECDSA" or "RSASSA-PKCS1-v1_5" + */ ++ (nullable RTC_OBJC_TYPE(RTCCertificate) *)generateCertificateWithParams: + (NSDictionary *)params; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCodecSpecificInfo.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCodecSpecificInfo.h new file mode 100644 index 0000000..39f7c18 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCodecSpecificInfo.h @@ -0,0 +1,24 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Implement this protocol to pass codec specific info from the encoder. + * Corresponds to webrtc::CodecSpecificInfo. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCCodecSpecificInfo) @end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h new file mode 100644 index 0000000..b6f34a5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCodecSpecificInfoH264.h @@ -0,0 +1,28 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +/** Class for H264 specific config. */ +typedef NS_ENUM(NSUInteger, RTCH264PacketizationMode) { + RTCH264PacketizationModeNonInterleaved = + 0, // Mode 1 - STAP-A, FU-A is allowed + RTCH264PacketizationModeSingleNalUnit // Mode 0 - only single NALU allowed +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCodecSpecificInfoH264) : NSObject + +@property(nonatomic, assign) RTCH264PacketizationMode packetizationMode; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCConfiguration.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCConfiguration.h new file mode 100644 index 0000000..21f12fc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCConfiguration.h @@ -0,0 +1,268 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +@class RTC_OBJC_TYPE(RTCIceServer); + +/** + * Represents the ice transport policy. This exposes the same states in C++, + * which include one more state than what exists in the W3C spec. + */ +typedef NS_ENUM(NSInteger, RTCIceTransportPolicy) { + RTCIceTransportPolicyNone, + RTCIceTransportPolicyRelay, + RTCIceTransportPolicyNoHost, + RTCIceTransportPolicyAll +}; + +/** Represents the bundle policy. */ +typedef NS_ENUM(NSInteger, RTCBundlePolicy) { + RTCBundlePolicyBalanced, + RTCBundlePolicyMaxCompat, + RTCBundlePolicyMaxBundle +}; + +/** Represents the rtcp mux policy. */ +typedef NS_ENUM(NSInteger, RTCRtcpMuxPolicy) { + RTCRtcpMuxPolicyNegotiate, + RTCRtcpMuxPolicyRequire +}; + +/** Represents the tcp candidate policy. */ +typedef NS_ENUM(NSInteger, RTCTcpCandidatePolicy) { + RTCTcpCandidatePolicyEnabled, + RTCTcpCandidatePolicyDisabled +}; + +/** Represents the candidate network policy. */ +typedef NS_ENUM(NSInteger, RTCCandidateNetworkPolicy) { + RTCCandidateNetworkPolicyAll, + RTCCandidateNetworkPolicyLowCost +}; + +/** Represents the continual gathering policy. */ +typedef NS_ENUM(NSInteger, RTCContinualGatheringPolicy) { + RTCContinualGatheringPolicyGatherOnce, + RTCContinualGatheringPolicyGatherContinually +}; + +/** Represents the encryption key type. */ +typedef NS_ENUM(NSInteger, RTCEncryptionKeyType) { + RTCEncryptionKeyTypeRSA, + RTCEncryptionKeyTypeECDSA, +}; + +/** Represents the chosen SDP semantics for the RTCPeerConnection. */ +typedef NS_ENUM(NSInteger, RTCSdpSemantics) { + // TODO(https://crbug.com/webrtc/13528): Remove support for Plan B. + RTCSdpSemanticsPlanB, + RTCSdpSemanticsUnifiedPlan, +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCConfiguration) : NSObject + +/** If true, allows DSCP codes to be set on outgoing packets, configured using + * networkPriority field of RTCRtpEncodingParameters. Defaults to false. + */ +@property(nonatomic, assign) BOOL enableDscp; + +/** An array of Ice Servers available to be used by ICE. */ +@property(nonatomic, copy) NSArray *iceServers; + +/** An RTCCertificate for 're' use. */ +@property(nonatomic, nullable) RTC_OBJC_TYPE(RTCCertificate) * certificate; + +/** Which candidates the ICE agent is allowed to use. The W3C calls it + * `iceTransportPolicy`, while in C++ it is called `type`. */ +@property(nonatomic, assign) RTCIceTransportPolicy iceTransportPolicy; + +/** The media-bundling policy to use when gathering ICE candidates. */ +@property(nonatomic, assign) RTCBundlePolicy bundlePolicy; + +/** The rtcp-mux policy to use when gathering ICE candidates. */ +@property(nonatomic, assign) RTCRtcpMuxPolicy rtcpMuxPolicy; +@property(nonatomic, assign) RTCTcpCandidatePolicy tcpCandidatePolicy; +@property(nonatomic, assign) RTCCandidateNetworkPolicy candidateNetworkPolicy; +@property(nonatomic, assign) + RTCContinualGatheringPolicy continualGatheringPolicy; + +/** If set to YES, don't gather IPv6 ICE candidates on Wi-Fi. + * Only intended to be used on specific devices. Certain phones disable IPv6 + * when the screen is turned off and it would be better to just disable the + * IPv6 ICE candidates on Wi-Fi in those cases. + * Default is NO. + */ +@property(nonatomic, assign) BOOL disableIPV6OnWiFi; + +/** By default, the PeerConnection will use a limited number of IPv6 network + * interfaces, in order to avoid too many ICE candidate pairs being created + * and delaying ICE completion. + * + * Can be set to INT_MAX to effectively disable the limit. + */ +@property(nonatomic, assign) int maxIPv6Networks; + +/** Exclude link-local network interfaces + * from considertaion for gathering ICE candidates. + * Defaults to NO. + */ +@property(nonatomic, assign) BOOL disableLinkLocalNetworks; + +@property(nonatomic, assign) int audioJitterBufferMaxPackets; +@property(nonatomic, assign) BOOL audioJitterBufferFastAccelerate; +@property(nonatomic, assign) int iceConnectionReceivingTimeout; +@property(nonatomic, assign) int iceBackupCandidatePairPingInterval; + +/** Key type used to generate SSL identity. Default is ECDSA. */ +@property(nonatomic, assign) RTCEncryptionKeyType keyType; + +/** ICE candidate pool size as defined in JSEP. Default is 0. */ +@property(nonatomic, assign) int iceCandidatePoolSize; + +/** Prune turn ports on the same network to the same turn server. + * Default is NO. + */ +@property(nonatomic, assign) BOOL shouldPruneTurnPorts; + +/** If set to YES, this means the ICE transport should presume TURN-to-TURN + * candidate pairs will succeed, even before a binding response is received. + */ +@property(nonatomic, assign) BOOL shouldPresumeWritableWhenFullyRelayed; + +/* This flag is only effective when `continualGatheringPolicy` is + * RTCContinualGatheringPolicyGatherContinually. + * + * If YES, after the ICE transport type is changed such that new types of + * ICE candidates are allowed by the new transport type, e.g. from + * RTCIceTransportPolicyRelay to RTCIceTransportPolicyAll, candidates that + * have been gathered by the ICE transport but not matching the previous + * transport type and as a result not observed by PeerConnectionDelegateAdapter, + * will be surfaced to the delegate. + */ +@property(nonatomic, assign) + BOOL shouldSurfaceIceCandidatesOnIceTransportTypeChanged; + +/** If set to non-nil, controls the minimal interval between consecutive ICE + * check packets. + */ +@property(nonatomic, copy, nullable) NSNumber *iceCheckMinInterval; + +/** + * Configure the SDP semantics used by this PeerConnection. By default, this + * is RTCSdpSemanticsUnifiedPlan which is compliant to the WebRTC 1.0 + * specification. It is possible to overrwite this to the deprecated + * RTCSdpSemanticsPlanB SDP format, but note that RTCSdpSemanticsPlanB will be + * deleted at some future date, see https://crbug.com/webrtc/13528. + * + * RTCSdpSemanticsUnifiedPlan will cause RTCPeerConnection to create offers and + * answers with multiple m= sections where each m= section maps to one + * RTCRtpSender and one RTCRtpReceiver (an RTCRtpTransceiver), either both audio + * or both video. This will also cause RTCPeerConnection to ignore all but the + * first a=ssrc lines that form a Plan B stream. + * + * RTCSdpSemanticsPlanB will cause RTCPeerConnection to create offers and + * answers with at most one audio and one video m= section with multiple + * RTCRtpSenders and RTCRtpReceivers specified as multiple a=ssrc lines within + * the section. This will also cause RTCPeerConnection to ignore all but the + * first m= section of the same media type. + */ +@property(nonatomic, assign) RTCSdpSemantics sdpSemantics; + +/** Actively reset the SRTP parameters when the DTLS transports underneath are + * changed after offer/answer negotiation. This is only intended to be a + * workaround for crbug.com/835958 + */ +@property(nonatomic, assign) BOOL activeResetSrtpParams; + +/** + * Defines advanced optional cryptographic settings related to SRTP and + * frame encryption for native WebRTC. Setting this will overwrite any + * options set through the PeerConnectionFactory (which is deprecated). + */ +@property(nonatomic, nullable) RTC_OBJC_TYPE(RTCCryptoOptions) * cryptoOptions; + +/** + * An optional string that will be attached to the TURN_ALLOCATE_REQUEST which + * which can be used to correlate client logs with backend logs. + */ +@property(nonatomic, nullable, copy) NSString *turnLoggingId; + +/** + * Time interval between audio RTCP reports. + */ +@property(nonatomic, assign) int rtcpAudioReportIntervalMs; + +/** + * Time interval between video RTCP reports. + */ +@property(nonatomic, assign) int rtcpVideoReportIntervalMs; + +/** + * Allow implicit rollback of local description when remote description + * conflicts with local description. + * See: https://w3c.github.io/webrtc-pc/#dom-peerconnection-setremotedescription + */ +@property(nonatomic, assign) BOOL enableImplicitRollback; + +/** + * Control if "a=extmap-allow-mixed" is included in the offer. + * See: https://www.chromestatus.com/feature/6269234631933952 + */ +@property(nonatomic, assign) BOOL offerExtmapAllowMixed; + +/** + * Defines the interval applied to ALL candidate pairs + * when ICE is strongly connected, and it overrides the + * default value of this interval in the ICE implementation; + */ +@property(nonatomic, copy, nullable) + NSNumber *iceCheckIntervalStrongConnectivity; + +/** + * Defines the counterpart for ALL pairs when ICE is + * weakly connected, and it overrides the default value of + * this interval in the ICE implementation + */ +@property(nonatomic, copy, nullable) NSNumber *iceCheckIntervalWeakConnectivity; + +/** + * The min time period for which a candidate pair must wait for response to + * connectivity checks before it becomes unwritable. This parameter + * overrides the default value in the ICE implementation if set. + */ +@property(nonatomic, copy, nullable) NSNumber *iceUnwritableTimeout; + +/** + * The min number of connectivity checks that a candidate pair must sent + * without receiving response before it becomes unwritable. This parameter + * overrides the default value in the ICE implementation if set. + */ +@property(nonatomic, copy, nullable) NSNumber *iceUnwritableMinChecks; + +/** + * The min time period for which a candidate pair must wait for response to + * connectivity checks it becomes inactive. This parameter overrides the + * default value in the ICE implementation if set. + */ +@property(nonatomic, copy, nullable) NSNumber *iceInactiveTimeout; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCryptoOptions.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCryptoOptions.h new file mode 100644 index 0000000..a4c85d7 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCCryptoOptions.h @@ -0,0 +1,66 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * Objective-C bindings for webrtc::CryptoOptions. This API had to be flattened + * as Objective-C doesn't support nested structures. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCCryptoOptions) : NSObject + +/** + * Enable GCM crypto suites from RFC 7714 for SRTP. GCM will only be used + * if both sides enable it + */ +@property(nonatomic, assign) BOOL srtpEnableGcmCryptoSuites; +/** + * If set to true, the (potentially insecure) crypto cipher + * kSrtpAes128CmSha1_32 will be included in the list of supported ciphers + * during negotiation. It will only be used if both peers support it and no + * other ciphers get preferred. + */ +@property(nonatomic, assign) BOOL srtpEnableAes128Sha1_32CryptoCipher; +/** + * If set to true, encrypted RTP header extensions as defined in RFC 6904 + * will be negotiated. They will only be used if both peers support them. + */ +@property(nonatomic, assign) BOOL srtpEnableEncryptedRtpHeaderExtensions; + +/** + * If set all RtpSenders must have an FrameEncryptor attached to them before + * they are allowed to send packets. All RtpReceivers must have a + * FrameDecryptor attached to them before they are able to receive packets. + */ +@property(nonatomic, assign) BOOL sframeRequireFrameEncryption; + +/** + * Initializes CryptoOptions with all possible options set explicitly. This + * is done when converting from a native RTCConfiguration.crypto_options. + */ +- (instancetype) + initWithSrtpEnableGcmCryptoSuites:(BOOL)srtpEnableGcmCryptoSuites + srtpEnableAes128Sha1_32CryptoCipher: + (BOOL)srtpEnableAes128Sha1_32CryptoCipher + srtpEnableEncryptedRtpHeaderExtensions: + (BOOL)srtpEnableEncryptedRtpHeaderExtensions + sframeRequireFrameEncryption:(BOOL)sframeRequireFrameEncryption + NS_DESIGNATED_INITIALIZER; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDataChannel.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDataChannel.h new file mode 100644 index 0000000..c5c2c9a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDataChannel.h @@ -0,0 +1,134 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDataBuffer) : NSObject + +/** NSData representation of the underlying buffer. */ +@property(nonatomic, readonly) NSData *data; + +/** Indicates whether `data` contains UTF-8 or binary data. */ +@property(nonatomic, readonly) BOOL isBinary; + +- (instancetype)init NS_UNAVAILABLE; + +/** + * Initialize an RTCDataBuffer from NSData. `isBinary` indicates whether `data` + * contains UTF-8 or binary data. + */ +- (instancetype)initWithData:(NSData *)data isBinary:(BOOL)isBinary; + +@end + +@class RTC_OBJC_TYPE(RTCDataChannel); +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCDataChannelDelegate) + + /** The data channel state changed. */ + - (void)dataChannelDidChangeState + : (RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel; + +/** The data channel successfully received a data buffer. */ +- (void)dataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel + didReceiveMessageWithBuffer:(RTC_OBJC_TYPE(RTCDataBuffer) *)buffer; + +@optional +/** The data channel's `bufferedAmount` changed. */ +- (void)dataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel + didChangeBufferedAmount:(uint64_t)amount; + +@end + +/** Represents the state of the data channel. */ +typedef NS_ENUM(NSInteger, RTCDataChannelState) { + RTCDataChannelStateConnecting, + RTCDataChannelStateOpen, + RTCDataChannelStateClosing, + RTCDataChannelStateClosed, +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDataChannel) : NSObject + +/** + * A label that can be used to distinguish this data channel from other data + * channel objects. + */ +@property(nonatomic, readonly) NSString *label; + +/** Whether the data channel can send messages in unreliable mode. */ +@property(nonatomic, readonly) BOOL isReliable DEPRECATED_ATTRIBUTE; + +/** Returns whether this data channel is ordered or not. */ +@property(nonatomic, readonly) BOOL isOrdered; + +/** Deprecated. Use maxPacketLifeTime. */ +@property(nonatomic, readonly) + NSUInteger maxRetransmitTime DEPRECATED_ATTRIBUTE; + +/** + * The length of the time window (in milliseconds) during which transmissions + * and retransmissions may occur in unreliable mode. + */ +@property(nonatomic, readonly) uint16_t maxPacketLifeTime; + +/** + * The maximum number of retransmissions that are attempted in unreliable mode. + */ +@property(nonatomic, readonly) uint16_t maxRetransmits; + +/** + * The name of the sub-protocol used with this data channel, if any. Otherwise + * this returns an empty string. + */ +@property(nonatomic, readonly) NSString *protocol; + +/** + * Returns whether this data channel was negotiated by the application or not. + */ +@property(nonatomic, readonly) BOOL isNegotiated; + +/** Deprecated. Use channelId. */ +@property(nonatomic, readonly) NSInteger streamId DEPRECATED_ATTRIBUTE; + +/** The identifier for this data channel. */ +@property(nonatomic, readonly) int channelId; + +/** The state of the data channel. */ +@property(nonatomic, readonly) RTCDataChannelState readyState; + +/** + * The number of bytes of application data that have been queued using + * `sendData:` but that have not yet been transmitted to the network. + */ +@property(nonatomic, readonly) uint64_t bufferedAmount; + +/** The delegate for this data channel. */ +@property(nonatomic, weak) id delegate; + +- (instancetype)init NS_UNAVAILABLE; + +/** Closes the data channel. */ +- (void)close; + +/** Attempt to send `data` on this data channel's underlying data transport. */ +- (BOOL)sendData:(RTC_OBJC_TYPE(RTCDataBuffer) *)data; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDataChannelConfiguration.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDataChannelConfiguration.h new file mode 100644 index 0000000..b1d8d77 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDataChannelConfiguration.h @@ -0,0 +1,52 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDataChannelConfiguration) : NSObject + +/** Set to YES if ordered delivery is required. */ +@property(nonatomic, assign) BOOL isOrdered; + +/** Deprecated. Use maxPacketLifeTime. */ +@property(nonatomic, assign) NSInteger maxRetransmitTimeMs DEPRECATED_ATTRIBUTE; + +/** + * Max period in milliseconds in which retransmissions will be sent. After this + * time, no more retransmissions will be sent. -1 if unset. + */ +@property(nonatomic, assign) int maxPacketLifeTime; + +/** The max number of retransmissions. -1 if unset. */ +@property(nonatomic, assign) int maxRetransmits; + +/** Set to YES if the channel has been externally negotiated and we do not send + * an in-band signalling in the form of an "open" message. + */ +@property(nonatomic, assign) BOOL isNegotiated; + +/** Deprecated. Use channelId. */ +@property(nonatomic, assign) int streamId DEPRECATED_ATTRIBUTE; + +/** The id of the data channel. */ +@property(nonatomic, assign) int channelId; + +/** Set by the application and opaque to the WebRTC implementation. */ +@property(nonatomic) NSString* protocol; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h new file mode 100644 index 0000000..88b1d9c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDefaultVideoDecoderFactory.h @@ -0,0 +1,26 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This decoder factory include support for all codecs bundled with WebRTC. If + * using custom codecs, create custom implementations of RTCVideoEncoderFactory + * and RTCVideoDecoderFactory. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDefaultVideoDecoderFactory) : NSObject +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h new file mode 100644 index 0000000..6defc80 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDefaultVideoEncoderFactory.h @@ -0,0 +1,31 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This encoder factory include support for all codecs bundled with WebRTC. If + * using custom codecs, create custom implementations of RTCVideoEncoderFactory + * and RTCVideoDecoderFactory. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDefaultVideoEncoderFactory) : NSObject + +@property(nonatomic, retain) RTC_OBJC_TYPE(RTCVideoCodecInfo) *preferredCodec; + ++ (NSArray *)supportedCodecs; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDispatcher.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDispatcher.h new file mode 100644 index 0000000..bc44b47 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDispatcher.h @@ -0,0 +1,47 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, RTCDispatcherQueueType) { + // Main dispatcher queue. + RTCDispatcherTypeMain, + // Used for starting/stopping AVCaptureSession, and assigning + // capture session to AVCaptureVideoPreviewLayer. + RTCDispatcherTypeCaptureSession, + // Used for operations on AVAudioSession. + RTCDispatcherTypeAudioSession, + // Used for operations on NWPathMonitor. + RTCDispatcherTypeNetworkMonitor, +}; + +/** Dispatcher that asynchronously dispatches blocks to a specific + * shared dispatch queue. + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCDispatcher) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Dispatch the block asynchronously on the queue for dispatchType. + * @param dispatchType The queue type to dispatch on. + * @param block The block to dispatch asynchronously. + */ ++ (void)dispatchAsyncOnType:(RTCDispatcherQueueType)dispatchType + block:(dispatch_block_t)block; + +/** Returns YES if run on queue for the dispatchType otherwise NO. + * Useful for asserting that a method is run on a correct queue. + */ ++ (BOOL)isOnQueueForType:(RTCDispatcherQueueType)dispatchType; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDtmfSender.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDtmfSender.h new file mode 100644 index 0000000..33d98c5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCDtmfSender.h @@ -0,0 +1,73 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCDtmfSender) + + /** + * Returns true if this RTCDtmfSender is capable of sending DTMF. Otherwise + * returns false. To be able to send DTMF, the associated RTCRtpSender must + * be able to send packets, and a "telephone-event" codec must be + * negotiated. + */ + @property(nonatomic, readonly) BOOL canInsertDtmf; + +/** + * Queues a task that sends the DTMF tones. The tones parameter is treated + * as a series of characters. The characters 0 through 9, A through D, #, and * + * generate the associated DTMF tones. The characters a to d are equivalent + * to A to D. The character ',' indicates a delay of 2 seconds before + * processing the next character in the tones parameter. + * + * Unrecognized characters are ignored. + * + * @param duration The parameter indicates the duration to use for each + * character passed in the tones parameter. The duration cannot be more + * than 6000 or less than 70 ms. + * + * @param interToneGap The parameter indicates the gap between tones. + * This parameter must be at least 50 ms but should be as short as + * possible. + * + * If InsertDtmf is called on the same object while an existing task for this + * object to generate DTMF is still running, the previous task is canceled. + * Returns true on success and false on failure. + */ +- (BOOL)insertDtmf:(nonnull NSString *)tones + duration:(NSTimeInterval)duration + interToneGap:(NSTimeInterval)interToneGap; + +/** The tones remaining to be played out */ +- (nonnull NSString *)remainingTones; + +/** + * The current tone duration value. This value will be the value last set via + * the insertDtmf method, or the default value of 100 ms if insertDtmf was never + * called. + */ +- (NSTimeInterval)duration; + +/** + * The current value of the between-tone gap. This value will be the value last + * set via the insertDtmf() method, or the default value of 50 ms if + * insertDtmf() was never called. + */ +- (NSTimeInterval)interToneGap; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCEAGLVideoView.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCEAGLVideoView.h new file mode 100644 index 0000000..75cf9ae --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCEAGLVideoView.h @@ -0,0 +1,45 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCEAGLVideoView); + +/** + * RTCEAGLVideoView is an RTCVideoRenderer which renders video frames + * in its bounds using OpenGLES 2.0 or OpenGLES 3.0. + */ +NS_EXTENSION_UNAVAILABLE_IOS("Rendering not available in app extensions.") +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCEAGLVideoView) : UIView + +@property(nonatomic, weak) id delegate; + +- (instancetype)initWithFrame:(CGRect)frame + shader:(id)shader + NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithCoder:(NSCoder *)aDecoder + shader:(id)shader + NS_DESIGNATED_INITIALIZER; + +/** @abstract Wrapped RTCVideoRotation, or nil. + */ +@property(nonatomic, nullable) NSValue *rotationOverride; +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCEncodedImage.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCEncodedImage.h new file mode 100644 index 0000000..97f29ed --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCEncodedImage.h @@ -0,0 +1,52 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Represents an encoded frame's type. */ +typedef NS_ENUM(NSUInteger, RTCFrameType) { + RTCFrameTypeEmptyFrame = 0, + RTCFrameTypeAudioFrameSpeech = 1, + RTCFrameTypeAudioFrameCN = 2, + RTCFrameTypeVideoFrameKey = 3, + RTCFrameTypeVideoFrameDelta = 4, +}; + +typedef NS_ENUM(NSUInteger, RTCVideoContentType) { + RTCVideoContentTypeUnspecified, + RTCVideoContentTypeScreenshare, +}; + +/** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCEncodedImage) : NSObject + +@property(nonatomic, strong) NSData *buffer; +@property(nonatomic, assign) int32_t encodedWidth; +@property(nonatomic, assign) int32_t encodedHeight; +@property(nonatomic, assign) uint32_t timeStamp; +@property(nonatomic, assign) int64_t captureTimeMs; +@property(nonatomic, assign) int64_t ntpTimeMs; +@property(nonatomic, assign) uint8_t flags; +@property(nonatomic, assign) int64_t encodeStartMs; +@property(nonatomic, assign) int64_t encodeFinishMs; +@property(nonatomic, assign) RTCFrameType frameType; +@property(nonatomic, assign) RTCVideoRotation rotation; +@property(nonatomic, strong) NSNumber *qp; +@property(nonatomic, assign) RTCVideoContentType contentType; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFieldTrials.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFieldTrials.h new file mode 100644 index 0000000..fa27322 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFieldTrials.h @@ -0,0 +1,34 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** The only valid value for the following if set is kRTCFieldTrialEnabledValue. + */ +RTC_EXTERN NSString *const kRTCFieldTrialAudioForceABWENoTWCCKey; +RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03AdvertisedKey; +RTC_EXTERN NSString *const kRTCFieldTrialFlexFec03Key; +RTC_EXTERN NSString *const kRTCFieldTrialH264HighProfileKey; +RTC_EXTERN NSString *const kRTCFieldTrialMinimizeResamplingOnMobileKey; +RTC_EXTERN NSString *const kRTCFieldTrialUseNWPathMonitor; + +/** The valid value for field trials above. */ +RTC_EXTERN NSString *const kRTCFieldTrialEnabledValue; + +/** Initialize field trials using a dictionary mapping field trial keys to their + * values. See above for valid keys and values. Must be called before any other + * call into WebRTC. See: webrtc/system_wrappers/include/field_trial.h + */ +// TODO: bugs.webrtc.org/42220378 - Delete after January 1, 2026. +RTC_OBJC_DEPRECATED("Pass field trials when building PeerConnectionFactory") +RTC_EXTERN void RTCInitFieldTrialDictionary( + NSDictionary *fieldTrials); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFileLogger.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFileLogger.h new file mode 100644 index 0000000..551a895 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFileLogger.h @@ -0,0 +1,76 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSUInteger, RTCFileLoggerSeverity) { + RTCFileLoggerSeverityVerbose, + RTCFileLoggerSeverityInfo, + RTCFileLoggerSeverityWarning, + RTCFileLoggerSeverityError +}; + +typedef NS_ENUM(NSUInteger, RTCFileLoggerRotationType) { + RTCFileLoggerTypeCall, + RTCFileLoggerTypeApp, +}; + +NS_ASSUME_NONNULL_BEGIN + +// This class intercepts WebRTC logs and saves them to a file. The file size +// will not exceed the given maximum bytesize. When the maximum bytesize is +// reached, logs are rotated according to the rotationType specified. +// For kRTCFileLoggerTypeCall, logs from the beginning and the end +// are preserved while the middle section is overwritten instead. +// For kRTCFileLoggerTypeApp, the oldest log is overwritten. +// This class is not threadsafe. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCFileLogger) : NSObject + +// The severity level to capture. The default is kRTCFileLoggerSeverityInfo. +@property(nonatomic, assign) RTCFileLoggerSeverity severity; + +// The rotation type for this file logger. The default is +// kRTCFileLoggerTypeCall. +@property(nonatomic, readonly) RTCFileLoggerRotationType rotationType; + +// Disables buffering disk writes. Should be set before `start`. Buffering +// is enabled by default for performance. +@property(nonatomic, assign) BOOL shouldDisableBuffering; + +// Default constructor provides default settings for dir path, file size and +// rotation type. +- (instancetype)init; + +// Create file logger with default rotation type. +- (instancetype)initWithDirPath:(NSString *)dirPath + maxFileSize:(NSUInteger)maxFileSize; + +- (instancetype)initWithDirPath:(NSString *)dirPath + maxFileSize:(NSUInteger)maxFileSize + rotationType:(RTCFileLoggerRotationType)rotationType + NS_DESIGNATED_INITIALIZER; + +// Starts writing WebRTC logs to disk if not already started. Overwrites any +// existing file(s). +- (void)start; + +// Stops writing WebRTC logs to disk. This method is also called on dealloc. +- (void)stop; + +// Returns the current contents of the logs, or nil if start has been called +// without a stop. +- (nullable NSData *)logData; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFileVideoCapturer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFileVideoCapturer.h new file mode 100644 index 0000000..38f65f8 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCFileVideoCapturer.h @@ -0,0 +1,51 @@ +/* + * Copyright 2017 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * Error passing block. + */ +typedef void (^RTCFileVideoCapturerErrorBlock)(NSError *error); + +/** + * Captures buffers from bundled video file. + * + * See @c RTCVideoCapturer for more info on capturers. + */ +RTC_OBJC_EXPORT + +NS_CLASS_AVAILABLE_IOS(10) +@interface RTC_OBJC_TYPE (RTCFileVideoCapturer) : RTC_OBJC_TYPE(RTCVideoCapturer) + +/** + * Starts asynchronous capture of frames from video file. + * + * Capturing is not started if error occurs. Underlying error will be + * relayed in the errorBlock if one is provided. + * Successfully captured video frames will be passed to the delegate. + * + * @param nameOfFile The name of the bundled video file to be read. + * @errorBlock block to be executed upon error. + */ +- (void)startCapturingFromFileNamed:(NSString *)nameOfFile + onError:(__nullable RTCFileVideoCapturerErrorBlock)errorBlock; + +/** + * Immediately stops capture. + */ +- (void)stopCapture; +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCH264ProfileLevelId.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCH264ProfileLevelId.h new file mode 100644 index 0000000..67bcae1 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCH264ProfileLevelId.h @@ -0,0 +1,61 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +RTC_EXTERN NSString *const kRTCVideoCodecH264Name; +RTC_EXTERN NSString *const kRTCLevel31ConstrainedHigh; +RTC_EXTERN NSString *const kRTCLevel31ConstrainedBaseline; +RTC_EXTERN NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedHigh; +RTC_EXTERN NSString *const kRTCMaxSupportedH264ProfileLevelConstrainedBaseline; + +/** H264 Profiles and levels. */ +typedef NS_ENUM(NSUInteger, RTCH264Profile) { + RTCH264ProfileConstrainedBaseline, + RTCH264ProfileBaseline, + RTCH264ProfileMain, + RTCH264ProfileConstrainedHigh, + RTCH264ProfileHigh, +}; + +typedef NS_ENUM(NSUInteger, RTCH264Level) { + RTCH264Level1_b = 0, + RTCH264Level1 = 10, + RTCH264Level1_1 = 11, + RTCH264Level1_2 = 12, + RTCH264Level1_3 = 13, + RTCH264Level2 = 20, + RTCH264Level2_1 = 21, + RTCH264Level2_2 = 22, + RTCH264Level3 = 30, + RTCH264Level3_1 = 31, + RTCH264Level3_2 = 32, + RTCH264Level4 = 40, + RTCH264Level4_1 = 41, + RTCH264Level4_2 = 42, + RTCH264Level5 = 50, + RTCH264Level5_1 = 51, + RTCH264Level5_2 = 52 +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCH264ProfileLevelId) : NSObject + +@property(nonatomic, readonly) RTCH264Profile profile; +@property(nonatomic, readonly) RTCH264Level level; +@property(nonatomic, readonly) NSString *hexString; + +- (instancetype)initWithHexString:(NSString *)hexString; +- (instancetype)initWithProfile:(RTCH264Profile)profile + level:(RTCH264Level)level; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCI420Buffer.h new file mode 100644 index 0000000..54c3240 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCI420Buffer.h @@ -0,0 +1,22 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Protocol for RTCYUVPlanarBuffers containing I420 data */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCI420Buffer) @end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceCandidate.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceCandidate.h new file mode 100644 index 0000000..23b4fec --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceCandidate.h @@ -0,0 +1,50 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCIceCandidate) : NSObject + +/** + * If present, the identifier of the "media stream identification" for the media + * component this candidate is associated with. + */ +@property(nonatomic, readonly, nullable) NSString *sdpMid; + +/** + * The index (starting at zero) of the media description this candidate is + * associated with in the SDP. + */ +@property(nonatomic, readonly) int sdpMLineIndex; + +/** The SDP string for this candidate. */ +@property(nonatomic, readonly) NSString *sdp; + +/** The URL of the ICE server which this candidate is gathered from. */ +@property(nonatomic, readonly, nullable) NSString *serverUrl; + +- (instancetype)init NS_UNAVAILABLE; + +/** + * Initialize an RTCIceCandidate from SDP. + */ +- (instancetype)initWithSdp:(NSString *)sdp + sdpMLineIndex:(int)sdpMLineIndex + sdpMid:(nullable NSString *)sdpMid + NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceCandidateErrorEvent.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceCandidateErrorEvent.h new file mode 100644 index 0000000..fb8e853 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceCandidateErrorEvent.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCIceCandidateErrorEvent) : NSObject + +/** The local IP address used to communicate with the STUN or TURN server. */ +@property(nonatomic, readonly) NSString *address; + +/** The port used to communicate with the STUN or TURN server. */ +@property(nonatomic, readonly) int port; + +/** The STUN or TURN URL that identifies the STUN or TURN server for which the + * failure occurred. */ +@property(nonatomic, readonly) NSString *url; + +/** The numeric STUN error code returned by the STUN or TURN server. If no host + * candidate can reach the server, errorCode will be set to the value 701 which + * is outside the STUN error code range. This error is only fired once per + * server URL while in the RTCIceGatheringState of "gathering". */ +@property(nonatomic, readonly) int errorCode; + +/** The STUN reason text returned by the STUN or TURN server. If the server + * could not be reached, errorText will be set to an implementation-specific + * value providing details about the error. */ +@property(nonatomic, readonly) NSString *errorText; + +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceServer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceServer.h new file mode 100644 index 0000000..6f6c7ea --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCIceServer.h @@ -0,0 +1,115 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSUInteger, RTCTlsCertPolicy) { + RTCTlsCertPolicySecure, + RTCTlsCertPolicyInsecureNoCheck +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCIceServer) : NSObject + +/** URI(s) for this server represented as NSStrings. */ +@property(nonatomic, readonly) NSArray *urlStrings; + +/** Username to use if this RTCIceServer object is a TURN server. */ +@property(nonatomic, readonly, nullable) NSString *username; + +/** Credential to use if this RTCIceServer object is a TURN server. */ +@property(nonatomic, readonly, nullable) NSString *credential; + +/** + * TLS certificate policy to use if this RTCIceServer object is a TURN server. + */ +@property(nonatomic, readonly) RTCTlsCertPolicy tlsCertPolicy; + +/** + If the URIs in `urls` only contain IP addresses, this field can be used + to indicate the hostname, which may be necessary for TLS (using the SNI + extension). If `urls` itself contains the hostname, this isn't necessary. + */ +@property(nonatomic, readonly, nullable) NSString *hostname; + +/** List of protocols to be used in the TLS ALPN extension. */ +@property(nonatomic, readonly) NSArray *tlsAlpnProtocols; + +/** + List elliptic curves to be used in the TLS elliptic curves extension. + Only curve names supported by OpenSSL should be used (eg. "P-256","X25519"). + */ +@property(nonatomic, readonly) NSArray *tlsEllipticCurves; + +- (nonnull instancetype)init NS_UNAVAILABLE; + +/** Convenience initializer for a server with no authentication (e.g. STUN). */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, and credentialType. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, and TLS cert policy. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, TLS cert policy and hostname. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy + hostname:(nullable NSString *)hostname; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, TLS cert policy, hostname and ALPN protocols. + */ +- (instancetype)initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy + hostname:(nullable NSString *)hostname + tlsAlpnProtocols:(NSArray *)tlsAlpnProtocols; + +/** + * Initialize an RTCIceServer with its associated URLs, optional username, + * optional credential, TLS cert policy, hostname, ALPN protocols and + * elliptic curves. + */ +- (instancetype) + initWithURLStrings:(NSArray *)urlStrings + username:(nullable NSString *)username + credential:(nullable NSString *)credential + tlsCertPolicy:(RTCTlsCertPolicy)tlsCertPolicy + hostname:(nullable NSString *)hostname + tlsAlpnProtocols:(nullable NSArray *)tlsAlpnProtocols + tlsEllipticCurves:(nullable NSArray *)tlsEllipticCurves + NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCLegacyStatsReport.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCLegacyStatsReport.h new file mode 100644 index 0000000..c9ce8e3 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCLegacyStatsReport.h @@ -0,0 +1,37 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** This does not currently conform to the spec. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCLegacyStatsReport) : NSObject + +/** Time since 1970-01-01T00:00:00Z in milliseconds. */ +@property(nonatomic, readonly) CFTimeInterval timestamp; + +/** The type of stats held by this object. */ +@property(nonatomic, readonly) NSString *type; + +/** The identifier for this object. */ +@property(nonatomic, readonly) NSString *reportId; + +/** A dictionary holding the actual stats. */ +@property(nonatomic, readonly) NSDictionary *values; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCLogging.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCLogging.h new file mode 100644 index 0000000..4cc2901 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCLogging.h @@ -0,0 +1,70 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +// Subset of webrtc::LoggingSeverity. +typedef NS_ENUM(NSInteger, RTCLoggingSeverity) { + RTCLoggingSeverityVerbose, + RTCLoggingSeverityInfo, + RTCLoggingSeverityWarning, + RTCLoggingSeverityError, + RTCLoggingSeverityNone, +}; + +// Wrapper for C++ RTC_LOG(sev) macros. +// Logs the log string to the webrtc logstream for the given severity. +RTC_EXTERN void RTCLogEx(RTCLoggingSeverity severity, NSString* log_string); + +// Wrapper for webrtc::LogMessage::LogToDebug. +// Sets the minimum severity to be logged to console. +RTC_EXTERN void RTCSetMinDebugLogLevel(RTCLoggingSeverity severity); + +// Returns the filename with the path prefix removed. +RTC_EXTERN NSString* RTCFileName(const char* filePath); + +// Some convenience macros. + +#define RTCLogString(format, ...) \ + [NSString stringWithFormat:@"(%@:%d %s): " format, \ + RTCFileName(__FILE__), \ + __LINE__, \ + __FUNCTION__, \ + ##__VA_ARGS__] + +#define RTCLogFormat(severity, format, ...) \ + do { \ + NSString* log_string = RTCLogString(format, ##__VA_ARGS__); \ + RTCLogEx(severity, log_string); \ + } while (false) + +#define RTCLogVerbose(format, ...) \ + RTCLogFormat(RTCLoggingSeverityVerbose, format, ##__VA_ARGS__) + +#define RTCLogInfo(format, ...) \ + RTCLogFormat(RTCLoggingSeverityInfo, format, ##__VA_ARGS__) + +#define RTCLogWarning(format, ...) \ + RTCLogFormat(RTCLoggingSeverityWarning, format, ##__VA_ARGS__) + +#define RTCLogError(format, ...) \ + RTCLogFormat(RTCLoggingSeverityError, format, ##__VA_ARGS__) + +#if !defined(NDEBUG) +#define RTCLogDebug(format, ...) RTCLogInfo(format, ##__VA_ARGS__) +#else +#define RTCLogDebug(format, ...) \ + do { \ + } while (false) +#endif + +#define RTCLog(format, ...) RTCLogInfo(format, ##__VA_ARGS__) diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMTLVideoView.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMTLVideoView.h new file mode 100644 index 0000000..f93ab59 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMTLVideoView.h @@ -0,0 +1,44 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * RTCMTLVideoView is thin wrapper around MTKView. + * + * It has id property that renders video frames in the view's + * bounds using Metal. + */ +NS_CLASS_AVAILABLE_IOS(9) + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMTLVideoView) : UIView + +@property(nonatomic, weak) id delegate; + +@property(nonatomic) UIViewContentMode videoContentMode; + +/** @abstract Enables/disables rendering. + */ +@property(nonatomic, getter=isEnabled) BOOL enabled; + +/** @abstract Wrapped RTCVideoRotation, or nil. + */ +@property(nonatomic, nullable) NSValue* rotationOverride; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMacros.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMacros.h new file mode 100644 index 0000000..cb943b4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMacros.h @@ -0,0 +1,67 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef SDK_OBJC_BASE_RTCMACROS_H_ +#define SDK_OBJC_BASE_RTCMACROS_H_ + +#ifdef WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT + +#if defined(WEBRTC_LIBRARY_IMPL) +#define RTC_OBJC_EXPORT __attribute__((visibility("default"))) +#endif + +#endif // WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT + +#ifndef RTC_OBJC_EXPORT +#define RTC_OBJC_EXPORT +#endif + +// Macro used to mark a function as deprecated. +#define RTC_OBJC_DEPRECATED(msg) __attribute__((deprecated(msg))) + +// Internal macros used to correctly concatenate symbols. +#define RTC_SYMBOL_CONCAT_HELPER(a, b) a##b +#define RTC_SYMBOL_CONCAT(a, b) RTC_SYMBOL_CONCAT_HELPER(a, b) + +// RTC_OBJC_TYPE_PREFIX +// +// Macro used to prepend a prefix to the API types that are exported with +// RTC_OBJC_EXPORT. +// +// Clients can patch the definition of this macro locally and build +// WebRTC.framework with their own prefix in case symbol clashing is a +// problem. +// +// This macro must be defined uniformily across all the translation units. +#ifndef RTC_OBJC_TYPE_PREFIX +#define RTC_OBJC_TYPE_PREFIX +#endif + +// RCT_OBJC_TYPE +// +// Macro used internally to declare API types. Declaring an API type without +// using this macro will not include the declared type in the set of types +// that will be affected by the configurable RTC_OBJC_TYPE_PREFIX. +#define RTC_OBJC_TYPE(type_name) \ + RTC_SYMBOL_CONCAT(RTC_OBJC_TYPE_PREFIX, type_name) + +#if defined(__cplusplus) +#define RTC_EXTERN extern "C" RTC_OBJC_EXPORT +#else +#define RTC_EXTERN extern RTC_OBJC_EXPORT +#endif + +#ifdef __OBJC__ +#define RTC_FWD_DECL_OBJC_CLASS(classname) @class classname +#else +#define RTC_FWD_DECL_OBJC_CLASS(classname) typedef struct objc_object classname +#endif + +#endif // SDK_OBJC_BASE_RTCMACROS_H_ diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaConstraints.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaConstraints.h new file mode 100644 index 0000000..8d002b9 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaConstraints.h @@ -0,0 +1,47 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Constraint keys for media sources. */ +/** The value for this key should be a base64 encoded string containing + * the data from the serialized configuration proto. + */ +RTC_EXTERN NSString *const kRTCMediaConstraintsAudioNetworkAdaptorConfig; + +/** Constraint keys for generating offers and answers. */ +RTC_EXTERN NSString *const kRTCMediaConstraintsIceRestart; +RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveAudio; +RTC_EXTERN NSString *const kRTCMediaConstraintsOfferToReceiveVideo; +RTC_EXTERN NSString *const kRTCMediaConstraintsVoiceActivityDetection; + +/** Constraint values for Boolean parameters. */ +RTC_EXTERN NSString *const kRTCMediaConstraintsValueTrue; +RTC_EXTERN NSString *const kRTCMediaConstraintsValueFalse; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaConstraints) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initialize with mandatory and/or optional constraints. */ +- (instancetype)initWithMandatoryConstraints: + (nullable NSDictionary *)mandatory + optionalConstraints: + (nullable NSDictionary *) + optional NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaSource.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaSource.h new file mode 100644 index 0000000..51ceb60 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaSource.h @@ -0,0 +1,34 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, RTCSourceState) { + RTCSourceStateInitializing, + RTCSourceStateLive, + RTCSourceStateEnded, + RTCSourceStateMuted, +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaSource) : NSObject + +/** The current state of the RTCMediaSource. */ +@property(nonatomic, readonly) RTCSourceState state; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaStream.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaStream.h new file mode 100644 index 0000000..ce3eec5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaStream.h @@ -0,0 +1,50 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCAudioTrack); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); +@class RTC_OBJC_TYPE(RTCVideoTrack); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaStream) : NSObject + +/** The audio tracks in this stream. */ +@property(nonatomic, strong, readonly) NSArray *audioTracks; + +/** The video tracks in this stream. */ +@property(nonatomic, strong, readonly) + NSArray *videoTracks; + +/** An identifier for this media stream. */ +@property(nonatomic, readonly) NSString *streamId; + +- (instancetype)init NS_UNAVAILABLE; + +/** Adds the given audio track to this media stream. */ +- (void)addAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack; + +/** Adds the given video track to this media stream. */ +- (void)addVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack; + +/** Removes the given audio track to this media stream. */ +- (void)removeAudioTrack:(RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrack; + +/** Removes the given video track to this media stream. */ +- (void)removeVideoTrack:(RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrack; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaStreamTrack.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaStreamTrack.h new file mode 100644 index 0000000..5265879 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMediaStreamTrack.h @@ -0,0 +1,50 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** + * Represents the state of the track. This exposes the same states in C++. + */ +typedef NS_ENUM(NSInteger, RTCMediaStreamTrackState) { + RTCMediaStreamTrackStateLive, + RTCMediaStreamTrackStateEnded +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_EXTERN NSString *const kRTCMediaStreamTrackKindAudio; +RTC_EXTERN NSString *const kRTCMediaStreamTrackKindVideo; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMediaStreamTrack) : NSObject + +/** + * The kind of track. For example, "audio" if this track represents an audio + * track and "video" if this track represents a video track. + */ +@property(nonatomic, readonly) NSString *kind; + +/** An identifier string. */ +@property(nonatomic, readonly) NSString *trackId; + +/** The enabled state of the track. */ +@property(nonatomic, assign) BOOL isEnabled; + +/** The state of the track. */ +@property(nonatomic, readonly) RTCMediaStreamTrackState readyState; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMetrics.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMetrics.h new file mode 100644 index 0000000..fffb451 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMetrics.h @@ -0,0 +1,24 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +/** + * Enables gathering of metrics (which can be fetched with + * RTCGetAndResetMetrics). Must be called before any other call into WebRTC. + */ +RTC_EXTERN void RTCEnableMetrics(void); + +/** Gets and clears native histograms. */ +RTC_EXTERN NSArray* + RTCGetAndResetMetrics(void); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMetricsSampleInfo.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMetricsSampleInfo.h new file mode 100644 index 0000000..18afdc0 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMetricsSampleInfo.h @@ -0,0 +1,48 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMetricsSampleInfo) : NSObject + +/** + * Example of RTCMetricsSampleInfo: + * name: "WebRTC.Video.InputFramesPerSecond" + * min: 1 + * max: 100 + * bucketCount: 50 + * samples: [29]:2 [30]:1 + */ + +/** The name of the histogram. */ +@property(nonatomic, readonly) NSString *name; + +/** The minimum bucket value. */ +@property(nonatomic, readonly) int min; + +/** The maximum bucket value. */ +@property(nonatomic, readonly) int max; + +/** The number of buckets. */ +@property(nonatomic, readonly) int bucketCount; + +/** A dictionary holding the samples . */ +@property(nonatomic, readonly) NSDictionary *samples; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMutableI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMutableI420Buffer.h new file mode 100644 index 0000000..7685234 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMutableI420Buffer.h @@ -0,0 +1,24 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Extension of the I420 buffer with mutable data access */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCMutableI420Buffer) @end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h new file mode 100644 index 0000000..feb7417 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCMutableYUVPlanarBuffer.h @@ -0,0 +1,28 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Extension of the YUV planar data buffer with mutable data access */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCMutableYUVPlanarBuffer) + + @property(nonatomic, readonly) uint8_t *mutableDataY; +@property(nonatomic, readonly) uint8_t *mutableDataU; +@property(nonatomic, readonly) uint8_t *mutableDataV; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNativeI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNativeI420Buffer.h new file mode 100644 index 0000000..c5a0ddf --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNativeI420Buffer.h @@ -0,0 +1,23 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCI420Buffer implements the RTCI420Buffer protocol */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCI420Buffer) : NSObject +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h new file mode 100644 index 0000000..b300731 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNativeMutableI420Buffer.h @@ -0,0 +1,24 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Mutable version of RTCI420Buffer */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCMutableI420Buffer) : RTC_OBJC_TYPE(RTCI420Buffer) +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNetworkMonitor.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNetworkMonitor.h new file mode 100644 index 0000000..21d22f5 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCNetworkMonitor.h @@ -0,0 +1,24 @@ +/* + * Copyright 2020 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Listens for NWPathMonitor updates and forwards the results to a C++ + * observer. + */ +@interface RTCNetworkMonitor : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnection.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnection.h new file mode 100644 index 0000000..7ddb5ba --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnection.h @@ -0,0 +1,422 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +@class RTC_OBJC_TYPE(RTCConfiguration); +@class RTC_OBJC_TYPE(RTCDataChannel); +@class RTC_OBJC_TYPE(RTCDataChannelConfiguration); +@class RTC_OBJC_TYPE(RTCIceCandidate); +@class RTC_OBJC_TYPE(RTCIceCandidateErrorEvent); +@class RTC_OBJC_TYPE(RTCMediaConstraints); +@class RTC_OBJC_TYPE(RTCMediaStream); +@class RTC_OBJC_TYPE(RTCMediaStreamTrack); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); +@class RTC_OBJC_TYPE(RTCRtpReceiver); +@class RTC_OBJC_TYPE(RTCRtpSender); +@class RTC_OBJC_TYPE(RTCRtpTransceiver); +@class RTC_OBJC_TYPE(RTCRtpTransceiverInit); +@class RTC_OBJC_TYPE(RTCSessionDescription); +@class RTC_OBJC_TYPE(RTCStatisticsReport); +@class RTC_OBJC_TYPE(RTCLegacyStatsReport); + +typedef NS_ENUM(NSInteger, RTCRtpMediaType); + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const kRTCPeerConnectionErrorDomain; +extern int const kRTCSessionDescriptionErrorCode; + +/** Represents the signaling state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCSignalingState) { + RTCSignalingStateStable, + RTCSignalingStateHaveLocalOffer, + RTCSignalingStateHaveLocalPrAnswer, + RTCSignalingStateHaveRemoteOffer, + RTCSignalingStateHaveRemotePrAnswer, + // Not an actual state, represents the total number of states. + RTCSignalingStateClosed, +}; + +/** Represents the ice connection state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCIceConnectionState) { + RTCIceConnectionStateNew, + RTCIceConnectionStateChecking, + RTCIceConnectionStateConnected, + RTCIceConnectionStateCompleted, + RTCIceConnectionStateFailed, + RTCIceConnectionStateDisconnected, + RTCIceConnectionStateClosed, + RTCIceConnectionStateCount, +}; + +/** Represents the combined ice+dtls connection state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCPeerConnectionState) { + RTCPeerConnectionStateNew, + RTCPeerConnectionStateConnecting, + RTCPeerConnectionStateConnected, + RTCPeerConnectionStateDisconnected, + RTCPeerConnectionStateFailed, + RTCPeerConnectionStateClosed, +}; + +/** Represents the ice gathering state of the peer connection. */ +typedef NS_ENUM(NSInteger, RTCIceGatheringState) { + RTCIceGatheringStateNew, + RTCIceGatheringStateGathering, + RTCIceGatheringStateComplete, +}; + +/** Represents the stats output level. */ +typedef NS_ENUM(NSInteger, RTCStatsOutputLevel) { + RTCStatsOutputLevelStandard, + RTCStatsOutputLevelDebug, +}; + +typedef void (^RTCCreateSessionDescriptionCompletionHandler)( + RTC_OBJC_TYPE(RTCSessionDescription) *_Nullable sdp, + NSError *_Nullable error); + +typedef void (^RTCSetSessionDescriptionCompletionHandler)( + NSError *_Nullable error); + +@class RTC_OBJC_TYPE(RTCPeerConnection); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCPeerConnectionDelegate) + + /** Called when the SignalingState changed. */ + - (void)peerConnection + : (RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection didChangeSignalingState + : (RTCSignalingState)stateChanged; + +/** Called when media is received on a new stream from remote peer. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didAddStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Called when a remote peer closes a stream. + * This is not called when RTCSdpSemanticsUnifiedPlan is specified. + */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didRemoveStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Called when negotiation is needed, for example ICE has restarted. */ +- (void)peerConnectionShouldNegotiate: + (RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection; + +/** Called any time the IceConnectionState changes. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeIceConnectionState:(RTCIceConnectionState)newState; + +/** Called any time the IceGatheringState changes. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeIceGatheringState:(RTCIceGatheringState)newState; + +/** New ice candidate has been found. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didGenerateIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate; + +/** Called when a group of local Ice candidates have been removed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didRemoveIceCandidates: + (NSArray *)candidates; + +/** New data channel has been opened. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didOpenDataChannel:(RTC_OBJC_TYPE(RTCDataChannel) *)dataChannel; + +/** Called when signaling indicates a transceiver will be receiving media from + * the remote endpoint. + * This is only called with RTCSdpSemanticsUnifiedPlan specified. + */ +@optional +/** Called any time the IceConnectionState changes following standardized + * transition. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeStandardizedIceConnectionState:(RTCIceConnectionState)newState; + +/** Called any time the PeerConnectionState changes. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeConnectionState:(RTCPeerConnectionState)newState; + +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didStartReceivingOnTransceiver: + (RTC_OBJC_TYPE(RTCRtpTransceiver) *)transceiver; + +/** Called when a receiver and its track are created. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didAddReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver + streams:(NSArray *)mediaStreams; + +/** Called when the receiver and its track are removed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didRemoveReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver; + +/** Called when the selected ICE candidate pair is changed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didChangeLocalCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)local + remoteCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)remote + lastReceivedMs:(int)lastDataReceivedMs + changeReason:(NSString *)reason; + +/** Called when gathering of an ICE candidate failed. */ +- (void)peerConnection:(RTC_OBJC_TYPE(RTCPeerConnection) *)peerConnection + didFailToGatherIceCandidate: + (RTC_OBJC_TYPE(RTCIceCandidateErrorEvent) *)event; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCPeerConnection) : NSObject + +/** The object that will be notifed about events such as state changes and + * streams being added or removed. + */ +@property(nonatomic, weak, nullable) id delegate; +/** This property is not available with RTCSdpSemanticsUnifiedPlan. Please use + * `senders` instead. + */ +@property(nonatomic, readonly) + NSArray *localStreams; +@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCSessionDescription) * + localDescription; +@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCSessionDescription) * + remoteDescription; +@property(nonatomic, readonly) RTCSignalingState signalingState; +@property(nonatomic, readonly) RTCIceConnectionState iceConnectionState; +@property(nonatomic, readonly) RTCPeerConnectionState connectionState; +@property(nonatomic, readonly) RTCIceGatheringState iceGatheringState; +@property(nonatomic, readonly, copy) RTC_OBJC_TYPE(RTCConfiguration) * + configuration; + +/** Gets all RTCRtpSenders associated with this peer connection. + * Note: reading this property returns different instances of RTCRtpSender. + * Use isEqual: instead of == to compare RTCRtpSender instances. + */ +@property(nonatomic, readonly) NSArray *senders; + +/** Gets all RTCRtpReceivers associated with this peer connection. + * Note: reading this property returns different instances of RTCRtpReceiver. + * Use isEqual: instead of == to compare RTCRtpReceiver instances. + */ +@property(nonatomic, readonly) + NSArray *receivers; + +/** Gets all RTCRtpTransceivers associated with this peer connection. + * Note: reading this property returns different instances of + * RTCRtpTransceiver. Use isEqual: instead of == to compare + * RTCRtpTransceiver instances. This is only available with + * RTCSdpSemanticsUnifiedPlan specified. + */ +@property(nonatomic, readonly) + NSArray *transceivers; + +- (instancetype)init NS_UNAVAILABLE; + +/** Sets the PeerConnection's global configuration to `configuration`. + * Any changes to STUN/TURN servers or ICE candidate policy will affect the + * next gathering phase, and cause the next call to createOffer to generate + * new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies + * cannot be changed with this method. + */ +- (BOOL)setConfiguration:(RTC_OBJC_TYPE(RTCConfiguration) *)configuration; + +/** Terminate all media and close the transport. */ +- (void)close; + +/** Provide a remote candidate to the ICE Agent. */ +- (void)addIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate + DEPRECATED_MSG_ATTRIBUTE( + "Please use addIceCandidate:completionHandler: instead"); + +/** Provide a remote candidate to the ICE Agent. */ +- (void)addIceCandidate:(RTC_OBJC_TYPE(RTCIceCandidate) *)candidate + completionHandler:(void (^)(NSError *_Nullable error))completionHandler; + +/** Remove a group of remote candidates from the ICE Agent. */ +- (void)removeIceCandidates: + (NSArray *)candidates; + +/** Add a new media stream to be sent on this peer connection. + * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use + * addTrack instead. + */ +- (void)addStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Remove the given media stream from this peer connection. + * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use + * removeTrack instead. + */ +- (void)removeStream:(RTC_OBJC_TYPE(RTCMediaStream) *)stream; + +/** Add a new media stream track to be sent on this peer connection, and return + * the newly created RTCRtpSender. The RTCRtpSender will be + * associated with the streams specified in the `streamIds` list. + * + * Errors: If an error occurs, returns nil. An error can occur if: + * - A sender already exists for the track. + * - The peer connection is closed. + */ +- (nullable RTC_OBJC_TYPE(RTCRtpSender) *) + addTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track + streamIds:(NSArray *)streamIds; + +/** With PlanB semantics, removes an RTCRtpSender from this peer connection. + * + * With UnifiedPlan semantics, sets sender's track to null and removes the + * send component from the associated RTCRtpTransceiver's direction. + * + * Returns YES on success. + */ +- (BOOL)removeTrack:(RTC_OBJC_TYPE(RTCRtpSender) *)sender; + +/** addTransceiver creates a new RTCRtpTransceiver and adds it to the set of + * transceivers. Adding a transceiver will cause future calls to CreateOffer + * to add a media description for the corresponding transceiver. + * + * The initial value of `mid` in the returned transceiver is nil. Setting a + * new session description may change it to a non-nil value. + * + * https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtransceiver + * + * Optionally, an RtpTransceiverInit structure can be specified to configure + * the transceiver from construction. If not specified, the transceiver will + * default to having a direction of kSendRecv and not be part of any streams. + * + * These methods are only available when Unified Plan is enabled (see + * RTCConfiguration). + */ + +/** Adds a transceiver with a sender set to transmit the given track. The kind + * of the transceiver (and sender/receiver) will be derived from the kind of + * the track. + */ +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *)addTransceiverWithTrack: + (RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track; +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *) + addTransceiverWithTrack:(RTC_OBJC_TYPE(RTCMediaStreamTrack) *)track + init:(RTC_OBJC_TYPE(RTCRtpTransceiverInit) *)init; + +/** Adds a transceiver with the given kind. Can either be RTCRtpMediaTypeAudio + * or RTCRtpMediaTypeVideo. + */ +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *)addTransceiverOfType: + (RTCRtpMediaType)mediaType; +- (nullable RTC_OBJC_TYPE(RTCRtpTransceiver) *) + addTransceiverOfType:(RTCRtpMediaType)mediaType + init:(RTC_OBJC_TYPE(RTCRtpTransceiverInit) *)init; + +/** Tells the PeerConnection that ICE should be restarted. This triggers a need + * for negotiation and subsequent offerForConstraints:completionHandler call + * will act as if RTCOfferAnswerOptions::ice_restart is true. + */ +- (void)restartIce; + +/** Generate an SDP offer. */ +- (void)offerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + completionHandler: + (RTCCreateSessionDescriptionCompletionHandler)completionHandler; + +/** Generate an SDP answer. */ +- (void)answerForConstraints:(RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + completionHandler: + (RTCCreateSessionDescriptionCompletionHandler)completionHandler; + +/** Apply the supplied RTCSessionDescription as the local description. */ +- (void)setLocalDescription:(RTC_OBJC_TYPE(RTCSessionDescription) *)sdp + completionHandler: + (RTCSetSessionDescriptionCompletionHandler)completionHandler; + +/** Creates an offer or answer (depending on current signaling state) and sets + * it as the local session description. */ +- (void)setLocalDescriptionWithCompletionHandler: + (RTCSetSessionDescriptionCompletionHandler)completionHandler; + +/** Apply the supplied RTCSessionDescription as the remote description. */ +- (void)setRemoteDescription:(RTC_OBJC_TYPE(RTCSessionDescription) *)sdp + completionHandler: + (RTCSetSessionDescriptionCompletionHandler)completionHandler; + +/** Limits the bandwidth allocated for all RTP streams sent by this + * PeerConnection. Nil parameters will be unchanged. Setting + * `currentBitrateBps` will force the available bitrate estimate to the given + * value. Returns YES if the parameters were successfully updated. + */ +- (BOOL)setBweMinBitrateBps:(nullable NSNumber *)minBitrateBps + currentBitrateBps:(nullable NSNumber *)currentBitrateBps + maxBitrateBps:(nullable NSNumber *)maxBitrateBps; + +/** Start or stop recording an Rtc EventLog. */ +- (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath + maxSizeInBytes:(int64_t)maxSizeInBytes; +- (void)stopRtcEventLog; + +@end + +@interface RTC_OBJC_TYPE (RTCPeerConnection) +(Media) + + /** Create an RTCRtpSender with the specified kind and media stream ID. + * See RTCMediaStreamTrack.h for available kinds. + * This method is not supported with RTCSdpSemanticsUnifiedPlan. Please use + * addTransceiver instead. + */ + - (RTC_OBJC_TYPE(RTCRtpSender) *)senderWithKind : (NSString *)kind streamId + : (NSString *)streamId; + +@end + +@interface RTC_OBJC_TYPE (RTCPeerConnection) +(DataChannel) + + /** Create a new data channel with the given label and configuration. */ + - (nullable RTC_OBJC_TYPE(RTCDataChannel) *)dataChannelForLabel + : (NSString *)label configuration + : (RTC_OBJC_TYPE(RTCDataChannelConfiguration) *)configuration; + +@end + +typedef void (^RTCStatisticsCompletionHandler)( + RTC_OBJC_TYPE(RTCStatisticsReport) *); + +@interface RTC_OBJC_TYPE (RTCPeerConnection) +(Stats) + + /** Gather stats for the given RTCMediaStreamTrack. If `mediaStreamTrack` is + * nil statistics are gathered for all tracks. + */ + - (void)statsForTrack : (nullable RTC_OBJC_TYPE(RTCMediaStreamTrack) *) + mediaStreamTrack statsOutputLevel + : (RTCStatsOutputLevel)statsOutputLevel completionHandler + : (nullable void (^)(NSArray *stats)) + completionHandler; + +/** Gather statistic through the v2 statistics API. */ +- (void)statisticsWithCompletionHandler: + (RTCStatisticsCompletionHandler)completionHandler; + +/** Spec-compliant getStats() performing the stats selection algorithm with the + * sender. + */ +- (void)statisticsForSender:(RTC_OBJC_TYPE(RTCRtpSender) *)sender + completionHandler:(RTCStatisticsCompletionHandler)completionHandler; + +/** Spec-compliant getStats() performing the stats selection algorithm with the + * receiver. + */ +- (void)statisticsForReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)receiver + completionHandler:(RTCStatisticsCompletionHandler)completionHandler; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnectionFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnectionFactory.h new file mode 100644 index 0000000..7396bea --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnectionFactory.h @@ -0,0 +1,147 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCRtpCapabilities); +@class RTC_OBJC_TYPE(RTCAudioSource); +@class RTC_OBJC_TYPE(RTCAudioTrack); +@class RTC_OBJC_TYPE(RTCConfiguration); +@class RTC_OBJC_TYPE(RTCMediaConstraints); +@class RTC_OBJC_TYPE(RTCMediaStream); +@class RTC_OBJC_TYPE(RTCPeerConnection); +@class RTC_OBJC_TYPE(RTCVideoSource); +@class RTC_OBJC_TYPE(RTCVideoTrack); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactoryOptions); +@protocol RTC_OBJC_TYPE +(RTCPeerConnectionDelegate); +@protocol RTC_OBJC_TYPE +(RTCVideoDecoderFactory); +@protocol RTC_OBJC_TYPE +(RTCVideoEncoderFactory); +@protocol RTC_OBJC_TYPE +(RTCSSLCertificateVerifier); +@protocol RTC_OBJC_TYPE +(RTCAudioDevice); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCPeerConnectionFactory) : NSObject + +/* Initialize object with default H264 video encoder/decoder factories and default ADM */ +- (instancetype)init; + +/* Initialize object with injectable video encoder/decoder factories and default + * ADM */ +- (instancetype) + initWithEncoderFactory: + (nullable id)encoderFactory + decoderFactory:(nullable id) + decoderFactory; + +/* Initialize object with injectable video encoder/decoder factories and + * injectable ADM */ +- (instancetype) + initWithEncoderFactory: + (nullable id)encoderFactory + decoderFactory:(nullable id) + decoderFactory + audioDevice: + (nullable id)audioDevice; + +/** + * Valid kind values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +- (RTC_OBJC_TYPE(RTCRtpCapabilities) *)rtpSenderCapabilitiesForKind: + (NSString *)kind; + +/** + * Valid kind values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +- (RTC_OBJC_TYPE(RTCRtpCapabilities) *)rtpReceiverCapabilitiesForKind: + (NSString *)kind; + +/** Initialize an RTCAudioSource with constraints. */ +- (RTC_OBJC_TYPE(RTCAudioSource) *)audioSourceWithConstraints: + (nullable RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints; + +/** Initialize an RTCAudioTrack with an id. Convenience ctor to use an audio + * source with no constraints. + */ +- (RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrackWithTrackId:(NSString *)trackId; + +/** Initialize an RTCAudioTrack with a source and an id. */ +- (RTC_OBJC_TYPE(RTCAudioTrack) *)audioTrackWithSource: + (RTC_OBJC_TYPE(RTCAudioSource) *)source + trackId:(NSString *)trackId; + +/** Initialize a generic RTCVideoSource. The RTCVideoSource should be + * passed to a RTCVideoCapturer implementation, e.g. + * RTCCameraVideoCapturer, in order to produce frames. + */ +- (RTC_OBJC_TYPE(RTCVideoSource) *)videoSource; + +/** Initialize a generic RTCVideoSource with he posibility of marking + * it as usable for screen sharing. The RTCVideoSource should be + * passed to a RTCVideoCapturer implementation, e.g. + * RTCCameraVideoCapturer, in order to produce frames. + */ +- (RTC_OBJC_TYPE(RTCVideoSource) *)videoSourceForScreenCast:(BOOL)forScreenCast; + +/** Initialize an RTCVideoTrack with a source and an id. */ +- (RTC_OBJC_TYPE(RTCVideoTrack) *)videoTrackWithSource: + (RTC_OBJC_TYPE(RTCVideoSource) *)source + trackId:(NSString *)trackId; + +/** Initialize an RTCMediaStream with an id. */ +- (RTC_OBJC_TYPE(RTCMediaStream) *)mediaStreamWithStreamId:(NSString *)streamId; + +/** Initialize an RTCPeerConnection with a configuration, constraints, and + * delegate. + */ +- (nullable RTC_OBJC_TYPE(RTCPeerConnection) *) + peerConnectionWithConfiguration: + (RTC_OBJC_TYPE(RTCConfiguration) *)configuration + constraints: + (RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + delegate:(nullable id)delegate; + +- (nullable RTC_OBJC_TYPE(RTCPeerConnection) *) + peerConnectionWithConfiguration: + (RTC_OBJC_TYPE(RTCConfiguration) *)configuration + constraints: + (RTC_OBJC_TYPE(RTCMediaConstraints) *)constraints + certificateVerifier: + (id) + certificateVerifier + delegate:(nullable id)delegate; + +/** Set the options to be used for subsequently created RTCPeerConnections */ +- (void)setOptions: + (nonnull RTC_OBJC_TYPE(RTCPeerConnectionFactoryOptions) *)options; + +/** Start an AecDump recording. This API call will likely change in the future. + */ +- (BOOL)startAecDumpWithFilePath:(NSString *)filePath + maxSizeInBytes:(int64_t)maxSizeInBytes; + +/* Stop an active AecDump recording */ +- (void)stopAecDump; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h new file mode 100644 index 0000000..1c7a10d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCPeerConnectionFactoryOptions.h @@ -0,0 +1,38 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCPeerConnectionFactoryOptions) : NSObject + +@property(nonatomic, assign) BOOL disableEncryption; + +@property(nonatomic, assign) BOOL disableNetworkMonitor; + +@property(nonatomic, assign) BOOL ignoreLoopbackNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreVPNNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreCellularNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreWiFiNetworkAdapter; + +@property(nonatomic, assign) BOOL ignoreEthernetNetworkAdapter; + +- (instancetype)init NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtcpParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtcpParameters.h new file mode 100644 index 0000000..8449500 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtcpParameters.h @@ -0,0 +1,30 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtcpParameters) : NSObject + +/** The Canonical Name used by RTCP. */ +@property(nonatomic, readonly, copy) NSString *cname; + +/** Whether reduced size RTCP is configured or compound RTCP. */ +@property(nonatomic, assign) BOOL isReducedSize; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCapabilities.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCapabilities.h new file mode 100644 index 0000000..c44d0b8 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCapabilities.h @@ -0,0 +1,31 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCRtpCodecCapability); +@class RTC_OBJC_TYPE(RTCRtpHeaderExtensionCapability); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpCapabilities) : NSObject + +@property(nonatomic, copy) NSArray *codecs; +@property(nonatomic, copy) + NSArray *headerExtensions; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCodecCapability.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCodecCapability.h new file mode 100644 index 0000000..ee953e1 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCodecCapability.h @@ -0,0 +1,58 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpCodecCapability) : NSObject + +/** The preferred RTP payload type. */ +@property(nonatomic, readonly, nullable) NSNumber *preferredPayloadType; + +/** + * The codec MIME subtype. Valid types are listed in: + * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2 + * + * Several supported types are represented by the constants above. + */ +@property(nonatomic, readonly) NSString *name; + +/** + * The media type of this codec. Equivalent to MIME top-level type. + * + * Valid values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +@property(nonatomic, readonly) NSString *kind; + +/** The codec clock rate expressed in Hertz. */ +@property(nonatomic, readonly, nullable) NSNumber *clockRate; + +/** + * The number of audio channels (mono=1, stereo=2). + * Set to null for video codecs. + **/ +@property(nonatomic, readonly, nullable) NSNumber *numChannels; + +/** The "format specific parameters" field from the "a=fmtp" line in the SDP */ +@property(nonatomic, readonly) NSDictionary *parameters; + +/** The MIME type of the codec. */ +@property(nonatomic, readonly) NSString *mimeType; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCodecParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCodecParameters.h new file mode 100644 index 0000000..9f96220 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpCodecParameters.h @@ -0,0 +1,72 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_EXTERN const NSString *const kRTCRtxCodecName; +RTC_EXTERN const NSString *const kRTCRedCodecName; +RTC_EXTERN const NSString *const kRTCUlpfecCodecName; +RTC_EXTERN const NSString *const kRTCFlexfecCodecName; +RTC_EXTERN const NSString *const kRTCOpusCodecName; +RTC_EXTERN const NSString *const kRTCIsacCodecName; +RTC_EXTERN const NSString *const kRTCL16CodecName; +RTC_EXTERN const NSString *const kRTCG722CodecName; +RTC_EXTERN const NSString *const kRTCPcmuCodecName; +RTC_EXTERN const NSString *const kRTCPcmaCodecName; +RTC_EXTERN const NSString *const kRTCDtmfCodecName; +RTC_EXTERN const NSString *const kRTCComfortNoiseCodecName; +RTC_EXTERN const NSString *const kRTCVp8CodecName; +RTC_EXTERN const NSString *const kRTCVp9CodecName; +RTC_EXTERN const NSString *const kRTCH264CodecName; + +/** Defined in https://www.w3.org/TR/webrtc/#idl-def-rtcrtpcodecparameters */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpCodecParameters) : NSObject + +/** The RTP payload type. */ +@property(nonatomic, assign) int payloadType; + +/** + * The codec MIME subtype. Valid types are listed in: + * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2 + * + * Several supported types are represented by the constants above. + */ +@property(nonatomic, readonly, nonnull) NSString *name; + +/** + * The media type of this codec. Equivalent to MIME top-level type. + * + * Valid values are kRTCMediaStreamTrackKindAudio and + * kRTCMediaStreamTrackKindVideo. + */ +@property(nonatomic, readonly, nonnull) NSString *kind; + +/** The codec clock rate expressed in Hertz. */ +@property(nonatomic, readonly, nullable) NSNumber *clockRate; + +/** + * The number of channels (mono=1, stereo=2). + * Set to null for video codecs. + **/ +@property(nonatomic, readonly, nullable) NSNumber *numChannels; + +/** The "format specific parameters" field from the "a=fmtp" line in the SDP */ +@property(nonatomic, readonly, nonnull) NSDictionary *parameters; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpEncodingParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpEncodingParameters.h new file mode 100644 index 0000000..a4ad10a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpEncodingParameters.h @@ -0,0 +1,77 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Corresponds to webrtc::Priority. */ +typedef NS_ENUM(NSInteger, RTCPriority) { + RTCPriorityVeryLow, + RTCPriorityLow, + RTCPriorityMedium, + RTCPriorityHigh +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpEncodingParameters) : NSObject + +/** The idenfifier for the encoding layer. This is used in simulcast. */ +@property(nonatomic, copy, nullable) NSString *rid; + +/** Controls whether the encoding is currently transmitted. */ +@property(nonatomic, assign) BOOL isActive; + +/** The maximum bitrate to use for the encoding, or nil if there is no + * limit. + */ +@property(nonatomic, copy, nullable) NSNumber *maxBitrateBps; + +/** The minimum bitrate to use for the encoding, or nil if there is no + * limit. + */ +@property(nonatomic, copy, nullable) NSNumber *minBitrateBps; + +/** The maximum framerate to use for the encoding, or nil if there is no + * limit. + */ +@property(nonatomic, copy, nullable) NSNumber *maxFramerate; + +/** The requested number of temporal layers to use for the encoding, or nil + * if the default should be used. + */ +@property(nonatomic, copy, nullable) NSNumber *numTemporalLayers; + +/** Scale the width and height down by this factor for video. If nil, + * implementation default scaling factor will be used. + */ +@property(nonatomic, copy, nullable) NSNumber *scaleResolutionDownBy; + +/** The SSRC being used by this encoding. */ +@property(nonatomic, readonly, nullable) NSNumber *ssrc; + +/** The relative bitrate priority. */ +@property(nonatomic, assign) double bitratePriority; + +/** The relative DiffServ Code Point priority. */ +@property(nonatomic, assign) RTCPriority networkPriority; + +/** Allow dynamic frame length changes for audio: + https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-adaptiveptime + */ +@property(nonatomic, assign) BOOL adaptiveAudioPacketTime; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpHeaderExtension.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpHeaderExtension.h new file mode 100644 index 0000000..d3f1fda --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpHeaderExtension.h @@ -0,0 +1,33 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpHeaderExtension) : NSObject + +/** The URI of the RTP header extension, as defined in RFC5285. */ +@property(nonatomic, readonly, copy) NSString *uri; + +/** The value put in the RTP packet to identify the header extension. */ +@property(nonatomic, readonly) int id; + +/** Whether the header extension is encrypted or not. */ +@property(nonatomic, readonly, getter=isEncrypted) BOOL encrypted; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpHeaderExtensionCapability.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpHeaderExtensionCapability.h new file mode 100644 index 0000000..2fbcce3 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpHeaderExtensionCapability.h @@ -0,0 +1,39 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +typedef NS_ENUM(NSInteger, RTCRtpTransceiverDirection); + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpHeaderExtensionCapability) : NSObject + +/** The URI of the RTP header extension, as defined in RFC5285. */ +@property(nonatomic, readonly, copy) NSString *uri; + +/** The value put in the RTP packet to identify the header extension. */ +@property(nonatomic, readonly, nullable) NSNumber* preferredId; + +/** Whether the header extension is encrypted or not. */ +@property(nonatomic, readonly, getter=isPreferredEncrypted) + BOOL preferredEncrypted; + +/** Direction of the header extension. */ +@property(nonatomic) RTCRtpTransceiverDirection direction; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpParameters.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpParameters.h new file mode 100644 index 0000000..0e97364 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpParameters.h @@ -0,0 +1,65 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Corresponds to webrtc::DegradationPreference. */ +typedef NS_ENUM(NSInteger, RTCDegradationPreference) { + RTCDegradationPreferenceMaintainFramerateAndResolution, + // TODO(webrtc:450044904): Switch downstream projects to + // RTCDegradationPreferenceMaintainFramerateAndResolution and remove + // RTCDegradationPreferenceDisabled. + RTCDegradationPreferenceDisabled = + RTCDegradationPreferenceMaintainFramerateAndResolution, + RTCDegradationPreferenceMaintainFramerate, + RTCDegradationPreferenceMaintainResolution, + RTCDegradationPreferenceBalanced +}; + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpParameters) : NSObject + +/** A unique identifier for the last set of parameters applied. */ +@property(nonatomic, copy) NSString *transactionId; + +/** Parameters used for RTCP. */ +@property(nonatomic, readonly, copy) RTC_OBJC_TYPE(RTCRtcpParameters) * rtcp; + +/** An array containing parameters for RTP header extensions. */ +@property(nonatomic, readonly, copy) + NSArray *headerExtensions; + +/** The currently active encodings in the order of preference. */ +@property(nonatomic, copy) + NSArray *encodings; + +/** The negotiated set of send codecs in order of preference. */ +@property(nonatomic, copy) + NSArray *codecs; + +/** + * Degradation preference in case of CPU adaptation or constrained bandwidth. + * If nil, implementation default degradation preference will be used. + */ +@property(nonatomic, copy, nullable) NSNumber *degradationPreference; + +- (instancetype)init; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpReceiver.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpReceiver.h new file mode 100644 index 0000000..ad5a6c1 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpReceiver.h @@ -0,0 +1,105 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Represents the media type of the RtpReceiver. */ +typedef NS_ENUM(NSInteger, RTCRtpMediaType) { + RTCRtpMediaTypeAudio, + RTCRtpMediaTypeVideo, + RTCRtpMediaTypeData, + RTCRtpMediaTypeUnsupported, + RTCRtpMediaTypeAny, +}; + +@class RTC_OBJC_TYPE(RTCRtpReceiver); +@class RTC_OBJC_TYPE(RTCRtpSource); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpReceiverDelegate) + + /** Called when the first RTP packet is received. + * + * Note: Currently if there are multiple RtpReceivers of the same media + * type, they will all call OnFirstPacketReceived at once. + * + * For example, if we create three audio receivers, A/B/C, they will listen + * to the same signal from the underneath network layer. Whenever the first + * audio packet is received, the underneath signal will be fired. All the + * receivers A/B/C will be notified and the callback of the receiver's + * delegate will be called. + * + * The process is the same for video receivers. + */ + - (void)rtpReceiver : (RTC_OBJC_TYPE(RTCRtpReceiver) *) + rtpReceiver didReceiveFirstPacketForMediaType + : (RTCRtpMediaType)mediaType; +/** Called when the first RTP packet is received after a change in + * receptiveness. + */ +// TODO: crbug.com/40821064 - remove @optional. +@optional +- (void)rtpReceiver:(RTC_OBJC_TYPE(RTCRtpReceiver) *)rtpReceiver + didReceiveFirstPacketForMediaTypeAfterReceptiveChange: + (RTCRtpMediaType)mediaType; + +@end + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpReceiver) + + /** A unique identifier for this receiver. */ + @property(nonatomic, readonly) NSString *receiverId; + +/** The currently active RTCRtpParameters, as defined in + * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. + * + * The WebRTC specification only defines RTCRtpParameters in terms of senders, + * but this API also applies them to receivers, similar to ORTC: + * http://ortc.org/wp-content/uploads/2016/03/ortc.html#rtcrtpparameters*. + */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpParameters) * parameters; + +/** The RTCMediaStreamTrack associated with the receiver. + * Note: reading this property returns a new instance of + * RTCMediaStreamTrack. Use isEqual: instead of == to compare + * RTCMediaStreamTrack instances. + */ +@property(nonatomic, readonly, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) * + track; + +/** +Returns an array that contains an object for each unique SSRC (synchronization +source) identifier and for each unique CSRC (contributing source) received by +the current RTCRtpReceiver in the last ten seconds. +*/ +@property(nonatomic, readonly) NSArray *sources; + +/** The delegate for this RtpReceiver. */ +@property(nonatomic, weak) id delegate; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpReceiver) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpSender.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpSender.h new file mode 100644 index 0000000..841a65e --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpSender.h @@ -0,0 +1,55 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpSender) + + /** A unique identifier for this sender. */ + @property(nonatomic, readonly) NSString *senderId; + +/** The currently active RTCRtpParameters, as defined in + * https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters. + */ +@property(nonatomic, copy) RTC_OBJC_TYPE(RTCRtpParameters) * parameters; + +/** The RTCMediaStreamTrack associated with the sender. + * Note: reading this property returns a new instance of + * RTCMediaStreamTrack. Use isEqual: instead of == to compare + * RTCMediaStreamTrack instances. + */ +@property(nonatomic, copy, nullable) RTC_OBJC_TYPE(RTCMediaStreamTrack) * track; + +/** IDs of streams associated with the RTP sender */ +@property(nonatomic, copy) NSArray *streamIds; + +/** The RTCDtmfSender accociated with the RTP sender. */ +@property(nonatomic, readonly, nullable) id + dtmfSender; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpSender) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpSource.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpSource.h new file mode 100644 index 0000000..a36a0bc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpSource.h @@ -0,0 +1,66 @@ +/* + * Copyright 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Represents the source type of received media. */ +typedef NS_ENUM(NSInteger, RTCRtpSourceType) { + RTCRtpSourceTypeSSRC, + RTCRtpSourceTypeCSRC, +}; + +@class RTC_OBJC_TYPE(RTCRtpSource); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpSource) + + /** + A positive integer value specifying the CSRC identifier of the contributing + source or SSRC identifier of the synchronization source. This uniquely + identifies the source of the particular stream RTP packets. */ + @property(nonatomic, readonly) uint32_t sourceId; + +@property(nonatomic, readonly) RTCRtpSourceType sourceType; + +/** +A floating-point value between 0.0 and 1.0 specifying the audio level contained +in the last RTP packet played from the contributing source. +*/ +@property(nonatomic, readonly, nullable) NSNumber *audioLevel; + +/** +A timestamp indicating the most recent time at which a frame originating from +this source was delivered to the receiver's track +*/ +@property(nonatomic, readonly) CFTimeInterval timestampUs; + +/** +The RTP timestamp of the media. This source-generated timestamp indicates the +time at which the media in this packet, scheduled for play out at the time +indicated by timestamp, was initially sampled or generated. It may be useful for +sequencing and synchronization purposes. +*/ +@property(nonatomic, readonly) uint32_t rtpTimestamp; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpSource) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpTransceiver.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpTransceiver.h new file mode 100644 index 0000000..2c5084b --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCRtpTransceiver.h @@ -0,0 +1,177 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +extern NSString *const kRTCRtpTransceiverErrorDomain; + +/** https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverdirection */ +typedef NS_ENUM(NSInteger, RTCRtpTransceiverDirection) { + RTCRtpTransceiverDirectionSendRecv, + RTCRtpTransceiverDirectionSendOnly, + RTCRtpTransceiverDirectionRecvOnly, + RTCRtpTransceiverDirectionInactive, + RTCRtpTransceiverDirectionStopped +}; + +/** Structure for initializing an RTCRtpTransceiver in a call to + * RTCPeerConnection.addTransceiver. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiverinit + */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpTransceiverInit) : NSObject + +/** Direction of the RTCRtpTransceiver. See RTCRtpTransceiver.direction. */ +@property(nonatomic) RTCRtpTransceiverDirection direction; + +/** The added RTCRtpTransceiver will be added to these streams. */ +@property(nonatomic) NSArray *streamIds; + +/** TODO(bugs.webrtc.org/7600): Not implemented. */ +@property(nonatomic) + NSArray *sendEncodings; + +@end + +@class RTC_OBJC_TYPE(RTCRtpTransceiver); +@class RTC_OBJC_TYPE(RTCRtpCodecCapability); +@class RTC_OBJC_TYPE(RTCRtpHeaderExtensionCapability); + +/** The RTCRtpTransceiver maps to the RTCRtpTransceiver defined by the + * WebRTC specification. A transceiver represents a combination of an + * RTCRtpSender and an RTCRtpReceiver that share a common mid. As defined in + * JSEP, an RTCRtpTransceiver is said to be associated with a media description + * if its mid property is non-nil; otherwise, it is said to be disassociated. + * JSEP: https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24 + * + * Note that RTCRtpTransceivers are only supported when using + * RTCPeerConnection with Unified Plan SDP. + * + * WebRTC specification for RTCRtpTransceiver, the JavaScript analog: + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCRtpTransceiver) + + /** Media type of the transceiver. The sender and receiver will also have + * this type. + */ + @property(nonatomic, readonly) RTCRtpMediaType mediaType; + +/** The mid attribute is the mid negotiated and present in the local and + * remote descriptions. Before negotiation is complete, the mid value may be + * nil. After rollbacks, the value may change from a non-nil value to nil. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-mid + */ +@property(nonatomic, readonly) NSString *mid; + +/** The sender attribute exposes the RTCRtpSender corresponding to the RTP + * media that may be sent with the transceiver's mid. The sender is always + * present, regardless of the direction of media. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-sender + */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpSender) * sender; + +/** The receiver attribute exposes the RTCRtpReceiver corresponding to the RTP + * media that may be received with the transceiver's mid. The receiver is + * always present, regardless of the direction of media. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-receiver + */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCRtpReceiver) * receiver; + +/** The isStopped attribute indicates that the sender of this transceiver will + * no longer send, and that the receiver will no longer receive. It is true if + * either stop has been called or if setting the local or remote description + * has caused the RTCRtpTransceiver to be stopped. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stopped + */ +@property(nonatomic, readonly) BOOL isStopped; + +/** The direction attribute indicates the preferred direction of this + * transceiver, which will be used in calls to createOffer and createAnswer. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction + */ +@property(nonatomic, readonly) RTCRtpTransceiverDirection direction; + +/** It will contain all the RTP header extensions that are supported. + * The direction attribute for all extensions that are mandatory to use MUST be + * initialized to an appropriate value other than + * RTCRtpTransceiverDirectionStopped. The direction attribute for extensions + * that will not be offered by default in an initial offer MUST be initialized + * to RTCRtpTransceiverDirectionStopped. + */ +@property(nonatomic, readonly, copy) + NSArray + *headerExtensionsToNegotiate; +@property(nonatomic, readonly, copy) + NSArray + *negotiatedHeaderExtensions; + +/** The currentDirection attribute indicates the current direction negotiated + * for this transceiver. If this transceiver has never been represented in an + * offer/answer exchange, or if the transceiver is stopped, the value is not + * present and this method returns NO. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-currentdirection + */ +- (BOOL)currentDirection:(RTCRtpTransceiverDirection *)currentDirectionOut; + +/** The stop method irreversibly stops the RTCRtpTransceiver. The sender of + * this transceiver will no longer send, the receiver will no longer receive. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-stop + */ +- (void)stopInternal; + +/** The setCodecPreferences method overrides the default codec preferences used + * by WebRTC for this transceiver. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences + */ +- (BOOL)setCodecPreferences: + (NSArray *_Nullable)codecs + error:(NSError **_Nullable)error; + +/** Deprecated version of [RTCRtpTransceiver setCodecPreferences:error:] */ +- (void)setCodecPreferences: + (NSArray *_Nullable)codecs + RTC_OBJC_DEPRECATED("Use setCodecPreferences:error: instead."); + +/** The setHeaderExtensionsToNegotiate method overrides the default header + * extensions used by WebRTC for this transceiver. + * https://w3c.github.io/webrtc-extensions/#ref-for-dom-rtcrtptransceiver-setheaderextensionstonegotiate + */ +- (BOOL)setHeaderExtensionsToNegotiate: + (NSArray *) + extensions + error:(NSError **)error; + +/** An update of directionality does not take effect immediately. Instead, + * future calls to createOffer and createAnswer mark the corresponding media + * descriptions as sendrecv, sendonly, recvonly, or inactive. + * https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction + */ +- (void)setDirection:(RTCRtpTransceiverDirection)direction + error:(NSError **)error; + +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCRtpTransceiver) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSSLAdapter.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSSLAdapter.h new file mode 100644 index 0000000..a0da827 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSSLAdapter.h @@ -0,0 +1,20 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** + * Initialize and clean up the SSL library. Failure is fatal. These call the + * corresponding functions in webrtc/rtc_base/ssladapter.h. + */ +RTC_EXTERN BOOL RTCInitializeSSL(void); +RTC_EXTERN BOOL RTCCleanupSSL(void); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSSLCertificateVerifier.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSSLCertificateVerifier.h new file mode 100644 index 0000000..d5acafa --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSSLCertificateVerifier.h @@ -0,0 +1,25 @@ +/* + * Copyright 2022 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT @protocol RTC_OBJC_TYPE +(RTCSSLCertificateVerifier) + + /** The certificate to verify */ + - (BOOL)verify : (NSData *)derCertificate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSessionDescription.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSessionDescription.h new file mode 100644 index 0000000..e513c16 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCSessionDescription.h @@ -0,0 +1,49 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +/** + * Represents the session description type. This exposes the same types that are + * in C++, which doesn't include the rollback type that is in the W3C spec. + */ +typedef NS_ENUM(NSInteger, RTCSdpType) { + RTCSdpTypeOffer, + RTCSdpTypePrAnswer, + RTCSdpTypeAnswer, + RTCSdpTypeRollback, +}; + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCSessionDescription) : NSObject + +/** The type of session description. */ +@property(nonatomic, readonly) RTCSdpType type; + +/** The SDP string representation of this session description. */ +@property(nonatomic, readonly) NSString *sdp; + +- (instancetype)init NS_UNAVAILABLE; + +/** Initialize a session description with a type and SDP string. */ +- (instancetype)initWithType:(RTCSdpType)type + sdp:(NSString *)sdp NS_DESIGNATED_INITIALIZER; + ++ (NSString *)stringForType:(RTCSdpType)type; + ++ (RTCSdpType)typeForString:(NSString *)string; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCStatisticsReport.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCStatisticsReport.h new file mode 100644 index 0000000..785d949 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCStatisticsReport.h @@ -0,0 +1,58 @@ +/* + * Copyright 2019 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +@class RTC_OBJC_TYPE(RTCStatistics); + +NS_ASSUME_NONNULL_BEGIN + +/** A statistics report. Encapsulates a number of RTCStatistics objects. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCStatisticsReport) : NSObject + +/** The timestamp of the report in microseconds since 1970-01-01T00:00:00Z. */ +@property(nonatomic, readonly) CFTimeInterval timestamp_us; + +/** RTCStatistics objects by id. */ +@property(nonatomic, readonly) + NSDictionary *statistics; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +/** A part of a report (a subreport) covering a certain area. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCStatistics) : NSObject + +/** The id of this subreport, e.g. "RTCMediaStreamTrack_receiver_2". */ +@property(nonatomic, readonly) NSString *id; + +/** The timestamp of the subreport in microseconds since 1970-01-01T00:00:00Z. + */ +@property(nonatomic, readonly) CFTimeInterval timestamp_us; + +/** The type of the subreport, e.g. "track", "codec". */ +@property(nonatomic, readonly) NSString *type; + +/** The keys and values of the subreport, e.g. "totalFramesDuration = 5.551". + The values are either NSNumbers or NSStrings or NSArrays encapsulating + NSNumbers or NSStrings, or NSDictionary of NSString keys to NSNumber values. + */ +@property(nonatomic, readonly) NSDictionary *values; + +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCTracing.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCTracing.h new file mode 100644 index 0000000..899a570 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCTracing.h @@ -0,0 +1,21 @@ +/* + * Copyright 2016 The WebRTC Project Authors. All rights reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +RTC_EXTERN void RTCSetupInternalTracer(void); +/** Starts capture to specified file. Must be a valid writable path. + * Returns YES if capture starts. + */ +RTC_EXTERN BOOL RTCStartInternalCapture(NSString* filePath); +RTC_EXTERN void RTCStopInternalCapture(void); +RTC_EXTERN void RTCShutdownInternalTracer(void); diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCapturer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCapturer.h new file mode 100644 index 0000000..78b1bef --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCapturer.h @@ -0,0 +1,37 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCVideoCapturer); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoCapturerDelegate) - + (void)capturer + : (RTC_OBJC_TYPE(RTCVideoCapturer) *)capturer didCaptureVideoFrame + : (RTC_OBJC_TYPE(RTCVideoFrame) *)frame; +@end + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoCapturer) : NSObject + +@property(nonatomic, weak) id delegate; + +- (instancetype)initWithDelegate: + (id)delegate; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCodecConstants.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCodecConstants.h new file mode 100644 index 0000000..0277bfc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCodecConstants.h @@ -0,0 +1,17 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +RTC_EXTERN NSString* const kRTCVideoCodecVp8Name; +RTC_EXTERN NSString* const kRTCVideoCodecVp9Name; +RTC_EXTERN NSString* const kRTCVideoCodecAv1Name; diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCodecInfo.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCodecInfo.h new file mode 100644 index 0000000..0a2c285 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoCodecInfo.h @@ -0,0 +1,43 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Holds information to identify a codec. Corresponds to + * webrtc::SdpVideoFormat. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoCodecInfo) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +- (instancetype)initWithName:(NSString *)name; + +- (instancetype)initWithName:(NSString *)name + parameters:(nullable NSDictionary *) + parameters; + +- (instancetype)initWithName:(NSString *)name + parameters:(NSDictionary *)parameters + scalabilityModes:(NSArray *)scalabilityModes + NS_DESIGNATED_INITIALIZER; + +- (BOOL)isEqualToCodecInfo:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; + +@property(nonatomic, readonly) NSString *name; +@property(nonatomic, readonly) NSDictionary *parameters; +@property(nonatomic, readonly) NSArray *scalabilityModes; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoder.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoder.h new file mode 100644 index 0000000..e7bd636 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoder.h @@ -0,0 +1,41 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Callback block for decoder. */ +typedef void (^RTCVideoDecoderCallback)(RTC_OBJC_TYPE(RTCVideoFrame) * frame); + +/** Protocol for decoder implementations. */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoDecoder) + + - (void)setCallback : (RTCVideoDecoderCallback)callback; +- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores; +- (NSInteger)releaseDecoder; +// TODO(bugs.webrtc.org/15444): Remove obsolete missingFrames param. +- (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage + missingFrames:(BOOL)missingFrames + codecSpecificInfo:(nullable id)info + renderTimeMs:(int64_t)renderTimeMs; +- (NSString *)implementationName; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderAV1.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderAV1.h new file mode 100644 index 0000000..c6cb38c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderAV1.h @@ -0,0 +1,25 @@ +/* + * Copyright 2021 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderAV1) : NSObject + +/* This returns a AV1 decoder that can be returned from a RTCVideoDecoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (id)av1Decoder; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderFactory.h new file mode 100644 index 0000000..5eb598a --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderFactory.h @@ -0,0 +1,33 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCVideoDecoderFactory is an Objective-C version of + * webrtc::VideoDecoderFactory. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoDecoderFactory) + + - (nullable id)createDecoder + : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; +- (NSArray *) + supportedCodecs; // TODO(andersc): "supportedFormats" instead? + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h new file mode 100644 index 0000000..d5ce05e --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderFactoryH264.h @@ -0,0 +1,18 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderFactoryH264) : NSObject +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderH264.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderH264.h new file mode 100644 index 0000000..f1c8468 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderH264.h @@ -0,0 +1,18 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderH264) : NSObject +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderVP8.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderVP8.h new file mode 100644 index 0000000..9e3af0d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderVP8.h @@ -0,0 +1,25 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderVP8) : NSObject + +/* This returns a VP8 decoder that can be returned from a RTCVideoDecoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (id)vp8Decoder; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderVP9.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderVP9.h new file mode 100644 index 0000000..6c76eba --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoDecoderVP9.h @@ -0,0 +1,27 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoDecoderVP9) : NSObject + +/* This returns a VP9 decoder that can be returned from a RTCVideoDecoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoDecoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (id)vp9Decoder; + ++ (bool)isSupported; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoder.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoder.h new file mode 100644 index 0000000..1b0a16d --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoder.h @@ -0,0 +1,62 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Callback block for encoder. */ +typedef BOOL (^RTCVideoEncoderCallback)( + RTC_OBJC_TYPE(RTCEncodedImage) * frame, + id info); + +/** Protocol for encoder implementations. */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoEncoder) + + - (void)setCallback : (nullable RTCVideoEncoderCallback)callback; +- (NSInteger)startEncodeWithSettings: + (RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings + numberOfCores:(int)numberOfCores; +- (NSInteger)releaseEncoder; +- (NSInteger)encode:(RTC_OBJC_TYPE(RTCVideoFrame) *)frame + codecSpecificInfo:(nullable id)info + frameTypes:(NSArray *)frameTypes; +- (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate; +- (NSString *)implementationName; + +/** Returns QP scaling settings for encoder. The quality scaler adjusts the + * resolution in order to keep the QP from the encoded images within the given + * range. Returning nil from this function disables quality scaling. */ +- (nullable RTC_OBJC_TYPE(RTCVideoEncoderQpThresholds) *)scalingSettings; + +/** Resolutions should be aligned to this value. */ +@property(nonatomic, readonly) NSInteger resolutionAlignment; + +/** If enabled, resolution alignment is applied to all simulcast layers + simultaneously so that when scaled, all resolutions comply with + 'resolutionAlignment'. */ +@property(nonatomic, readonly) BOOL applyAlignmentToAllSimulcastLayers; + +/** If YES, the receiver is expected to resample/scale the source texture to the + expected output size. */ +@property(nonatomic, readonly) BOOL supportsNativeHandle; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderAV1.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderAV1.h new file mode 100644 index 0000000..4c97563 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderAV1.h @@ -0,0 +1,32 @@ +/* + * Copyright 2021 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderAV1) : NSObject + +/* This returns a AV1 encoder that can be returned from a RTCVideoEncoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (nonnull id)av1Encoder; + +/* Returns list of scalability modes supported by the encoder that can be + * created with `av1Encoder` method above. + */ ++ (nonnull NSArray*)supportedScalabilityModes; + ++ (bool)isSupported; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderFactory.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderFactory.h new file mode 100644 index 0000000..8574545 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderFactory.h @@ -0,0 +1,78 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** RTCVideoEncoderFactory is an Objective-C version of + webrtc::VideoEncoderFactory::VideoEncoderSelector. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoEncoderSelector) + + - (void)registerCurrentEncoderInfo + : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; +- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBitrate: + (NSInteger)bitrate; +- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBrokenEncoder; + +@optional +- (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForResolutionChangeBySize: + (CGSize)size; + +@end + +/** RTCVideoEncoderCodecSupport is an Objective-C version of + * webrtc::VideoEncoderFactory::CodecSupport. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderCodecSupport) : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +- (instancetype)initWithSupported:(bool)isSupported; +- (instancetype)initWithSupported:(bool)isSupported + isPowerEfficient:(bool)isPowerEfficient + NS_DESIGNATED_INITIALIZER; + +@property(nonatomic, readonly) bool isSupported; +@property(nonatomic, readonly) bool isPowerEfficient; + +@end + +/** RTCVideoEncoderFactory is an Objective-C version of + * webrtc::VideoEncoderFactory. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoEncoderFactory) + + - (nullable id)createEncoder + : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; +- (NSArray *) + supportedCodecs; // TODO(andersc): "supportedFormats" instead? + +@optional +- (NSArray *)implementations; +- (nullable id)encoderSelector; +/* TODO: b/299588022 - move to non-optional section when implemented by all + * derived classes. */ +- (RTC_OBJC_TYPE(RTCVideoEncoderCodecSupport) *) + queryCodecSupport:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info + scalabilityMode:(nullable NSString *)scalabilityMode; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h new file mode 100644 index 0000000..ac9bac8 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderFactoryH264.h @@ -0,0 +1,18 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderFactoryH264) : NSObject +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderH264.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderH264.h new file mode 100644 index 0000000..37ff4e4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderH264.h @@ -0,0 +1,22 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderH264) : NSObject + +- (instancetype)initWithCodecInfo:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)codecInfo; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h new file mode 100644 index 0000000..818c272 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderQpThresholds.h @@ -0,0 +1,29 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** QP thresholds for encoder. Corresponds to + * webrtc::VideoEncoder::QpThresholds. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderQpThresholds) : NSObject + +- (instancetype)initWithThresholdsLow:(NSInteger)low high:(NSInteger)high; + +@property(nonatomic, readonly) NSInteger low; +@property(nonatomic, readonly) NSInteger high; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderSettings.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderSettings.h new file mode 100644 index 0000000..efbdb5e --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderSettings.h @@ -0,0 +1,42 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, RTCVideoCodecMode) { + RTCVideoCodecModeRealtimeVideo, + RTCVideoCodecModeScreensharing, +}; + +/** Settings for encoder. Corresponds to webrtc::VideoCodec. */ +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderSettings) : NSObject + +@property(nonatomic, strong) NSString *name; + +@property(nonatomic, assign) unsigned short width; +@property(nonatomic, assign) unsigned short height; + +@property(nonatomic, assign) unsigned int startBitrate; // kilobits/sec. +@property(nonatomic, assign) unsigned int maxBitrate; +@property(nonatomic, assign) unsigned int minBitrate; + +@property(nonatomic, assign) uint32_t maxFramerate; + +@property(nonatomic, assign) unsigned int qpMax; +@property(nonatomic, assign) RTCVideoCodecMode mode; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderVP8.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderVP8.h new file mode 100644 index 0000000..789ae28 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderVP8.h @@ -0,0 +1,30 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderVP8) : NSObject + +/* This returns a VP8 encoder that can be returned from a RTCVideoEncoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (nonnull id)vp8Encoder; + +/* Returns list of scalability modes supported by the encoder that can be + * created with `vp8Encoder` method above. + */ ++ (nonnull NSArray*)supportedScalabilityModes; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderVP9.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderVP9.h new file mode 100644 index 0000000..86c3ddf --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoEncoderVP9.h @@ -0,0 +1,32 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoEncoderVP9) : NSObject + +/* This returns a VP9 encoder that can be returned from a RTCVideoEncoderFactory injected into + * RTCPeerConnectionFactory. Even though it implements the RTCVideoEncoder protocol, it can not be + * used independently from the RTCPeerConnectionFactory. + */ ++ (nullable id)vp9Encoder; + +/* Returns list of scalability modes supported by the encoder that can be + * created with `vp9Encoder` method above. + */ ++ (nonnull NSArray*)supportedScalabilityModes; + ++ (bool)isSupported; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoFrame.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoFrame.h new file mode 100644 index 0000000..c9f7cfc --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoFrame.h @@ -0,0 +1,64 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, RTCVideoRotation) { + RTCVideoRotation_0 = 0, + RTCVideoRotation_90 = 90, + RTCVideoRotation_180 = 180, + RTCVideoRotation_270 = 270, +}; + +@protocol RTC_OBJC_TYPE +(RTCVideoFrameBuffer); + +// RTCVideoFrame is an ObjectiveC version of webrtc::VideoFrame. +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoFrame) : NSObject + +/** Width without rotation applied. */ +@property(nonatomic, readonly) int width; + +/** Height without rotation applied. */ +@property(nonatomic, readonly) int height; +@property(nonatomic, readonly) RTCVideoRotation rotation; + +/** Timestamp in nanoseconds. */ +@property(nonatomic, readonly) int64_t timeStampNs; + +/** Timestamp 90 kHz. */ +@property(nonatomic, assign) int32_t timeStamp; + +@property(nonatomic, readonly) id buffer; + +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)new NS_UNAVAILABLE; + +/** Initialize an RTCVideoFrame from a frame buffer, rotation, and timestamp. + */ +- (instancetype)initWithBuffer: + (id)frameBuffer + rotation:(RTCVideoRotation)rotation + timeStampNs:(int64_t)timeStampNs; + +/** Return a frame that is guaranteed to be I420, i.e. it is possible to access + * the YUV data on it. + */ +- (RTC_OBJC_TYPE(RTCVideoFrame) *)newI420VideoFrame; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoFrameBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoFrameBuffer.h new file mode 100644 index 0000000..7efbd2b --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoFrameBuffer.h @@ -0,0 +1,40 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol RTC_OBJC_TYPE +(RTCI420Buffer); + +// RTCVideoFrameBuffer is an ObjectiveC version of webrtc::VideoFrameBuffer. +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoFrameBuffer) + + @property(nonatomic, readonly) int width; +@property(nonatomic, readonly) int height; + +- (id)toI420; + +@optional +- (id)cropAndScaleWith:(int)offsetX + offsetY:(int)offsetY + cropWidth:(int)cropWidth + cropHeight:(int)cropHeight + scaleWidth:(int)scaleWidth + scaleHeight:(int)scaleHeight; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoRenderer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoRenderer.h new file mode 100644 index 0000000..1182844 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoRenderer.h @@ -0,0 +1,44 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#if TARGET_OS_IPHONE +#import +#endif + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class RTC_OBJC_TYPE(RTCVideoFrame); + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoRenderer) + + /** The size of the frame. */ + - (void)setSize : (CGSize)size; + +/** The frame to be displayed. */ +- (void)renderFrame:(nullable RTC_OBJC_TYPE(RTCVideoFrame) *)frame; + +@end + +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoViewDelegate) + + - (void)videoView + : (id)videoView didChangeVideoSize + : (CGSize)size; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoSource.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoSource.h new file mode 100644 index 0000000..2428527 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoSource.h @@ -0,0 +1,37 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +RTC_OBJC_EXPORT + +@interface RTC_OBJC_TYPE (RTCVideoSource) : RTC_OBJC_TYPE(RTCMediaSource) + +- (instancetype)init NS_UNAVAILABLE; + +/** + * Calling this function will cause frames to be scaled down to the + * requested resolution. Also, frames will be cropped to match the + * requested aspect ratio, and frames will be dropped to match the + * requested fps. The requested aspect ratio is orientation agnostic and + * will be adjusted to maintain the input orientation, so it doesn't + * matter if e.g. 1280x720 or 720x1280 is requested. + */ +- (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoTrack.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoTrack.h new file mode 100644 index 0000000..1836816 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoTrack.h @@ -0,0 +1,38 @@ +/* + * Copyright 2015 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol RTC_OBJC_TYPE +(RTCVideoRenderer); +@class RTC_OBJC_TYPE(RTCPeerConnectionFactory); +@class RTC_OBJC_TYPE(RTCVideoSource); + +RTC_OBJC_EXPORT +@interface RTC_OBJC_TYPE (RTCVideoTrack) : RTC_OBJC_TYPE(RTCMediaStreamTrack) + +/** The video source for this video track. */ +@property(nonatomic, readonly) RTC_OBJC_TYPE(RTCVideoSource) *source; + +- (instancetype)init NS_UNAVAILABLE; + +/** Register a renderer that will render all frames received on this track. */ +- (void)addRenderer:(id)renderer; + +/** Deregister a renderer. */ +- (void)removeRenderer:(id)renderer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoViewShading.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoViewShading.h new file mode 100644 index 0000000..afba015 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCVideoViewShading.h @@ -0,0 +1,39 @@ +/* + * Copyright 2017 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * RTCVideoViewShading provides a way for apps to customize the OpenGL(ES + * shaders used in rendering for the RTCEAGLVideoView/RTCNSGLVideoView. + */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCVideoViewShading) + + /** Callback for I420 frames. Each plane is given as a texture. */ + - (void)applyShadingForFrameWithWidth : (int)width height + : (int)height rotation : (RTCVideoRotation)rotation yPlane + : (GLuint)yPlane uPlane : (GLuint)uPlane vPlane : (GLuint)vPlane; + +/** Callback for NV12 frames. Each plane is given as a texture. */ +- (void)applyShadingForFrameWithWidth:(int)width + height:(int)height + rotation:(RTCVideoRotation)rotation + yPlane:(GLuint)yPlane + uvPlane:(GLuint)uvPlane; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h new file mode 100644 index 0000000..20a154c --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/RTCYUVPlanarBuffer.h @@ -0,0 +1,46 @@ +/* + * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** Protocol for RTCVideoFrameBuffers containing YUV planar data. */ +RTC_OBJC_EXPORT +@protocol RTC_OBJC_TYPE +(RTCYUVPlanarBuffer) + + @property(nonatomic, readonly) int chromaWidth; +@property(nonatomic, readonly) int chromaHeight; +@property(nonatomic, readonly) const uint8_t *dataY; +@property(nonatomic, readonly) const uint8_t *dataU; +@property(nonatomic, readonly) const uint8_t *dataV; +@property(nonatomic, readonly) int strideY; +@property(nonatomic, readonly) int strideU; +@property(nonatomic, readonly) int strideV; + +- (instancetype)initWithWidth:(int)width + height:(int)height + dataY:(const uint8_t *)dataY + dataU:(const uint8_t *)dataU + dataV:(const uint8_t *)dataV; +- (instancetype)initWithWidth:(int)width height:(int)height; +- (instancetype)initWithWidth:(int)width + height:(int)height + strideY:(int)strideY + strideU:(int)strideU + strideV:(int)strideV; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/UIDevice+RTCDevice.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/UIDevice+RTCDevice.h new file mode 100644 index 0000000..4d04f38 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/UIDevice+RTCDevice.h @@ -0,0 +1,17 @@ +/* + * Copyright 2016 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import + +@interface UIDevice (RTCDevice) + ++ (NSString *)machineName; + +@end diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/WebRTC.h b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/WebRTC.h new file mode 100644 index 0000000..1f88aeb --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Headers/WebRTC.h @@ -0,0 +1,102 @@ +/* + * Copyright 2026 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Info.plist b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Info.plist new file mode 100644 index 0000000..24361f1 Binary files /dev/null and b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Info.plist differ diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Modules/module.modulemap b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Modules/module.modulemap new file mode 100644 index 0000000..cd485a4 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module WebRTC { + umbrella header "WebRTC.h" + + export * + module * { export * } +} diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/PrivacyInfo.xcprivacy b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..a1f6725 --- /dev/null +++ b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/PrivacyInfo.xcprivacy @@ -0,0 +1,32 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + 8FFB.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + + diff --git a/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/WebRTC b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/WebRTC new file mode 100755 index 0000000..2550cc1 Binary files /dev/null and b/Frameworks/WebRTC.xcframework/ios-arm64_x86_64-simulator/WebRTC.framework/WebRTC differ diff --git a/Info.plist b/Info.plist index 5d790e9..d977eca 100644 --- a/Info.plist +++ b/Info.plist @@ -12,9 +12,13 @@ Rosetta needs access to your camera to take and send photos in chats. NSMicrophoneUsageDescription Rosetta needs access to your microphone for secure voice calls and audio messages. + NSSupportsLiveActivities + UIBackgroundModes remote-notification + audio + voip NSUserActivityTypes diff --git a/Rosetta.xcodeproj/project.pbxproj b/Rosetta.xcodeproj/project.pbxproj index 3b1f35f..0a94c61 100644 --- a/Rosetta.xcodeproj/project.pbxproj +++ b/Rosetta.xcodeproj/project.pbxproj @@ -19,11 +19,17 @@ D0BD72A9646880B604F1AC3C /* RosettaNotificationService.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = A182B0EDE5C68E7C6F1FB6D1 /* RosettaNotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; D60B2E657D691F256B5B7FD4 /* SchemaParityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F4769EEC8ABADB3AA98D3A5 /* SchemaParityTests.swift */; }; DA91A59FDC04C2EBE77550F4 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F43A41D5496A62870E307FC /* NotificationService.swift */; }; - E20000032F8D11110092AD05 /* WebRTC in Frameworks */ = {isa = PBXBuildFile; productRef = E20000022F8D11110092AD05 /* WebRTC */; }; + E20000032F8D11110092AD05 /* WebRTC.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E20000042F8D11110092AD05 /* WebRTC.xcframework */; }; + E20000062F8D11110092AD05 /* WebRTC.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E20000042F8D11110092AD05 /* WebRTC.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; EC5DFA298C697AE235323240 /* MigrationHarnessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBAA4AD95B61886B5A22EF0D /* MigrationHarnessTests.swift */; }; F1A000012F6F00010092AD05 /* FirebaseAnalyticsWithoutAdIdSupport in Frameworks */ = {isa = PBXBuildFile; productRef = F1A000022F6F00010092AD05 /* FirebaseAnalyticsWithoutAdIdSupport */; }; F1A000032F6F00010092AD05 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = F1A000042F6F00010092AD05 /* FirebaseMessaging */; }; F1A000062F6F00010092AD05 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = F1A000072F6F00010092AD05 /* FirebaseCrashlytics */; }; + + LA00000102F8D22220092AD05 /* RosettaLiveActivityWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = LA000000D2F8D22220092AD05 /* RosettaLiveActivityWidgetBundle.swift */; }; + LA00000112F8D22220092AD05 /* CallLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = LA000000E2F8D22220092AD05 /* CallLiveActivity.swift */; }; + LA00000122F8D22220092AD05 /* CallActivityAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = LA000000F2F8D22220092AD05 /* CallActivityAttributes.swift */; }; + LA00000092F8D22220092AD05 /* RosettaLiveActivityWidget.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = LA00000022F8D22220092AD05 /* RosettaLiveActivityWidget.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -41,9 +47,29 @@ remoteGlobalIDString = 853F29612F4B50410092AD05; remoteInfo = Rosetta; }; + + LA000000B2F8D22220092AD05 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 853F295A2F4B50410092AD05 /* Project object */; + proxyType = 1; + remoteGlobalIDString = LA00000012F8D22220092AD05; + remoteInfo = RosettaLiveActivityWidget; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + + LA000000Z2F8D22220092AD05 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + LA00000092F8D22220092AD05 /* RosettaLiveActivityWidget.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; 249D2C5CD23DB96B22202215 /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -55,6 +81,17 @@ name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; + E20000052F8D11110092AD05 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + E20000062F8D11110092AD05 /* WebRTC.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -70,6 +107,12 @@ A182B0EDE5C68E7C6F1FB6D1 /* RosettaNotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = RosettaNotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; C9FC5C4F7E26FAFEC47C1D51 /* BehaviorParityFixtureTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BehaviorParityFixtureTests.swift; sourceTree = ""; }; DBAA4AD95B61886B5A22EF0D /* MigrationHarnessTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MigrationHarnessTests.swift; sourceTree = ""; }; + E20000042F8D11110092AD05 /* WebRTC.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = WebRTC.xcframework; path = Frameworks/WebRTC.xcframework; sourceTree = ""; }; + + LA00000022F8D22220092AD05 /* RosettaLiveActivityWidget.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = RosettaLiveActivityWidget.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + LA000000D2F8D22220092AD05 /* RosettaLiveActivityWidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RosettaLiveActivityWidgetBundle.swift; sourceTree = ""; }; + LA000000E2F8D22220092AD05 /* CallLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallLiveActivity.swift; sourceTree = ""; }; + LA000000F2F8D22220092AD05 /* CallActivityAttributes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallActivityAttributes.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ @@ -93,7 +136,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E20000032F8D11110092AD05 /* WebRTC in Frameworks */, + E20000032F8D11110092AD05 /* WebRTC.xcframework in Frameworks */, 85E887F72F6DC9460032774C /* GRDB in Frameworks */, 853F29992F4B63D20092AD05 /* Lottie in Frameworks */, 853F29A02F4B63D20092AD05 /* P256K in Frameworks */, @@ -111,6 +154,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + + LA00000042F8D22220092AD05 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -143,6 +194,7 @@ 95676C1A4D239B1FF9E73782 /* Frameworks */, BA35C0165A0371B32DD8B4C0 /* RosettaNotificationService */, 0D5BD0581AA976925F688CDA /* RosettaTests */, + LA000000C2F8D22220092AD05 /* RosettaLiveActivityWidget */, ); sourceTree = ""; }; @@ -151,6 +203,7 @@ children = ( 853F29622F4B50410092AD05 /* Rosetta.app */, A182B0EDE5C68E7C6F1FB6D1 /* RosettaNotificationService.appex */, + LA00000022F8D22220092AD05 /* RosettaLiveActivityWidget.appex */, 75BA8A97FE297E450BB1452E /* RosettaTests.xctest */, ); name = Products; @@ -160,6 +213,7 @@ isa = PBXGroup; children = ( 32A246700D4A2618B3F81039 /* iOS */, + E20000042F8D11110092AD05 /* WebRTC.xcframework */, ); name = Frameworks; sourceTree = ""; @@ -173,6 +227,17 @@ path = RosettaNotificationService; sourceTree = ""; }; + + LA000000C2F8D22220092AD05 /* RosettaLiveActivityWidget */ = { + isa = PBXGroup; + children = ( + LA000000D2F8D22220092AD05 /* RosettaLiveActivityWidgetBundle.swift */, + LA000000E2F8D22220092AD05 /* CallLiveActivity.swift */, + LA000000F2F8D22220092AD05 /* CallActivityAttributes.swift */, + ); + path = RosettaLiveActivityWidget; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -201,12 +266,15 @@ 853F295E2F4B50410092AD05 /* Sources */, 853F295F2F4B50410092AD05 /* Frameworks */, 853F29602F4B50410092AD05 /* Resources */, + E20000052F8D11110092AD05 /* Embed Frameworks */, 249D2C5CD23DB96B22202215 /* Embed Foundation Extensions */, + LA000000Z2F8D22220092AD05 /* Embed App Extensions */, ); buildRules = ( ); dependencies = ( 3323872B02212359E2291EE8 /* PBXTargetDependency */, + LA000000A2F8D22220092AD05 /* PBXTargetDependency */, ); fileSystemSynchronizedGroups = ( 853F29642F4B50410092AD05 /* Rosetta */, @@ -219,7 +287,6 @@ F1A000042F6F00010092AD05 /* FirebaseMessaging */, F1A000072F6F00010092AD05 /* FirebaseCrashlytics */, D1DB00022F8C00010092AD05 /* GRDB */, - E20000022F8D11110092AD05 /* WebRTC */, ); productName = Rosetta; productReference = 853F29622F4B50410092AD05 /* Rosetta.app */; @@ -242,6 +309,24 @@ productReference = A182B0EDE5C68E7C6F1FB6D1 /* RosettaNotificationService.appex */; productType = "com.apple.product-type.app-extension"; }; + + LA00000012F8D22220092AD05 /* RosettaLiveActivityWidget */ = { + isa = PBXNativeTarget; + buildConfigurationList = LA00000062F8D22220092AD05 /* Build configuration list for PBXNativeTarget "RosettaLiveActivityWidget" */; + buildPhases = ( + LA00000032F8D22220092AD05 /* Sources */, + LA00000042F8D22220092AD05 /* Frameworks */, + LA00000052F8D22220092AD05 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RosettaLiveActivityWidget; + productName = RosettaLiveActivityWidget; + productReference = LA00000022F8D22220092AD05 /* RosettaLiveActivityWidget.appex */; + productType = "com.apple.product-type.app-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -258,6 +343,9 @@ E47730762E9823BA2D02A197 = { CreatedOnToolsVersion = 26.2; }; + LA00000012F8D22220092AD05 = { + CreatedOnToolsVersion = 26.2; + }; }; }; buildConfigurationList = 853F295D2F4B50410092AD05 /* Build configuration list for PBXProject "Rosetta" */; @@ -274,7 +362,6 @@ 853F29A22F4B63D20092AD05 /* XCRemoteSwiftPackageReference "secp256k1.swift" */, F1A000052F6F00010092AD05 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, D1DB00012F8C00010092AD05 /* XCRemoteSwiftPackageReference "GRDB.swift" */, - E20000012F8D11110092AD05 /* XCRemoteSwiftPackageReference "WebRTC" */, ); preferredProjectObjectVersion = 77; productRefGroup = 853F29632F4B50410092AD05 /* Products */; @@ -283,6 +370,7 @@ targets = ( 853F29612F4B50410092AD05 /* Rosetta */, E47730762E9823BA2D02A197 /* RosettaNotificationService */, + LA00000012F8D22220092AD05 /* RosettaLiveActivityWidget */, 219188CF4FCBF8E8CF11BEC2 /* RosettaTests */, ); }; @@ -310,6 +398,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + + LA00000052F8D22220092AD05 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -341,6 +437,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + + LA00000032F8D22220092AD05 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + LA00000102F8D22220092AD05 /* RosettaLiveActivityWidgetBundle.swift in Sources */, + LA00000112F8D22220092AD05 /* CallLiveActivity.swift in Sources */, + LA00000122F8D22220092AD05 /* CallActivityAttributes.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -356,6 +463,12 @@ target = 853F29612F4B50410092AD05 /* Rosetta */; targetProxy = D1E9D598009C8306B116CA87 /* PBXContainerItemProxy */; }; + + LA000000A2F8D22220092AD05 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = LA00000012F8D22220092AD05 /* RosettaLiveActivityWidget */; + targetProxy = LA000000B2F8D22220092AD05 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -650,6 +763,61 @@ }; name = Release; }; + + LA00000072F8D22220092AD05 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_ENTITLEMENTS = RosettaLiveActivityWidget/RosettaLiveActivityWidget.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = QN8Z263QGX; + GENERATE_INFOPLIST_FILE = NO; + INFOPLIST_FILE = RosettaLiveActivityWidget/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rosetta.dev.LiveActivityWidget; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + LA00000082F8D22220092AD05 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_ENTITLEMENTS = RosettaLiveActivityWidget/RosettaLiveActivityWidget.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = QN8Z263QGX; + GENERATE_INFOPLIST_FILE = NO; + INFOPLIST_FILE = RosettaLiveActivityWidget/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rosetta.dev.LiveActivityWidget; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -689,6 +857,16 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; + + LA00000062F8D22220092AD05 /* Build configuration list for PBXNativeTarget "RosettaLiveActivityWidget" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + LA00000072F8D22220092AD05 /* Debug */, + LA00000082F8D22220092AD05 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -716,14 +894,6 @@ minimumVersion = 7.0.0; }; }; - E20000012F8D11110092AD05 /* XCRemoteSwiftPackageReference "WebRTC" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/stasel/WebRTC.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 146.0.0; - }; - }; F1A000052F6F00010092AD05 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/firebase/firebase-ios-sdk"; @@ -750,11 +920,6 @@ package = D1DB00012F8C00010092AD05 /* XCRemoteSwiftPackageReference "GRDB.swift" */; productName = GRDB; }; - E20000022F8D11110092AD05 /* WebRTC */ = { - isa = XCSwiftPackageProductDependency; - package = E20000012F8D11110092AD05 /* XCRemoteSwiftPackageReference "WebRTC" */; - productName = WebRTC; - }; F1A000022F6F00010092AD05 /* FirebaseAnalyticsWithoutAdIdSupport */ = { isa = XCSwiftPackageProductDependency; package = F1A000052F6F00010092AD05 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; diff --git a/Rosetta.xcodeproj/xcuserdata/gaidartimirbaev.xcuserdatad/xcschemes/xcschememanagement.plist b/Rosetta.xcodeproj/xcuserdata/gaidartimirbaev.xcuserdatad/xcschemes/xcschememanagement.plist index aced8e4..414c6b6 100644 --- a/Rosetta.xcodeproj/xcuserdata/gaidartimirbaev.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Rosetta.xcodeproj/xcuserdata/gaidartimirbaev.xcuserdatad/xcschemes/xcschememanagement.plist @@ -9,6 +9,11 @@ orderHint 0 + RosettaLiveActivityWidget.xcscheme_^#shared#^_ + + orderHint + 2 + RosettaNotificationService.xcscheme_^#shared#^_ orderHint diff --git a/Rosetta/Core/Crypto/WebRTCFrameCryptorBridge.mm b/Rosetta/Core/Crypto/WebRTCFrameCryptorBridge.mm index 27cba7b..7cf5ea8 100644 --- a/Rosetta/Core/Crypto/WebRTCFrameCryptorBridge.mm +++ b/Rosetta/Core/Crypto/WebRTCFrameCryptorBridge.mm @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include "NativeXChaCha20.hpp" @@ -201,6 +203,12 @@ namespace { constexpr std::size_t kSharedKeyLength = 32; constexpr std::size_t kNonceLength = 24; +constexpr int kDiagFrameLimit = 50; + +static os_log_t e2ee_log() { + static os_log_t log = os_log_create("com.rosetta.e2ee", "frame"); + return log; +} std::mutex gCryptorLock; std::unordered_map> gSenderEncryptors; @@ -222,76 +230,295 @@ std::string receiverMapKey(RTCRtpReceiver *receiver) { return "receiver@" + std::to_string(reinterpret_cast(receiver)); } -void fillNonceFromAdditionalData(std::array &nonce, - const std::uint8_t *additionalData, - std::size_t additionalDataLength) { - nonce.fill(0); +// MARK: - RTP helpers (ported from rosetta_e2ee.cpp) - if (additionalData == nullptr || additionalDataLength == 0) { - return; - } +struct ParsedRtpPacket { + std::size_t header_size = 0; + uint16_t sequence = 0; + uint32_t timestamp = 0; + uint32_t ssrc = 0; +}; - // Desktop path: additionalData is 8-byte big-endian timestamp. - if (additionalDataLength == 8) { - std::memcpy(nonce.data(), additionalData, 8); - return; - } +struct RtpProbeState { + bool locked = false; + bool has_probe = false; + uint32_t probe_ssrc = 0; + uint16_t probe_sequence = 0; + uint32_t probe_timestamp = 0; + uint32_t ssrc = 0; + uint16_t last_sequence = 0; + uint32_t last_timestamp = 0; +}; - // RTP fallback path: use RTP timestamp (bytes 4...7) when header version is valid. - if (additionalDataLength >= 12) { - const std::uint8_t version = (additionalData[0] >> 6U) & 0x03U; - if (version == 2) { - std::memcpy(nonce.data() + 4, additionalData + 4, 4); - return; - } - } +struct GeneratedTsState { + bool initialized = false; + uint32_t next_timestamp = 0; + uint32_t next_step = 960; +}; - // Last-resort path: copy first 8 bytes to nonce prefix. - const std::size_t copyCount = std::min(8, additionalDataLength); - std::memcpy(nonce.data(), additionalData, copyCount); +struct AdditionalTsState { + bool initialized = false; + uint64_t base_timestamp = 0; +}; + +inline uint16_t load16_be(const uint8_t *p) { + return (uint16_t)((uint16_t)p[0] << 8 | (uint16_t)p[1]); } -bool xorFramePayload(const std::uint8_t *input, - std::size_t inputLength, - const std::array &key, - const std::uint8_t *additionalData, - std::size_t additionalDataLength, - std::uint8_t *output, - std::size_t outputCapacity, - std::size_t *bytesWritten) { - if (input == nullptr || output == nullptr || bytesWritten == nullptr) { - return false; - } - if (outputCapacity < inputLength) { - return false; - } +inline uint32_t load32_be(const uint8_t *p) { + return (uint32_t)p[0] << 24 | (uint32_t)p[1] << 16 | (uint32_t)p[2] << 8 | (uint32_t)p[3]; +} - std::array nonce; - fillNonceFromAdditionalData(nonce, additionalData, additionalDataLength); +inline uint64_t load64_be(const uint8_t *p) { + return (uint64_t)p[0] << 56 | (uint64_t)p[1] << 48 | (uint64_t)p[2] << 40 | (uint64_t)p[3] << 32 | + (uint64_t)p[4] << 24 | (uint64_t)p[5] << 16 | (uint64_t)p[6] << 8 | (uint64_t)p[7]; +} - std::vector encrypted; - const bool ok = rosetta::nativecrypto::xchacha20_xor( - input, - inputLength, - key.data(), - nonce.data(), - encrypted - ); +inline void fill_nonce_from_ts32(uint32_t ts, uint8_t nonce[24]) { + nonce[4] = (uint8_t)(ts >> 24); + nonce[5] = (uint8_t)(ts >> 16); + nonce[6] = (uint8_t)(ts >> 8); + nonce[7] = (uint8_t)(ts); +} - if (!ok || encrypted.size() != inputLength) { - return false; +inline void fill_nonce_from_ts64(uint64_t ts, uint8_t nonce[24]) { + nonce[0] = (uint8_t)(ts >> 56); + nonce[1] = (uint8_t)(ts >> 48); + nonce[2] = (uint8_t)(ts >> 40); + nonce[3] = (uint8_t)(ts >> 32); + nonce[4] = (uint8_t)(ts >> 24); + nonce[5] = (uint8_t)(ts >> 16); + nonce[6] = (uint8_t)(ts >> 8); + nonce[7] = (uint8_t)(ts); +} + +bool parse_rtp_packet(const uint8_t *data, std::size_t len, ParsedRtpPacket *out) { + if (!data || !out || len < 12) return false; + const uint8_t version = (data[0] >> 6) & 0x03; + if (version != 2) return false; + const std::size_t csrc_count = (std::size_t)(data[0] & 0x0F); + const bool has_extension = (data[0] & 0x10) != 0; + std::size_t header = 12 + csrc_count * 4; + if (header > len) return false; + if (has_extension) { + if (len < header + 4) return false; + const uint16_t ext_len_words = (uint16_t)((uint16_t)data[header + 2] << 8 | (uint16_t)data[header + 3]); + header += 4 + (std::size_t)ext_len_words * 4; + if (header > len) return false; } - - if (inputLength > 0) { - std::memcpy(output, encrypted.data(), inputLength); - } - *bytesWritten = inputLength; + const std::size_t payload_size = len - header; + if (payload_size == 0 || payload_size > 1200) return false; + out->header_size = header; + out->sequence = load16_be(data + 2); + out->timestamp = load32_be(data + 4); + out->ssrc = load32_be(data + 8); return true; } +bool fill_nonce_from_rtp_frame(const uint8_t *data, std::size_t len, + RtpProbeState *state, uint8_t nonce[24], + std::size_t *header_size) { + if (!state) return false; + ParsedRtpPacket packet; + if (!parse_rtp_packet(data, len, &packet)) return false; + + if (!state->locked) { + if (!state->has_probe) { + state->has_probe = true; + state->probe_ssrc = packet.ssrc; + state->probe_sequence = packet.sequence; + state->probe_timestamp = packet.timestamp; + return false; + } + const bool same_ssrc = packet.ssrc == state->probe_ssrc; + const uint16_t seq_delta = (uint16_t)(packet.sequence - state->probe_sequence); + const bool sequence_progressed = seq_delta > 0 && seq_delta <= 10; + if (!same_ssrc || !sequence_progressed) { + state->probe_ssrc = packet.ssrc; + state->probe_sequence = packet.sequence; + state->probe_timestamp = packet.timestamp; + return false; + } + state->locked = true; + state->ssrc = packet.ssrc; + state->last_sequence = packet.sequence; + state->last_timestamp = packet.timestamp; + } else { + if (packet.ssrc != state->ssrc) { + state->locked = false; + state->has_probe = true; + state->probe_ssrc = packet.ssrc; + state->probe_sequence = packet.sequence; + state->probe_timestamp = packet.timestamp; + return false; + } + const uint16_t seq_delta = (uint16_t)(packet.sequence - state->last_sequence); + if (seq_delta != 0 && seq_delta <= 200) { + state->last_sequence = packet.sequence; + state->last_timestamp = packet.timestamp; + } else if (seq_delta != 0) { + state->locked = false; + state->has_probe = true; + state->probe_ssrc = packet.ssrc; + state->probe_sequence = packet.sequence; + state->probe_timestamp = packet.timestamp; + return false; + } + } + nonce[4] = (uint8_t)(packet.timestamp >> 24); + nonce[5] = (uint8_t)(packet.timestamp >> 16); + nonce[6] = (uint8_t)(packet.timestamp >> 8); + nonce[7] = (uint8_t)(packet.timestamp); + if (header_size) *header_size = packet.header_size; + return true; +} + +bool fill_nonce_from_additional_data(const uint8_t *data, std::size_t len, + uint8_t nonce[24], + bool *used_rtp_header, + AdditionalTsState *ts_state, + bool *used_relative_ts) { + if (used_rtp_header) *used_rtp_header = false; + if (used_relative_ts) *used_relative_ts = false; + if (!data || len < 8) return false; + + if (len == 8) { + uint64_t ts64 = load64_be(data); + uint64_t ts_rel = ts64; + if (ts_state != nullptr) { + if (!ts_state->initialized) { + ts_state->initialized = true; + ts_state->base_timestamp = ts64; + } else if (ts64 < ts_state->base_timestamp) { + ts_state->base_timestamp = ts64; + } + ts_rel = ts64 - ts_state->base_timestamp; + if (used_relative_ts) *used_relative_ts = true; + } + fill_nonce_from_ts64(ts_rel, nonce); + return true; + } + + if (len >= 12) { + const uint8_t version = (data[0] >> 6) & 0x03; + if (version == 2) { + uint32_t ts = load32_be(data + 4); + fill_nonce_from_ts32(ts, nonce); + if (used_rtp_header) *used_rtp_header = true; + return true; + } + } + + std::memcpy(nonce, data, std::min(8, len)); + return true; +} + +// MARK: - Opus plausibility checks (ported from rosetta_e2ee.cpp) + +uint32_t opus_base_frame_samples(uint8_t config) { + if (config <= 11) { + static const uint32_t kSilk[4] = {480, 960, 1920, 2880}; + return kSilk[config & 0x03]; + } + if (config <= 15) { + return (config & 0x01) ? 960 : 480; + } + static const uint32_t kCelt[4] = {120, 240, 480, 960}; + return kCelt[config & 0x03]; +} + +uint32_t infer_opus_packet_duration_samples(const uint8_t *packet, std::size_t len) { + if (!packet || len == 0) return 960; + const uint8_t toc = packet[0]; + const uint8_t config = (uint8_t)(toc >> 3); + const uint8_t frame_code = (uint8_t)(toc & 0x03); + uint32_t frame_count = 1; + if (frame_code == 1 || frame_code == 2) { + frame_count = 2; + } else if (frame_code == 3) { + if (len < 2) return 960; + frame_count = (uint32_t)(packet[1] & 0x3F); + if (frame_count == 0 || frame_count > 48) return 960; + } + uint32_t base = opus_base_frame_samples(config); + uint32_t total = base * frame_count; + if (total < 120 || total > 5760) return 960; + return total; +} + +bool decode_opus_frame_len(const uint8_t *packet, std::size_t len, + std::size_t *offset, std::size_t *frame_len) { + if (!packet || !offset || !frame_len) return false; + if (*offset >= len) return false; + const uint8_t b0 = packet[*offset]; + (*offset)++; + if (b0 < 252) { *frame_len = b0; return true; } + if (*offset >= len) return false; + const uint8_t b1 = packet[*offset]; + (*offset)++; + *frame_len = (std::size_t)b1 * 4u + (std::size_t)b0; + return true; +} + +bool is_plausible_opus_packet(const uint8_t *packet, std::size_t len) { + if (!packet || len == 0 || len > 2000) return false; + const uint8_t toc = packet[0]; + const uint8_t config = (uint8_t)(toc >> 3); + if (config > 31) return false; + const uint8_t frame_code = (uint8_t)(toc & 0x03); + const std::size_t payload_len = len - 1; + if (frame_code == 0) return payload_len >= 1; + if (frame_code == 1) { if (payload_len < 2) return false; return (payload_len % 2) == 0; } + if (frame_code == 2) { + std::size_t off = 1; + std::size_t len1 = 0; + if (!decode_opus_frame_len(packet, len, &off, &len1)) return false; + if (len1 == 0) return false; + if (off + len1 >= len) return false; + return (len - off - len1) > 0; + } + if (len < 2) return false; + const uint8_t ch = packet[1]; + const bool has_padding = (ch & 0x40) != 0; + const uint8_t frame_count = (uint8_t)(ch & 0x3F); + if (frame_count == 0 || frame_count > 48) return false; + uint32_t total = opus_base_frame_samples(config) * (uint32_t)frame_count; + if (total > 5760) return false; + if (has_padding) return false; + const bool vbr = (ch & 0x80) != 0; + if (!vbr) { + const std::size_t data_len = len - 2; + if (data_len < (std::size_t)frame_count) return false; + return (data_len % frame_count) == 0; + } + std::size_t off = 2; + std::size_t consumed = 0; + for (std::size_t i = 0; i + 1 < frame_count; ++i) { + std::size_t flen = 0; + if (!decode_opus_frame_len(packet, len, &off, &flen)) return false; + if (flen == 0) return false; + consumed += flen; + if (off + consumed >= len) return false; + } + return (len - off) > consumed; +} + +bool is_plausible_decrypted_audio_frame(const uint8_t *data, std::size_t len) { + if (!data || len == 0) return false; + ParsedRtpPacket packet; + if (parse_rtp_packet(data, len, &packet) && packet.header_size < len) { + return is_plausible_opus_packet(data + packet.header_size, len - packet.header_size); + } + return is_plausible_opus_packet(data, len); +} + +// MARK: - Encryptor (Android-parity with multi-strategy nonce) + class RosettaFrameEncryptor final : public webrtc::FrameEncryptorInterface { public: - explicit RosettaFrameEncryptor(const std::array &key) : key_(key) {} + explicit RosettaFrameEncryptor(const std::array &key) { + std::memcpy(key_.data(), key.data(), kSharedKeyLength); + } int Encrypt(cricket::MediaType media_type, uint32_t ssrc, @@ -301,18 +528,60 @@ public: std::size_t *bytes_written) override { (void)media_type; (void)ssrc; - if (xorFramePayload( - frame.data(), - frame.size(), - key_, - additional_data.data(), - additional_data.size(), - encrypted_frame.data(), - encrypted_frame.size(), - bytes_written)) { - return 0; + + if (frame.size() == 0 || encrypted_frame.size() < frame.size()) { + *bytes_written = 0; + return -1; } - return 1; + + uint8_t nonce[24] = {0}; + bool ad_was_rtp = false; + const char *mode = "zero"; + + // Strategy 1: additional_data (Desktop-compatible 8-byte timestamp). + // After custom WebRTC build with E2EE patch, ad=8 on every frame. + bool has_nonce = fill_nonce_from_additional_data( + additional_data.data(), additional_data.size(), + nonce, &ad_was_rtp, nullptr, nullptr); + if (has_nonce) { + mode = ad_was_rtp ? "ad-rtp" : "raw-abs"; + } + + // Strategy 2: RTP header in frame payload + if (!has_nonce) { + std::size_t header_size = 0; + has_nonce = fill_nonce_from_rtp_frame( + frame.data(), frame.size(), &rtp_probe_, nonce, &header_size); + if (has_nonce) { + mode = "rtp"; + } + } + + // Strategy 3: nonce stays zero (fallback for unpatched WebRTC builds). + // Both sender and receiver will use nonce=0 symmetrically. + + // Always encrypt — E2EE is mandatory for all call frames. + std::vector encrypted; + const bool ok = rosetta::nativecrypto::xchacha20_xor( + frame.data(), frame.size(), key_.data(), nonce, encrypted); + if (!ok || encrypted.size() != frame.size()) { + *bytes_written = 0; + return 1; + } + std::memcpy(encrypted_frame.data(), encrypted.data(), frame.size()); + *bytes_written = frame.size(); + + // Diagnostic log for first N frames + int n = diag_count_.fetch_add(1, std::memory_order_relaxed); + if (n < kDiagFrameLimit) { + os_log_info(e2ee_log(), + "ENC frame#%d sz=%zu ad=%zu mode=%s nonce=[%02x%02x%02x%02x%02x%02x%02x%02x]", + n, frame.size(), additional_data.size(), mode, + nonce[0], nonce[1], nonce[2], nonce[3], + nonce[4], nonce[5], nonce[6], nonce[7]); + } + + return 0; } std::size_t GetMaxCiphertextByteSize(cricket::MediaType media_type, std::size_t frame_size) override { @@ -335,12 +604,18 @@ public: private: mutable std::atomic refCount_{0}; + mutable std::atomic diag_count_{0}; std::array key_; + mutable RtpProbeState rtp_probe_; }; +// MARK: - Decryptor (with plausibility checks when timestamp available) + class RosettaFrameDecryptor final : public webrtc::FrameDecryptorInterface { public: - explicit RosettaFrameDecryptor(const std::array &key) : key_(key) {} + explicit RosettaFrameDecryptor(const std::array &key) { + std::memcpy(key_.data(), key.data(), kSharedKeyLength); + } Result Decrypt(cricket::MediaType media_type, const std::vector &csrcs, @@ -350,19 +625,88 @@ public: (void)media_type; (void)csrcs; - std::size_t bytesWritten = 0; - if (xorFramePayload( - encrypted_frame.data(), - encrypted_frame.size(), - key_, - additional_data.data(), - additional_data.size(), - frame.data(), - frame.size(), - &bytesWritten)) { - return Result(Result::Status::kOk, bytesWritten); + if (encrypted_frame.size() == 0 || frame.size() < encrypted_frame.size()) { + return Result(Result::Status::kFailedToDecrypt, 0); } - return Result(Result::Status::kFailedToDecrypt, 0); + + uint8_t nonce[24] = {0}; + bool ad_was_rtp = false; + const char *mode = "zero"; + bool plausible = true; + + // Strategy 1: additional_data (Desktop-compatible 8-byte timestamp). + // After custom WebRTC build with E2EE patch, ad=8 on every frame. + bool has_nonce = fill_nonce_from_additional_data( + additional_data.data(), additional_data.size(), + nonce, &ad_was_rtp, nullptr, nullptr); + if (has_nonce) { + mode = ad_was_rtp ? "ad-rtp" : "raw-abs"; + } + + // Strategy 2: RTP header in encrypted frame + if (!has_nonce) { + std::size_t header_size = 0; + has_nonce = fill_nonce_from_rtp_frame( + encrypted_frame.data(), encrypted_frame.size(), + &rtp_probe_, nonce, &header_size); + if (has_nonce) { + mode = "rtp"; + } + } + + // Strategy 3: nonce stays zero (fallback for unpatched WebRTC builds). + + // Always decrypt — E2EE is mandatory for all call frames. + std::vector decrypted; + rosetta::nativecrypto::xchacha20_xor( + encrypted_frame.data(), encrypted_frame.size(), + key_.data(), nonce, decrypted); + if (decrypted.size() != encrypted_frame.size()) { + return Result(Result::Status::kFailedToDecrypt, 0); + } + std::memcpy(frame.data(), decrypted.data(), encrypted_frame.size()); + + plausible = is_plausible_decrypted_audio_frame(frame.data(), encrypted_frame.size()); + + // Fallback: try relative timestamp (when ad=8 but base differs) + if (!plausible && has_nonce && additional_data.size() == 8 && !ad_was_rtp) { + uint8_t nonce_rel[24] = {0}; + bool rel_used = false; + if (fill_nonce_from_additional_data( + additional_data.data(), additional_data.size(), + nonce_rel, nullptr, &additional_rel_ts_state_, &rel_used) && rel_used) { + std::vector candidate; + rosetta::nativecrypto::xchacha20_xor( + encrypted_frame.data(), encrypted_frame.size(), + key_.data(), nonce_rel, candidate); + if (is_plausible_decrypted_audio_frame(candidate.data(), candidate.size())) { + std::memcpy(frame.data(), candidate.data(), candidate.size()); + std::memcpy(nonce, nonce_rel, sizeof(nonce)); + plausible = true; + mode = "raw-rel-fb"; + } + } + } + + // Passthrough: peer sent unencrypted frames (raw Opus) + if (!plausible && has_nonce && + is_plausible_decrypted_audio_frame(encrypted_frame.data(), encrypted_frame.size())) { + std::memcpy(frame.data(), encrypted_frame.data(), encrypted_frame.size()); + plausible = true; + mode = "passthrough"; + } + + int n = diag_count_.fetch_add(1, std::memory_order_relaxed); + if (n < kDiagFrameLimit) { + os_log_info(e2ee_log(), + "DEC frame#%d sz=%zu ad=%zu mode=%s ok=%d nonce=[%02x%02x%02x%02x%02x%02x%02x%02x]", + n, encrypted_frame.size(), additional_data.size(), mode, + plausible ? 1 : 0, + nonce[0], nonce[1], nonce[2], nonce[3], + nonce[4], nonce[5], nonce[6], nonce[7]); + } + + return Result(Result::Status::kOk, encrypted_frame.size()); } std::size_t GetMaxPlaintextByteSize(cricket::MediaType media_type, @@ -386,9 +730,14 @@ public: private: mutable std::atomic refCount_{0}; + mutable std::atomic diag_count_{0}; std::array key_; + mutable RtpProbeState rtp_probe_; + mutable AdditionalTsState additional_rel_ts_state_; }; +// MARK: - Key normalization + std::array normalizeSharedKey(NSData *sharedKey) { std::array key{}; if (sharedKey.length == 0 || sharedKey.bytes == nullptr) { diff --git a/Rosetta/Core/Data/Repositories/MessageRepository.swift b/Rosetta/Core/Data/Repositories/MessageRepository.swift index 656cdad..49e6151 100644 --- a/Rosetta/Core/Data/Repositories/MessageRepository.swift +++ b/Rosetta/Core/Data/Repositories/MessageRepository.swift @@ -787,6 +787,18 @@ final class MessageRepository: ObservableObject { } } + /// Force-refresh cache for a specific dialog (bypasses debounce + activeDialogs guard). + /// Used when a message is inserted programmatically (e.g., call attachment) and must + /// appear immediately regardless of dialog active state. + func refreshDialogCache(for opponentKey: String) { + let messages = loadMessagesFromDB(dialogKey: opponentKey, limit: nil) + if messages.count > Self.maxCacheSize { + messagesByDialog[opponentKey] = Array(messages.suffix(Self.maxCacheSize)) + } else { + messagesByDialog[opponentKey] = messages + } + } + /// Immediately refresh all pending dialog caches. private func flushPendingCacheRefreshes() { let pending = pendingCacheRefresh diff --git a/Rosetta/Core/Layout/MessageCellLayout.swift b/Rosetta/Core/Layout/MessageCellLayout.swift index 1e1cac4..adbc6e0 100644 --- a/Rosetta/Core/Layout/MessageCellLayout.swift +++ b/Rosetta/Core/Layout/MessageCellLayout.swift @@ -282,9 +282,9 @@ extension MessageCellLayout { let replyH: CGFloat = config.hasReplyQuote ? 46 : 0 var photoH: CGFloat = 0 let forwardHeaderH: CGFloat = config.isForward ? 40 : 0 - let fileH: CGFloat = CGFloat(config.fileCount) * 56 - + CGFloat(config.callCount) * 60 - + CGFloat(config.avatarCount) * 72 + var fileH: CGFloat = CGFloat(config.fileCount) * 52 + + CGFloat(config.callCount) * 42 + + CGFloat(config.avatarCount) * 52 // Tiny floor just to prevent zero-width collapse. // Telegram does NOT force a large minW — short messages get tight bubbles. @@ -294,6 +294,7 @@ extension MessageCellLayout { var bubbleW: CGFloat var bubbleH: CGFloat = replyH + forwardHeaderH + fileH + var fileOnlyTsPad: CGFloat = 0 // symmetric bottom inset for file-only bubbles if config.imageCount > 0 { // Telegram-exact photo sizing (ChatMessageInteractiveMediaNode.swift): @@ -371,15 +372,25 @@ extension MessageCellLayout { bubbleW = leftPad + finalContentW + rightPad bubbleW = max(minW, min(bubbleW, effectiveMaxBubbleWidth)) // File/call/avatar with text: ensure min width for icon+text layout - if fileH > 0 { bubbleW = max(bubbleW, min(240, effectiveMaxBubbleWidth)) } + let fileMinW: CGFloat = config.callCount > 0 ? 200 : 220 + if fileH > 0 { bubbleW = max(bubbleW, min(fileMinW, effectiveMaxBubbleWidth)) } bubbleH += topPad + textMeasurement.size.height + bottomPad } else if fileH > 0 { - // File / Call / Avatar — needs wide bubble for icon + text + metadata - // Telegram file min: ~240pt (icon 44 + spacing + filename + insets) - bubbleW = min(240, effectiveMaxBubbleWidth) + // Telegram: call width = title + button(54) + insets ≈ 200pt + // Telegram: file width = icon(55) + filename + insets ≈ 220pt + let fileMinW: CGFloat = config.callCount > 0 ? 200 : 220 + bubbleW = min(fileMinW, effectiveMaxBubbleWidth) bubbleW = max(bubbleW, leftPad + metadataWidth + rightPad) - // Add space for timestamp row below file content - bubbleH += bottomPad + tsSize.height + 2 + // Symmetric centering: content + gap + timestamp block centered in bubble. + // Content is centered within fileContainer (in layoutSubviews) above the timestamp. + // To achieve visual symmetry, fileH spans the ENTIRE bubble + // and metadataBottomInset = (fileH - contentH) / 2 (same as content topY). + let tsGap: CGFloat = 6 + let contentH: CGFloat = config.callCount > 0 ? 36 : 44 + let tsPad = ceil((fileH + tsGap - contentH) / 2) + fileOnlyTsPad = tsPad + bubbleH += tsGap + tsSize.height + tsPad + fileH = bubbleH // fileContainer spans entire bubble } else { // No text, no file (forward header only, empty) bubbleW = leftPad + metadataWidth + rightPad @@ -421,7 +432,14 @@ extension MessageCellLayout { // Telegram: pill bottom = statusEndY + mediaStatusInsets.bottom(2). // Photo bottom = bubbleH - 2. Gap = 6pt → pill bottom = bubbleH - 8. // → statusEndY = bubbleH - 10 → metadataBottomInset = 10. - let metadataBottomInset: CGFloat = (messageType == .photo) ? 10 : bottomPad + let metadataBottomInset: CGFloat + if messageType == .photo { + metadataBottomInset = 10 + } else if messageType == .file && config.text.isEmpty { + metadataBottomInset = fileOnlyTsPad + } else { + metadataBottomInset = bottomPad + } let statusEndX = bubbleW - metadataRightInset let statusEndY = bubbleH - metadataBottomInset let statusVerticalOffset: CGFloat = isTextMessage diff --git a/Rosetta/Core/Services/CallActivityAttributes.swift b/Rosetta/Core/Services/CallActivityAttributes.swift new file mode 100644 index 0000000..d36b243 --- /dev/null +++ b/Rosetta/Core/Services/CallActivityAttributes.swift @@ -0,0 +1,15 @@ +import ActivityKit +import Foundation + +struct CallActivityAttributes: ActivityAttributes { + /// Fixed data set when the activity starts. + let peerName: String + let peerPublicKey: String + + /// Dynamic state updated during the call. + struct ContentState: Codable, Hashable { + let durationSec: Int + let isActive: Bool + let isMuted: Bool + } +} diff --git a/Rosetta/Core/Services/CallManager+Runtime.swift b/Rosetta/Core/Services/CallManager+Runtime.swift index 827b589..cc42543 100644 --- a/Rosetta/Core/Services/CallManager+Runtime.swift +++ b/Rosetta/Core/Services/CallManager+Runtime.swift @@ -83,6 +83,7 @@ extension CallManager { func finishCall(reason: String?, notifyPeer: Bool) { cancelRingTimeout() + endLiveActivity() let wasActive = uiState.phase == .active if wasActive { CallSoundManager.shared.playEndCall() @@ -105,13 +106,16 @@ extension CallManager { if role == .caller, snapshot.peerPublicKey.isEmpty == false { let duration = max(snapshot.durationSec, 0) + let peerKey = snapshot.peerPublicKey Task { @MainActor in try? await SessionManager.shared.sendCallAttachment( - toPublicKey: snapshot.peerPublicKey, + toPublicKey: peerKey, durationSec: duration, opponentTitle: snapshot.peerTitle, opponentUsername: snapshot.peerUsername ) + // Force immediate cache refresh so call attachment appears in chat + MessageRepository.shared.refreshDialogCache(for: peerKey) } } @@ -186,6 +190,9 @@ extension CallManager { guard let self else { return } guard self.uiState.phase == .active else { return } self.uiState.durationSec += 1 + if self.uiState.durationSec % 2 == 0 { + self.updateLiveActivity() + } } } } @@ -240,6 +247,7 @@ extension CallManager { try session.setActive(true) applyAudioOutputRouting() UIDevice.current.isProximityMonitoringEnabled = true + print("[Call] AudioSession configured: category=\(session.category.rawValue) mode=\(session.mode.rawValue) sampleRate=\(session.sampleRate) outputs=\(session.currentRoute.outputs.map { "\($0.portName)(\($0.portType.rawValue))" }) inputs=\(session.currentRoute.inputs.map { "\($0.portName)(\($0.portType.rawValue))" })") } func deactivateAudioSession() { @@ -396,9 +404,10 @@ extension CallManager: RTCPeerConnectionDelegate { nonisolated func peerConnection(_ peerConnection: RTCPeerConnection, didChange stateChanged: RTCSignalingState) {} nonisolated func peerConnection(_ peerConnection: RTCPeerConnection, didAdd stream: RTCMediaStream) { Task { @MainActor in + print("[Call] Remote stream added: \(stream.streamId), audioTracks=\(stream.audioTracks.count), videoTracks=\(stream.videoTracks.count)") for audioTrack in stream.audioTracks { - // Speaker routing must not mute the remote track. audioTrack.isEnabled = true + print("[Call] Remote audio track: \(audioTrack.trackId), enabled=\(audioTrack.isEnabled), state=\(audioTrack.readyState.rawValue)") } } } @@ -419,8 +428,27 @@ extension CallManager: RTCPeerConnectionDelegate { nonisolated func peerConnection(_ peerConnection: RTCPeerConnection, didOpen dataChannel: RTCDataChannel) {} nonisolated func peerConnection(_ peerConnection: RTCPeerConnection, didChange newState: RTCPeerConnectionState) { + print("[Call] PeerConnection state: \(newState.rawValue)") if newState == .connected { - Task { @MainActor in self.setCallActiveIfNeeded() } + Task { @MainActor in + self.setCallActiveIfNeeded() + // Log audio state + let localEnabled = self.localAudioTrack?.isEnabled ?? false + let senderCount = peerConnection.senders.count + let receiverCount = peerConnection.receivers.count + let transceiverCount = peerConnection.transceivers.count + print("[Call] CONNECTED — localAudio=\(localEnabled), senders=\(senderCount), receivers=\(receiverCount), transceivers=\(transceiverCount)") + for (i, t) in peerConnection.transceivers.enumerated() { + let dir = t.direction.rawValue + let hasSender = t.sender.track != nil + let hasReceiver = t.receiver.track != nil + let recvEnabled = t.receiver.track?.isEnabled ?? false + print("[Call] Transceiver[\(i)]: dir=\(dir) hasSender=\(hasSender) hasReceiver=\(hasReceiver) recvEnabled=\(recvEnabled)") + } + // Log audio session + let session = AVAudioSession.sharedInstance() + print("[Call] AudioSession: category=\(session.category.rawValue) mode=\(session.mode.rawValue) route.outputs=\(session.currentRoute.outputs.map { $0.portName })") + } return } if newState == .failed || newState == .closed || newState == .disconnected { @@ -432,6 +460,8 @@ extension CallManager: RTCPeerConnectionDelegate { guard let receiver = transceiver.receiver as RTCRtpReceiver? else { return } Task { @MainActor in receiver.track?.isEnabled = true + let trackKind = transceiver.mediaType == .audio ? "audio" : "video" + print("[Call] didStartReceivingOn: \(trackKind), receiverId=\(receiver.receiverId), trackEnabled=\(receiver.track?.isEnabled ?? false)") self.attachReceiverCryptor(receiver) } } diff --git a/Rosetta/Core/Services/CallManager.swift b/Rosetta/Core/Services/CallManager.swift index cd20baf..f74c611 100644 --- a/Rosetta/Core/Services/CallManager.swift +++ b/Rosetta/Core/Services/CallManager.swift @@ -1,3 +1,4 @@ +import ActivityKit import AVFAudio import Combine import CryptoKit @@ -37,6 +38,7 @@ final class CallManager: NSObject, ObservableObject { var durationTask: Task? var ringTimeoutTask: Task? + var liveActivity: Activity? private override init() { super.init() @@ -82,6 +84,7 @@ final class CallManager: NSObject, ObservableObject { ) CallSoundManager.shared.playCalling() startRingTimeout() + startLiveActivity() return .started } @@ -128,12 +131,16 @@ final class CallManager: NSObject, ObservableObject { let nextMuted = !uiState.isMuted uiState.isMuted = nextMuted localAudioTrack?.isEnabled = !nextMuted + updateLiveActivity() + print("[Call] toggleMute: isMuted=\(nextMuted), trackEnabled=\(localAudioTrack?.isEnabled ?? false), trackState=\(localAudioTrack?.readyState.rawValue ?? -1)") } func toggleSpeaker() { let nextSpeaker = !uiState.isSpeakerOn uiState.isSpeakerOn = nextSpeaker applyAudioOutputRouting() + let route = AVAudioSession.sharedInstance().currentRoute + print("[Call] toggleSpeaker: isSpeakerOn=\(nextSpeaker), outputs=\(route.outputs.map { $0.portName })") } // MARK: - Protocol handlers @@ -196,6 +203,7 @@ final class CallManager: NSObject, ObservableObject { hydratePeerIdentity(for: incomingPeer) CallSoundManager.shared.playRingtone() startRingTimeout() + startLiveActivity() case .keyExchange: handleKeyExchange(packet) case .createRoom: @@ -289,6 +297,7 @@ final class CallManager: NSObject, ObservableObject { cancelRingTimeout() CallSoundManager.shared.playConnected() startDurationTimerIfNeeded() + updateLiveActivity() } func startRingTimeout() { @@ -313,6 +322,62 @@ final class CallManager: NSObject, ObservableObject { ringTimeoutTask = nil } + // MARK: - Live Activity + + func startLiveActivity() { + let authInfo = ActivityAuthorizationInfo() + print("[Call] LiveActivity: areActivitiesEnabled=\(authInfo.areActivitiesEnabled), frequentPushesEnabled=\(authInfo.frequentPushesEnabled)") + guard authInfo.areActivitiesEnabled else { + print("[Call] LiveActivity DISABLED by user settings") + return + } + let attributes = CallActivityAttributes( + peerName: uiState.displayName, + peerPublicKey: uiState.peerPublicKey + ) + let state = CallActivityAttributes.ContentState( + durationSec: uiState.durationSec, + isActive: uiState.phase == .active, + isMuted: uiState.isMuted + ) + print("[Call] LiveActivity starting: peerName=\(uiState.displayName), isActive=\(uiState.phase == .active)") + do { + liveActivity = try Activity.request( + attributes: attributes, + content: .init(state: state, staleDate: nil), + pushType: nil + ) + print("[Call] LiveActivity started: id=\(liveActivity?.id ?? "nil"), state=\(String(describing: liveActivity?.activityState))") + } catch { + print("[Call] LiveActivity FAILED: \(error)") + } + } + + func updateLiveActivity() { + guard let liveActivity, liveActivity.activityState == .active else { return } + let state = CallActivityAttributes.ContentState( + durationSec: uiState.durationSec, + isActive: uiState.phase == .active, + isMuted: uiState.isMuted + ) + Task { + await liveActivity.update(.init(state: state, staleDate: nil)) + } + } + + func endLiveActivity() { + guard let liveActivity else { return } + let finalState = CallActivityAttributes.ContentState( + durationSec: uiState.durationSec, + isActive: false, + isMuted: false + ) + Task { + await liveActivity.end(.init(state: finalState, staleDate: nil), dismissalPolicy: .immediate) + } + self.liveActivity = nil + } + func attachReceiverCryptor(_ receiver: RTCRtpReceiver) { guard let sharedKey, sharedKey.count >= CallMediaCrypto.keyLength else { return } guard attachedReceiverIds.contains(receiver.receiverId) == false else { return } diff --git a/Rosetta/Core/Services/CallSoundManager.swift b/Rosetta/Core/Services/CallSoundManager.swift index 3d1efa9..fe93752 100644 --- a/Rosetta/Core/Services/CallSoundManager.swift +++ b/Rosetta/Core/Services/CallSoundManager.swift @@ -51,9 +51,15 @@ final class CallSoundManager { private func configureForRingtone() { let session = AVAudioSession.sharedInstance() - // Use .playback so ringtone/calling sounds play through speaker - // even if phone is on silent mode. WebRTC will reconfigure later. - try? session.setCategory(.playback, mode: .default, options: []) + // Use .playAndRecord so iOS keeps the audio session active in background + // (requires UIBackgroundModes: audio in Info.plist). + // .defaultToSpeaker routes ringtone through speaker. + // WebRTC will reconfigure the session later when call connects. + try? session.setCategory( + .playAndRecord, + mode: .default, + options: [.defaultToSpeaker, .mixWithOthers] + ) try? session.setActive(true) } diff --git a/Rosetta/Features/Chats/ChatDetail/MessageCallView.swift b/Rosetta/Features/Chats/ChatDetail/MessageCallView.swift index 11f6912..0c6d243 100644 --- a/Rosetta/Features/Chats/ChatDetail/MessageCallView.swift +++ b/Rosetta/Features/Chats/ChatDetail/MessageCallView.swift @@ -5,9 +5,7 @@ import SwiftUI /// Displays a call attachment inside a message bubble. /// /// Telegram iOS parity: `ChatMessageCallBubbleContentNode.swift` -/// — title (16pt medium), directional arrow, duration, call-back button. -/// -/// Desktop parity: `MessageCall.tsx` — phone icon, direction label, duration "M:SS". +/// — NO icon circle on left, title at left edge, arrow + duration below, phone icon right. /// /// Preview format: duration seconds as plain int (0 = missed/rejected). struct MessageCallView: View { @@ -20,59 +18,44 @@ struct MessageCallView: View { var body: some View { HStack(spacing: 0) { - // Left: icon + info - HStack(spacing: 10) { - // Call icon circle (44×44 — Telegram parity) - ZStack { - Circle() - .fill(iconBackgroundColor) - .frame(width: 44, height: 44) + // Left: title + arrow/duration — Telegram: NO icon circle + VStack(alignment: .leading, spacing: 2) { + Text(titleText) + .font(.system(size: 16, weight: .medium)) + .foregroundStyle(outgoing ? .white : RosettaColors.Adaptive.text) - Image(systemName: iconName) - .font(.system(size: 20, weight: .medium)) - .foregroundStyle(.white) - } + HStack(spacing: 4) { + Image(systemName: arrowIconName) + .font(.system(size: 10, weight: .bold)) + .foregroundStyle(arrowColor) - // Call metadata - VStack(alignment: .leading, spacing: 2) { - Text(titleText) - .font(.system(size: 16, weight: .medium)) - .foregroundStyle(.white) - - // Status line with directional arrow - HStack(spacing: 4) { - Image(systemName: arrowIconName) - .font(.system(size: 10, weight: .bold)) - .foregroundStyle(arrowColor) - - Text(subtitleText) - .font(.system(size: 13).monospacedDigit()) - .foregroundStyle(.white.opacity(0.6)) - } + Text(subtitleText) + .font(.system(size: 13)) + .foregroundStyle( + isMissedOrRejected + ? Color(hex: 0xFF4747) + : (outgoing ? .white.opacity(0.6) : RosettaColors.Adaptive.textSecondary) + ) } } Spacer(minLength: 8) - // Right: call-back button + // Right: phone icon only — Telegram: NO circle background Button { let peerKey = outgoing ? message.toPublicKey : message.fromPublicKey actions.onCall(peerKey) } label: { - ZStack { - Circle() - .fill(Color(hex: 0x248AE6).opacity(0.3)) - .frame(width: 44, height: 44) - - Image(systemName: "phone.fill") - .font(.system(size: 18)) - .foregroundStyle(Color(hex: 0x248AE6)) - } + Image(systemName: "phone.fill") + .font(.system(size: 22)) + .foregroundStyle(outgoing ? .white : Color(hex: 0x248AE6)) + .frame(width: 36, height: 36) } .buttonStyle(.plain) } - .padding(.horizontal, 10) - .padding(.vertical, 8) + .padding(.leading, 11) + .padding(.trailing, 10) + .padding(.vertical, 6) } // MARK: - Computed Properties @@ -98,27 +81,13 @@ struct MessageCallView: View { private var subtitleText: String { if isMissedOrRejected { - return "Call was not answered" + return "Declined" } let minutes = durationSeconds / 60 let seconds = durationSeconds % 60 return String(format: "%d:%02d", minutes, seconds) } - private var iconName: String { - if isMissedOrRejected { - return "phone.down.fill" - } - return isIncoming ? "phone.arrow.down.left.fill" : "phone.arrow.up.right.fill" - } - - private var iconBackgroundColor: Color { - if isMissedOrRejected { - return Color(hex: 0xFF4747).opacity(0.85) - } - return Color.white.opacity(0.2) - } - private var arrowIconName: String { isIncoming ? "arrow.down.left" : "arrow.up.right" } diff --git a/Rosetta/Features/Chats/ChatDetail/MessageFileView.swift b/Rosetta/Features/Chats/ChatDetail/MessageFileView.swift index 7077885..fff3000 100644 --- a/Rosetta/Features/Chats/ChatDetail/MessageFileView.swift +++ b/Rosetta/Features/Chats/ChatDetail/MessageFileView.swift @@ -71,7 +71,6 @@ struct MessageFileView: View { } .padding(.horizontal, 10) .padding(.vertical, 8) - .frame(width: 220) .contentShape(Rectangle()) .task { checkCache() diff --git a/Rosetta/Features/Chats/ChatDetail/NativeMessageCell.swift b/Rosetta/Features/Chats/ChatDetail/NativeMessageCell.swift index b6bde7f..5bdd3d1 100644 --- a/Rosetta/Features/Chats/ChatDetail/NativeMessageCell.swift +++ b/Rosetta/Features/Chats/ChatDetail/NativeMessageCell.swift @@ -301,18 +301,12 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel callArrowView.isHidden = true fileContainer.addSubview(callArrowView) - // Call-back button (phone icon on right side) - let callCircle = UIView() - callCircle.backgroundColor = UIColor(red: 0.14, green: 0.54, blue: 0.90, alpha: 0.3) // #248AE6 @ 0.3 - callCircle.layer.cornerRadius = 22 - callCircle.isUserInteractionEnabled = false - callCircle.tag = 2001 - callBackButton.addSubview(callCircle) + // Call-back button — Telegram: just a phone icon, NO circle background let callPhoneIcon = UIImageView( image: UIImage(systemName: "phone.fill", - withConfiguration: UIImage.SymbolConfiguration(pointSize: 18, weight: .medium)) + withConfiguration: UIImage.SymbolConfiguration(pointSize: 22, weight: .regular)) ) - callPhoneIcon.tintColor = UIColor(red: 0.14, green: 0.54, blue: 0.90, alpha: 1) // #248AE6 + callPhoneIcon.tintColor = .white callPhoneIcon.contentMode = .center callPhoneIcon.tag = 2002 callBackButton.addSubview(callPhoneIcon) @@ -320,6 +314,11 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel callBackButton.isHidden = true fileContainer.addSubview(callBackButton) + // Tap on entire file container — triggers call-back for call bubbles + let fileTap = UITapGestureRecognizer(target: self, action: #selector(fileContainerTapped)) + fileContainer.addGestureRecognizer(fileTap) + fileContainer.isUserInteractionEnabled = true + // Avatar image (circular, replaces icon for avatar type) avatarImageView.contentMode = .scaleAspectFill avatarImageView.clipsToBounds = true @@ -329,6 +328,12 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel bubbleView.addSubview(fileContainer) + // Listen for avatar download trigger (tap-to-download, Android parity) + NotificationCenter.default.addObserver( + self, selector: #selector(handleAttachmentDownload(_:)), + name: .triggerAttachmentDownload, object: nil + ) + // Forward header forwardLabel.font = Self.forwardLabelFont forwardLabel.text = "Forwarded message" @@ -478,23 +483,10 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel let isOutgoing = currentLayout?.isOutgoing ?? false let isMissed = durationSec == 0 let isIncoming = !isOutgoing - avatarImageView.isHidden = true - fileIconView.isHidden = false - // Icon - if isMissed { - fileIconView.backgroundColor = UIColor(red: 1.0, green: 0.28, blue: 0.28, alpha: 0.85) - fileIconSymbolView.image = UIImage( - systemName: "phone.down.fill", - withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .medium) - ) - } else { - fileIconView.backgroundColor = UIColor.white.withAlphaComponent(0.2) - fileIconSymbolView.image = UIImage( - systemName: isOutgoing ? "phone.arrow.up.right.fill" : "phone.arrow.down.left.fill", - withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .medium) - ) - } + // Telegram: call bubbles have NO icon circle on the left + avatarImageView.isHidden = true + fileIconView.isHidden = true // Title (16pt medium — Telegram parity) fileNameLabel.font = UIFont.systemFont(ofSize: 16, weight: .medium) @@ -506,10 +498,10 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel // Duration with arrow if isMissed { - fileSizeLabel.text = "Call was not answered" + fileSizeLabel.text = "Declined" fileSizeLabel.textColor = UIColor(red: 1.0, green: 0.28, blue: 0.28, alpha: 0.95) } else { - fileSizeLabel.text = " " + Self.formattedDuration(seconds: durationSec) + fileSizeLabel.text = Self.formattedDuration(seconds: durationSec) fileSizeLabel.textColor = UIColor.white.withAlphaComponent(0.6) } @@ -524,6 +516,14 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel : UIColor(red: 0.21, green: 0.75, blue: 0.20, alpha: 1) // #36C033 callArrowView.isHidden = false callBackButton.isHidden = false + + // Call button color: outgoing = white, incoming = blue (Telegram accentControlColor) + let callPhoneView = callBackButton.viewWithTag(2002) as? UIImageView + if isOutgoing { + callPhoneView?.tintColor = .white + } else { + callPhoneView?.tintColor = UIColor(red: 0.14, green: 0.54, blue: 0.90, alpha: 1) + } } else if let fileAtt = message.attachments.first(where: { $0.type == .file }) { let parsed = AttachmentPreviewCodec.parseFilePreview(fileAtt.preview) avatarImageView.isHidden = true @@ -539,46 +539,69 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel } else if let avatarAtt = message.attachments.first(where: { $0.type == .avatar }) { fileNameLabel.font = Self.fileNameFont fileNameLabel.text = "Avatar" - fileSizeLabel.text = "Shared profile photo" - fileSizeLabel.textColor = UIColor.white.withAlphaComponent(0.6) callArrowView.isHidden = true callBackButton.isHidden = true - // Try to load cached avatar image or blurhash + // Android parity: show cached image OR blurhash placeholder. + // NO auto-download — user must tap to download (via .triggerAttachmentDownload). if let cached = AttachmentCache.shared.cachedImage(forAttachmentId: avatarAtt.id) { avatarImageView.image = cached avatarImageView.isHidden = false fileIconView.isHidden = true + fileSizeLabel.text = "Shared profile photo" + fileSizeLabel.textColor = UIColor.white.withAlphaComponent(0.6) } else { - // Try blurhash placeholder + let isOutgoing = currentLayout?.isOutgoing ?? false + if isOutgoing { + // Own avatar — already uploaded, just loading from disk + fileSizeLabel.text = "Shared profile photo" + } else { + // Incoming avatar — needs download on tap (Android parity) + fileSizeLabel.text = "Tap to download" + } + fileSizeLabel.textColor = UIColor.white.withAlphaComponent(0.6) + // Show blurhash placeholder (decode async if not cached) let hash = AttachmentPreviewCodec.blurHash(from: avatarAtt.preview) if !hash.isEmpty, let blurImg = Self.blurHashCache.object(forKey: hash as NSString) { avatarImageView.image = blurImg avatarImageView.isHidden = false fileIconView.isHidden = true - } else if !hash.isEmpty { - // Decode blurhash on background - avatarImageView.isHidden = true - fileIconView.isHidden = false - fileIconView.backgroundColor = UIColor.white.withAlphaComponent(0.2) - fileIconSymbolView.image = UIImage(systemName: "person.crop.circle.fill") - let messageId = message.id - Task.detached(priority: .userInitiated) { - guard let decoded = UIImage.fromBlurHash(hash, width: 32, height: 32) else { return } - await MainActor.run { [weak self] in - guard let self, self.message?.id == messageId else { return } - Self.blurHashCache.setObject(decoded, forKey: hash as NSString) - self.avatarImageView.image = decoded - self.avatarImageView.isHidden = false - self.fileIconView.isHidden = true - } - } } else { avatarImageView.isHidden = true fileIconView.isHidden = false fileIconView.backgroundColor = UIColor.white.withAlphaComponent(0.2) fileIconSymbolView.image = UIImage(systemName: "person.crop.circle.fill") } + + // Async: decode blurhash + try disk cache (NO CDN download — tap required) + let messageId = message.id + let attId = avatarAtt.id + Task.detached(priority: .userInitiated) { + // 1. Decode blurhash immediately (~2ms) + if !hash.isEmpty { + if let decoded = UIImage.fromBlurHash(hash, width: 32, height: 32) { + await MainActor.run { [weak self] in + guard let self, self.message?.id == messageId else { return } + Self.blurHashCache.setObject(decoded, forKey: hash as NSString) + self.avatarImageView.image = decoded + self.avatarImageView.isHidden = false + self.fileIconView.isHidden = true + } + } + } + + // 2. Try disk cache only (previously downloaded) + if let diskImage = AttachmentCache.shared.loadImage(forAttachmentId: attId) { + await MainActor.run { [weak self] in + guard let self, self.message?.id == messageId else { return } + self.avatarImageView.image = diskImage + self.avatarImageView.isHidden = false + self.fileIconView.isHidden = true + self.fileSizeLabel.text = "Shared profile photo" + } + } + // CDN download is triggered by user tap via .triggerAttachmentDownload + } } } else { avatarImageView.isHidden = true @@ -721,32 +744,52 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel let isCallType = message?.attachments.contains(where: { $0.type == .call }) ?? false let fileW = layout.fileFrame.width - fileIconView.frame = CGRect(x: 9, y: 6, width: 44, height: 44) - fileIconSymbolView.frame = CGRect(x: 11, y: 11, width: 22, height: 22) - let isAvatarType = message?.attachments.contains(where: { $0.type == .avatar }) ?? false + let fileContainerH = layout.fileFrame.height + + // For file-only messages, fileContainer spans the ENTIRE bubble (fileH = bubbleH). + // Centering in fileContainerH gives visually perfect centering within the bubble. + // The timestamp is a separate view positioned at the bottom — no collision risk + // because content is left-aligned and timestamp is right-aligned. + let centerableH = fileContainerH if isCallType { - // Call layout: icon + title/status + call-back button on right - let callBtnSize: CGFloat = 44 - let callBtnRight: CGFloat = 8 - let textRight = callBtnRight + callBtnSize + 4 - fileNameLabel.frame = CGRect(x: 63, y: 8, width: fileW - 63 - textRight, height: 20) - fileSizeLabel.frame = CGRect(x: 78, y: 30, width: fileW - 78 - textRight, height: 16) - callArrowView.frame = CGRect(x: 63, y: 33, width: 12, height: 12) - callBackButton.frame = CGRect(x: fileW - callBtnSize - callBtnRight, y: 8, width: callBtnSize, height: callBtnSize) - callBackButton.viewWithTag(2001)?.frame = CGRect(x: 0, y: 0, width: callBtnSize, height: callBtnSize) + // Telegram-exact call layout: NO icon circle, text at left edge + // Source: ChatMessageCallBubbleContentNode.swift + fileIconView.isHidden = true + let callBtnSize: CGFloat = 36 + let callBtnRight: CGFloat = 10 + let textRight = callBtnRight + callBtnSize + 8 + // Vertically center content above timestamp + let contentH: CGFloat = 36 // title(20) + gap(2) + subtitle(14) + let topY = max(0, (centerableH - contentH) / 2) + fileNameLabel.frame = CGRect(x: 11, y: topY, width: fileW - 11 - textRight, height: 20) + fileSizeLabel.frame = CGRect(x: 25, y: topY + 22, width: fileW - 25 - textRight, height: 14) + callArrowView.frame = CGRect(x: 12, y: topY + 25, width: 10, height: 10) + // Call button: vertically centered in same area + let btnY = max(0, (centerableH - callBtnSize) / 2) + callBackButton.frame = CGRect(x: fileW - callBtnSize - callBtnRight, y: btnY, width: callBtnSize, height: callBtnSize) callBackButton.viewWithTag(2002)?.frame = CGRect(x: 0, y: 0, width: callBtnSize, height: callBtnSize) avatarImageView.isHidden = true } else if isAvatarType { - // Avatar layout: circular image (44pt) + title + description - avatarImageView.frame = CGRect(x: 9, y: 14, width: 44, height: 44) - fileNameLabel.frame = CGRect(x: 63, y: 18, width: fileW - 75, height: 19) - fileSizeLabel.frame = CGRect(x: 63, y: 39, width: fileW - 75, height: 16) + // Avatar layout: vertically centered icon (44pt) + title + description + let contentH: CGFloat = 44 // icon height dominates + let topY = max(0, (centerableH - contentH) / 2) + fileIconView.frame = CGRect(x: 9, y: topY, width: 44, height: 44) + fileIconSymbolView.frame = CGRect(x: 11, y: 11, width: 22, height: 22) + avatarImageView.frame = CGRect(x: 9, y: topY, width: 44, height: 44) + let textTopY = topY + 4 + fileNameLabel.frame = CGRect(x: 63, y: textTopY, width: fileW - 75, height: 19) + fileSizeLabel.frame = CGRect(x: 63, y: textTopY + 21, width: fileW - 75, height: 16) } else { - // File layout: icon + title + size - fileNameLabel.frame = CGRect(x: 63, y: 9, width: fileW - 75, height: 19) - fileSizeLabel.frame = CGRect(x: 63, y: 30, width: fileW - 75, height: 16) + // File layout: vertically centered icon + title + size + let contentH: CGFloat = 44 // icon height dominates + let topY = max(0, (centerableH - contentH) / 2) + fileIconView.frame = CGRect(x: 9, y: topY, width: 44, height: 44) + fileIconSymbolView.frame = CGRect(x: 11, y: 11, width: 22, height: 22) + let textTopY = topY + 4 + fileNameLabel.frame = CGRect(x: 63, y: textTopY, width: fileW - 75, height: 19) + fileSizeLabel.frame = CGRect(x: 63, y: textTopY + 21, width: fileW - 75, height: 16) avatarImageView.isHidden = true } } @@ -819,6 +862,70 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel return String(format: "%.1f GB", Double(bytes) / (1024 * 1024 * 1024)) } + /// Downloads avatar from CDN, decrypts, caches to disk, and returns the image. + /// Shared logic with `MessageAvatarView.downloadAvatar()`. + private static func downloadAndCacheAvatar( + tag: String, attachmentId: String, storedPassword: String, senderKey: String + ) async -> UIImage? { + do { + let encryptedData = try await TransportManager.shared.downloadFile(tag: tag) + let encryptedString = String(decoding: encryptedData, as: UTF8.self) + + let passwords = MessageCrypto.attachmentPasswordCandidates(from: storedPassword) + guard let image = decryptAvatarImage(encryptedString: encryptedString, passwords: passwords) + else { return nil } + + AttachmentCache.shared.saveImage(image, forAttachmentId: attachmentId) + + // Android parity: save avatar to sender's profile after download + if let jpegData = image.jpegData(compressionQuality: 0.85) { + let base64 = jpegData.base64EncodedString() + await MainActor.run { + AvatarRepository.shared.saveAvatarFromBase64(base64, publicKey: senderKey) + } + } + return image + } catch { + return nil + } + } + + /// Tries each password candidate to decrypt avatar image data. + private static func decryptAvatarImage(encryptedString: String, passwords: [String]) -> UIImage? { + let crypto = CryptoManager.shared + for password in passwords { + guard let data = try? crypto.decryptWithPassword( + encryptedString, password: password, requireCompression: true + ) else { continue } + if let img = parseAvatarImageData(data) { return img } + } + for password in passwords { + guard let data = try? crypto.decryptWithPassword( + encryptedString, password: password + ) else { continue } + if let img = parseAvatarImageData(data) { return img } + } + return nil + } + + /// Parses avatar image data (data URI or raw base64 or raw bytes). + private static func parseAvatarImageData(_ data: Data) -> UIImage? { + if let str = String(data: data, encoding: .utf8) { + if str.hasPrefix("data:"), + let commaIndex = str.firstIndex(of: ",") { + let base64Part = String(str[str.index(after: commaIndex)...]) + if let imageData = Data(base64Encoded: base64Part), + let img = AttachmentCache.downsampledImage(from: imageData) { + return img + } + } else if let imageData = Data(base64Encoded: str), + let img = AttachmentCache.downsampledImage(from: imageData) { + return img + } + } + return AttachmentCache.downsampledImage(from: data) + } + // MARK: - Self-sizing (from pre-calculated layout) override func preferredLayoutAttributesFitting( @@ -899,6 +1006,59 @@ final class NativeMessageCell: UICollectionViewCell, UIContextMenuInteractionDel actions.onCall(peerKey) } + @objc private func handleAttachmentDownload(_ notif: Notification) { + guard let id = notif.object as? String, + let message, + let avatarAtt = message.attachments.first(where: { $0.type == .avatar }), + avatarAtt.id == id else { return } + // Already downloaded? + if AttachmentCache.shared.cachedImage(forAttachmentId: id) != nil { return } + // Download from CDN + let tag = AttachmentPreviewCodec.downloadTag(from: avatarAtt.preview) + guard !tag.isEmpty else { return } + guard let password = message.attachmentPassword, !password.isEmpty else { return } + + // Show loading state + fileSizeLabel.text = "Downloading..." + + let messageId = message.id + let senderKey = message.fromPublicKey + Task.detached(priority: .userInitiated) { + let downloaded = await Self.downloadAndCacheAvatar( + tag: tag, attachmentId: id, + storedPassword: password, senderKey: senderKey + ) + await MainActor.run { [weak self] in + guard let self, self.message?.id == messageId else { return } + if let downloaded { + self.avatarImageView.image = downloaded + self.avatarImageView.isHidden = false + self.fileIconView.isHidden = true + self.fileSizeLabel.text = "Shared profile photo" + } else { + self.fileSizeLabel.text = "Tap to retry" + } + } + } + } + + @objc private func fileContainerTapped() { + guard let message, let actions else { return } + let isCallType = message.attachments.contains { $0.type == .call } + if isCallType { + // Tap anywhere on call bubble → call back + let isOutgoing = currentLayout?.isOutgoing ?? false + let peerKey = isOutgoing ? message.toPublicKey : message.fromPublicKey + actions.onCall(peerKey) + } else if let avatarAtt = message.attachments.first(where: { $0.type == .avatar }) { + // Tap on avatar bubble → trigger download (Android parity) + NotificationCenter.default.post(name: .triggerAttachmentDownload, object: avatarAtt.id) + } else if let fileAtt = message.attachments.first(where: { $0.type == .file }) { + // Tap on file bubble → trigger download/share + NotificationCenter.default.post(name: .triggerAttachmentDownload, object: fileAtt.id) + } + } + @objc private func handlePhotoTileTap(_ sender: UIButton) { guard sender.tag >= 0, sender.tag < photoAttachments.count, let message, diff --git a/RosettaLiveActivityWidget/CallActivityAttributes.swift b/RosettaLiveActivityWidget/CallActivityAttributes.swift new file mode 100644 index 0000000..d36b243 --- /dev/null +++ b/RosettaLiveActivityWidget/CallActivityAttributes.swift @@ -0,0 +1,15 @@ +import ActivityKit +import Foundation + +struct CallActivityAttributes: ActivityAttributes { + /// Fixed data set when the activity starts. + let peerName: String + let peerPublicKey: String + + /// Dynamic state updated during the call. + struct ContentState: Codable, Hashable { + let durationSec: Int + let isActive: Bool + let isMuted: Bool + } +} diff --git a/RosettaLiveActivityWidget/CallLiveActivity.swift b/RosettaLiveActivityWidget/CallLiveActivity.swift new file mode 100644 index 0000000..87448d4 --- /dev/null +++ b/RosettaLiveActivityWidget/CallLiveActivity.swift @@ -0,0 +1,37 @@ +import ActivityKit +import SwiftUI +import WidgetKit + +struct CallLiveActivity: Widget { + var body: some WidgetConfiguration { + ActivityConfiguration(for: CallActivityAttributes.self) { context in + // Lock Screen + Text("Rosetta Call: \(context.attributes.peerName)") + .foregroundColor(.white) + .padding() + .activityBackgroundTint(.black) + } dynamicIsland: { context in + DynamicIsland { + DynamicIslandExpandedRegion(.center) { + Text(context.attributes.peerName) + .foregroundColor(.white) + } + DynamicIslandExpandedRegion(.bottom) { + Text("Encrypted call") + .font(.caption2) + .foregroundColor(.gray) + } + } compactLeading: { + Image(systemName: "phone.fill") + .foregroundColor(.green) + } compactTrailing: { + Text("Call") + .font(.caption2) + .foregroundColor(.green) + } minimal: { + Image(systemName: "phone.fill") + .foregroundColor(.green) + } + } + } +} diff --git a/RosettaLiveActivityWidget/Info.plist b/RosettaLiveActivityWidget/Info.plist new file mode 100644 index 0000000..a4721d4 --- /dev/null +++ b/RosettaLiveActivityWidget/Info.plist @@ -0,0 +1,27 @@ + + + + + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleDisplayName + RosettaLiveActivityWidget + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSExtension + + NSExtensionPointIdentifier + com.apple.widgetkit-extension + + + diff --git a/RosettaLiveActivityWidget/RosettaLiveActivityWidget.entitlements b/RosettaLiveActivityWidget/RosettaLiveActivityWidget.entitlements new file mode 100644 index 0000000..e07eedf --- /dev/null +++ b/RosettaLiveActivityWidget/RosettaLiveActivityWidget.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.com.rosetta.dev + + + diff --git a/RosettaLiveActivityWidget/RosettaLiveActivityWidgetBundle.swift b/RosettaLiveActivityWidget/RosettaLiveActivityWidgetBundle.swift new file mode 100644 index 0000000..9e4fa83 --- /dev/null +++ b/RosettaLiveActivityWidget/RosettaLiveActivityWidgetBundle.swift @@ -0,0 +1,10 @@ +import ActivityKit +import SwiftUI +import WidgetKit + +@main +struct RosettaLiveActivityWidgetBundle: WidgetBundle { + var body: some Widget { + CallLiveActivity() + } +} diff --git a/RosettaTests/CallCryptoParityTests.swift b/RosettaTests/CallCryptoParityTests.swift new file mode 100644 index 0000000..a512b6a --- /dev/null +++ b/RosettaTests/CallCryptoParityTests.swift @@ -0,0 +1,229 @@ +import XCTest +@testable import Rosetta + +/// Tests that iOS crypto primitives produce byte-identical output +/// to Android/Desktop for call E2EE. +final class CallCryptoParityTests: XCTestCase { + + // MARK: - HSalsa20 (nacl.box.before parity) + + func testHSalsa20ProducesConsistentOutput() throws { + // HSalsa20 with zero nonce should produce deterministic output from any key + let key = Data(repeating: 0x42, count: 32) + let result1 = NativeCryptoBridge.naclSharedKey(fromRawDH: key) + let result2 = NativeCryptoBridge.naclSharedKey(fromRawDH: key) + + XCTAssertNotNil(result1) + XCTAssertNotNil(result2) + XCTAssertEqual(result1!.count, 32) + XCTAssertEqual(result1, result2, "HSalsa20 must be deterministic") + } + + func testHSalsa20OutputDiffersForDifferentKeys() throws { + let key1 = Data(repeating: 0x01, count: 32) + let key2 = Data(repeating: 0x02, count: 32) + + let result1 = NativeCryptoBridge.naclSharedKey(fromRawDH: key1) + let result2 = NativeCryptoBridge.naclSharedKey(fromRawDH: key2) + + XCTAssertNotNil(result1) + XCTAssertNotNil(result2) + XCTAssertNotEqual(result1, result2, "Different keys must produce different shared secrets") + } + + func testHSalsa20RejectsWrongKeyLength() { + let shortKey = Data(repeating: 0x00, count: 16) + let result = NativeCryptoBridge.naclSharedKey(fromRawDH: shortKey) + XCTAssertNil(result, "HSalsa20 must reject keys != 32 bytes") + } + + // MARK: - XChaCha20 stream cipher + + func testXChaCha20EncryptDecryptRoundTrip() throws { + let key = Data(repeating: 0xAB, count: 32) + let nonce = Data(repeating: 0xCD, count: 24) + let plaintext = Data("Hello Rosetta E2EE call frame!".utf8) + + let encrypted = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonce) + XCTAssertNotNil(encrypted) + XCTAssertEqual(encrypted!.count, plaintext.count, "Encrypted size must match plaintext size") + XCTAssertNotEqual(encrypted, plaintext, "Encrypted data must differ from plaintext") + + // XOR cipher: encrypt again = decrypt + let decrypted = NativeCryptoBridge.xChaCha20Xor(encrypted!, key: key, nonce: nonce) + XCTAssertNotNil(decrypted) + XCTAssertEqual(decrypted, plaintext, "XChaCha20 XOR decrypt must recover original plaintext") + } + + func testXChaCha20DifferentNonceProducesDifferentCiphertext() throws { + let key = Data(repeating: 0x11, count: 32) + let nonce1 = Data(repeating: 0x01, count: 24) + let nonce2 = Data(repeating: 0x02, count: 24) + let plaintext = Data(repeating: 0xFF, count: 64) + + let enc1 = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonce1) + let enc2 = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonce2) + + XCTAssertNotNil(enc1) + XCTAssertNotNil(enc2) + XCTAssertNotEqual(enc1, enc2, "Different nonces must produce different ciphertext") + } + + func testXChaCha20DifferentKeyProducesDifferentCiphertext() throws { + let key1 = Data(repeating: 0x11, count: 32) + let key2 = Data(repeating: 0x22, count: 32) + let nonce = Data(repeating: 0x00, count: 24) + let plaintext = Data(repeating: 0xFF, count: 64) + + let enc1 = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key1, nonce: nonce) + let enc2 = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key2, nonce: nonce) + + XCTAssertNotNil(enc1) + XCTAssertNotNil(enc2) + XCTAssertNotEqual(enc1, enc2, "Different keys must produce different ciphertext") + } + + func testXChaCha20OutputSizeMatchesInput() throws { + let key = Data(repeating: 0x33, count: 32) + let nonce = Data(repeating: 0x44, count: 24) + + for size in [0, 1, 16, 63, 64, 65, 128, 960, 1024] { + let plaintext = Data(repeating: 0xAA, count: size) + let encrypted = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonce) + XCTAssertNotNil(encrypted, "XChaCha20 must handle size \(size)") + XCTAssertEqual(encrypted!.count, size, "Output size must equal input size for \(size) bytes") + } + } + + func testXChaCha20RejectsWrongKeyOrNonceLength() { + let plaintext = Data(repeating: 0x00, count: 16) + + let badKey = NativeCryptoBridge.xChaCha20Xor(plaintext, key: Data(repeating: 0, count: 16), nonce: Data(repeating: 0, count: 24)) + XCTAssertNil(badKey, "Must reject key != 32 bytes") + + let badNonce = NativeCryptoBridge.xChaCha20Xor(plaintext, key: Data(repeating: 0, count: 32), nonce: Data(repeating: 0, count: 12)) + XCTAssertNil(badNonce, "Must reject nonce != 24 bytes") + } + + // MARK: - Nonce construction parity (Desktop BigInt encoding) + + /// Verifies that a nonce built from an 8-byte big-endian timestamp + /// matches the Desktop audioE2EE.ts fillNonceFromTimestamp output. + func testNonceFromTimestampMatchesDesktopFormat() throws { + let key = Data(repeating: 0x55, count: 32) + let plaintext = Data(repeating: 0xEE, count: 48) + + // Desktop encodes timestamp 12345 as big-endian 8 bytes: + // [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x39] + // Then nonce[8:24] = zeros + let timestamp: UInt64 = 12345 + var nonce = Data(repeating: 0, count: 24) + nonce[0] = UInt8((timestamp >> 56) & 0xFF) + nonce[1] = UInt8((timestamp >> 48) & 0xFF) + nonce[2] = UInt8((timestamp >> 40) & 0xFF) + nonce[3] = UInt8((timestamp >> 32) & 0xFF) + nonce[4] = UInt8((timestamp >> 24) & 0xFF) + nonce[5] = UInt8((timestamp >> 16) & 0xFF) + nonce[6] = UInt8((timestamp >> 8) & 0xFF) + nonce[7] = UInt8(timestamp & 0xFF) + + // Encrypt with manually constructed nonce + let enc1 = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonce) + XCTAssertNotNil(enc1) + + // Same nonce built differently (raw bytes = big-endian 12345) + var nonce2 = Data(repeating: 0, count: 24) + var tsBE = timestamp.bigEndian + nonce2.replaceSubrange(0..<8, with: Data(bytes: &tsBE, count: 8)) + + let enc2 = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonce2) + XCTAssertNotNil(enc2) + + XCTAssertEqual(enc1, enc2, "Both nonce construction methods must produce identical ciphertext") + } + + /// Verifies that 32-bit RTP timestamp at nonce[4:8] matches + /// the 64-bit encoding when value fits in 32 bits. + func testRtpTimestamp32MatchesDesktop64ForSmallValues() throws { + let key = Data(repeating: 0x66, count: 32) + let plaintext = Data(repeating: 0xDD, count: 32) + + let rtpTs: UInt32 = 48000 // 1 second at 48kHz + + // Desktop-style: 64-bit big-endian in nonce[0:8] + var nonceDesktop = Data(repeating: 0, count: 24) + let ts64 = UInt64(rtpTs) + nonceDesktop[0] = UInt8((ts64 >> 56) & 0xFF) // 0 + nonceDesktop[1] = UInt8((ts64 >> 48) & 0xFF) // 0 + nonceDesktop[2] = UInt8((ts64 >> 40) & 0xFF) // 0 + nonceDesktop[3] = UInt8((ts64 >> 32) & 0xFF) // 0 + nonceDesktop[4] = UInt8((ts64 >> 24) & 0xFF) // 0 + nonceDesktop[5] = UInt8((ts64 >> 16) & 0xFF) // 0 + nonceDesktop[6] = UInt8((ts64 >> 8) & 0xFF) // 0xBB + nonceDesktop[7] = UInt8(ts64 & 0xFF) // 0x80 + + // RTP-style: 32-bit big-endian at nonce[4:8] + var nonceRtp = Data(repeating: 0, count: 24) + nonceRtp[4] = UInt8((rtpTs >> 24) & 0xFF) // 0 + nonceRtp[5] = UInt8((rtpTs >> 16) & 0xFF) // 0 + nonceRtp[6] = UInt8((rtpTs >> 8) & 0xFF) // 0xBB + nonceRtp[7] = UInt8(rtpTs & 0xFF) // 0x80 + + let encDesktop = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonceDesktop) + let encRtp = NativeCryptoBridge.xChaCha20Xor(plaintext, key: key, nonce: nonceRtp) + + XCTAssertNotNil(encDesktop) + XCTAssertNotNil(encRtp) + XCTAssertEqual(encDesktop, encRtp, + "32-bit RTP timestamp at nonce[4:8] must match 64-bit encoding for values < 2^32") + } + + // MARK: - Full E2EE round-trip (simulate iOS encrypt → Desktop decrypt) + + func testFullE2EERoundTripWithDesktopNonce() throws { + // Simulate: iOS encrypts a frame, Desktop decrypts with same key and nonce + let sharedKey = Data(repeating: 0x77, count: 32) + + // Simulated Opus frame (TOC byte 0xFC = CELT, 20ms, 1 frame) + var opusFrame = Data([0xFC]) // TOC: config=31, code=0 + opusFrame.append(Data(repeating: 0x42, count: 80)) // payload + + // Desktop-style timestamp nonce + let timestamp: UInt64 = 96000 // 2 seconds at 48kHz + var nonce = Data(repeating: 0, count: 24) + for i in 0..<8 { + nonce[i] = UInt8((timestamp >> UInt64((7 - i) * 8)) & 0xFF) + } + + // Encrypt (iOS side) + let encrypted = NativeCryptoBridge.xChaCha20Xor(opusFrame, key: sharedKey, nonce: nonce) + XCTAssertNotNil(encrypted) + XCTAssertEqual(encrypted!.count, opusFrame.count) + XCTAssertNotEqual(encrypted, opusFrame) + + // Decrypt (simulating Desktop side with same key+nonce) + let decrypted = NativeCryptoBridge.xChaCha20Xor(encrypted!, key: sharedKey, nonce: nonce) + XCTAssertNotNil(decrypted) + XCTAssertEqual(decrypted, opusFrame, "Desktop must recover exact Opus frame") + } + + // MARK: - HSalsa20 + XChaCha20 full chain + + func testFullKeyDerivationAndEncryptionChain() throws { + // Simulate two peers with fixed "DH results" + let rawDH = Data((0..<32).map { UInt8($0) }) + + let sharedKey = NativeCryptoBridge.naclSharedKey(fromRawDH: rawDH) + XCTAssertNotNil(sharedKey) + XCTAssertEqual(sharedKey!.count, 32) + + let plaintext = Data(repeating: 0xAA, count: 160) // typical Opus frame + let nonce = Data(repeating: 0, count: 24) + + let encrypted = NativeCryptoBridge.xChaCha20Xor(plaintext, key: sharedKey!, nonce: nonce) + XCTAssertNotNil(encrypted) + + let decrypted = NativeCryptoBridge.xChaCha20Xor(encrypted!, key: sharedKey!, nonce: nonce) + XCTAssertEqual(decrypted, plaintext, "Full chain: HSalsa20 key derivation + XChaCha20 must round-trip") + } +} diff --git a/tools/webrtc-custom-ios/README.md b/tools/webrtc-custom-ios/README.md new file mode 100644 index 0000000..c74d5ba --- /dev/null +++ b/tools/webrtc-custom-ios/README.md @@ -0,0 +1,74 @@ +# Custom WebRTC for Rosetta iOS (Audio E2EE Timestamp) + +This setup builds a custom `WebRTC.xcframework` for iOS and patches audio E2EE so +`FrameEncryptor/FrameDecryptor` receive non-empty `additional_data` with RTP timestamp bytes. + +## Why + +Stock `stasel/WebRTC` M146 calls audio frame encryptor with empty +`additional_data` (`ad=0`), so nonce derivation based on timestamp is unavailable. + +Desktop uses frame timestamp for nonce. This patch aligns iOS with that approach by passing +an 8-byte big-endian timestamp payload in `additional_data` (absolute RTP timestamp, +including sender start offset): + +- bytes `0..3` = `0` +- bytes `4..7` = RTP timestamp (big-endian) + +Same patch as Android: `mobile-android/tools/webrtc-custom/patches/0001-...` + +## Files + +- `build_custom_webrtc_ios.sh` — reproducible build script +- `patches/0001-audio-e2ee-pass-rtp-timestamp-as-additional-data.patch` — WebRTC patch (identical to Android) + +## Build + +Requirements: macOS, Xcode, `depot_tools` in PATH. + +Bootstrap depot_tools first (if not installed): + +```bash +git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ~/depot_tools +export PATH=$PATH:$HOME/depot_tools +``` + +Then build: + +```bash +cd /path/to/Rosetta/tools/webrtc-custom-ios +./build_custom_webrtc_ios.sh +``` + +Optional env vars: + +- `WEBRTC_ROOT` — checkout root (default: `$HOME/webrtc_ios`) +- `WEBRTC_BRANCH` — default `branch-heads/6422` (M125, same as Android) +- `WEBRTC_TAG` — use a specific tag/commit instead of branch +- `OUT_FRAMEWORK` — output xcframework path (default: `Frameworks/WebRTC.xcframework`) +- `SYNC_JOBS` — `gclient sync` jobs (default: `1`) +- `SYNC_RETRIES` — sync retry attempts (default: `8`) + +## Integration in Xcode + +1. Remove `stasel/WebRTC` SPM dependency from Xcode project +2. Add `Frameworks/WebRTC.xcframework` as Embedded Framework +3. Build and verify: diagnostic logs should show `ad=8` instead of `ad=0` + +## Verification + +After building and integrating: + +``` +ENC frame#0 sz=53 ad=8 mode=raw-abs nonce=[00000000XXXXXXXX] +DEC frame#0 sz=48 ad=8 mode=raw-abs ok=1 nonce=[00000000XXXXXXXX] +``` + +Where `XXXXXXXX` is the RTP timestamp in hex. This matches Desktop and Android behavior. + +## Maintenance + +- Keep patch small: only `audio/channel_send.cc` + `audio/channel_receive.cc` +- Pin WebRTC branch/tag for releases (M125 = `branch-heads/6422`) +- Rebuild xcframework on version bumps +- Verify `ad=8` in diagnostic logs after each rebuild diff --git a/tools/webrtc-custom-ios/build_custom_webrtc_ios.sh b/tools/webrtc-custom-ios/build_custom_webrtc_ios.sh new file mode 100755 index 0000000..520de82 --- /dev/null +++ b/tools/webrtc-custom-ios/build_custom_webrtc_ios.sh @@ -0,0 +1,153 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Reproducible custom WebRTC xcframework build for Rosetta iOS. +# Applies the same E2EE timestamp patch as the Android custom build. +# +# Requirements: +# - macOS with Xcode (Command Line Tools) +# - depot_tools in PATH (run bootstrap_depot_tools.sh first if needed) +# - python3, git +# +# Usage: +# cd /path/to/Rosetta/tools/webrtc-custom-ios +# ./build_custom_webrtc_ios.sh + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROSETTA_DIR="$(cd "${SCRIPT_DIR}/../.." && pwd)" +PATCH_FILE="${SCRIPT_DIR}/patches/0001-audio-e2ee-pass-rtp-timestamp-as-additional-data.patch" + +# Default: WebRTC M125 family — same as Android (branch-heads/6422). +WEBRTC_BRANCH="${WEBRTC_BRANCH:-branch-heads/6422}" +WEBRTC_TAG="${WEBRTC_TAG:-}" + +# Source checkout root (contains src/). +WEBRTC_ROOT="${WEBRTC_ROOT:-$HOME/webrtc_ios}" +WEBRTC_SRC="${WEBRTC_SRC:-${WEBRTC_ROOT}/src}" + +# Output framework consumed by Xcode project. +OUT_FRAMEWORK="${OUT_FRAMEWORK:-${ROSETTA_DIR}/Frameworks/WebRTC.xcframework}" + +# Sync tuning (chromium.googlesource rate limits). +SYNC_JOBS="${SYNC_JOBS:-1}" +SYNC_RETRIES="${SYNC_RETRIES:-8}" +SYNC_RETRY_BASE_SEC="${SYNC_RETRY_BASE_SEC:-20}" + +echo "[webrtc-ios] root: ${WEBRTC_ROOT}" +echo "[webrtc-ios] src: ${WEBRTC_SRC}" +echo "[webrtc-ios] out: ${OUT_FRAMEWORK}" +echo "[webrtc-ios] sync jobs: ${SYNC_JOBS}, retries: ${SYNC_RETRIES}" + +export DEPOT_TOOLS_UPDATE=0 + +retry_cmd() { + local max_attempts="$1" + shift + local attempt=1 + local backoff="${SYNC_RETRY_BASE_SEC}" + + while true; do + if "$@"; then + return 0 + fi + if (( attempt >= max_attempts )); then + return 1 + fi + echo "[webrtc-ios] attempt ${attempt}/${max_attempts} failed, retrying in ${backoff}s: $*" + sleep "${backoff}" + backoff=$(( backoff * 2 )) + if (( backoff > 300 )); then + backoff=300 + fi + attempt=$(( attempt + 1 )) + done +} + +sync_with_retry() { + local attempt=1 + while true; do + if gclient sync -D --jobs "${SYNC_JOBS}"; then + return 0 + fi + if (( attempt >= SYNC_RETRIES )); then + echo "[webrtc-ios] ERROR: gclient sync failed after ${SYNC_RETRIES} attempts" + return 1 + fi + local wait_sec=$(( SYNC_RETRY_BASE_SEC * attempt )) + if (( wait_sec > 300 )); then + wait_sec=300 + fi + echo "[webrtc-ios] gclient sync failed (attempt ${attempt}/${SYNC_RETRIES}), sleeping ${wait_sec}s..." + sleep "${wait_sec}" + attempt=$(( attempt + 1 )) + done +} + +if ! command -v fetch >/dev/null 2>&1; then + echo "[webrtc-ios] ERROR: depot_tools 'fetch' not found in PATH" + echo "[webrtc-ios] Run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git" + echo "[webrtc-ios] Then: export PATH=\$PATH:/path/to/depot_tools" + exit 1 +fi + +# Step 1: Checkout WebRTC source for iOS +if [[ ! -d "${WEBRTC_SRC}/.git" ]]; then + echo "[webrtc-ios] checkout not found, fetching webrtc_ios..." + mkdir -p "${WEBRTC_ROOT}" + pushd "${WEBRTC_ROOT}" >/dev/null + retry_cmd "${SYNC_RETRIES}" fetch --nohooks --no-history webrtc_ios + sync_with_retry + popd >/dev/null +fi + +pushd "${WEBRTC_SRC}" >/dev/null + +# Step 2: Sync to target branch +echo "[webrtc-ios] syncing source..." +retry_cmd "${SYNC_RETRIES}" git fetch --all --tags + +if [[ -n "${WEBRTC_TAG}" ]]; then + retry_cmd "${SYNC_RETRIES}" git checkout "${WEBRTC_TAG}" +else + if git show-ref --verify --quiet "refs/remotes/origin/${WEBRTC_BRANCH}"; then + retry_cmd "${SYNC_RETRIES}" git checkout -B "${WEBRTC_BRANCH}" "origin/${WEBRTC_BRANCH}" + else + retry_cmd "${SYNC_RETRIES}" git checkout "${WEBRTC_BRANCH}" + fi + if git rev-parse --abbrev-ref --symbolic-full-name '@{u}' >/dev/null 2>&1; then + retry_cmd "${SYNC_RETRIES}" git pull --ff-only + fi +fi + +sync_with_retry + +# Step 3: Apply E2EE patch +echo "[webrtc-ios] applying Rosetta E2EE patch..." +git reset --hard +echo "[webrtc-ios] apply $(basename "${PATCH_FILE}")" +git apply --check "${PATCH_FILE}" +git apply "${PATCH_FILE}" +echo "[webrtc-ios] patch applied successfully" + +# Step 4: Build iOS framework +echo "[webrtc-ios] building xcframework (this takes 30-60 minutes)..." +mkdir -p "$(dirname "${OUT_FRAMEWORK}")" + +# Remove previous build if exists +rm -rf "${OUT_FRAMEWORK}" + +python3 tools_webrtc/ios/build_ios_libs.py \ + --build-dir out_rosetta_ios \ + --output-dir "$(dirname "${OUT_FRAMEWORK}")" \ + --arch arm64 x86_64 \ + --extra-gn-args "is_debug=false is_component_build=false rtc_include_tests=false rtc_build_examples=false" + +echo "[webrtc-ios] done" +echo "[webrtc-ios] framework: ${OUT_FRAMEWORK}" +echo "" +echo "Next steps:" +echo " 1. Remove stasel/WebRTC SPM dependency from Xcode" +echo " 2. Add ${OUT_FRAMEWORK} as Embedded Framework" +echo " 3. Build and verify: logs should show ad=8 (not ad=0)" + +popd >/dev/null diff --git a/tools/webrtc-custom-ios/patches/0001-audio-e2ee-pass-rtp-timestamp-as-additional-data.patch b/tools/webrtc-custom-ios/patches/0001-audio-e2ee-pass-rtp-timestamp-as-additional-data.patch new file mode 100644 index 0000000..42a7396 --- /dev/null +++ b/tools/webrtc-custom-ios/patches/0001-audio-e2ee-pass-rtp-timestamp-as-additional-data.patch @@ -0,0 +1,56 @@ +diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc +index 17cf859ed8..b9d9ab14c8 100644 +--- a/audio/channel_receive.cc ++++ b/audio/channel_receive.cc +@@ -693,10 +693,20 @@ void ChannelReceive::ReceivePacket(const uint8_t* packet, + + const std::vector csrcs(header.arrOfCSRCs, + header.arrOfCSRCs + header.numCSRCs); ++ const uint8_t additional_data_bytes[8] = { ++ 0, ++ 0, ++ 0, ++ 0, ++ static_cast((header.timestamp >> 24) & 0xff), ++ static_cast((header.timestamp >> 16) & 0xff), ++ static_cast((header.timestamp >> 8) & 0xff), ++ static_cast(header.timestamp & 0xff), ++ }; + const FrameDecryptorInterface::Result decrypt_result = + frame_decryptor_->Decrypt( + cricket::MEDIA_TYPE_AUDIO, csrcs, +- /*additional_data=*/nullptr, ++ /*additional_data=*/additional_data_bytes, + rtc::ArrayView(payload, payload_data_length), + decrypted_audio_payload); + +diff --git a/audio/channel_send.cc b/audio/channel_send.cc +index 4a2700177b..7ebb501704 100644 +--- a/audio/channel_send.cc ++++ b/audio/channel_send.cc +@@ -320,10 +320,23 @@ int32_t ChannelSend::SendRtpAudio(AudioFrameType frameType, + + // Encrypt the audio payload into the buffer. + size_t bytes_written = 0; ++ const uint32_t additional_data_timestamp = ++ rtp_timestamp_without_offset + rtp_rtcp_->StartTimestamp(); ++ const uint8_t additional_data_bytes[8] = { ++ 0, ++ 0, ++ 0, ++ 0, ++ static_cast((additional_data_timestamp >> 24) & 0xff), ++ static_cast((additional_data_timestamp >> 16) & 0xff), ++ static_cast((additional_data_timestamp >> 8) & 0xff), ++ static_cast(additional_data_timestamp & 0xff), ++ }; ++ + int encrypt_status = frame_encryptor_->Encrypt( + cricket::MEDIA_TYPE_AUDIO, rtp_rtcp_->SSRC(), +- /*additional_data=*/nullptr, payload, encrypted_audio_payload, +- &bytes_written); ++ /*additional_data=*/additional_data_bytes, payload, ++ encrypted_audio_payload, &bytes_written); + if (encrypt_status != 0) { + RTC_DLOG(LS_ERROR) + << "Channel::SendData() failed encrypt audio payload: "