Skip to content

Commit bdd54f2

Browse files
authored
Updated project to the stable WebRTC branch 6998 (#163)
* feat!: refactor code to use webrtc branch 6998 * fix: unresolved symbols and audio processing classes * fix: DesktopCaptureCallback using copy frames for now * fix: missing symbols on macOS * fix: new webrtc branch number in readme and workflows * fix: compile on Windows 2022 with Visual Studio 2022 * fix: add '*.inc' pattern for installation as abseil requires those files * fix: workflows to run on ubuntu-22.04 * fix: linux and macOS builds * build.yml Linux pipewire activation * feat: added the utility class VoiceActivityDetector * feat: add maven profile to compile with clang in windows * fix: refactored RTCStats to match new API * fix: refactored AudioProcessingStats to match new API * refactor: prefer and set clang as the default compiler on linux and windows * refactor: refined GitHub actions * fix: GitHub actions step names * fix: macOS deprecation warnings * fix: macOS deprecation warnings * feat: macOS screen inhibition * chore: migrate ossrh to maven central deployment * fix: minor desktop capture fixes * fix: crash with desktop capture with pipewire enabled and clang build * Update CMakeLists.txt Disable rtc_build_tools and rtc_use_perfetto * refactor: DesktopCapturer initialization * fix: DesktopCapturer SetMaxFrameRate * fix: AudioConverter destination buffer size * fix: comment out retain and release calls in buffer conversion
1 parent c304db0 commit bdd54f2

File tree

91 files changed

+5641
-5273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+5641
-5273
lines changed

.github/actions/build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ runs:
4242
with:
4343
java-version: ${{ inputs.java-version }}
4444
distribution: 'temurin'
45-
server-id: ossrh
45+
server-id: central
4646
server-username: MAVEN_USERNAME
4747
server-password: MAVEN_TOKEN
4848

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'Prepare Linux Build'
2+
3+
description: 'Frees up disk space and installs required packages for Linux builds.'
4+
5+
runs:
6+
using: "composite"
7+
steps:
8+
- name: Disk cleanup
9+
run: |
10+
set -x
11+
df -h
12+
#sudo du -h -d1 /usr/local
13+
#sudo du -h -d1 /usr/local/share
14+
#sudo du -h -d1 /usr/local/lib
15+
#sudo du -h -d1 /usr/share
16+
RMI=`docker images -q -a`
17+
if [ -n "$RMI" ]; then
18+
docker rmi $RMI
19+
fi
20+
# 4.6G
21+
sudo rm -rf /usr/local/.ghcup
22+
# 1.7G
23+
sudo rm -rf /usr/share/swift
24+
# 1.4G
25+
sudo rm -rf /usr/share/dotnet
26+
# 13G
27+
sudo rm -rf /usr/local/lib/android
28+
df -h
29+
shell: bash
30+
31+
- name: Install required packages
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y pulseaudio libpulse-dev libasound2-dev libdbus-1-dev libudev-dev libv4l-dev libx11-dev libxcomposite-dev libxrandr-dev libxfixes-dev binutils cmake git locales lsb-release ninja-build pkg-config python3 python3-setuptools rsync unzip wget xz-utils
35+
36+
# More recent LLVM and Clang.
37+
wget https://apt.llvm.org/llvm.sh
38+
chmod +x llvm.sh
39+
sudo ./llvm.sh ${{ matrix.llvm }} all
40+
41+
# Required for testing
42+
#pulseaudio --start
43+
sudo apt-get install -y pipewire pipewire-pulse gstreamer1.0-pipewire libspa-0.2-bluetooth libspa-0.2-jack pipewire-audio-client-libraries
44+
systemctl --user daemon-reload
45+
systemctl --user --now enable pipewire{,-pulse}.{socket,service}
46+
shell: bash
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Prepare macOS Build'
2+
3+
description: 'Installs required packages for macOS builds.'
4+
5+
runs:
6+
using: "composite"
7+
steps:
8+
- name: Install required packages
9+
run: |
10+
brew install ninja
11+
# Required for macos-13
12+
pip install setuptools
13+
# Required for macos-14
14+
brew install python-setuptools
15+
shell: bash
16+
17+
- name: Select Xcode version
18+
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
19+
shell: bash
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Prepare Windows Build'
2+
3+
description: 'Frees up disk space and installs required packages for Windows builds.'
4+
5+
runs:
6+
using: "composite"
7+
steps:
8+
- name: Set up Python 3.11
9+
if: false
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: "3.11"
13+
14+
- name: Disk cleanup
15+
if: false
16+
run: |
17+
Get-PSDrive
18+
# Docker Images
19+
docker rmi $(docker images -q -a)
20+
# Android SDK
21+
if ($Env:ANDROID_HOME) {
22+
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
23+
}
24+
if ($Env:ANDROID_NDK_HOME) {
25+
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
26+
}
27+
# JVM
28+
if ($Env:JAVA_HOME_11_X64) {
29+
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
30+
}
31+
if ($Env:JAVA_HOME_8_X64) {
32+
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
33+
}
34+
Get-PSDrive
35+
shell: powershell
36+
37+
- name: Install required packages
38+
run: |
39+
choco install ninja
40+
shell: powershell

.github/actions/release/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ runs:
5050
with:
5151
java-version: ${{ inputs.java-version }}
5252
distribution: 'temurin'
53-
server-id: ossrh
53+
server-id: central
5454
server-username: MAVEN_USERNAME
5555
server-password: MAVEN_TOKEN
5656
gpg-private-key: ${{ inputs.maven-gpg-private-key }}

.github/workflows/build.yml

Lines changed: 13 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
workflow_dispatch:
1717

1818
env:
19-
WEBRTC_CACHE_BRANCH: 4844
19+
WEBRTC_CACHE_BRANCH: 6998
2020
WEBRTC_CHECKOUT_FOLDER: webrtc
2121
WEBRTC_INSTALL_FOLDER: webrtc/build
2222

@@ -27,44 +27,16 @@ jobs:
2727
matrix:
2828
platform:
2929
- name: windows_x86_64
30-
runs-on: windows-2019
30+
runs-on: windows-2022
3131
java: [17]
3232
runs-on: ${{ matrix.platform.runs-on }}
3333
steps:
3434
- name: Checkout code
3535
uses: actions/checkout@v4
3636

37-
- name: Set up Python 3.11
38-
if: false
39-
uses: actions/setup-python@v5
40-
with:
41-
python-version: "3.11"
42-
43-
- name: Disk cleanup
44-
if: false
45-
run: |
46-
Get-PSDrive
47-
# Docker Images
48-
docker rmi $(docker images -q -a)
49-
# Android SDK
50-
if ($Env:ANDROID_HOME) {
51-
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
52-
}
53-
if ($Env:ANDROID_NDK_HOME) {
54-
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
55-
}
56-
# JVM
57-
if ($Env:JAVA_HOME_11_X64) {
58-
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
59-
}
60-
if ($Env:JAVA_HOME_8_X64) {
61-
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
62-
}
63-
Get-PSDrive
64-
65-
- name: Install required packages
66-
run: |
67-
choco install ninja
37+
- id: prepare
38+
name: Prepare build
39+
uses: ./.github/actions/prepare-windows
6840

6941
- id: maven-build
7042
name: Maven build
@@ -81,44 +53,17 @@ jobs:
8153
matrix:
8254
platform:
8355
- name: linux_x86-64
84-
runs-on: ubuntu-20.04
56+
runs-on: ubuntu-22.04
8557
java: [17]
58+
llvm: [21]
8659
runs-on: ${{ matrix.platform.runs-on }}
8760
steps:
8861
- name: Checkout code
8962
uses: actions/checkout@v4
9063

91-
- name: Disk cleanup
92-
run: |
93-
set -x
94-
df -h
95-
#sudo du -h -d1 /usr/local
96-
#sudo du -h -d1 /usr/local/share
97-
#sudo du -h -d1 /usr/local/lib
98-
#sudo du -h -d1 /usr/share
99-
RMI=`docker images -q -a`
100-
if [ -n "$RMI" ]; then
101-
docker rmi $RMI
102-
fi
103-
# 4.6G
104-
sudo rm -rf /usr/local/.ghcup
105-
# 1.7G
106-
sudo rm -rf /usr/share/swift
107-
# 1.4G
108-
sudo rm -rf /usr/share/dotnet
109-
# 13G
110-
sudo rm -rf /usr/local/lib/android
111-
df -h
112-
113-
- name: Install required packages
114-
run: |
115-
sudo apt-get update
116-
sudo apt-get install -y pulseaudio libpulse-dev libasound2-dev libdbus-1-dev libudev-dev libv4l-dev libx11-dev libxcomposite-dev libxrandr-dev libxfixes-dev binutils cmake git locales lsb-release ninja-build pkg-config python3 python3-setuptools rsync unzip wget xz-utils
117-
# Required for testing
118-
#pulseaudio --start
119-
sudo apt-get install -y pipewire pipewire-pulse gstreamer1.0-pipewire libspa-0.2-bluetooth libspa-0.2-jack pipewire-audio-client-libraries
120-
systemctl --user daemon-reload
121-
systemctl --user --now enable pipewire{,-pulse}.{socket,service}
64+
- id: prepare
65+
name: Prepare build
66+
uses: ./.github/actions/prepare-linux
12267

12368
- id: maven-build
12469
name: Maven build
@@ -144,16 +89,9 @@ jobs:
14489
- name: Checkout code
14590
uses: actions/checkout@v4
14691

147-
- name: Install required packages
148-
run: |
149-
brew install ninja
150-
# Required for macos-13
151-
pip install setuptools
152-
# Required for macos-14
153-
brew install python-setuptools
154-
155-
- name: Select Xcode version
156-
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
92+
- id: prepare-build
93+
name: Prepare build
94+
uses: ./.github/actions/prepare-macos
15795

15896
- id: maven-build
15997
name: Maven build

0 commit comments

Comments
 (0)