├── .circleci └── config.yml ├── .github └── workflows │ ├── build_android.yml │ ├── build_ios_develop.yml │ └── build_ios_release.yml ├── .gitignore ├── CHANGES.md ├── LICENSE ├── Makefile ├── README.md ├── config ├── android-m73.10 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ └── build_aar.py.diff ├── android-m75.16 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── BUILD.gn.diff │ │ └── build_aar.py.diff ├── android-m78.8 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── BUILD.gn.diff │ │ └── build_aar.py.diff ├── android-m79.5-onremovetrack │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ └── android.diff ├── android-m79.5 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── BUILD.gn.diff │ │ └── build_aar.py.diff ├── ios-m73.10-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ └── build_ios_libs.py.diff ├── ios-m73.10 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ └── build_ios_libs.py.diff ├── ios-m75.16-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m75.16 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m76.3-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ └── build_ios_libs.py.diff ├── ios-m76.3.1-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m76.3.1 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m76.3 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m78.8-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m78.8.1-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m78.8.1 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m78.8 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m79.5.0-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m79.5.0-recvonly │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ ├── build_ios_libs.py.diff │ │ └── mute.diff ├── ios-m79.5.0-shiguredo-develop │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ ├── patch │ │ ├── build_aar.py.diff │ │ ├── build_ios_libs.py.diff │ │ └── manual_audio_input.diff │ └── src │ │ ├── components │ │ └── audio │ │ │ ├── RTCAudioSession+Configuration.mm │ │ │ ├── RTCAudioSession+Private.h │ │ │ ├── RTCAudioSession.h │ │ │ ├── RTCAudioSession.mm │ │ │ ├── RTCAudioSessionConfiguration.h │ │ │ ├── RTCAudioSessionConfiguration.m │ │ │ ├── RTCNativeAudioSessionDelegateAdapter.h │ │ │ └── RTCNativeAudioSessionDelegateAdapter.mm │ │ └── native │ │ ├── api │ │ ├── audio_device_module.h │ │ └── audio_device_module.mm │ │ └── src │ │ └── audio │ │ ├── audio_device_ios.h │ │ ├── audio_device_ios.mm │ │ ├── audio_device_module_ios.h │ │ ├── audio_device_module_ios.mm │ │ ├── audio_session_observer.h │ │ ├── helpers.h │ │ ├── helpers.mm │ │ ├── voice_processing_audio_unit.h │ │ └── voice_processing_audio_unit.mm ├── ios-m79.5.0-shiguredo │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ ├── patch │ │ ├── build_aar.py.diff │ │ ├── build_ios_libs.py.diff │ │ └── manual_audio_input.diff │ └── src │ │ ├── components │ │ └── audio │ │ │ ├── RTCAudioSession+Configuration.mm │ │ │ ├── RTCAudioSession+Private.h │ │ │ ├── RTCAudioSession.h │ │ │ ├── RTCAudioSession.mm │ │ │ ├── RTCAudioSessionConfiguration.h │ │ │ ├── RTCAudioSessionConfiguration.m │ │ │ ├── RTCNativeAudioSessionDelegateAdapter.h │ │ │ └── RTCNativeAudioSessionDelegateAdapter.mm │ │ └── native │ │ ├── api │ │ ├── audio_device_module.h │ │ └── audio_device_module.mm │ │ └── src │ │ └── audio │ │ ├── audio_device_ios.h │ │ ├── audio_device_ios.mm │ │ ├── audio_device_module_ios.h │ │ ├── audio_device_module_ios.mm │ │ ├── audio_session_observer.h │ │ ├── helpers.h │ │ ├── helpers.mm │ │ ├── voice_processing_audio_unit.h │ │ └── voice_processing_audio_unit.mm ├── ios-m79.5.0 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m79.5.1-shiguredo │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ ├── patch │ │ ├── build_aar.py.diff │ │ ├── build_ios_libs.py.diff │ │ └── manual_audio_input.diff │ └── src │ │ ├── components │ │ └── audio │ │ │ ├── RTCAudioSession+Configuration.mm │ │ │ ├── RTCAudioSession+Private.h │ │ │ ├── RTCAudioSession.h │ │ │ ├── RTCAudioSession.mm │ │ │ ├── RTCAudioSessionConfiguration.h │ │ │ ├── RTCAudioSessionConfiguration.m │ │ │ ├── RTCNativeAudioSessionDelegateAdapter.h │ │ │ └── RTCNativeAudioSessionDelegateAdapter.mm │ │ └── native │ │ ├── api │ │ ├── audio_device_module.h │ │ └── audio_device_module.mm │ │ └── src │ │ └── audio │ │ ├── audio_device_ios.h │ │ ├── audio_device_ios.mm │ │ ├── audio_device_module_ios.h │ │ ├── audio_device_module_ios.mm │ │ ├── audio_session_observer.h │ │ ├── helpers.h │ │ ├── helpers.mm │ │ ├── voice_processing_audio_unit.h │ │ └── voice_processing_audio_unit.mm ├── ios-m80.6.0 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_aar.py.diff │ │ └── build_ios_libs.py.diff ├── ios-m81.9.0 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ └── build_ios_libs.py.diff ├── ios-m83.4103.12.0 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ │ ├── build_ios_libs.py.diff │ │ └── ios.diff └── ios-m84.4147.11.0 │ ├── CONFIG │ ├── GCLIENT │ ├── VERSION │ ├── patch.sh │ └── patch │ ├── build_ios_libs.py.diff │ ├── disable_code_switching.diff │ └── manual_audio_input.diff ├── docker-aar ├── Dockerfile ├── install-build-deps.sh └── sources.list ├── docs └── patch_shiguredo_ios.md └── scripts ├── build_all_android.sh ├── build_all_ios.sh ├── build_android.sh ├── build_ios.sh ├── fetch_depot_tools.sh ├── fetch_webrtc.sh ├── generate_version_android.sh ├── install-build-deps-android.sh ├── install-build-deps.sh ├── patch.sh └── reset.sh /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | jobs: 3 | build_android_m75_16: 4 | docker: 5 | - image: ubuntu:18.04 6 | steps: 7 | - checkout 8 | - run: 9 | command: apt-get update && apt-get install -y make lsb-release net-tools git curl python openjdk-8-jdk-headless 10 | - run: 11 | command: update-java-alternatives -s java-1.8.0-openjdk-amd64 12 | - run: 13 | command: make android-m75.16 14 | no_output_timeout: 2h 15 | build_ios_m75_16: 16 | macos: 17 | xcode: "10.2.1" 18 | steps: 19 | - checkout 20 | - run: 21 | command: make ios-m75.16 22 | no_output_timeout: 2h 23 | build_ios_m76_3: 24 | macos: 25 | xcode: "10.2.1" 26 | steps: 27 | - checkout 28 | - run: 29 | command: make ios-m76.3 30 | no_output_timeout: 2h 31 | build_ios_m76_3_develop: 32 | macos: 33 | xcode: "10.2.1" 34 | steps: 35 | - checkout 36 | - run: 37 | command: make ios-m76.3-develop 38 | no_output_timeout: 2h 39 | 40 | workflows: 41 | version: 2 42 | weekly_build_workflow: 43 | triggers: 44 | - schedule: 45 | # 週 1 、日曜日のみビルドする 46 | # UTCで記述する事、この場合は日本時間 20 時にしたいので -9 して 11 にしてある 47 | cron: "0 11 * * 0" 48 | filters: 49 | branches: 50 | only: 51 | - develop 52 | jobs: 53 | # - build_android_m75_16 54 | - build_ios_m76_3 55 | - build_ios_m76_3_develop 56 | -------------------------------------------------------------------------------- /.github/workflows/build_android.yml: -------------------------------------------------------------------------------- 1 | name: Build Android AAR 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - '*.md' 7 | schedule: 8 | - cron: "0 0 * * *" 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v1 15 | with: 16 | ref: develop 17 | - name: Build and archive 18 | run: make android-latest 19 | - name: Upload an artifact 20 | uses: actions/upload-artifact@v1 21 | with: 22 | name: android 23 | path: build/android 24 | -------------------------------------------------------------------------------- /.github/workflows/build_ios_develop.yml: -------------------------------------------------------------------------------- 1 | name: Build iOS develop 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - '*.md' 7 | schedule: 8 | - cron: "0 0 * * *" 9 | 10 | jobs: 11 | build-ios: 12 | runs-on: macOS-latest 13 | steps: 14 | - uses: actions/checkout@v1 15 | with: 16 | ref: develop 17 | - name: Build and archive 18 | run: make ios-latest-develop 19 | - name: Upload an artifact 20 | uses: actions/upload-artifact@v1 21 | with: 22 | name: WebRTC.framework.zip 23 | path: build/ios-develop/WebRTC.framework.zip 24 | 25 | release-ios: 26 | runs-on: macOS-latest 27 | if: contains(github.ref, 'tags/ios-m') 28 | needs: [build-ios] 29 | steps: 30 | - name: Download an artifact 31 | uses: actions/download-artifact@v1 32 | with: 33 | name: WebRTC.framework.zip 34 | - run: ls 35 | - name: Create release 36 | id: create_release 37 | uses: actions/create-release@v1.0.0 38 | env: 39 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 40 | with: 41 | tag_name: ${{ github.ref }} 42 | release_name: Release ${{ github.ref }} 43 | draft: false 44 | prerelease: false 45 | - name: Upload release asset 46 | uses: actions/upload-release-asset@v1.0.1 47 | env: 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 49 | with: 50 | upload_url: ${{ steps.create_release.outputs.upload_url }} 51 | asset_path: ./WebRTC.framework.zip 52 | asset_name: libwebrtc-ios-develop.zip 53 | asset_content_type: application/zip 54 | 55 | -------------------------------------------------------------------------------- /.github/workflows/build_ios_release.yml: -------------------------------------------------------------------------------- 1 | name: Build iOS release 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - '*.md' 7 | schedule: 8 | - cron: "0 0 * * *" 9 | 10 | jobs: 11 | build-ios: 12 | runs-on: macOS-latest 13 | steps: 14 | - uses: actions/checkout@v1 15 | with: 16 | ref: develop 17 | - name: Build and archive 18 | run: make ios-latest 19 | - name: Upload an artifact 20 | uses: actions/upload-artifact@v1 21 | with: 22 | name: libwebrtc 23 | path: build/ios/WebRTC.framework.zip 24 | 25 | release-ios: 26 | runs-on: macOS-latest 27 | if: contains(github.ref, 'tags/ios-m') 28 | needs: [build-ios] 29 | steps: 30 | - name: Download an artifact 31 | uses: actions/download-artifact@v1 32 | with: 33 | name: libwebrtc 34 | - name: Create release 35 | id: create_release 36 | uses: actions/create-release@v1.0.0 37 | env: 38 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 39 | with: 40 | tag_name: ${{ github.ref }} 41 | release_name: Release ${{ github.ref }} 42 | draft: false 43 | prerelease: false 44 | - name: Upload release asset 45 | uses: actions/upload-release-asset@v1.0.1 46 | env: 47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 48 | with: 49 | upload_url: ${{ steps.create_release.outputs.upload_url }} 50 | asset_path: ./libwebrtc/WebRTC.framework.zip 51 | asset_name: libwebrtc-ios-release.zip 52 | asset_content_type: application/zip 53 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | depot_tools 3 | webrtc/.gclient* 4 | webrtc/src 5 | webrtc/build 6 | webrtc/depot_tools 7 | webrtc-build 8 | dist 9 | WebRTC.framework 10 | sora-webrtc-* 11 | /build_info.json 12 | docker-aar/config/ 13 | docker-aar/scripts/ 14 | /THIRD_PARTY_LICENSES.md 15 | build 16 | -------------------------------------------------------------------------------- /CHANGES.md: -------------------------------------------------------------------------------- 1 | # 変更履歴 2 | 3 | - UPDATE 4 | - 下位互換がある変更 5 | - ADD 6 | - 下位互換がある追加 7 | - CHANGE 8 | - 下位互換のない変更 9 | - FIX 10 | - バグ修正 11 | 12 | # ios-m76.3.1 13 | 14 | - arm 用のバイナリを除いた 15 | 16 | - シミュレーター用のバイナリを含めるようにした 17 | 18 | # android-m75.16.0 19 | 20 | M75 コミットポジション 16 21 | 22 | # ビルドツールを shell script ベースに移行 23 | 24 | - Go ベースのビルドツールから shell script ベースのツールへ移行した 25 | - Docker スクリプトを shell script ベースに書き換えた 26 | - Git のタグを ios- / android- とプラットフォーム別に打つように変更した 27 | 28 | # m73.10.1 29 | 30 | - jitpack.io が m 付きを認識しなかったため AAR 作り直し 31 | 32 | # m73.10.0 33 | 34 | M73 コミットポジション 10 35 | 36 | # 72.26.0 37 | 38 | M72 コミットポジション 26 39 | 40 | # 71.16.0 41 | 42 | M71 コミットポジション 16 43 | 44 | # 70.17.0 45 | 46 | M70 コミットポジション 17 47 | 48 | # 70.14.0 49 | 50 | M70 コミットポジション 14 51 | 52 | # 68.10.1 53 | 54 | - [ADD] Docker での AAR ビルドに config.json フィールドいくつかを Java 定数フィールドとして 55 | 持つクラスを追加した。 56 | 57 | # 68.10.x 58 | 59 | M68 コミットポジション 10 60 | 61 | # 67.28.x 62 | 63 | M67 コミットポジション 28 64 | 65 | - [ADD] AAR ビルド用の Dockerfile, make ターゲットを追加した 66 | - [ADD] M68 お試しビルドをしたので、68.6.0 でビルド、AAR を 67 | sora-webrtc-android にアップロードした 68 | - [FIX] ios build から build_type が消えたため対応した 69 | - ios 用 patch の微修正 70 | - webrtc-build から build type 関連(static)を削除 71 | - [FIX] ios archive コマンドのパスを修正した 72 | - [ADD] build-clean コマンドを追加した 73 | - fetch, build でエラーになった場合に build-clean すると fetch の状態でビルドが可能 74 | - [ADD] build_info.json を gitignore に追加した 75 | - [FIX] ios ビルド後に dSYM diretory が存在しないため、archive からコピーを消した 76 | 77 | # 66.8.x 78 | 79 | M66 コミットポジション 8 80 | 81 | ## 66.8.2 82 | 83 | - [CHANGE] 設定ファイルの内容を全体的に変更した 84 | 85 | - [UPDATE] Google Paly services のライセンスに y で答えるよう変更した 86 | 87 | ## 66.8.1 88 | 89 | - [CHANGE] Android: gclient の設定ファイルを 66.8 に対応した 90 | 91 | ## 66.8.0 92 | 93 | - [CHANGE] コミットポジション 8 に対応した 94 | 95 | # 66.6.x 96 | 97 | M66 コミットポジション 6 98 | 99 | # 64.6.x 100 | 101 | M64 102 | 103 | # 63.13.x 104 | 105 | M63 106 | 107 | ## 63.13.0 108 | 109 | - [CHANGE] M63 のビルドに対応した 110 | 111 | - [CHANGE] webrtc-build.go のバージョンを WebRTC のバージョンと分けた 112 | 113 | - [CHANGE] 次のサブコマンドを削除した 114 | 115 | - all 116 | 117 | - setup 118 | 119 | - update 120 | 121 | - reset 122 | 123 | - debug 124 | 125 | - release 126 | 127 | - framework-debug (iOS) 128 | 129 | - framework-release (iOS) 130 | 131 | - static-debug (iOS) 132 | 133 | - static-release (iOS) 134 | 135 | - [CHANGE] "dist" サブコマンドを "archive" に変更した 136 | 137 | - [CHANGE] "fetch" サブコマンドで depot_tools をダウンロードするように変更した 138 | 139 | - [CHANGE] "build" サブコマンドは config.json で指定された設定のみをビルドするように変更した 140 | 141 | - [CHANGE] "-no-patch" コマンドラインオプションを削除した 142 | 143 | - [CHANGE] config.json に次の項目を追加した 144 | 145 | - ios_targets 146 | 147 | - ios_bitcode 148 | 149 | - build_config 150 | 151 | - vp9 152 | 153 | - apply_patch 154 | 155 | - patches 156 | 157 | - [CHANGE] パッチファイルを config.json で指定できるようにした 158 | 159 | # 62.12.x 160 | 161 | M62 162 | 163 | ## 60.12.0 164 | 165 | - [CHANGE] コミットポジション 12 のビルドに対応した 166 | 167 | - [CHANGE] コマンドラインオプション "-no-patch" を追加した 168 | 169 | - [CHANGE] gclient sync の実行をソースコードのチェックアウト後に変更した 170 | 171 | - [CHANGE] iOS: アーキテクチャに armv7 を追加した 172 | 173 | # 60.x 174 | 175 | ## 60.9.1 176 | 177 | - [CHANGE] コミットポジション 9 のビルドに対応した 178 | 179 | - [CHANGE] iOS: コンパイラに Xcode を使うようにした 180 | 181 | - [CHANGE] iOS: Xcode 8.3.3 に対応した 182 | 183 | - [CHANGE] iOS: Bitcode を有効にした 184 | 185 | ## 60.4.1 186 | 187 | - [CHANGE] アーキテクチャに x86_64 を追加した 188 | 189 | ## 60.4.0 190 | 191 | - [CHANGE] コミットポジション 4 のビルドに対応した 192 | 193 | - [CHANGE] サブコマンド "all", "update" を追加した 194 | 195 | ## 60.1.0 196 | 197 | - [CHANGE] M60 のビルドに対応した 198 | 199 | - [CHANGE] config.json で指定できた webrtc-build のバージョンをソースコードに直接記述した 200 | 201 | - [CHANGE] webrtc-build のサブコマンド名を短縮した 202 | 203 | # 59.x 204 | 205 | ## 59.1.4 206 | 207 | 60.4.0 以降に 59.1.3 からブランチを切ったため、以下の変更は 60.x に影響しない。 208 | 209 | - [CHANGE] アーキテクチャに x86_64 を追加した 210 | 211 | ## 59.1.3 212 | 213 | - [CHANGE] Makefile を追加した 214 | 215 | - [CHANGE] iOS: フレームワーク: WebRTC.h にインポートするヘッダーファイルを追加した 216 | 217 | - RTCCameraVideoCapturer.h 218 | 219 | - RTCMTLVideoView.h 220 | 221 | - RTCVideoCapturer.h 222 | 223 | - [FIX] アーカイブの拡張子が .zip になっていたのを .tar.gz に修正した 224 | 225 | ## 59.1.2 226 | 227 | - [CHANGE] パッチファイルをリリースバイナリに含める 228 | 229 | ## 59.1.1 230 | 231 | - [CHANGE] iOS: フレームワーク: ヘッダーファイルに RTCCameraVideoCapturer.h を追加する 232 | 233 | ## 59.1.0 234 | 235 | 最初のリリース。 236 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all dist clean aar copy-aar android-deps 2 | .PHONY: ios-shiguredo 3 | 4 | IOS_LATEST=m83.4103.12.0 5 | ANDROID_LATEST=m79.5 6 | 7 | SCRIPT_DIR=scripts 8 | IOS_BUILD_SCRIPT=./scripts/build_all_ios.sh 9 | ANDROID_BUILD_SCRIPT=./scripts/build_all_android.sh 10 | INSTALL_BUILD_DEPS_SCRIPT=$(SCRIPT_DIR)/install-build-deps.sh 11 | INSTALL_BUILD_DEPS_ANDROID_SCRIPT=$(SCRIPT_DIR)/install-build-deps-android.sh 12 | 13 | BUILD_IOS_DIR=build/ios 14 | IOS_FRAMEWORK=WebRTC.framework.zip 15 | BUILD_IOS_FRAMEWORK=$(BUILD_IOS_DIR)-$(IOS_LATEST)/$(IOS_FRAMEWORK) 16 | 17 | BUILD_ANDROID_DIR=build/android 18 | ANDROID_AAR=libwebrtc.aar 19 | 20 | ios-latest: ios-$(IOS_LATEST) 21 | rm -rf $(BUILD_IOS_DIR) 22 | mkdir $(BUILD_IOS_DIR) 23 | cp $(BUILD_IOS_DIR)-$(IOS_LATEST)/$(IOS_FRAMEWORK) $(BUILD_IOS_DIR) 24 | 25 | ios-latest-nofetch: ios-$(IOS_LATEST)-nofetch 26 | 27 | ios-latest-develop: ios-$(IOS_LATEST)-develop 28 | rm -rf $(BUILD_IOS_DIR)-develop 29 | mkdir $(BUILD_IOS_DIR)-develop 30 | cp $(BUILD_IOS_DIR)-$(IOS_LATEST)-develop/$(IOS_FRAMEWORK) $(BUILD_IOS_DIR)-develop 31 | 32 | ios-latest-develop-nofetch: ios-$(IOS_LATEST)-develop-nofetch 33 | 34 | android-latest: android-$(ANDROID_LATEST) 35 | rm -rf $(BUILD_ANDROID_DIR) 36 | mkdir $(BUILD_ANDROID_DIR) 37 | cp build/android-$(ANDROID_LATEST)/libwebrtc.aar $(BUILD_ANDROID_DIR) 38 | cp build/android-$(ANDROID_LATEST)/LICENSE.md $(BUILD_ANDROID_DIR)/THIRD_PARTY_LICENSES.md 39 | 40 | ios-%-nofetch: 41 | $(IOS_BUILD_SCRIPT) --nofetch config/ios-$* 42 | 43 | ios-%: 44 | $(IOS_BUILD_SCRIPT) config/ios-$* 45 | 46 | android-deps: 47 | ./$(INSTALL_BUILD_DEPS_SCRIPT) --no-chromeos-fonts --no-prompt 48 | ./$(INSTALL_BUILD_DEPS_ANDROID_SCRIPT) 49 | 50 | android-%-nofetch: 51 | $(ANDROID_BUILD_SCRIPT) --nofetch config/android-$* 52 | 53 | android-%: 54 | $(ANDROID_BUILD_SCRIPT) config/android-$* 55 | 56 | webrtc-build: 57 | go build -o webrtc-build cmd/main.go 58 | 59 | all: webrtc-build 60 | 61 | dist: 62 | ./webrtc-build selfdist 63 | 64 | clean: 65 | rm -rf webrtc-build sora-webrtc-build-* 66 | 67 | AAR_DIR = "android-aar-"$(shell date +%Y%m%d-%H%M%S) 68 | 69 | aar-android-%: 70 | rm -rf docker-aar/config 71 | mkdir -p docker-aar/config/ 72 | cp -a config/android-$* docker-aar/config/android-aar 73 | rm -rf docker-aar/scripts 74 | cp -a scripts docker-aar/scripts 75 | @echo AAR_VERSION=$(AAR_VERSION) 76 | rm -f sora-webrtc-$(AAR_VERSION)-android.zip 77 | docker build --progress=plain --rm -t sora-webrtc-build/docker-aar docker-aar 78 | $(MAKE) copy-aar 79 | 80 | copy-aar: 81 | (docker rm aar-container > /dev/null 2>&1 ; true) 82 | docker run --name aar-container sora-webrtc-build/docker-aar /bin/true 83 | echo "Output dir: " $(AAR_DIR) 84 | mkdir -p $(AAR_DIR) 85 | docker cp aar-container:/work/build/android-aar/libwebrtc.aar $(AAR_DIR)/libwebrtc.aar 86 | docker cp aar-container:/work/build/android-aar/LICENSE.md \ 87 | $(AAR_DIR)/THIRD_PARTY_LICENSES.md 88 | docker rm aar-container 89 | 90 | -------------------------------------------------------------------------------- /config/android-m73.10/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | AAR_ARCH="armeabi-v7a arm64-v8a" 5 | -------------------------------------------------------------------------------- /config/android-m73.10/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["android", "unix"] 11 | -------------------------------------------------------------------------------- /config/android-m73.10/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=73 2 | COMMIT=10 3 | REVISION=9b67cfa3d3735953d275c3c56f9a9f268bcd67bb 4 | MAINT=1 5 | -------------------------------------------------------------------------------- /config/android-m73.10/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/android/build_aar.py $PATCH_DIR/build_aar.py.diff 4 | patch -buN $RTC_DIR/sdk/android/BUILD.gn $PATCH_DIR/BUILD.gn.diff 5 | 6 | -------------------------------------------------------------------------------- /config/android-m73.10/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/android-m75.16/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | AAR_ARCH="armeabi-v7a arm64-v8a" 5 | -------------------------------------------------------------------------------- /config/android-m75.16/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["android", "unix"] 11 | -------------------------------------------------------------------------------- /config/android-m75.16/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=75 2 | COMMIT=16 3 | REVISION=159c16f3ceea1d02d08d51fc83d843019d773ec6 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/android-m75.16/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/android/build_aar.py $PATCH_DIR/build_aar.py.diff 4 | patch -buN $RTC_DIR/sdk/android/BUILD.gn $PATCH_DIR/BUILD.gn.diff 5 | 6 | -------------------------------------------------------------------------------- /config/android-m75.16/patch/BUILD.gn.diff: -------------------------------------------------------------------------------- 1 | --- BUILD.gn.orig 2019-03-29 15:25:43.725980912 +0900 2 | +++ BUILD.gn 2019-03-29 15:28:18.049043589 +0900 3 | @@ -193,6 +193,7 @@ 4 | java_files = [ 5 | "api/org/webrtc/RefCounted.java", 6 | "api/org/webrtc/Predicate.java", 7 | + "api/org/webrtc/WebrtcBuildVersion.java", 8 | "src/java/org/webrtc/CalledByNative.java", 9 | "src/java/org/webrtc/CalledByNativeUnchecked.java", 10 | "src/java/org/webrtc/Histogram.java", 11 | -------------------------------------------------------------------------------- /config/android-m75.16/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/android-m78.8/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | AAR_ARCH="armeabi-v7a arm64-v8a" 5 | -------------------------------------------------------------------------------- /config/android-m78.8/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["android", "unix"] 11 | -------------------------------------------------------------------------------- /config/android-m78.8/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=78 2 | COMMIT=8 3 | REVISION=0b2302e5e0418b6716fbc0b3927874fd3a842caf 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/android-m78.8/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/android/build_aar.py $PATCH_DIR/build_aar.py.diff 4 | patch -buN $RTC_DIR/sdk/android/BUILD.gn $PATCH_DIR/BUILD.gn.diff 5 | 6 | -------------------------------------------------------------------------------- /config/android-m78.8/patch/BUILD.gn.diff: -------------------------------------------------------------------------------- 1 | --- BUILD.gn.orig 2019-03-29 15:25:43.725980912 +0900 2 | +++ BUILD.gn 2019-03-29 15:28:18.049043589 +0900 3 | @@ -193,6 +193,7 @@ 4 | java_files = [ 5 | "api/org/webrtc/RefCounted.java", 6 | "api/org/webrtc/Predicate.java", 7 | + "api/org/webrtc/WebrtcBuildVersion.java", 8 | "src/java/org/webrtc/CalledByNative.java", 9 | "src/java/org/webrtc/CalledByNativeUnchecked.java", 10 | "src/java/org/webrtc/Histogram.java", 11 | -------------------------------------------------------------------------------- /config/android-m78.8/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/android-m79.5-onremovetrack/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | AAR_ARCH="armeabi-v7a arm64-v8a" 5 | -------------------------------------------------------------------------------- /config/android-m79.5-onremovetrack/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["android", "unix"] 11 | -------------------------------------------------------------------------------- /config/android-m79.5-onremovetrack/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/android-m79.5-onremovetrack/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/android.diff 4 | 5 | -------------------------------------------------------------------------------- /config/android-m79.5-onremovetrack/patch/android.diff: -------------------------------------------------------------------------------- 1 | diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn 2 | index f6fd46230c..d38a3ddcbd 100644 3 | --- a/sdk/android/BUILD.gn 4 | +++ b/sdk/android/BUILD.gn 5 | @@ -166,6 +166,7 @@ if (is_android) { 6 | java_files = [ 7 | "api/org/webrtc/RefCounted.java", 8 | "api/org/webrtc/Predicate.java", 9 | + "api/org/webrtc/WebrtcBuildVersion.java", 10 | "src/java/org/webrtc/CalledByNative.java", 11 | "src/java/org/webrtc/CalledByNativeUnchecked.java", 12 | "src/java/org/webrtc/Histogram.java", 13 | diff --git a/sdk/android/api/org/webrtc/PeerConnection.java b/sdk/android/api/org/webrtc/PeerConnection.java 14 | index b981520746..abda50766d 100644 15 | --- a/sdk/android/api/org/webrtc/PeerConnection.java 16 | +++ b/sdk/android/api/org/webrtc/PeerConnection.java 17 | @@ -143,6 +143,8 @@ public class PeerConnection { 18 | */ 19 | @CalledByNative("Observer") void onAddTrack(RtpReceiver receiver, MediaStream[] mediaStreams); 20 | 21 | + @CalledByNative("Observer") void onRemoveTrack(RtpReceiver receiver); 22 | + 23 | /** 24 | * Triggered when the signaling from SetRemoteDescription indicates that a transceiver 25 | * will be receiving media from a remote endpoint. This is only called if UNIFIED_PLAN 26 | diff --git a/sdk/android/src/jni/pc/peer_connection.cc b/sdk/android/src/jni/pc/peer_connection.cc 27 | index f40a7bff3a..b213eee0d4 100644 28 | --- a/sdk/android/src/jni/pc/peer_connection.cc 29 | +++ b/sdk/android/src/jni/pc/peer_connection.cc 30 | @@ -408,6 +408,14 @@ void PeerConnectionObserverJni::OnAddTrack( 31 | NativeToJavaMediaStreamArray(env, streams)); 32 | } 33 | 34 | +void PeerConnectionObserverJni::OnRemoveTrack( 35 | + rtc::scoped_refptr receiver) { 36 | + JNIEnv* env = AttachCurrentThreadIfNeeded(); 37 | + ScopedJavaLocalRef j_rtp_receiver = 38 | + NativeToJavaRtpReceiver(env, receiver); 39 | + Java_Observer_onRemoveTrack(env, j_observer_global_, j_rtp_receiver); 40 | +} 41 | + 42 | void PeerConnectionObserverJni::OnTrack( 43 | rtc::scoped_refptr transceiver) { 44 | JNIEnv* env = AttachCurrentThreadIfNeeded(); 45 | diff --git a/sdk/android/src/jni/pc/peer_connection.h b/sdk/android/src/jni/pc/peer_connection.h 46 | index a9e2af2a47..3e6a67bcee 100644 47 | --- a/sdk/android/src/jni/pc/peer_connection.h 48 | +++ b/sdk/android/src/jni/pc/peer_connection.h 49 | @@ -70,6 +70,7 @@ class PeerConnectionObserverJni : public PeerConnectionObserver { 50 | void OnAddTrack(rtc::scoped_refptr receiver, 51 | const std::vector>& 52 | streams) override; 53 | + void OnRemoveTrack(rtc::scoped_refptr receiver) override; 54 | void OnTrack( 55 | rtc::scoped_refptr transceiver) override; 56 | 57 | diff --git a/tools_webrtc/android/build_aar.py b/tools_webrtc/android/build_aar.py 58 | index 81e545d11c..07bf9afa8e 100755 59 | --- a/tools_webrtc/android/build_aar.py 60 | +++ b/tools_webrtc/android/build_aar.py 61 | @@ -65,6 +65,10 @@ def _ParseArgs(): 62 | help='Use goma.') 63 | parser.add_argument('--verbose', action='store_true', default=False, 64 | help='Debug logging.') 65 | + parser.add_argument('--build_config', default='release', 66 | + choices=['debug', 'release'], 67 | + help='The build config. Can be "debug" or "release". ' 68 | + 'Defaults to "release".') 69 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 70 | help="""Additional GN arguments to be used during Ninja generation. 71 | These are passed to gn inside `--args` switch and 72 | -------------------------------------------------------------------------------- /config/android-m79.5/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | AAR_ARCH="armeabi-v7a arm64-v8a" 5 | -------------------------------------------------------------------------------- /config/android-m79.5/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["android", "unix"] 11 | -------------------------------------------------------------------------------- /config/android-m79.5/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/android-m79.5/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/android/build_aar.py $PATCH_DIR/build_aar.py.diff 4 | patch -buN $RTC_DIR/sdk/android/BUILD.gn $PATCH_DIR/BUILD.gn.diff 5 | 6 | -------------------------------------------------------------------------------- /config/android-m79.5/patch/BUILD.gn.diff: -------------------------------------------------------------------------------- 1 | --- BUILD.gn.orig 2019-03-29 15:25:43.725980912 +0900 2 | +++ BUILD.gn 2019-03-29 15:28:18.049043589 +0900 3 | @@ -193,6 +193,7 @@ 4 | java_files = [ 5 | "api/org/webrtc/RefCounted.java", 6 | "api/org/webrtc/Predicate.java", 7 | + "api/org/webrtc/WebrtcBuildVersion.java", 8 | "src/java/org/webrtc/CalledByNative.java", 9 | "src/java/org/webrtc/CalledByNativeUnchecked.java", 10 | "src/java/org/webrtc/Histogram.java", 11 | -------------------------------------------------------------------------------- /config/android-m79.5/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m73.10-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH=arm64 5 | IOS_BITCODE=false 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m73.10-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m73.10-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=73 2 | COMMIT=10 3 | REVISION=9b67cfa3d3735953d275c3c56f9a9f268bcd67bb 4 | -------------------------------------------------------------------------------- /config/ios-m73.10-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m73.10-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m73.10/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm arm64" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m73.10/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m73.10/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=73 2 | COMMIT=10 3 | REVISION=9b67cfa3d3735953d275c3c56f9a9f268bcd67bb 4 | -------------------------------------------------------------------------------- /config/ios-m73.10/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m73.10/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m75.16-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64" 5 | IOS_BITCODE=false 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m75.16-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m75.16-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=75 2 | COMMIT=16 3 | REVISION=159c16f3ceea1d02d08d51fc83d843019d773ec6 4 | -------------------------------------------------------------------------------- /config/ios-m75.16-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m75.16-develop/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m75.16-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m75.16/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm arm64" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m75.16/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m75.16/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=75 2 | COMMIT=16 3 | REVISION=159c16f3ceea1d02d08d51fc83d843019d773ec6 4 | -------------------------------------------------------------------------------- /config/ios-m75.16/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m75.16/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m75.16/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m76.3-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64" 5 | IOS_BITCODE=false 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m76.3-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m76.3-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=76 2 | COMMIT=3 3 | REVISION=9863f3d246e2da7a2e1f42bbc5757f6af5ec5682 4 | -------------------------------------------------------------------------------- /config/ios-m76.3-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m76.3-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m76.3.1-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 x64" 5 | IOS_BITCODE=false 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m76.3.1-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m76.3.1-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=76 2 | COMMIT=3 3 | REVISION=9863f3d246e2da7a2e1f42bbc5757f6af5ec5682 4 | -------------------------------------------------------------------------------- /config/ios-m76.3.1-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m76.3.1-develop/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m76.3.1-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m76.3.1/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 x64" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m76.3.1/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m76.3.1/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=76 2 | COMMIT=3 3 | REVISION=9863f3d246e2da7a2e1f42bbc5757f6af5ec5682 4 | -------------------------------------------------------------------------------- /config/ios-m76.3.1/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m76.3.1/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m76.3.1/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m76.3/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm arm64" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m76.3/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m76.3/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=76 2 | COMMIT=3 3 | REVISION=9863f3d246e2da7a2e1f42bbc5757f6af5ec5682 4 | -------------------------------------------------------------------------------- /config/ios-m76.3/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m76.3/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m76.3/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m78.8-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 x64" 5 | IOS_BITCODE=false 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m78.8-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m78.8-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=78 2 | COMMIT=8 3 | REVISION=0b2302e5e0418b6716fbc0b3927874fd3a842caf 4 | -------------------------------------------------------------------------------- /config/ios-m78.8-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m78.8-develop/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m78.8-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m78.8.1-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=debug 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=false 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m78.8.1-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m78.8.1-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=78 2 | COMMIT=8 3 | REVISION=0b2302e5e0418b6716fbc0b3927874fd3a842caf 4 | -------------------------------------------------------------------------------- /config/ios-m78.8.1-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m78.8.1-develop/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m78.8.1-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m78.8.1/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m78.8.1/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m78.8.1/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=78 2 | COMMIT=8 3 | REVISION=0b2302e5e0418b6716fbc0b3927874fd3a842caf 4 | -------------------------------------------------------------------------------- /config/ios-m78.8.1/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m78.8.1/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m78.8.1/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m78.8/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 x64" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m78.8/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m78.8/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=78 2 | COMMIT=8 3 | REVISION=0b2302e5e0418b6716fbc0b3927874fd3a842caf 4 | -------------------------------------------------------------------------------- /config/ios-m78.8/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m78.8/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m78.8/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=debug 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=false 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-develop/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-recvonly/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-recvonly/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-recvonly/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-recvonly/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/mute.diff 5 | 6 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-recvonly/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-recvonly/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-recvonly/patch/mute.diff: -------------------------------------------------------------------------------- 1 | diff --git a/sdk/objc/components/audio/RTCAudioSession.mm b/sdk/objc/components/audio/RTCAudioSession.mm 2 | index 09ffa16fcc..01753fe659 100644 3 | --- a/sdk/objc/components/audio/RTCAudioSession.mm 4 | +++ b/sdk/objc/components/audio/RTCAudioSession.mm 5 | @@ -403,14 +403,17 @@ - (BOOL)setCategory:(NSString *)category 6 | if (![self checkLock:outError]) { 7 | return NO; 8 | } 9 | - return [self.session setCategory:category withOptions:options error:outError]; 10 | + RTCLog(@"setCategory: ignore category options: %@", category); 11 | + return [self.session setCategory:category error:outError]; 12 | } 13 | 14 | - (BOOL)setMode:(NSString *)mode error:(NSError **)outError { 15 | if (![self checkLock:outError]) { 16 | return NO; 17 | } 18 | - return [self.session setMode:mode error:outError]; 19 | + RTCLog(@"ignore setMode: %@", mode); 20 | + // return [self.session setMode:mode error:outError]; 21 | + return YES; 22 | } 23 | 24 | - (BOOL)setInputGain:(float)gain error:(NSError **)outError { 25 | diff --git a/sdk/objc/components/audio/RTCAudioSessionConfiguration.m b/sdk/objc/components/audio/RTCAudioSessionConfiguration.m 26 | index 2247e65ab5..3deacc3a92 100644 27 | --- a/sdk/objc/components/audio/RTCAudioSessionConfiguration.m 28 | +++ b/sdk/objc/components/audio/RTCAudioSessionConfiguration.m 29 | @@ -69,7 +69,7 @@ - (instancetype)init { 30 | // By default, using this category implies that our app’s audio is 31 | // nonmixable, hence activating the session will interrupt any other 32 | // audio sessions which are also nonmixable. 33 | - _category = AVAudioSessionCategoryPlayAndRecord; 34 | + _category = AVAudioSessionCategoryAmbient; 35 | _categoryOptions = AVAudioSessionCategoryOptionAllowBluetooth; 36 | 37 | // Specify mode for two-way voice communication (e.g. VoIP). 38 | diff --git a/sdk/objc/native/src/audio/voice_processing_audio_unit.mm b/sdk/objc/native/src/audio/voice_processing_audio_unit.mm 39 | index 15a09b31e2..796ae423c7 100644 40 | --- a/sdk/objc/native/src/audio/voice_processing_audio_unit.mm 41 | +++ b/sdk/objc/native/src/audio/voice_processing_audio_unit.mm 42 | @@ -91,7 +91,8 @@ static OSStatus GetAGCState(AudioUnit audio_unit, UInt32* enabled) { 43 | // I/O audio unit. 44 | AudioComponentDescription vpio_unit_description; 45 | vpio_unit_description.componentType = kAudioUnitType_Output; 46 | - vpio_unit_description.componentSubType = kAudioUnitSubType_VoiceProcessingIO; 47 | + //vpio_unit_description.componentSubType = kAudioUnitSubType_VoiceProcessingIO; 48 | + vpio_unit_description.componentSubType = kAudioUnitSubType_RemoteIO; 49 | vpio_unit_description.componentManufacturer = kAudioUnitManufacturer_Apple; 50 | vpio_unit_description.componentFlags = 0; 51 | vpio_unit_description.componentFlagsMask = 0; 52 | @@ -109,6 +110,7 @@ static OSStatus GetAGCState(AudioUnit audio_unit, UInt32* enabled) { 53 | return false; 54 | } 55 | 56 | + /* 57 | // Enable input on the input scope of the input element. 58 | UInt32 enable_input = 1; 59 | result = AudioUnitSetProperty(vpio_unit_, kAudioOutputUnitProperty_EnableIO, 60 | @@ -121,6 +123,7 @@ static OSStatus GetAGCState(AudioUnit audio_unit, UInt32* enabled) { 61 | (long)result); 62 | return false; 63 | } 64 | + */ 65 | 66 | // Enable output on the output scope of the output element. 67 | UInt32 enable_output = 1; 68 | @@ -165,6 +168,7 @@ static OSStatus GetAGCState(AudioUnit audio_unit, UInt32* enabled) { 69 | return false; 70 | } 71 | 72 | + /* 73 | // Specify the callback to be called by the I/O thread to us when input audio 74 | // is available. The recorded samples can then be obtained by calling the 75 | // AudioUnitRender() method. 76 | @@ -182,6 +186,7 @@ static OSStatus GetAGCState(AudioUnit audio_unit, UInt32* enabled) { 77 | (long)result); 78 | return false; 79 | } 80 | + */ 81 | 82 | state_ = kUninitialized; 83 | return true; 84 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH=arm64 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/manual_audio_input.diff 5 | 6 | #SRC_DIR=$PATCH_DIR/../src 7 | #SDK_DIR=$RTC_DIR/sdk/objc 8 | 9 | #echo "cp $SRC_DIR/components/audio/* $SDK_DIR/components/audio" 10 | #cp $SRC_DIR/components/audio/* $SDK_DIR/components/audio 11 | 12 | #echo "cp $SRC_DIR/native/api/* $SDK_DIR/native/api" 13 | #cp $SRC_DIR/native/api/* $SDK_DIR/native/api 14 | 15 | #echo "cp $SRC_DIR/native/src/audio/* $SDK_DIR/native/src/audio" 16 | #cp $SRC_DIR/native/src/audio/* $SDK_DIR/native/src/audio 17 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/components/audio/RTCAudioSession+Private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCAudioSession.h" 12 | #import 13 | #include "sdk/objc/native/src/audio/voice_processing_audio_unit.h" 14 | 15 | #include 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | @class RTCAudioSessionConfiguration; 20 | 21 | @interface RTCAudioSession () 22 | 23 | /** Number of times setActive:YES has succeeded without a balanced call to 24 | * setActive:NO. 25 | */ 26 | @property(nonatomic, readonly) int activationCount; 27 | 28 | /** The number of times |beginWebRTCSession| was called without a balanced call 29 | * to |endWebRTCSession|. 30 | */ 31 | @property(nonatomic, readonly) int webRTCSessionCount; 32 | 33 | /** Convenience BOOL that checks useManualAudio and isAudioEnebled. */ 34 | @property(readonly) BOOL canPlayOrRecord; 35 | 36 | /** Tracks whether we have been sent an interruption event that hasn't been matched by either an 37 | * interrupted end event or a foreground event. 38 | */ 39 | @property(nonatomic, assign) BOOL isInterrupted; 40 | 41 | - (BOOL)checkLock:(NSError **)outError; 42 | 43 | /** Adds the delegate to the list of delegates, and places it at the front of 44 | * the list. This delegate will be notified before other delegates of 45 | * audio events. 46 | */ 47 | - (void)pushDelegate:(id)delegate; 48 | 49 | /** Signals RTCAudioSession that a WebRTC session is about to begin and 50 | * audio configuration is needed. Will configure the audio session for WebRTC 51 | * if not already configured and if configuration is not delayed. 52 | * Successful calls must be balanced by a call to endWebRTCSession. 53 | */ 54 | - (BOOL)beginWebRTCSession:(NSError **)outError; 55 | 56 | /** Signals RTCAudioSession that a WebRTC session is about to end and audio 57 | * unconfiguration is needed. Will unconfigure the audio session for WebRTC 58 | * if this is the last unmatched call and if configuration is not delayed. 59 | */ 60 | - (BOOL)endWebRTCSession:(NSError **)outError; 61 | 62 | /** Configure the audio session for WebRTC. This call will fail if the session 63 | * is already configured. On other failures, we will attempt to restore the 64 | * previously used audio session configuration. 65 | * |lockForConfiguration| must be called first. 66 | * Successful calls to configureWebRTCSession must be matched by calls to 67 | * |unconfigureWebRTCSession|. 68 | */ 69 | - (BOOL)configureWebRTCSession:(NSError **)outError; 70 | 71 | /** Unconfigures the session for WebRTC. This will attempt to restore the 72 | * audio session to the settings used before |configureWebRTCSession| was 73 | * called. 74 | * |lockForConfiguration| must be called first. 75 | */ 76 | - (BOOL)unconfigureWebRTCSession:(NSError **)outError; 77 | 78 | /** Returns a configuration error with the given description. */ 79 | - (NSError *)configurationErrorWithDescription:(NSString *)description; 80 | 81 | // Properties and methods for tests. 82 | @property(nonatomic, readonly) std::vector<__weak id > delegates; 83 | 84 | - (void)notifyDidBeginInterruption; 85 | - (void)notifyDidEndInterruptionWithShouldResumeSession:(BOOL)shouldResumeSession; 86 | - (void)notifyDidChangeRouteWithReason:(AVAudioSessionRouteChangeReason)reason 87 | previousRoute:(AVAudioSessionRouteDescription *)previousRoute; 88 | - (void)notifyMediaServicesWereLost; 89 | - (void)notifyMediaServicesWereReset; 90 | - (void)notifyDidChangeCanPlayOrRecord:(BOOL)canPlayOrRecord; 91 | - (void)notifyDidStartPlayOrRecord; 92 | - (void)notifyDidStopPlayOrRecord; 93 | - (void)notifyDidDetectPlayoutGlitch:(int64_t)totalNumberOfGlitches; 94 | 95 | @property(nonatomic, readonly) webrtc::ios_adm::VoiceProcessingAudioUnit *vpAudioUnit; 96 | 97 | - (void)setVoiceProcessingAudioUnit:(webrtc::ios_adm::VoiceProcessingAudioUnit *)vpAudioUnit; 98 | - (void)finishInitializeInput; 99 | 100 | @end 101 | 102 | NS_ASSUME_NONNULL_END 103 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/components/audio/RTCAudioSessionConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import 12 | #import 13 | 14 | #import "RTCMacros.h" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | RTC_EXTERN const int kRTCAudioSessionPreferredNumberOfChannels; 19 | RTC_EXTERN const double kRTCAudioSessionHighPerformanceSampleRate; 20 | RTC_EXTERN const double kRTCAudioSessionLowComplexitySampleRate; 21 | RTC_EXTERN const double kRTCAudioSessionHighPerformanceIOBufferDuration; 22 | RTC_EXTERN const double kRTCAudioSessionLowComplexityIOBufferDuration; 23 | 24 | // Struct to hold configuration values. 25 | RTC_OBJC_EXPORT 26 | @interface RTCAudioSessionConfiguration : NSObject 27 | 28 | @property(nonatomic, strong) NSString *category; 29 | @property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; 30 | @property(nonatomic, strong) NSString *mode; 31 | @property(nonatomic, assign) double sampleRate; 32 | @property(nonatomic, assign) NSTimeInterval ioBufferDuration; 33 | @property(nonatomic, assign) NSInteger inputNumberOfChannels; 34 | @property(nonatomic, assign) NSInteger outputNumberOfChannels; 35 | 36 | /** Initializes configuration to defaults. */ 37 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 38 | 39 | /** Returns the current configuration of the audio session. */ 40 | + (instancetype)currentConfiguration; 41 | /** Returns the configuration that WebRTC needs. */ 42 | + (instancetype)webRTCConfiguration; 43 | /** Provide a way to override the default configuration. */ 44 | + (void)setWebRTCConfiguration:(RTCAudioSessionConfiguration *)configuration; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/components/audio/RTCNativeAudioSessionDelegateAdapter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCAudioSession.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | namespace webrtc { 16 | class AudioSessionObserver; 17 | } 18 | 19 | /** Adapter that forwards RTCAudioSessionDelegate calls to the appropriate 20 | * methods on the AudioSessionObserver. 21 | */ 22 | @interface RTCNativeAudioSessionDelegateAdapter : NSObject 23 | 24 | - (instancetype)init NS_UNAVAILABLE; 25 | 26 | /** |observer| is a raw pointer and should be kept alive 27 | * for this object's lifetime. 28 | */ 29 | - (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer NS_DESIGNATED_INITIALIZER; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/components/audio/RTCNativeAudioSessionDelegateAdapter.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCNativeAudioSessionDelegateAdapter.h" 12 | 13 | #include "sdk/objc/native/src/audio/audio_session_observer.h" 14 | 15 | #import "base/RTCLogging.h" 16 | 17 | @implementation RTCNativeAudioSessionDelegateAdapter { 18 | webrtc::AudioSessionObserver *_observer; 19 | } 20 | 21 | - (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer { 22 | RTC_DCHECK(observer); 23 | if (self = [super init]) { 24 | _observer = observer; 25 | } 26 | return self; 27 | } 28 | 29 | #pragma mark - RTCAudioSessionDelegate 30 | 31 | - (void)audioSessionDidBeginInterruption:(RTCAudioSession *)session { 32 | _observer->OnInterruptionBegin(); 33 | } 34 | 35 | - (void)audioSessionDidEndInterruption:(RTCAudioSession *)session 36 | shouldResumeSession:(BOOL)shouldResumeSession { 37 | _observer->OnInterruptionEnd(); 38 | } 39 | 40 | - (void)audioSessionDidChangeRoute:(RTCAudioSession *)session 41 | reason:(AVAudioSessionRouteChangeReason)reason 42 | previousRoute:(AVAudioSessionRouteDescription *)previousRoute { 43 | switch (reason) { 44 | case AVAudioSessionRouteChangeReasonUnknown: 45 | case AVAudioSessionRouteChangeReasonNewDeviceAvailable: 46 | case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: 47 | case AVAudioSessionRouteChangeReasonCategoryChange: 48 | // It turns out that we see a category change (at least in iOS 9.2) 49 | // when making a switch from a BT device to e.g. Speaker using the 50 | // iOS Control Center and that we therefore must check if the sample 51 | // rate has changed. And if so is the case, restart the audio unit. 52 | case AVAudioSessionRouteChangeReasonOverride: 53 | case AVAudioSessionRouteChangeReasonWakeFromSleep: 54 | case AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory: 55 | _observer->OnValidRouteChange(); 56 | break; 57 | case AVAudioSessionRouteChangeReasonRouteConfigurationChange: 58 | // The set of input and output ports has not changed, but their 59 | // configuration has, e.g., a port’s selected data source has 60 | // changed. Ignore this type of route change since we are focusing 61 | // on detecting headset changes. 62 | RTCLog(@"Ignoring RouteConfigurationChange"); 63 | break; 64 | } 65 | } 66 | 67 | - (void)audioSessionMediaServerTerminated:(RTCAudioSession *)session { 68 | } 69 | 70 | - (void)audioSessionMediaServerReset:(RTCAudioSession *)session { 71 | } 72 | 73 | - (void)audioSession:(RTCAudioSession *)session 74 | didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord { 75 | _observer->OnCanPlayOrRecordChange(canPlayOrRecord); 76 | } 77 | 78 | - (void)audioSessionDidStartPlayOrRecord:(RTCAudioSession *)session { 79 | } 80 | 81 | - (void)audioSessionDidStopPlayOrRecord:(RTCAudioSession *)session { 82 | } 83 | 84 | - (void)audioSession:(RTCAudioSession *)audioSession 85 | didChangeOutputVolume:(float)outputVolume { 86 | _observer->OnChangedOutputVolume(); 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/native/api/audio_device_module.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 12 | #define SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 13 | 14 | #include 15 | 16 | #include "modules/audio_device/include/audio_device.h" 17 | 18 | namespace webrtc { 19 | 20 | rtc::scoped_refptr CreateAudioDeviceModule(); 21 | 22 | } // namespace webrtc 23 | 24 | #endif // SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 25 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/native/api/audio_device_module.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include "audio_device_module.h" 12 | 13 | #include "rtc_base/logging.h" 14 | #include "rtc_base/ref_counted_object.h" 15 | 16 | #include "sdk/objc/native/src/audio/audio_device_module_ios.h" 17 | 18 | namespace webrtc { 19 | 20 | rtc::scoped_refptr CreateAudioDeviceModule() { 21 | RTC_LOG(INFO) << __FUNCTION__; 22 | #if defined(WEBRTC_IOS) 23 | return new rtc::RefCountedObject(); 24 | #else 25 | RTC_LOG(LERROR) 26 | << "current platform is not supported => this module will self destruct!"; 27 | return nullptr; 28 | #endif 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/native/src/audio/audio_session_observer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 13 | 14 | #include "rtc_base/thread.h" 15 | 16 | namespace webrtc { 17 | 18 | // Observer interface for listening to AVAudioSession events. 19 | class AudioSessionObserver { 20 | public: 21 | // Called when audio session interruption begins. 22 | virtual void OnInterruptionBegin() = 0; 23 | 24 | // Called when audio session interruption ends. 25 | virtual void OnInterruptionEnd() = 0; 26 | 27 | // Called when audio route changes. 28 | virtual void OnValidRouteChange() = 0; 29 | 30 | // Called when the ability to play or record changes. 31 | virtual void OnCanPlayOrRecordChange(bool can_play_or_record) = 0; 32 | 33 | virtual void OnChangedOutputVolume() = 0; 34 | 35 | protected: 36 | virtual ~AudioSessionObserver() {} 37 | }; 38 | 39 | } // namespace webrtc 40 | 41 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 42 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/native/src/audio/helpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 13 | 14 | #include 15 | 16 | namespace webrtc { 17 | namespace ios { 18 | 19 | bool CheckAndLogError(BOOL success, NSError* error); 20 | 21 | NSString* NSStringFromStdString(const std::string& stdString); 22 | std::string StdStringFromNSString(NSString* nsString); 23 | 24 | // Return thread ID as a string. 25 | std::string GetThreadId(); 26 | 27 | // Return thread ID as string suitable for debug logging. 28 | std::string GetThreadInfo(); 29 | 30 | // Returns [NSThread currentThread] description as string. 31 | // Example: {number = 1, name = main} 32 | std::string GetCurrentThreadDescription(); 33 | 34 | #if defined(WEBRTC_IOS) 35 | // Returns the current name of the operating system. 36 | std::string GetSystemName(); 37 | 38 | // Returns the current version of the operating system as a string. 39 | std::string GetSystemVersionAsString(); 40 | 41 | // Returns the version of the operating system in double representation. 42 | // Uses a cached value of the system version. 43 | double GetSystemVersion(); 44 | 45 | // Returns the device type. 46 | // Examples: ”iPhone” and ”iPod touch”. 47 | std::string GetDeviceType(); 48 | #endif // defined(WEBRTC_IOS) 49 | 50 | // Returns a more detailed device name. 51 | // Examples: "iPhone 5s (GSM)" and "iPhone 6 Plus". 52 | std::string GetDeviceName(); 53 | 54 | // Returns the name of the process. Does not uniquely identify the process. 55 | std::string GetProcessName(); 56 | 57 | // Returns the identifier of the process (often called process ID). 58 | int GetProcessID(); 59 | 60 | // Returns a string containing the version of the operating system on which the 61 | // process is executing. The string is string is human readable, localized, and 62 | // is appropriate for displaying to the user. 63 | std::string GetOSVersionString(); 64 | 65 | // Returns the number of processing cores available on the device. 66 | int GetProcessorCount(); 67 | 68 | #if defined(WEBRTC_IOS) 69 | // Indicates whether Low Power Mode is enabled on the iOS device. 70 | bool GetLowPowerModeEnabled(); 71 | #endif 72 | 73 | } // namespace ios 74 | } // namespace webrtc 75 | 76 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 77 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo-develop/src/native/src/audio/helpers.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import 12 | #import 13 | #if defined(WEBRTC_IOS) 14 | #import 15 | #endif 16 | 17 | #include 18 | 19 | #include "helpers.h" 20 | #include "rtc_base/checks.h" 21 | #include "rtc_base/logging.h" 22 | 23 | namespace webrtc { 24 | namespace ios { 25 | 26 | NSString* NSStringFromStdString(const std::string& stdString) { 27 | // std::string may contain null termination character so we construct 28 | // using length. 29 | return [[NSString alloc] initWithBytes:stdString.data() 30 | length:stdString.length() 31 | encoding:NSUTF8StringEncoding]; 32 | } 33 | 34 | std::string StdStringFromNSString(NSString* nsString) { 35 | NSData* charData = [nsString dataUsingEncoding:NSUTF8StringEncoding]; 36 | return std::string(reinterpret_cast([charData bytes]), 37 | [charData length]); 38 | } 39 | 40 | bool CheckAndLogError(BOOL success, NSError* error) { 41 | if (!success) { 42 | NSString* msg = 43 | [NSString stringWithFormat:@"Error: %ld, %@, %@", (long)error.code, 44 | error.localizedDescription, 45 | error.localizedFailureReason]; 46 | RTC_LOG(LS_ERROR) << StdStringFromNSString(msg); 47 | return false; 48 | } 49 | return true; 50 | } 51 | 52 | // TODO(henrika): see if it is possible to move to GetThreadName in 53 | // platform_thread.h and base it on pthread methods instead. 54 | std::string GetCurrentThreadDescription() { 55 | NSString* name = [NSString stringWithFormat:@"%@", [NSThread currentThread]]; 56 | return StdStringFromNSString(name); 57 | } 58 | 59 | #if defined(WEBRTC_IOS) 60 | std::string GetSystemName() { 61 | NSString* osName = [[UIDevice currentDevice] systemName]; 62 | return StdStringFromNSString(osName); 63 | } 64 | 65 | std::string GetSystemVersionAsString() { 66 | NSString* osVersion = [[UIDevice currentDevice] systemVersion]; 67 | return StdStringFromNSString(osVersion); 68 | } 69 | 70 | std::string GetDeviceType() { 71 | NSString* deviceModel = [[UIDevice currentDevice] model]; 72 | return StdStringFromNSString(deviceModel); 73 | } 74 | 75 | bool GetLowPowerModeEnabled() { 76 | return [NSProcessInfo processInfo].lowPowerModeEnabled; 77 | } 78 | #endif 79 | 80 | std::string GetDeviceName() { 81 | size_t size; 82 | sysctlbyname("hw.machine", NULL, &size, NULL, 0); 83 | std::unique_ptr machine; 84 | machine.reset(new char[size]); 85 | sysctlbyname("hw.machine", machine.get(), &size, NULL, 0); 86 | return std::string(machine.get()); 87 | } 88 | 89 | std::string GetProcessName() { 90 | NSString* processName = [NSProcessInfo processInfo].processName; 91 | return StdStringFromNSString(processName); 92 | } 93 | 94 | int GetProcessID() { 95 | return [NSProcessInfo processInfo].processIdentifier; 96 | } 97 | 98 | std::string GetOSVersionString() { 99 | NSString* osVersion = 100 | [NSProcessInfo processInfo].operatingSystemVersionString; 101 | return StdStringFromNSString(osVersion); 102 | } 103 | 104 | int GetProcessorCount() { 105 | return [NSProcessInfo processInfo].processorCount; 106 | } 107 | 108 | } // namespace ios 109 | } // namespace webrtc 110 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/manual_audio_input.diff 5 | 6 | #SRC_DIR=$PATCH_DIR/../src 7 | #SDK_DIR=$RTC_DIR/sdk/objc 8 | 9 | #echo "cp $SRC_DIR/components/audio/* $SDK_DIR/components/audio" 10 | #cp $SRC_DIR/components/audio/* $SDK_DIR/components/audio 11 | 12 | #echo "cp $SRC_DIR/native/api/* $SDK_DIR/native/api" 13 | #cp $SRC_DIR/native/api/* $SDK_DIR/native/api 14 | 15 | #echo "cp $SRC_DIR/native/src/audio/* $SDK_DIR/native/src/audio" 16 | #cp $SRC_DIR/native/src/audio/* $SDK_DIR/native/src/audio 17 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/components/audio/RTCAudioSession+Private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCAudioSession.h" 12 | #import 13 | #include "sdk/objc/native/src/audio/voice_processing_audio_unit.h" 14 | 15 | #include 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | @class RTCAudioSessionConfiguration; 20 | 21 | @interface RTCAudioSession () 22 | 23 | /** Number of times setActive:YES has succeeded without a balanced call to 24 | * setActive:NO. 25 | */ 26 | @property(nonatomic, readonly) int activationCount; 27 | 28 | /** The number of times |beginWebRTCSession| was called without a balanced call 29 | * to |endWebRTCSession|. 30 | */ 31 | @property(nonatomic, readonly) int webRTCSessionCount; 32 | 33 | /** Convenience BOOL that checks useManualAudio and isAudioEnebled. */ 34 | @property(readonly) BOOL canPlayOrRecord; 35 | 36 | /** Tracks whether we have been sent an interruption event that hasn't been matched by either an 37 | * interrupted end event or a foreground event. 38 | */ 39 | @property(nonatomic, assign) BOOL isInterrupted; 40 | 41 | - (BOOL)checkLock:(NSError **)outError; 42 | 43 | /** Adds the delegate to the list of delegates, and places it at the front of 44 | * the list. This delegate will be notified before other delegates of 45 | * audio events. 46 | */ 47 | - (void)pushDelegate:(id)delegate; 48 | 49 | /** Signals RTCAudioSession that a WebRTC session is about to begin and 50 | * audio configuration is needed. Will configure the audio session for WebRTC 51 | * if not already configured and if configuration is not delayed. 52 | * Successful calls must be balanced by a call to endWebRTCSession. 53 | */ 54 | - (BOOL)beginWebRTCSession:(NSError **)outError; 55 | 56 | /** Signals RTCAudioSession that a WebRTC session is about to end and audio 57 | * unconfiguration is needed. Will unconfigure the audio session for WebRTC 58 | * if this is the last unmatched call and if configuration is not delayed. 59 | */ 60 | - (BOOL)endWebRTCSession:(NSError **)outError; 61 | 62 | /** Configure the audio session for WebRTC. This call will fail if the session 63 | * is already configured. On other failures, we will attempt to restore the 64 | * previously used audio session configuration. 65 | * |lockForConfiguration| must be called first. 66 | * Successful calls to configureWebRTCSession must be matched by calls to 67 | * |unconfigureWebRTCSession|. 68 | */ 69 | - (BOOL)configureWebRTCSession:(NSError **)outError; 70 | 71 | /** Unconfigures the session for WebRTC. This will attempt to restore the 72 | * audio session to the settings used before |configureWebRTCSession| was 73 | * called. 74 | * |lockForConfiguration| must be called first. 75 | */ 76 | - (BOOL)unconfigureWebRTCSession:(NSError **)outError; 77 | 78 | /** Returns a configuration error with the given description. */ 79 | - (NSError *)configurationErrorWithDescription:(NSString *)description; 80 | 81 | // Properties and methods for tests. 82 | @property(nonatomic, readonly) std::vector<__weak id > delegates; 83 | 84 | - (void)notifyDidBeginInterruption; 85 | - (void)notifyDidEndInterruptionWithShouldResumeSession:(BOOL)shouldResumeSession; 86 | - (void)notifyDidChangeRouteWithReason:(AVAudioSessionRouteChangeReason)reason 87 | previousRoute:(AVAudioSessionRouteDescription *)previousRoute; 88 | - (void)notifyMediaServicesWereLost; 89 | - (void)notifyMediaServicesWereReset; 90 | - (void)notifyDidChangeCanPlayOrRecord:(BOOL)canPlayOrRecord; 91 | - (void)notifyDidStartPlayOrRecord; 92 | - (void)notifyDidStopPlayOrRecord; 93 | - (void)notifyDidDetectPlayoutGlitch:(int64_t)totalNumberOfGlitches; 94 | 95 | @property(nonatomic, readonly) webrtc::ios_adm::VoiceProcessingAudioUnit *vpAudioUnit; 96 | 97 | - (void)startVoiceProcessingAudioUnit:(webrtc::ios_adm::VoiceProcessingAudioUnit *)vpAudioUnit; 98 | - (void)stopVoiceProcessingAudioUnit; 99 | - (void)finishInitializeInput; 100 | 101 | @end 102 | 103 | NS_ASSUME_NONNULL_END 104 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/components/audio/RTCAudioSessionConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import 12 | #import 13 | 14 | #import "RTCMacros.h" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | RTC_EXTERN const int kRTCAudioSessionPreferredNumberOfChannels; 19 | RTC_EXTERN const double kRTCAudioSessionHighPerformanceSampleRate; 20 | RTC_EXTERN const double kRTCAudioSessionLowComplexitySampleRate; 21 | RTC_EXTERN const double kRTCAudioSessionHighPerformanceIOBufferDuration; 22 | RTC_EXTERN const double kRTCAudioSessionLowComplexityIOBufferDuration; 23 | 24 | // Struct to hold configuration values. 25 | RTC_OBJC_EXPORT 26 | @interface RTCAudioSessionConfiguration : NSObject 27 | 28 | @property(nonatomic, strong) NSString *category; 29 | @property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; 30 | @property(nonatomic, strong) NSString *mode; 31 | @property(nonatomic, assign) double sampleRate; 32 | @property(nonatomic, assign) NSTimeInterval ioBufferDuration; 33 | @property(nonatomic, assign) NSInteger inputNumberOfChannels; 34 | @property(nonatomic, assign) NSInteger outputNumberOfChannels; 35 | 36 | /** Initializes configuration to defaults. */ 37 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 38 | 39 | /** Returns the current configuration of the audio session. */ 40 | + (instancetype)currentConfiguration; 41 | /** Returns the configuration that WebRTC needs. */ 42 | + (instancetype)webRTCConfiguration; 43 | /** Provide a way to override the default configuration. */ 44 | + (void)setWebRTCConfiguration:(RTCAudioSessionConfiguration *)configuration; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/components/audio/RTCNativeAudioSessionDelegateAdapter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCAudioSession.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | namespace webrtc { 16 | class AudioSessionObserver; 17 | } 18 | 19 | /** Adapter that forwards RTCAudioSessionDelegate calls to the appropriate 20 | * methods on the AudioSessionObserver. 21 | */ 22 | @interface RTCNativeAudioSessionDelegateAdapter : NSObject 23 | 24 | - (instancetype)init NS_UNAVAILABLE; 25 | 26 | /** |observer| is a raw pointer and should be kept alive 27 | * for this object's lifetime. 28 | */ 29 | - (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer NS_DESIGNATED_INITIALIZER; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/components/audio/RTCNativeAudioSessionDelegateAdapter.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCNativeAudioSessionDelegateAdapter.h" 12 | 13 | #include "sdk/objc/native/src/audio/audio_session_observer.h" 14 | 15 | #import "base/RTCLogging.h" 16 | 17 | @implementation RTCNativeAudioSessionDelegateAdapter { 18 | webrtc::AudioSessionObserver *_observer; 19 | } 20 | 21 | - (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer { 22 | RTC_DCHECK(observer); 23 | if (self = [super init]) { 24 | _observer = observer; 25 | } 26 | return self; 27 | } 28 | 29 | #pragma mark - RTCAudioSessionDelegate 30 | 31 | - (void)audioSessionDidBeginInterruption:(RTCAudioSession *)session { 32 | _observer->OnInterruptionBegin(); 33 | } 34 | 35 | - (void)audioSessionDidEndInterruption:(RTCAudioSession *)session 36 | shouldResumeSession:(BOOL)shouldResumeSession { 37 | _observer->OnInterruptionEnd(); 38 | } 39 | 40 | - (void)audioSessionDidChangeRoute:(RTCAudioSession *)session 41 | reason:(AVAudioSessionRouteChangeReason)reason 42 | previousRoute:(AVAudioSessionRouteDescription *)previousRoute { 43 | switch (reason) { 44 | case AVAudioSessionRouteChangeReasonUnknown: 45 | case AVAudioSessionRouteChangeReasonNewDeviceAvailable: 46 | case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: 47 | case AVAudioSessionRouteChangeReasonCategoryChange: 48 | // It turns out that we see a category change (at least in iOS 9.2) 49 | // when making a switch from a BT device to e.g. Speaker using the 50 | // iOS Control Center and that we therefore must check if the sample 51 | // rate has changed. And if so is the case, restart the audio unit. 52 | case AVAudioSessionRouteChangeReasonOverride: 53 | case AVAudioSessionRouteChangeReasonWakeFromSleep: 54 | case AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory: 55 | _observer->OnValidRouteChange(); 56 | break; 57 | case AVAudioSessionRouteChangeReasonRouteConfigurationChange: 58 | // The set of input and output ports has not changed, but their 59 | // configuration has, e.g., a port’s selected data source has 60 | // changed. Ignore this type of route change since we are focusing 61 | // on detecting headset changes. 62 | RTCLog(@"Ignoring RouteConfigurationChange"); 63 | break; 64 | } 65 | } 66 | 67 | - (void)audioSessionMediaServerTerminated:(RTCAudioSession *)session { 68 | } 69 | 70 | - (void)audioSessionMediaServerReset:(RTCAudioSession *)session { 71 | } 72 | 73 | - (void)audioSession:(RTCAudioSession *)session 74 | didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord { 75 | _observer->OnCanPlayOrRecordChange(canPlayOrRecord); 76 | } 77 | 78 | - (void)audioSessionDidStartPlayOrRecord:(RTCAudioSession *)session { 79 | } 80 | 81 | - (void)audioSessionDidStopPlayOrRecord:(RTCAudioSession *)session { 82 | } 83 | 84 | - (void)audioSession:(RTCAudioSession *)audioSession 85 | didChangeOutputVolume:(float)outputVolume { 86 | _observer->OnChangedOutputVolume(); 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/native/api/audio_device_module.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 12 | #define SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 13 | 14 | #include 15 | 16 | #include "modules/audio_device/include/audio_device.h" 17 | 18 | namespace webrtc { 19 | 20 | rtc::scoped_refptr CreateAudioDeviceModule(); 21 | 22 | } // namespace webrtc 23 | 24 | #endif // SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 25 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/native/api/audio_device_module.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include "audio_device_module.h" 12 | 13 | #include "rtc_base/logging.h" 14 | #include "rtc_base/ref_counted_object.h" 15 | 16 | #include "sdk/objc/native/src/audio/audio_device_module_ios.h" 17 | 18 | namespace webrtc { 19 | 20 | rtc::scoped_refptr CreateAudioDeviceModule() { 21 | RTC_LOG(INFO) << __FUNCTION__; 22 | #if defined(WEBRTC_IOS) 23 | return new rtc::RefCountedObject(); 24 | #else 25 | RTC_LOG(LERROR) 26 | << "current platform is not supported => this module will self destruct!"; 27 | return nullptr; 28 | #endif 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/native/src/audio/audio_device_module_ios.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_DEVICE_MODULE_IOS_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_DEVICE_MODULE_IOS_H_ 13 | 14 | #include 15 | 16 | #include "audio_device_ios.h" 17 | 18 | #include "api/task_queue/task_queue_factory.h" 19 | #include "modules/audio_device/audio_device_buffer.h" 20 | #include "modules/audio_device/include/audio_device.h" 21 | #include "rtc_base/checks.h" 22 | #include "rtc_base/critical_section.h" 23 | 24 | namespace webrtc { 25 | 26 | class AudioDeviceGeneric; 27 | 28 | namespace ios_adm { 29 | 30 | class AudioDeviceModuleIOS : public AudioDeviceModule { 31 | public: 32 | int32_t AttachAudioBuffer(); 33 | 34 | AudioDeviceModuleIOS(); 35 | ~AudioDeviceModuleIOS() override; 36 | 37 | // Retrieve the currently utilized audio layer 38 | int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; 39 | 40 | // Full-duplex transportation of PCM audio 41 | int32_t RegisterAudioCallback(AudioTransport* audioCallback) override; 42 | 43 | // Main initializaton and termination 44 | int32_t Init() override; 45 | int32_t Terminate() override; 46 | bool Initialized() const override; 47 | 48 | // Device enumeration 49 | int16_t PlayoutDevices() override; 50 | int16_t RecordingDevices() override; 51 | int32_t PlayoutDeviceName(uint16_t index, 52 | char name[kAdmMaxDeviceNameSize], 53 | char guid[kAdmMaxGuidSize]) override; 54 | int32_t RecordingDeviceName(uint16_t index, 55 | char name[kAdmMaxDeviceNameSize], 56 | char guid[kAdmMaxGuidSize]) override; 57 | 58 | // Device selection 59 | int32_t SetPlayoutDevice(uint16_t index) override; 60 | int32_t SetPlayoutDevice(WindowsDeviceType device) override; 61 | int32_t SetRecordingDevice(uint16_t index) override; 62 | int32_t SetRecordingDevice(WindowsDeviceType device) override; 63 | 64 | // Audio transport initialization 65 | int32_t PlayoutIsAvailable(bool* available) override; 66 | int32_t InitPlayout() override; 67 | bool PlayoutIsInitialized() const override; 68 | int32_t RecordingIsAvailable(bool* available) override; 69 | int32_t InitRecording() override; 70 | bool RecordingIsInitialized() const override; 71 | 72 | // Audio transport control 73 | int32_t StartPlayout() override; 74 | int32_t StopPlayout() override; 75 | bool Playing() const override; 76 | int32_t StartRecording() override; 77 | int32_t StopRecording() override; 78 | bool Recording() const override; 79 | 80 | // Audio mixer initialization 81 | int32_t InitSpeaker() override; 82 | bool SpeakerIsInitialized() const override; 83 | int32_t InitMicrophone() override; 84 | bool MicrophoneIsInitialized() const override; 85 | 86 | // Speaker volume controls 87 | int32_t SpeakerVolumeIsAvailable(bool* available) override; 88 | int32_t SetSpeakerVolume(uint32_t volume) override; 89 | int32_t SpeakerVolume(uint32_t* volume) const override; 90 | int32_t MaxSpeakerVolume(uint32_t* maxVolume) const override; 91 | int32_t MinSpeakerVolume(uint32_t* minVolume) const override; 92 | 93 | // Microphone volume controls 94 | int32_t MicrophoneVolumeIsAvailable(bool* available) override; 95 | int32_t SetMicrophoneVolume(uint32_t volume) override; 96 | int32_t MicrophoneVolume(uint32_t* volume) const override; 97 | int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override; 98 | int32_t MinMicrophoneVolume(uint32_t* minVolume) const override; 99 | 100 | // Speaker mute control 101 | int32_t SpeakerMuteIsAvailable(bool* available) override; 102 | int32_t SetSpeakerMute(bool enable) override; 103 | int32_t SpeakerMute(bool* enabled) const override; 104 | 105 | // Microphone mute control 106 | int32_t MicrophoneMuteIsAvailable(bool* available) override; 107 | int32_t SetMicrophoneMute(bool enable) override; 108 | int32_t MicrophoneMute(bool* enabled) const override; 109 | 110 | // Stereo support 111 | int32_t StereoPlayoutIsAvailable(bool* available) const override; 112 | int32_t SetStereoPlayout(bool enable) override; 113 | int32_t StereoPlayout(bool* enabled) const override; 114 | int32_t StereoRecordingIsAvailable(bool* available) const override; 115 | int32_t SetStereoRecording(bool enable) override; 116 | int32_t StereoRecording(bool* enabled) const override; 117 | 118 | // Delay information and control 119 | int32_t PlayoutDelay(uint16_t* delayMS) const override; 120 | 121 | bool BuiltInAECIsAvailable() const override; 122 | int32_t EnableBuiltInAEC(bool enable) override; 123 | bool BuiltInAGCIsAvailable() const override; 124 | int32_t EnableBuiltInAGC(bool enable) override; 125 | bool BuiltInNSIsAvailable() const override; 126 | int32_t EnableBuiltInNS(bool enable) override; 127 | 128 | int32_t GetPlayoutUnderrunCount() const override; 129 | 130 | #if defined(WEBRTC_IOS) 131 | int GetPlayoutAudioParameters(AudioParameters* params) const override; 132 | int GetRecordAudioParameters(AudioParameters* params) const override; 133 | #endif // WEBRTC_IOS 134 | private: 135 | bool initialized_ = false; 136 | const std::unique_ptr task_queue_factory_; 137 | std::unique_ptr audio_device_; 138 | std::unique_ptr audio_device_buffer_; 139 | }; 140 | } // namespace ios_adm 141 | } // namespace webrtc 142 | 143 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_DEVICE_MODULE_IOS_H_ 144 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/native/src/audio/audio_session_observer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 13 | 14 | #include "rtc_base/thread.h" 15 | 16 | namespace webrtc { 17 | 18 | // Observer interface for listening to AVAudioSession events. 19 | class AudioSessionObserver { 20 | public: 21 | // Called when audio session interruption begins. 22 | virtual void OnInterruptionBegin() = 0; 23 | 24 | // Called when audio session interruption ends. 25 | virtual void OnInterruptionEnd() = 0; 26 | 27 | // Called when audio route changes. 28 | virtual void OnValidRouteChange() = 0; 29 | 30 | // Called when the ability to play or record changes. 31 | virtual void OnCanPlayOrRecordChange(bool can_play_or_record) = 0; 32 | 33 | virtual void OnChangedOutputVolume() = 0; 34 | 35 | protected: 36 | virtual ~AudioSessionObserver() {} 37 | }; 38 | 39 | } // namespace webrtc 40 | 41 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 42 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/native/src/audio/helpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 13 | 14 | #include 15 | 16 | namespace webrtc { 17 | namespace ios { 18 | 19 | bool CheckAndLogError(BOOL success, NSError* error); 20 | 21 | NSString* NSStringFromStdString(const std::string& stdString); 22 | std::string StdStringFromNSString(NSString* nsString); 23 | 24 | // Return thread ID as a string. 25 | std::string GetThreadId(); 26 | 27 | // Return thread ID as string suitable for debug logging. 28 | std::string GetThreadInfo(); 29 | 30 | // Returns [NSThread currentThread] description as string. 31 | // Example: {number = 1, name = main} 32 | std::string GetCurrentThreadDescription(); 33 | 34 | #if defined(WEBRTC_IOS) 35 | // Returns the current name of the operating system. 36 | std::string GetSystemName(); 37 | 38 | // Returns the current version of the operating system as a string. 39 | std::string GetSystemVersionAsString(); 40 | 41 | // Returns the version of the operating system in double representation. 42 | // Uses a cached value of the system version. 43 | double GetSystemVersion(); 44 | 45 | // Returns the device type. 46 | // Examples: ”iPhone” and ”iPod touch”. 47 | std::string GetDeviceType(); 48 | #endif // defined(WEBRTC_IOS) 49 | 50 | // Returns a more detailed device name. 51 | // Examples: "iPhone 5s (GSM)" and "iPhone 6 Plus". 52 | std::string GetDeviceName(); 53 | 54 | // Returns the name of the process. Does not uniquely identify the process. 55 | std::string GetProcessName(); 56 | 57 | // Returns the identifier of the process (often called process ID). 58 | int GetProcessID(); 59 | 60 | // Returns a string containing the version of the operating system on which the 61 | // process is executing. The string is string is human readable, localized, and 62 | // is appropriate for displaying to the user. 63 | std::string GetOSVersionString(); 64 | 65 | // Returns the number of processing cores available on the device. 66 | int GetProcessorCount(); 67 | 68 | #if defined(WEBRTC_IOS) 69 | // Indicates whether Low Power Mode is enabled on the iOS device. 70 | bool GetLowPowerModeEnabled(); 71 | #endif 72 | 73 | } // namespace ios 74 | } // namespace webrtc 75 | 76 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 77 | -------------------------------------------------------------------------------- /config/ios-m79.5.0-shiguredo/src/native/src/audio/helpers.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import 12 | #import 13 | #if defined(WEBRTC_IOS) 14 | #import 15 | #endif 16 | 17 | #include 18 | 19 | #include "helpers.h" 20 | #include "rtc_base/checks.h" 21 | #include "rtc_base/logging.h" 22 | 23 | namespace webrtc { 24 | namespace ios { 25 | 26 | NSString* NSStringFromStdString(const std::string& stdString) { 27 | // std::string may contain null termination character so we construct 28 | // using length. 29 | return [[NSString alloc] initWithBytes:stdString.data() 30 | length:stdString.length() 31 | encoding:NSUTF8StringEncoding]; 32 | } 33 | 34 | std::string StdStringFromNSString(NSString* nsString) { 35 | NSData* charData = [nsString dataUsingEncoding:NSUTF8StringEncoding]; 36 | return std::string(reinterpret_cast([charData bytes]), 37 | [charData length]); 38 | } 39 | 40 | bool CheckAndLogError(BOOL success, NSError* error) { 41 | if (!success) { 42 | NSString* msg = 43 | [NSString stringWithFormat:@"Error: %ld, %@, %@", (long)error.code, 44 | error.localizedDescription, 45 | error.localizedFailureReason]; 46 | RTC_LOG(LS_ERROR) << StdStringFromNSString(msg); 47 | return false; 48 | } 49 | return true; 50 | } 51 | 52 | // TODO(henrika): see if it is possible to move to GetThreadName in 53 | // platform_thread.h and base it on pthread methods instead. 54 | std::string GetCurrentThreadDescription() { 55 | NSString* name = [NSString stringWithFormat:@"%@", [NSThread currentThread]]; 56 | return StdStringFromNSString(name); 57 | } 58 | 59 | #if defined(WEBRTC_IOS) 60 | std::string GetSystemName() { 61 | NSString* osName = [[UIDevice currentDevice] systemName]; 62 | return StdStringFromNSString(osName); 63 | } 64 | 65 | std::string GetSystemVersionAsString() { 66 | NSString* osVersion = [[UIDevice currentDevice] systemVersion]; 67 | return StdStringFromNSString(osVersion); 68 | } 69 | 70 | std::string GetDeviceType() { 71 | NSString* deviceModel = [[UIDevice currentDevice] model]; 72 | return StdStringFromNSString(deviceModel); 73 | } 74 | 75 | bool GetLowPowerModeEnabled() { 76 | return [NSProcessInfo processInfo].lowPowerModeEnabled; 77 | } 78 | #endif 79 | 80 | std::string GetDeviceName() { 81 | size_t size; 82 | sysctlbyname("hw.machine", NULL, &size, NULL, 0); 83 | std::unique_ptr machine; 84 | machine.reset(new char[size]); 85 | sysctlbyname("hw.machine", machine.get(), &size, NULL, 0); 86 | return std::string(machine.get()); 87 | } 88 | 89 | std::string GetProcessName() { 90 | NSString* processName = [NSProcessInfo processInfo].processName; 91 | return StdStringFromNSString(processName); 92 | } 93 | 94 | int GetProcessID() { 95 | return [NSProcessInfo processInfo].processIdentifier; 96 | } 97 | 98 | std::string GetOSVersionString() { 99 | NSString* osVersion = 100 | [NSProcessInfo processInfo].operatingSystemVersionString; 101 | return StdStringFromNSString(osVersion); 102 | } 103 | 104 | int GetProcessorCount() { 105 | return [NSProcessInfo processInfo].processorCount; 106 | } 107 | 108 | } // namespace ios 109 | } // namespace webrtc 110 | -------------------------------------------------------------------------------- /config/ios-m79.5.0/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m79.5.0/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m79.5.0/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.0/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.0/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m79.5.0/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=79 2 | COMMIT=5 3 | REVISION=b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b 4 | MAINT=1 5 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/manual_audio_input.diff 5 | 6 | #SRC_DIR=$PATCH_DIR/../src 7 | #SDK_DIR=$RTC_DIR/sdk/objc 8 | 9 | #echo "cp $SRC_DIR/components/audio/* $SDK_DIR/components/audio" 10 | #cp $SRC_DIR/components/audio/* $SDK_DIR/components/audio 11 | 12 | #echo "cp $SRC_DIR/native/api/* $SDK_DIR/native/api" 13 | #cp $SRC_DIR/native/api/* $SDK_DIR/native/api 14 | 15 | #echo "cp $SRC_DIR/native/src/audio/* $SDK_DIR/native/src/audio" 16 | #cp $SRC_DIR/native/src/audio/* $SDK_DIR/native/src/audio 17 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/components/audio/RTCAudioSession+Private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCAudioSession.h" 12 | #import 13 | #include "sdk/objc/native/src/audio/voice_processing_audio_unit.h" 14 | 15 | #include 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | @class RTCAudioSessionConfiguration; 20 | 21 | @interface RTCAudioSession () 22 | 23 | /** Number of times setActive:YES has succeeded without a balanced call to 24 | * setActive:NO. 25 | */ 26 | @property(nonatomic, readonly) int activationCount; 27 | 28 | /** The number of times |beginWebRTCSession| was called without a balanced call 29 | * to |endWebRTCSession|. 30 | */ 31 | @property(nonatomic, readonly) int webRTCSessionCount; 32 | 33 | /** Convenience BOOL that checks useManualAudio and isAudioEnebled. */ 34 | @property(readonly) BOOL canPlayOrRecord; 35 | 36 | /** Tracks whether we have been sent an interruption event that hasn't been matched by either an 37 | * interrupted end event or a foreground event. 38 | */ 39 | @property(nonatomic, assign) BOOL isInterrupted; 40 | 41 | - (BOOL)checkLock:(NSError **)outError; 42 | 43 | /** Adds the delegate to the list of delegates, and places it at the front of 44 | * the list. This delegate will be notified before other delegates of 45 | * audio events. 46 | */ 47 | - (void)pushDelegate:(id)delegate; 48 | 49 | /** Signals RTCAudioSession that a WebRTC session is about to begin and 50 | * audio configuration is needed. Will configure the audio session for WebRTC 51 | * if not already configured and if configuration is not delayed. 52 | * Successful calls must be balanced by a call to endWebRTCSession. 53 | */ 54 | - (BOOL)beginWebRTCSession:(NSError **)outError; 55 | 56 | /** Signals RTCAudioSession that a WebRTC session is about to end and audio 57 | * unconfiguration is needed. Will unconfigure the audio session for WebRTC 58 | * if this is the last unmatched call and if configuration is not delayed. 59 | */ 60 | - (BOOL)endWebRTCSession:(NSError **)outError; 61 | 62 | /** Configure the audio session for WebRTC. This call will fail if the session 63 | * is already configured. On other failures, we will attempt to restore the 64 | * previously used audio session configuration. 65 | * |lockForConfiguration| must be called first. 66 | * Successful calls to configureWebRTCSession must be matched by calls to 67 | * |unconfigureWebRTCSession|. 68 | */ 69 | - (BOOL)configureWebRTCSession:(NSError **)outError; 70 | 71 | /** Unconfigures the session for WebRTC. This will attempt to restore the 72 | * audio session to the settings used before |configureWebRTCSession| was 73 | * called. 74 | * |lockForConfiguration| must be called first. 75 | */ 76 | - (BOOL)unconfigureWebRTCSession:(NSError **)outError; 77 | 78 | /** Returns a configuration error with the given description. */ 79 | - (NSError *)configurationErrorWithDescription:(NSString *)description; 80 | 81 | // Properties and methods for tests. 82 | @property(nonatomic, readonly) std::vector<__weak id > delegates; 83 | 84 | - (void)notifyDidBeginInterruption; 85 | - (void)notifyDidEndInterruptionWithShouldResumeSession:(BOOL)shouldResumeSession; 86 | - (void)notifyDidChangeRouteWithReason:(AVAudioSessionRouteChangeReason)reason 87 | previousRoute:(AVAudioSessionRouteDescription *)previousRoute; 88 | - (void)notifyMediaServicesWereLost; 89 | - (void)notifyMediaServicesWereReset; 90 | - (void)notifyDidChangeCanPlayOrRecord:(BOOL)canPlayOrRecord; 91 | - (void)notifyDidStartPlayOrRecord; 92 | - (void)notifyDidStopPlayOrRecord; 93 | - (void)notifyDidDetectPlayoutGlitch:(int64_t)totalNumberOfGlitches; 94 | 95 | @property(nonatomic, readonly) webrtc::ios_adm::VoiceProcessingAudioUnit *vpAudioUnit; 96 | 97 | - (void)startVoiceProcessingAudioUnit:(webrtc::ios_adm::VoiceProcessingAudioUnit *)vpAudioUnit; 98 | - (void)stopVoiceProcessingAudioUnit; 99 | - (void)finishInitializeInput; 100 | 101 | @end 102 | 103 | NS_ASSUME_NONNULL_END 104 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/components/audio/RTCAudioSessionConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import 12 | #import 13 | 14 | #import "RTCMacros.h" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | RTC_EXTERN const int kRTCAudioSessionPreferredNumberOfChannels; 19 | RTC_EXTERN const double kRTCAudioSessionHighPerformanceSampleRate; 20 | RTC_EXTERN const double kRTCAudioSessionLowComplexitySampleRate; 21 | RTC_EXTERN const double kRTCAudioSessionHighPerformanceIOBufferDuration; 22 | RTC_EXTERN const double kRTCAudioSessionLowComplexityIOBufferDuration; 23 | 24 | // Struct to hold configuration values. 25 | RTC_OBJC_EXPORT 26 | @interface RTCAudioSessionConfiguration : NSObject 27 | 28 | @property(nonatomic, strong) NSString *category; 29 | @property(nonatomic, assign) AVAudioSessionCategoryOptions categoryOptions; 30 | @property(nonatomic, strong) NSString *mode; 31 | @property(nonatomic, assign) double sampleRate; 32 | @property(nonatomic, assign) NSTimeInterval ioBufferDuration; 33 | @property(nonatomic, assign) NSInteger inputNumberOfChannels; 34 | @property(nonatomic, assign) NSInteger outputNumberOfChannels; 35 | 36 | /** Initializes configuration to defaults. */ 37 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 38 | 39 | /** Returns the current configuration of the audio session. */ 40 | + (instancetype)currentConfiguration; 41 | /** Returns the configuration that WebRTC needs. */ 42 | + (instancetype)webRTCConfiguration; 43 | /** Provide a way to override the default configuration. */ 44 | + (void)setWebRTCConfiguration:(RTCAudioSessionConfiguration *)configuration; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/components/audio/RTCNativeAudioSessionDelegateAdapter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCAudioSession.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | namespace webrtc { 16 | class AudioSessionObserver; 17 | } 18 | 19 | /** Adapter that forwards RTCAudioSessionDelegate calls to the appropriate 20 | * methods on the AudioSessionObserver. 21 | */ 22 | @interface RTCNativeAudioSessionDelegateAdapter : NSObject 23 | 24 | - (instancetype)init NS_UNAVAILABLE; 25 | 26 | /** |observer| is a raw pointer and should be kept alive 27 | * for this object's lifetime. 28 | */ 29 | - (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer NS_DESIGNATED_INITIALIZER; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/components/audio/RTCNativeAudioSessionDelegateAdapter.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import "RTCNativeAudioSessionDelegateAdapter.h" 12 | 13 | #include "sdk/objc/native/src/audio/audio_session_observer.h" 14 | 15 | #import "base/RTCLogging.h" 16 | 17 | @implementation RTCNativeAudioSessionDelegateAdapter { 18 | webrtc::AudioSessionObserver *_observer; 19 | } 20 | 21 | - (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer { 22 | RTC_DCHECK(observer); 23 | if (self = [super init]) { 24 | _observer = observer; 25 | } 26 | return self; 27 | } 28 | 29 | #pragma mark - RTCAudioSessionDelegate 30 | 31 | - (void)audioSessionDidBeginInterruption:(RTCAudioSession *)session { 32 | _observer->OnInterruptionBegin(); 33 | } 34 | 35 | - (void)audioSessionDidEndInterruption:(RTCAudioSession *)session 36 | shouldResumeSession:(BOOL)shouldResumeSession { 37 | _observer->OnInterruptionEnd(); 38 | } 39 | 40 | - (void)audioSessionDidChangeRoute:(RTCAudioSession *)session 41 | reason:(AVAudioSessionRouteChangeReason)reason 42 | previousRoute:(AVAudioSessionRouteDescription *)previousRoute { 43 | switch (reason) { 44 | case AVAudioSessionRouteChangeReasonUnknown: 45 | case AVAudioSessionRouteChangeReasonNewDeviceAvailable: 46 | case AVAudioSessionRouteChangeReasonOldDeviceUnavailable: 47 | case AVAudioSessionRouteChangeReasonCategoryChange: 48 | // It turns out that we see a category change (at least in iOS 9.2) 49 | // when making a switch from a BT device to e.g. Speaker using the 50 | // iOS Control Center and that we therefore must check if the sample 51 | // rate has changed. And if so is the case, restart the audio unit. 52 | case AVAudioSessionRouteChangeReasonOverride: 53 | case AVAudioSessionRouteChangeReasonWakeFromSleep: 54 | case AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory: 55 | _observer->OnValidRouteChange(); 56 | break; 57 | case AVAudioSessionRouteChangeReasonRouteConfigurationChange: 58 | // The set of input and output ports has not changed, but their 59 | // configuration has, e.g., a port’s selected data source has 60 | // changed. Ignore this type of route change since we are focusing 61 | // on detecting headset changes. 62 | RTCLog(@"Ignoring RouteConfigurationChange"); 63 | break; 64 | } 65 | } 66 | 67 | - (void)audioSessionMediaServerTerminated:(RTCAudioSession *)session { 68 | } 69 | 70 | - (void)audioSessionMediaServerReset:(RTCAudioSession *)session { 71 | } 72 | 73 | - (void)audioSession:(RTCAudioSession *)session 74 | didChangeCanPlayOrRecord:(BOOL)canPlayOrRecord { 75 | _observer->OnCanPlayOrRecordChange(canPlayOrRecord); 76 | } 77 | 78 | - (void)audioSessionDidStartPlayOrRecord:(RTCAudioSession *)session { 79 | } 80 | 81 | - (void)audioSessionDidStopPlayOrRecord:(RTCAudioSession *)session { 82 | } 83 | 84 | - (void)audioSession:(RTCAudioSession *)audioSession 85 | didChangeOutputVolume:(float)outputVolume { 86 | _observer->OnChangedOutputVolume(); 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/native/api/audio_device_module.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 12 | #define SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 13 | 14 | #include 15 | 16 | #include "modules/audio_device/include/audio_device.h" 17 | 18 | namespace webrtc { 19 | 20 | rtc::scoped_refptr CreateAudioDeviceModule(); 21 | 22 | } // namespace webrtc 23 | 24 | #endif // SDK_OBJC_NATIVE_API_AUDIO_DEVICE_MODULE_H_ 25 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/native/api/audio_device_module.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include "audio_device_module.h" 12 | 13 | #include "rtc_base/logging.h" 14 | #include "rtc_base/ref_counted_object.h" 15 | 16 | #include "sdk/objc/native/src/audio/audio_device_module_ios.h" 17 | 18 | namespace webrtc { 19 | 20 | rtc::scoped_refptr CreateAudioDeviceModule() { 21 | RTC_LOG(INFO) << __FUNCTION__; 22 | #if defined(WEBRTC_IOS) 23 | return new rtc::RefCountedObject(); 24 | #else 25 | RTC_LOG(LERROR) 26 | << "current platform is not supported => this module will self destruct!"; 27 | return nullptr; 28 | #endif 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/native/src/audio/audio_device_module_ios.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_DEVICE_MODULE_IOS_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_DEVICE_MODULE_IOS_H_ 13 | 14 | #include 15 | 16 | #include "audio_device_ios.h" 17 | 18 | #include "api/task_queue/task_queue_factory.h" 19 | #include "modules/audio_device/audio_device_buffer.h" 20 | #include "modules/audio_device/include/audio_device.h" 21 | #include "rtc_base/checks.h" 22 | #include "rtc_base/critical_section.h" 23 | 24 | namespace webrtc { 25 | 26 | class AudioDeviceGeneric; 27 | 28 | namespace ios_adm { 29 | 30 | class AudioDeviceModuleIOS : public AudioDeviceModule { 31 | public: 32 | int32_t AttachAudioBuffer(); 33 | 34 | AudioDeviceModuleIOS(); 35 | ~AudioDeviceModuleIOS() override; 36 | 37 | // Retrieve the currently utilized audio layer 38 | int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; 39 | 40 | // Full-duplex transportation of PCM audio 41 | int32_t RegisterAudioCallback(AudioTransport* audioCallback) override; 42 | 43 | // Main initializaton and termination 44 | int32_t Init() override; 45 | int32_t Terminate() override; 46 | bool Initialized() const override; 47 | 48 | // Device enumeration 49 | int16_t PlayoutDevices() override; 50 | int16_t RecordingDevices() override; 51 | int32_t PlayoutDeviceName(uint16_t index, 52 | char name[kAdmMaxDeviceNameSize], 53 | char guid[kAdmMaxGuidSize]) override; 54 | int32_t RecordingDeviceName(uint16_t index, 55 | char name[kAdmMaxDeviceNameSize], 56 | char guid[kAdmMaxGuidSize]) override; 57 | 58 | // Device selection 59 | int32_t SetPlayoutDevice(uint16_t index) override; 60 | int32_t SetPlayoutDevice(WindowsDeviceType device) override; 61 | int32_t SetRecordingDevice(uint16_t index) override; 62 | int32_t SetRecordingDevice(WindowsDeviceType device) override; 63 | 64 | // Audio transport initialization 65 | int32_t PlayoutIsAvailable(bool* available) override; 66 | int32_t InitPlayout() override; 67 | bool PlayoutIsInitialized() const override; 68 | int32_t RecordingIsAvailable(bool* available) override; 69 | int32_t InitRecording() override; 70 | bool RecordingIsInitialized() const override; 71 | 72 | // Audio transport control 73 | int32_t StartPlayout() override; 74 | int32_t StopPlayout() override; 75 | bool Playing() const override; 76 | int32_t StartRecording() override; 77 | int32_t StopRecording() override; 78 | bool Recording() const override; 79 | 80 | // Audio mixer initialization 81 | int32_t InitSpeaker() override; 82 | bool SpeakerIsInitialized() const override; 83 | int32_t InitMicrophone() override; 84 | bool MicrophoneIsInitialized() const override; 85 | 86 | // Speaker volume controls 87 | int32_t SpeakerVolumeIsAvailable(bool* available) override; 88 | int32_t SetSpeakerVolume(uint32_t volume) override; 89 | int32_t SpeakerVolume(uint32_t* volume) const override; 90 | int32_t MaxSpeakerVolume(uint32_t* maxVolume) const override; 91 | int32_t MinSpeakerVolume(uint32_t* minVolume) const override; 92 | 93 | // Microphone volume controls 94 | int32_t MicrophoneVolumeIsAvailable(bool* available) override; 95 | int32_t SetMicrophoneVolume(uint32_t volume) override; 96 | int32_t MicrophoneVolume(uint32_t* volume) const override; 97 | int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override; 98 | int32_t MinMicrophoneVolume(uint32_t* minVolume) const override; 99 | 100 | // Speaker mute control 101 | int32_t SpeakerMuteIsAvailable(bool* available) override; 102 | int32_t SetSpeakerMute(bool enable) override; 103 | int32_t SpeakerMute(bool* enabled) const override; 104 | 105 | // Microphone mute control 106 | int32_t MicrophoneMuteIsAvailable(bool* available) override; 107 | int32_t SetMicrophoneMute(bool enable) override; 108 | int32_t MicrophoneMute(bool* enabled) const override; 109 | 110 | // Stereo support 111 | int32_t StereoPlayoutIsAvailable(bool* available) const override; 112 | int32_t SetStereoPlayout(bool enable) override; 113 | int32_t StereoPlayout(bool* enabled) const override; 114 | int32_t StereoRecordingIsAvailable(bool* available) const override; 115 | int32_t SetStereoRecording(bool enable) override; 116 | int32_t StereoRecording(bool* enabled) const override; 117 | 118 | // Delay information and control 119 | int32_t PlayoutDelay(uint16_t* delayMS) const override; 120 | 121 | bool BuiltInAECIsAvailable() const override; 122 | int32_t EnableBuiltInAEC(bool enable) override; 123 | bool BuiltInAGCIsAvailable() const override; 124 | int32_t EnableBuiltInAGC(bool enable) override; 125 | bool BuiltInNSIsAvailable() const override; 126 | int32_t EnableBuiltInNS(bool enable) override; 127 | 128 | int32_t GetPlayoutUnderrunCount() const override; 129 | 130 | #if defined(WEBRTC_IOS) 131 | int GetPlayoutAudioParameters(AudioParameters* params) const override; 132 | int GetRecordAudioParameters(AudioParameters* params) const override; 133 | #endif // WEBRTC_IOS 134 | private: 135 | bool initialized_ = false; 136 | const std::unique_ptr task_queue_factory_; 137 | std::unique_ptr audio_device_; 138 | std::unique_ptr audio_device_buffer_; 139 | }; 140 | } // namespace ios_adm 141 | } // namespace webrtc 142 | 143 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_DEVICE_MODULE_IOS_H_ 144 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/native/src/audio/audio_session_observer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 13 | 14 | #include "rtc_base/thread.h" 15 | 16 | namespace webrtc { 17 | 18 | // Observer interface for listening to AVAudioSession events. 19 | class AudioSessionObserver { 20 | public: 21 | // Called when audio session interruption begins. 22 | virtual void OnInterruptionBegin() = 0; 23 | 24 | // Called when audio session interruption ends. 25 | virtual void OnInterruptionEnd() = 0; 26 | 27 | // Called when audio route changes. 28 | virtual void OnValidRouteChange() = 0; 29 | 30 | // Called when the ability to play or record changes. 31 | virtual void OnCanPlayOrRecordChange(bool can_play_or_record) = 0; 32 | 33 | virtual void OnChangedOutputVolume() = 0; 34 | 35 | protected: 36 | virtual ~AudioSessionObserver() {} 37 | }; 38 | 39 | } // namespace webrtc 40 | 41 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_AUDIO_SESSION_OBSERVER_H_ 42 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/native/src/audio/helpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 12 | #define SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 13 | 14 | #include 15 | 16 | namespace webrtc { 17 | namespace ios { 18 | 19 | bool CheckAndLogError(BOOL success, NSError* error); 20 | 21 | NSString* NSStringFromStdString(const std::string& stdString); 22 | std::string StdStringFromNSString(NSString* nsString); 23 | 24 | // Return thread ID as a string. 25 | std::string GetThreadId(); 26 | 27 | // Return thread ID as string suitable for debug logging. 28 | std::string GetThreadInfo(); 29 | 30 | // Returns [NSThread currentThread] description as string. 31 | // Example: {number = 1, name = main} 32 | std::string GetCurrentThreadDescription(); 33 | 34 | #if defined(WEBRTC_IOS) 35 | // Returns the current name of the operating system. 36 | std::string GetSystemName(); 37 | 38 | // Returns the current version of the operating system as a string. 39 | std::string GetSystemVersionAsString(); 40 | 41 | // Returns the version of the operating system in double representation. 42 | // Uses a cached value of the system version. 43 | double GetSystemVersion(); 44 | 45 | // Returns the device type. 46 | // Examples: ”iPhone” and ”iPod touch”. 47 | std::string GetDeviceType(); 48 | #endif // defined(WEBRTC_IOS) 49 | 50 | // Returns a more detailed device name. 51 | // Examples: "iPhone 5s (GSM)" and "iPhone 6 Plus". 52 | std::string GetDeviceName(); 53 | 54 | // Returns the name of the process. Does not uniquely identify the process. 55 | std::string GetProcessName(); 56 | 57 | // Returns the identifier of the process (often called process ID). 58 | int GetProcessID(); 59 | 60 | // Returns a string containing the version of the operating system on which the 61 | // process is executing. The string is string is human readable, localized, and 62 | // is appropriate for displaying to the user. 63 | std::string GetOSVersionString(); 64 | 65 | // Returns the number of processing cores available on the device. 66 | int GetProcessorCount(); 67 | 68 | #if defined(WEBRTC_IOS) 69 | // Indicates whether Low Power Mode is enabled on the iOS device. 70 | bool GetLowPowerModeEnabled(); 71 | #endif 72 | 73 | } // namespace ios 74 | } // namespace webrtc 75 | 76 | #endif // SDK_OBJC_NATIVE_SRC_AUDIO_HELPERS_H_ 77 | -------------------------------------------------------------------------------- /config/ios-m79.5.1-shiguredo/src/native/src/audio/helpers.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #import 12 | #import 13 | #if defined(WEBRTC_IOS) 14 | #import 15 | #endif 16 | 17 | #include 18 | 19 | #include "helpers.h" 20 | #include "rtc_base/checks.h" 21 | #include "rtc_base/logging.h" 22 | 23 | namespace webrtc { 24 | namespace ios { 25 | 26 | NSString* NSStringFromStdString(const std::string& stdString) { 27 | // std::string may contain null termination character so we construct 28 | // using length. 29 | return [[NSString alloc] initWithBytes:stdString.data() 30 | length:stdString.length() 31 | encoding:NSUTF8StringEncoding]; 32 | } 33 | 34 | std::string StdStringFromNSString(NSString* nsString) { 35 | NSData* charData = [nsString dataUsingEncoding:NSUTF8StringEncoding]; 36 | return std::string(reinterpret_cast([charData bytes]), 37 | [charData length]); 38 | } 39 | 40 | bool CheckAndLogError(BOOL success, NSError* error) { 41 | if (!success) { 42 | NSString* msg = 43 | [NSString stringWithFormat:@"Error: %ld, %@, %@", (long)error.code, 44 | error.localizedDescription, 45 | error.localizedFailureReason]; 46 | RTC_LOG(LS_ERROR) << StdStringFromNSString(msg); 47 | return false; 48 | } 49 | return true; 50 | } 51 | 52 | // TODO(henrika): see if it is possible to move to GetThreadName in 53 | // platform_thread.h and base it on pthread methods instead. 54 | std::string GetCurrentThreadDescription() { 55 | NSString* name = [NSString stringWithFormat:@"%@", [NSThread currentThread]]; 56 | return StdStringFromNSString(name); 57 | } 58 | 59 | #if defined(WEBRTC_IOS) 60 | std::string GetSystemName() { 61 | NSString* osName = [[UIDevice currentDevice] systemName]; 62 | return StdStringFromNSString(osName); 63 | } 64 | 65 | std::string GetSystemVersionAsString() { 66 | NSString* osVersion = [[UIDevice currentDevice] systemVersion]; 67 | return StdStringFromNSString(osVersion); 68 | } 69 | 70 | std::string GetDeviceType() { 71 | NSString* deviceModel = [[UIDevice currentDevice] model]; 72 | return StdStringFromNSString(deviceModel); 73 | } 74 | 75 | bool GetLowPowerModeEnabled() { 76 | return [NSProcessInfo processInfo].lowPowerModeEnabled; 77 | } 78 | #endif 79 | 80 | std::string GetDeviceName() { 81 | size_t size; 82 | sysctlbyname("hw.machine", NULL, &size, NULL, 0); 83 | std::unique_ptr machine; 84 | machine.reset(new char[size]); 85 | sysctlbyname("hw.machine", machine.get(), &size, NULL, 0); 86 | return std::string(machine.get()); 87 | } 88 | 89 | std::string GetProcessName() { 90 | NSString* processName = [NSProcessInfo processInfo].processName; 91 | return StdStringFromNSString(processName); 92 | } 93 | 94 | int GetProcessID() { 95 | return [NSProcessInfo processInfo].processIdentifier; 96 | } 97 | 98 | std::string GetOSVersionString() { 99 | NSString* osVersion = 100 | [NSProcessInfo processInfo].operatingSystemVersionString; 101 | return StdStringFromNSString(osVersion); 102 | } 103 | 104 | int GetProcessorCount() { 105 | return [NSProcessInfo processInfo].processorCount; 106 | } 107 | 108 | } // namespace ios 109 | } // namespace webrtc 110 | -------------------------------------------------------------------------------- /config/ios-m80.6.0/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m80.6.0/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m80.6.0/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=80 2 | COMMIT=6 3 | REVISION=7a0e44c1a84fb4ed57a6701cfc8093756c37af6f 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m80.6.0/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m80.6.0/patch/build_aar.py.diff: -------------------------------------------------------------------------------- 1 | --- build_aar.py.orig 2017-12-11 22:45:27.000000000 +0900 2 | +++ build_aar.py 2017-12-11 22:49:09.000000000 +0900 3 | @@ -60,6 +60,10 @@ 4 | help='Use goma.') 5 | parser.add_argument('--verbose', action='store_true', default=False, 6 | help='Debug logging.') 7 | + parser.add_argument('--build_config', default='release', 8 | + choices=['debug', 'release'], 9 | + help='The build config. Can be "debug" or "release". ' 10 | + 'Defaults to "release".') 11 | parser.add_argument('--extra-gn-args', default=[], nargs='*', 12 | help='Additional GN args to be used during Ninja generation.') 13 | return parser.parse_args() 14 | @@ -120,13 +124,13 @@ 15 | raise Exception('Unknown arch: ' + arch) 16 | 17 | 18 | -def Build(build_dir, arch, use_goma, extra_gn_args): 19 | +def Build(build_dir, arch, build_config, use_goma, extra_gn_args): 20 | """Generates target architecture using GN and builds it using ninja.""" 21 | logging.info('Building: %s', arch) 22 | output_directory = _GetOutputDirectory(build_dir, arch) 23 | gn_args = { 24 | 'target_os': 'android', 25 | - 'is_debug': False, 26 | + 'is_debug': build_config == 'debug', 27 | 'is_component_build': False, 28 | 'rtc_include_tests': False, 29 | 'target_cpu': _GetTargetCpu(arch), 30 | @@ -171,13 +175,13 @@ 31 | builder.GenerateLicenseText(output_dir) 32 | 33 | 34 | -def BuildAar(archs, output_file, use_goma=False, extra_gn_args=None, 35 | +def BuildAar(archs, output_file, build_config, use_goma=False, extra_gn_args=None, 36 | ext_build_dir=None): 37 | extra_gn_args = extra_gn_args or [] 38 | build_dir = ext_build_dir if ext_build_dir else tempfile.mkdtemp() 39 | 40 | for arch in archs: 41 | - Build(build_dir, arch, use_goma, extra_gn_args) 42 | + Build(build_dir, arch, build_config, use_goma, extra_gn_args) 43 | 44 | with zipfile.ZipFile(output_file, 'w') as aar_file: 45 | # Architecture doesn't matter here, arbitrarily using the first one. 46 | @@ -196,7 +200,7 @@ 47 | args = _ParseArgs() 48 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) 49 | 50 | - BuildAar(args.arch, args.output, args.use_goma, args.extra_gn_args, 51 | + BuildAar(args.arch, args.output, args.build_config, args.use_goma, args.extra_gn_args, 52 | args.build_dir) 53 | 54 | 55 | -------------------------------------------------------------------------------- /config/ios-m80.6.0/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m81.9.0/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m81.9.0/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m81.9.0/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=81 2 | COMMIT=9 3 | REVISION=601eb2dc9e68d24e37175fa70cd2784923b3ad46 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m81.9.0/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | 5 | -------------------------------------------------------------------------------- /config/ios-m81.9.0/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m83.4103.12.0/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m83.4103.12.0/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m83.4103.12.0/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=4103 2 | COMMIT=12 3 | REVISION=befd48e76346cdc17713997f90cc5e8ce06513f2 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m83.4103.12.0/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/ios.diff -------------------------------------------------------------------------------- /config/ios-m83.4103.12.0/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m83.4103.12.0/patch/ios.diff: -------------------------------------------------------------------------------- 1 | diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc 2 | index 14281eb243..bf59676ef0 100644 3 | --- a/pc/peer_connection.cc 4 | +++ b/pc/peer_connection.cc 5 | @@ -4116,13 +4116,13 @@ RTCError PeerConnection::SetConfiguration( 6 | modified_config.active_reset_srtp_params); 7 | } 8 | 9 | - if (modified_config.allow_codec_switching.has_value()) { 10 | - cricket::VideoMediaChannel* video_channel = video_media_channel(); 11 | - if (video_channel) { 12 | - video_channel->SetVideoCodecSwitchingEnabled( 13 | - *modified_config.allow_codec_switching); 14 | - } 15 | - } 16 | + // if (modified_config.allow_codec_switching.has_value()) { 17 | + // cricket::VideoMediaChannel* video_channel = video_media_channel(); 18 | + // if (video_channel) { 19 | + // video_channel->SetVideoCodecSwitchingEnabled( 20 | + // *modified_config.allow_codec_switching); 21 | + // } 22 | + // } 23 | 24 | configuration_ = modified_config; 25 | return RTCError::OK(); 26 | -------------------------------------------------------------------------------- /config/ios-m84.4147.11.0/CONFIG: -------------------------------------------------------------------------------- 1 | CONFIG=release 2 | VP9=true 3 | 4 | IOS_ARCH="arm64 arm x64 x86" 5 | IOS_BITCODE=true 6 | 7 | -------------------------------------------------------------------------------- /config/ios-m84.4147.11.0/GCLIENT: -------------------------------------------------------------------------------- 1 | solutions = [ 2 | { 3 | "url": "https://webrtc.googlesource.com/src.git", 4 | "managed": False, 5 | "name": "src", 6 | "deps_file": "DEPS", 7 | "custom_deps": {} 8 | } 9 | ]; 10 | target_os = ["ios", "mac"] 11 | -------------------------------------------------------------------------------- /config/ios-m84.4147.11.0/VERSION: -------------------------------------------------------------------------------- 1 | BRANCH=4147 2 | COMMIT=11 3 | REVISION=d25c2ac74afc25f65d111771dbfabd6db25d2498 4 | MAINT=0 5 | -------------------------------------------------------------------------------- /config/ios-m84.4147.11.0/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | patch -buN $RTC_DIR/tools_webrtc/ios/build_ios_libs.py $PATCH_DIR/build_ios_libs.py.diff 4 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/manual_audio_input.diff 5 | patch -buN -p1 -d $RTC_DIR < $PATCH_DIR/disable_code_switching.diff -------------------------------------------------------------------------------- /config/ios-m84.4147.11.0/patch/build_ios_libs.py.diff: -------------------------------------------------------------------------------- 1 | --- build_ios_libs.py.orig 2017-12-11 22:17:46.000000000 +0900 2 | +++ build_ios_libs.py 2017-12-11 22:18:11.000000000 +0900 3 | @@ -63,6 +63,8 @@ 4 | help='Specifies a revision number to embed if building the framework.') 5 | parser.add_argument('-e', '--bitcode', action='store_true', default=False, 6 | help='Compile with bitcode.') 7 | + parser.add_argument('--vp9', action='store_true', default=False, 8 | + help='Enables VP9.') 9 | parser.add_argument('--verbose', action='store_true', default=False, 10 | help='Debug logging.') 11 | parser.add_argument('--use-goma', action='store_true', default=False, 12 | @@ -176,7 +178,7 @@ 13 | # Build all architectures. 14 | for arch in architectures: 15 | BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name, 16 | - IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode, 17 | + IOS_DEPLOYMENT_TARGET, args.vp9, args.bitcode, 18 | args.use_goma, gn_args) 19 | 20 | # Create FAT archive. 21 | -------------------------------------------------------------------------------- /config/ios-m84.4147.11.0/patch/disable_code_switching.diff: -------------------------------------------------------------------------------- 1 | diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc 2 | index 14281eb243..bf59676ef0 100644 3 | --- a/pc/peer_connection.cc 4 | +++ b/pc/peer_connection.cc 5 | @@ -4116,13 +4116,13 @@ RTCError PeerConnection::SetConfiguration( 6 | modified_config.active_reset_srtp_params); 7 | } 8 | 9 | - if (modified_config.allow_codec_switching.has_value()) { 10 | - cricket::VideoMediaChannel* video_channel = video_media_channel(); 11 | - if (video_channel) { 12 | - video_channel->SetVideoCodecSwitchingEnabled( 13 | - *modified_config.allow_codec_switching); 14 | - } 15 | - } 16 | + // if (modified_config.allow_codec_switching.has_value()) { 17 | + // cricket::VideoMediaChannel* video_channel = video_media_channel(); 18 | + // if (video_channel) { 19 | + // video_channel->SetVideoCodecSwitchingEnabled( 20 | + // *modified_config.allow_codec_switching); 21 | + // } 22 | + // } 23 | 24 | configuration_ = modified_config; 25 | return RTCError::OK(); 26 | -------------------------------------------------------------------------------- /docker-aar/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | MAINTAINER SHINOHARA, Shunichi 4 | 5 | ADD sources.list /etc/apt/sources.list 6 | 7 | ENV DEBIAN_FRONTEND=noninteractive 8 | 9 | RUN apt-get update 10 | 11 | RUN apt-get install -y \ 12 | tzdata \ 13 | lsb-release \ 14 | net-tools \ 15 | git \ 16 | curl \ 17 | python \ 18 | sudo \ 19 | openjdk-8-jdk-headless \ 20 | time 21 | 22 | RUN update-java-alternatives -s java-1.8.0-openjdk-amd64 23 | 24 | ADD install-build-deps.sh install-build-deps.sh 25 | RUN yes | ./install-build-deps.sh --no-chromeos-fonts --no-prompt 26 | 27 | WORKDIR /work 28 | 29 | ADD scripts scripts 30 | 31 | ADD config config 32 | 33 | RUN ./scripts/build_all_android.sh config/android-aar 34 | -------------------------------------------------------------------------------- /docker-aar/sources.list: -------------------------------------------------------------------------------- 1 | ## jp.archive.ubuntu.com のときは 220.152.35.166 にすげ替えられてエラーが出るので 2 | ## IP 直指定、あまりよくない 3 | 4 | deb http://160.26.2.187/ubuntu/ bionic main restricted universe 5 | deb http://160.26.2.187/ubuntu/ bionic-security main restricted universe 6 | deb http://160.26.2.187/ubuntu/ bionic-updates main restricted universe 7 | -------------------------------------------------------------------------------- /docs/patch_shiguredo_ios.md: -------------------------------------------------------------------------------- 1 | # 時雨堂のパッチ (iOS) について 2 | 3 | ## 対象のビルド設定 4 | 5 | - ios-\*-shiguredo 6 | - ios-\*-shiguredo-develop 7 | 8 | ## 目的 9 | 10 | - 接続時、マイクの使用不使用に関わらずパーミッションが要求されてしまう事象を修正する。 11 | 12 | ## パッチ内容 13 | 14 | - 接続時のマイクのパーミッション要求を抑制する。 15 | 16 | - マイクの初期化を明示的に行う API を追加する。 17 | パッチ適用後はマイクは自動的に初期化されない。 18 | 19 | - デフォルトで設定される ``AVAudioSession`` のカテゴリを ``AVAudioSessionCategoryPlayAndRecord`` から ``AVAudioSessionCategoryAmbient`` に変更する。 20 | 21 | ## パッチ適用後の使い方 22 | 23 | - マイクを使う場合は ``RTCAudioSession.initializeInput(completionHandler:)`` を実行してマイクを初期化する。このメソッドはマイクの初期化の準備が整うまで非同期で待ち、初期化可能な状態になったらパーミッションを要求する。ユーザーがマイクの使用を許可したら初期化を行い、ハンドラを実行する。 24 | 25 | - ``RTCAudioSession.initializeInput(completionHandler:)`` の前後で ``RTCAudioSession.lockForConfiguration`` と ``RTCAudiotSession.unlockForConfiguration`` を実行する必要はない。内部で必要に応じてロックしているので、 ``initializeInput(completionHandler:)`` の前後でロックすると、おそらく何かしらの競合を起こしてマイクが初期化されない。 26 | 27 | - マイクを使わない場合は ``Info.plist`` にマイクの用途を記述する必要はない。 28 | -------------------------------------------------------------------------------- /scripts/build_all_android.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage: ./build_all_android.sh CONFIG_DIR 4 | 5 | NOFETCH= 6 | 7 | while getopts ":-:" OPT 8 | do 9 | case $OPT in 10 | -) 11 | case "${OPTARG}" in 12 | nofetch) NOFETCH=true;; 13 | esac 14 | ;; 15 | esac 16 | done 17 | shift $((OPTIND - 1)) 18 | 19 | BUILD_DIR=$(dirname $0)/../build 20 | mkdir -p $BUILD_DIR 21 | BUILD_DIR=$(cd $BUILD_DIR && pwd) 22 | 23 | CONFIG_DIR=$(cd $1 && pwd) 24 | SCRIPT_DIR=$(dirname $0) 25 | 26 | if [ "$NOFETCH" != "true" ]; then 27 | $SCRIPT_DIR/fetch_depot_tools.sh $BUILD_DIR 28 | $SCRIPT_DIR/fetch_webrtc.sh $CONFIG_DIR 29 | fi 30 | $SCRIPT_DIR/build_android.sh $CONFIG_DIR 31 | 32 | -------------------------------------------------------------------------------- /scripts/build_all_ios.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage: ./build_all_ios.sh CONFIG_DIR 4 | 5 | NOFETCH= 6 | 7 | while getopts ":-:" OPT 8 | do 9 | case $OPT in 10 | -) 11 | case "${OPTARG}" in 12 | nofetch) NOFETCH=true;; 13 | esac 14 | ;; 15 | esac 16 | done 17 | shift $((OPTIND - 1)) 18 | 19 | BUILD_DIR=$(dirname $0)/../build 20 | mkdir -p $BUILD_DIR 21 | BUILD_DIR=$(cd $BUILD_DIR && pwd) 22 | 23 | CONFIG_DIR=$(cd $1 && pwd) 24 | SCRIPT_DIR=$(dirname $0) 25 | 26 | $SCRIPT_DIR/fetch_depot_tools.sh $BUILD_DIR 27 | if [ "$NOFETCH" != "true" ]; then 28 | $SCRIPT_DIR/fetch_webrtc.sh $CONFIG_DIR 29 | fi 30 | $SCRIPT_DIR/build_ios.sh $CONFIG_DIR 31 | 32 | -------------------------------------------------------------------------------- /scripts/build_android.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # usage: ./build_io.sh CONFIG_DIR 4 | 5 | DTOOLS_DIR=$(cd $(dirname $0)/../build/depot_tools && pwd) 6 | CONFIG_DIR=$(cd $1 && pwd) 7 | BUILD_CONFIG_FILE=$CONFIG_DIR/CONFIG 8 | BUILD_DIR=$(cd $(dirname $0)/../build/$(basename $CONFIG_DIR) && pwd) 9 | GCLIENT_CONFIG_FILE=$CONFIG_DIR/GCLIENT 10 | VERSION_CONFIG_FILE=$CONFIG_DIR/VERSION 11 | PATCH_SCRIPT=$CONFIG_DIR/patch.sh 12 | PATCH_DIR=$CONFIG_DIR/patch 13 | 14 | SCRIPT_DIR=$(cd $(dirname $0) && pwd) 15 | GEN_VERSION_CMD=$SCRIPT_DIR/generate_version_android.sh 16 | VERSION_FILE=WebrtcBuildVersion.java 17 | RTC_DIR=$BUILD_DIR/src 18 | JAVA_SRC_DIR=$RTC_DIR/sdk/android/api/org/webrtc 19 | BUILD_VERSION_FILE=$JAVA_SRC_DIR/$VERSION_FILE 20 | 21 | BUILD_AAR_CMD=$RTC_DIR/tools_webrtc/android/build_aar.py 22 | AAR_FILE=$BUILD_DIR/libwebrtc.aar 23 | 24 | export PATH=$DTOOLS_DIR:$PATH 25 | 26 | source $BUILD_CONFIG_FILE 27 | source $VERSION_CONFIG_FILE 28 | 29 | 30 | echo "Apply patches..." 31 | 32 | if [ -e "$PATCH_SCRIPT" ]; then 33 | source $PATCH_SCRIPT 34 | fi 35 | 36 | echo "Generate $VERSION_FILE..." 37 | echo "$GEN_VERSION_CMD $CONFIG_DIR > $BUILD_VERSION_FILE" 38 | $GEN_VERSION_CMD $CONFIG_DIR > $BUILD_VERSION_FILE 39 | 40 | 41 | echo "Build Android AAR..." 42 | 43 | # --build_config はパッチ適用時に追加されるオプション 44 | BUILD_SCRIPT_OPTS="--build-dir $BUILD_DIR --output $AAR_FILE --build_config $CONFIG --arch $AAR_ARCH" 45 | 46 | pushd $RTC_DIR > /dev/null 47 | 48 | echo python $BUILD_AAR_CMD $BUILD_SCRIPT_OPTS 49 | python $BUILD_AAR_CMD $BUILD_SCRIPT_OPTS 50 | -------------------------------------------------------------------------------- /scripts/build_ios.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage: ./build_io.sh CONFIG_DIR 4 | 5 | DTOOLS_DIR=$(cd $(dirname $0)/../build/depot_tools && pwd) 6 | CONFIG_DIR=$(cd $1 && pwd) 7 | BUILD_CONFIG_FILE=$CONFIG_DIR/CONFIG 8 | BUILD_DIR=$(cd $(dirname $0)/../build/$(basename $CONFIG_DIR) && pwd) 9 | GCLIENT_CONFIG_FILE=$CONFIG_DIR/GCLIENT 10 | VERSION_CONFIG_FILE=$CONFIG_DIR/VERSION 11 | PATCH_SCRIPT=$CONFIG_DIR/patch.sh 12 | PATCH_DIR=$CONFIG_DIR/patch 13 | 14 | SCRIPT_DIR=$(cd $(dirname $0) && pwd) 15 | RTC_DIR=$BUILD_DIR/src 16 | BUILD_IOS_CMD=$RTC_DIR/tools_webrtc/ios/build_ios_libs.sh 17 | FRAMEWORK=WebRTC.framework 18 | BUILD_LIB_PATH=$BUILD_DIR/$FRAMEWORK 19 | BUILD_INFO_FILE=$BUILD_LIB_PATH/build_info.json 20 | 21 | export PATH=$DTOOLS_DIR:$PATH 22 | 23 | source $BUILD_CONFIG_FILE 24 | source $VERSION_CONFIG_FILE 25 | 26 | 27 | echo "Apply patches..." 28 | 29 | if [ -e "$PATCH_SCRIPT" ]; then 30 | source $PATCH_SCRIPT 31 | fi 32 | 33 | 34 | echo "Build iOS framework..." 35 | 36 | BUILD_SCRIPT_OPTS="-o $BUILD_DIR --build_config $CONFIG --arch $IOS_ARCH" 37 | if [ "$IOS_BITCODE" = "true" ]; then 38 | BUILD_SCRIPT_OPTS="$BUILD_SCRIPT_OPTS --bitcode" 39 | fi 40 | if [ "$VP9" = "true" ]; then 41 | BUILD_SCRIPT_OPTS="$BUILD_SCRIPT_OPTS --vp9" 42 | fi 43 | 44 | echo $BUILD_IOS_CMD $BUILD_SCRIPT_OPTS 45 | $BUILD_IOS_CMD $BUILD_SCRIPT_OPTS 46 | 47 | 48 | echo "Generate build_info.json..." 49 | cat < $BUILD_INFO_FILE 50 | { 51 | "webrtc_version": "$BRANCH", 52 | "webrtc_commit": "$COMMIT", 53 | "webrtc_maint": "$MAINT", 54 | "webrtc_revision": "$REVISION" 55 | } 56 | EOF 57 | 58 | cd $BUILD_DIR; zip -rq $FRAMEWORK.zip $FRAMEWORK 59 | -------------------------------------------------------------------------------- /scripts/fetch_depot_tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage: ./fetch_depot_tools.sh DIR 4 | 5 | URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git 6 | DIR=$1 7 | DTOOLS_DIR=$DIR/depot_tools 8 | 9 | if [ ! -e $DTOOLS_DIR ]; then 10 | echo "Get depot_tools..." 11 | git clone $URL $DTOOLS_DIR 12 | else 13 | echo "Update depot_tools..." 14 | git -C $DTOOLS_DIR pull 15 | fi 16 | -------------------------------------------------------------------------------- /scripts/fetch_webrtc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # usage: ./fetch_webrtc.sh CONFIG_DIR 4 | 5 | URL=https://chromium.googlesource.com/external/webrtc 6 | DTOOLS=$(cd $(dirname $0)/../build/depot_tools && pwd) 7 | 8 | CONFIG_DIR=$(cd $1 && pwd) 9 | VERSION_CONFIG=$CONFIG_DIR/VERSION 10 | GCLIENT_CONFIG=$CONFIG_DIR/GCLIENT 11 | 12 | BUILD_DIR=$(dirname $0)/../build/$(basename $CONFIG_DIR) 13 | mkdir -p $BUILD_DIR 14 | BUILD_DIR=$(cd $BUILD_DIR && pwd) 15 | RTC_DIR=$BUILD_DIR/src 16 | GCLIENT=$DTOOLS/gclient 17 | 18 | export PATH=$DTOOLS:$PATH 19 | 20 | source $VERSION_CONFIG 21 | GCLIENT_CONFIG_SPEC=`tr -d "\n" < ${GCLIENT_CONFIG}` 22 | 23 | if [ $BRANCH -gt 72 ]; then 24 | BRANCH_HEADS=m$BRANCH 25 | else 26 | BRANCH_HEADS=$BRANCH 27 | fi 28 | 29 | echo "Checkout the code with release branch M$BRANCH ($REVISION)..." 30 | 31 | pushd $BUILD_DIR > /dev/null 32 | 33 | echo "Initialize gclient..." 34 | $GCLIENT config --spec "$GCLIENT_CONFIG_SPEC" 35 | 36 | echo "Sync..." 37 | $GCLIENT sync --nohooks --with_branch_heads -v -R 38 | 39 | pushd $RTC_DIR > /dev/null 40 | git submodule foreach "'git config -f \$toplevel/.git/config submodule.\$name.ignore all'" 41 | git config diff.ignoreSubmodules all 42 | 43 | git fetch origin 44 | git checkout -B "M$BRANCH" remotes/branch-heads/$BRANCH_HEADS 45 | git checkout $REVISION 46 | 47 | # Android だと途中でライセンスの同意が必要になるので yes を置く 48 | yes | $GCLIENT sync --with_branch_heads -v -R 49 | 50 | $GCLIENT runhooks -v 51 | 52 | -------------------------------------------------------------------------------- /scripts/generate_version_android.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # usage: generate_version_android.sh CONFIG_DIR 4 | 5 | CONFIG_DIR=$(cd $1 && pwd) 6 | BUILD_CONFIG_FILE=$CONFIG_DIR/CONFIG 7 | VERSION_CONFIG_FILE=$CONFIG_DIR/VERSION 8 | 9 | _BUILD_DIR=$(dirname $0)/../build/$(basename $CONFIG_DIR) 10 | mkdir -p $_BUILD_DIR 11 | BUILD_DIR=$(cd $_BUILD_DIR && pwd) 12 | 13 | SCRIPT_DIR=$(cd $(dirname $0) && pwd) 14 | RTC_DIR=$BUILD_DIR/src 15 | 16 | export PATH=$DTOOLS_DIR:$PATH 17 | 18 | source $VERSION_CONFIG_FILE 19 | 20 | cat <&2 15 | exit 16 | fi 17 | 18 | # Exit if any commands fail. 19 | set -e 20 | 21 | lsb_release=$(lsb_release --codename --short) 22 | 23 | # Install first the default Linux build deps. 24 | "$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \ 25 | --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "${args}" 26 | 27 | # Fix deps 28 | sudo apt-get -f install 29 | 30 | # common 31 | sudo apt-get -y install lib32z1 lighttpd python-pexpect xvfb x11-utils 32 | 33 | # Some binaries in the Android SDK require 32-bit libraries on the host. 34 | # See https://developer.android.com/sdk/installing/index.html?pkg=tools 35 | sudo apt-get -y install libncurses5:i386 libstdc++6:i386 zlib1g:i386 36 | 37 | # Required for apk-patch-size-estimator 38 | sudo apt-get -y install bsdiff 39 | 40 | # Do our own error handling for java. 41 | set +e 42 | 43 | # First arg is either "java" or "javac", second is Java version 44 | function IsJavaInstalled() { 45 | $1 -version 2>&1 | grep -q "$2" 46 | } 47 | 48 | # First arg is Java release, second argument is string showing version 49 | # (Java > 8 is not reporting version as 1.x) 50 | function CheckOrInstallJava() { 51 | if ! (IsJavaInstalled java $2 && IsJavaInstalled javac $2); then 52 | sudo apt-get -y install openjdk-$1-jre openjdk-$1-jdk 53 | fi 54 | 55 | # There can be several reasons why java is not default despite being installed. 56 | # Just show an error and exit. 57 | if ! (IsJavaInstalled java $2 && IsJavaInstalled javac $2); then 58 | echo 59 | echo "Automatic java installation failed." 60 | echo '`java -version` reports:' 61 | java -version 62 | echo 63 | echo '`javac -version` reports:' 64 | javac -version 65 | echo 66 | echo "Please ensure that JDK $1 is installed and resolves first in your PATH." 67 | echo -n '`which java` reports: ' 68 | which java 69 | echo 70 | echo -n '`which javac` reports: ' 71 | which javac 72 | echo 73 | echo 74 | echo "You might also try running:" 75 | if [[ "$lsb_release" == "disco" && "$1" == "8" ]]; then 76 | # Propose repository from latest LTS with Java 8 (Ubuntu 18.04 LTS) in Ubuntu 19.04 without Java 8 77 | echo " sudo add-apt-repository -u -y 'deb http://archive.ubuntu.com/ubuntu bionic-security universe'" 78 | echo " sudo apt-get install openjdk-8-jdk" 79 | echo 80 | echo " OR" 81 | echo 82 | fi 83 | echo " sudo update-java-alternatives -s java-1.$1.0-openjdk-amd64" 84 | exit 1 85 | fi 86 | } 87 | 88 | if [[ "$lsb_release" == "disco" ]]; then 89 | # TODO(marcin@mwiacek.com): Investigate what needs to be changed to support Java 11. 90 | # 91 | # Currently known: 92 | # 1. changing version in internal_rules.gni (it's hardcoded to 1.8) 93 | # 2. replacing -Xbootclasspath/p: with -Xbootclasspath/a: (?) 94 | # Issue during compiling chrome_public_apk: 95 | # Exception in thread "main" java.lang.InternalError: 96 | # Cannot find requested resource bundle for locale en_US 97 | # 98 | # CheckOrInstallJava 11 "11." 99 | CheckOrInstallJava 8 "1.8" 100 | else 101 | CheckOrInstallJava 8 "1.8" 102 | fi 103 | 104 | echo "install-build-deps-android.sh complete." 105 | -------------------------------------------------------------------------------- /scripts/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage: ./patch.sh CONFIG_DIR 4 | 5 | DTOOLS_DIR=$(cd $(dirname $0)/../build/depot_tools && pwd) 6 | CONFIG_DIR=$(cd $1 && pwd) 7 | BUILD_CONFIG_FILE=$CONFIG_DIR/CONFIG 8 | BUILD_DIR=$(dirname $0)/../build/$(basename $CONFIG_DIR) 9 | GCLIENT_CONFIG_FILE=$CONFIG_DIR/GCLIENT 10 | VERSION_CONFIG_FILE=$CONFIG_DIR/VERSION 11 | SCRIPT_DIR=$(dirname $0) 12 | RTC_DIR=$BUILD_DIR/src 13 | BUILD_IOS_CMD=$RTC_DIR/tools_webrtc/ios/build_ios_libs.sh 14 | BUILD_LIB_PATH=$BUILD_DIR/WebRTC.framework 15 | BUILD_INFO_FILE=$BUILD_LIB_PATH/build_info.json 16 | 17 | source $SCRIPT 18 | -------------------------------------------------------------------------------- /scripts/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage: ./reset.sh DIRS... 4 | 5 | for dir in $@ 6 | do 7 | echo "Discard changes of $dir..." 8 | git -C $dir checkout -- . 9 | done 10 | 11 | --------------------------------------------------------------------------------