Skip to content

Commit

Permalink
Merge branch 'develop' into feature/multi-codec-simulcast
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Jul 8, 2024
2 parents 0175817 + 9861590 commit c85ccfd
Show file tree
Hide file tree
Showing 78 changed files with 1,863 additions and 4,554 deletions.
139 changes: 86 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name:
- windows_x86_64
name: Build sora-cpp-sdk for ${{ matrix.name }}
runs-on: windows-2019
runs-on: windows-2022
env:
TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }}
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
cd examples
mkdir examples_${{ matrix.name }}
foreach ($app in @('sdl_sample', 'sumomo', 'messaging_recvonly_sample')) {
python3 "$app\${{ matrix.name }}\run.py" --sora-dir ..
python3 "$app\${{ matrix.name }}\run.py" --local-sora-cpp-sdk-dir ..
cp "_build\${{ matrix.name }}\release\$app\Release\$app.exe" "examples_${{ matrix.name }}"
}
- name: Upload Examples Artifact
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
cd examples
mkdir examples_${{ matrix.name }}
for app in sdl_sample sumomo messaging_recvonly_sample; do
python3 $app/${{ matrix.name }}/run.py --sora-dir ..
python3 $app/${{ matrix.name }}/run.py --local-sora-cpp-sdk-dir ..
cp _build/${{ matrix.name }}/release/$app/$app examples_${{ matrix.name }}
done
if: matrix.name == 'macos_arm64'
Expand All @@ -156,18 +156,26 @@ jobs:
strategy:
fail-fast: false
matrix:
name:
- ubuntu-20.04_x86_64
- ubuntu-22.04_x86_64
- ubuntu-20.04_armv8_jetson
- android
name: Build sora-cpp-sdk for ${{ matrix.name }}
runs-on: ${{ matrix.name == 'ubuntu-22.04_x86_64' && 'ubuntu-22.04' || 'ubuntu-20.04' }}
platform:
- name: ubuntu-20.04_x86_64
runs-on: ubuntu-20.04
os: ubuntu
- name: ubuntu-22.04_x86_64
runs-on: ubuntu-22.04
os: ubuntu
- name: ubuntu-24.04_x86_64
runs-on: ubuntu-24.04
os: ubuntu
- name: android
runs-on: ubuntu-22.04
os: android
name: Build sora-cpp-sdk for ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.runs-on }}
env:
TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }}
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
TEST_MATRIX_NAME: ${{ matrix.name }}
TEST_MATRIX_NAME: ${{ matrix.platform.name }}
steps:
- uses: actions/checkout@v4
- name: Disk cleanup
Expand All @@ -178,42 +186,60 @@ jobs:
sudo du -h -d1 /usr/local/share
sudo du -h -d1 /usr/local/lib
sudo du -h -d1 /usr/share
docker rmi `docker images -q -a`
RMI=`docker images -q -a`
if [ -n "$RMI" ]; then
docker rmi $RMI
fi
# 4.6G
sudo rm -rf /usr/local/.ghcup
# 1.7G
sudo rm -rf /usr/share/swift
# 1.4G
sudo rm -rf /usr/share/dotnet
df -h
- name: Install deps for ${{ matrix.name }}
if: matrix.name == 'ubuntu-20.04_x86_64' || matrix.name == 'ubuntu-22.04_x86_64'
# Ubuntu 24.04 だと libtinfo5 が見つからない問題があるので、その修正
# ref: https://qiita.com/gengen16k/items/88cf3c18a40a94205fab
- name: Fix CUDA issues for Ubuntu 24.04
if: matrix.platform.name == 'ubuntu-24.04_x86_64'
run: |
sudo tee /etc/apt/sources.list.d/jammy.list << EOF
deb http://archive.ubuntu.com/ubuntu/ jammy universe
EOF
sudo tee /etc/apt/preferences.d/pin-jammy <<EOF
Package: *
Pin: release n=jammy
Pin-Priority: -10
Package: libtinfo5
Pin: release n=jammy
Pin-Priority: 990
EOF
- name: Install deps for ${{ matrix.platform.name }}
if: matrix.platform.os == 'ubuntu'
run: |
source VERSION
# clang-18 と CUDA を入れる
sudo apt-get update
sudo apt-get install -y software-properties-common
# X11
sudo apt-get install libx11-dev libxext-dev
# CUDA
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_*all.deb
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install cuda=$CUDA_VERSION
# clang-18
wget https://apt.llvm.org/llvm.sh
chmod a+x llvm.sh
sudo ./llvm.sh 18
# Intel Media SDK のために libva-dev, libdrm-dev を入れる
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install libva-dev libdrm-dev
- name: Install deps for Jetson series
if: matrix.name == 'ubuntu-20.04_armv8_jetson'
run: |
sudo apt-get update
sudo apt-get -y install multistrap binutils-aarch64-linux-gnu
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap
- name: Install deps for Android
if: matrix.name == 'android'
if: matrix.platform.os == 'android'
run: |
sudo apt-get -y install ninja-build
# JDK を指定しないとデフォルトの JDK 11 で動作するため指定する
Expand All @@ -222,56 +248,48 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
if: matrix.name == 'android'
if: matrix.platform.os == 'android'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
if: matrix.name == 'android'
- run: python3 run.py --test --run-e2e-test --package ${{ matrix.name }}
if: matrix.platform.os == 'android'
- run: python3 run.py --test --run-e2e-test --package ${{ matrix.platform.name }}
- name: Get package name
run: |
source _package/${{ matrix.name }}/release/sora.env
source _package/${{ matrix.platform.name }}/release/sora.env
echo "name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
echo "boost_name=${BOOST_PACKAGE_NAME}" >> $GITHUB_OUTPUT
id: package_name
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package_name.outputs.name }}
path: _package/${{ matrix.name }}/release/${{ steps.package_name.outputs.name }}
path: _package/${{ matrix.platform.name }}/release/${{ steps.package_name.outputs.name }}
- name: Upload Boost Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.package_name.outputs.boost_name }}
path: _package/${{ matrix.name }}/release/${{ steps.package_name.outputs.boost_name }}
path: _package/${{ matrix.platform.name }}/release/${{ steps.package_name.outputs.boost_name }}
- name: Upload Environment
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}.env
path: _package/${{ matrix.name }}/release/sora.env
name: ${{ matrix.platform.name }}.env
path: _package/${{ matrix.platform.name }}/release/sora.env
# Examples のビルド
- name: Build Examples
run: |
cd examples
mkdir examples_${{ matrix.name }}
mkdir examples_${{ matrix.platform.name }}
for app in sdl_sample sumomo messaging_recvonly_sample; do
python3 $app/${{ matrix.name }}/run.py --sora-dir ..
cp _build/${{ matrix.name }}/release/$app/$app examples_${{ matrix.name }}
python3 $app/${{ matrix.platform.name }}/run.py --local-sora-cpp-sdk-dir ..
cp _build/${{ matrix.platform.name }}/release/$app/$app examples_${{ matrix.platform.name }}
done
if: matrix.name == 'ubuntu-20.04_x86_64' || matrix.name == 'ubuntu-22.04_x86_64' || matrix.name == 'ubuntu-20.04_armv8_jetson'
if: matrix.platform.os == 'ubuntu'
- name: Upload Examples Artifact
uses: actions/upload-artifact@v4
with:
name: examples_${{ matrix.name }}
path: examples/examples_${{ matrix.name }}
if: matrix.name == 'ubuntu-20.04_x86_64' || matrix.name == 'ubuntu-22.04_x86_64' || matrix.name == 'ubuntu-20.04_armv8_jetson'
- name: Slack Notification
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: sora-cpp-sdk
SLACK_COLOR: danger
SLACK_TITLE: Build failed
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
name: examples_${{ matrix.platform.name }}
path: examples/examples_${{ matrix.platform.name }}
if: matrix.platform.os == 'ubuntu'

create-release:
name: Create Release
Expand All @@ -292,15 +310,15 @@ jobs:
- uses: ./.github/actions/download
with:
platform: ios
- uses: ./.github/actions/download
with:
platform: ubuntu-20.04_armv8_jetson
- uses: ./.github/actions/download
with:
platform: ubuntu-20.04_x86_64
- uses: ./.github/actions/download
with:
platform: ubuntu-22.04_x86_64
- uses: ./.github/actions/download
with:
platform: ubuntu-24.04_x86_64
- uses: ./.github/actions/download
with:
platform: android
Expand All @@ -314,11 +332,26 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.env.outputs.package_paths }}
- name: Slack Notification
if: failure()
uses: rtCamp/action-slack-notify@v2
prerelease: ${{ contains(github.ref, 'canary') }}

notification:
name: Slack Notification
runs-on: ubuntu-latest
needs:
- build-windows
- build-macos
- build-ubuntu
- create-release
if: always()
steps:
- uses: rtCamp/action-slack-notify@v2
if: |
needs.build-windows.result == 'failure' ||
needs.build-macos.result == 'failure' ||
needs.build-ubuntu.result == 'failure' ||
needs.create-release.result == 'failure'
env:
SLACK_CHANNEL: sora-cpp-sdk
SLACK_COLOR: danger
SLACK_TITLE: Release failed
SLACK_TITLE: Build failed
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
26 changes: 17 additions & 9 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"_LIBCPP_DISABLE_AVAILABILITY",
"OPENSSL_IS_BORINGSSL",
"SORA_CPP_SDK_UBUNTU_2004",
"USE_NVCODEC_ENCODER"
"USE_NVCODEC_ENCODER",
"RTC_ENABLE_H265"
],
"compilerPath": "${workspaceFolder}/_install/ubuntu-20.04_x86_64/release/llvm/clang/bin/clang++",
"compilerArgs": ["-nostdinc++"],
Expand Down Expand Up @@ -58,7 +59,8 @@
"OPENSSL_IS_BORINGSSL",
"USE_JETSON_ENCODER",
"SORA_CPP_SDK_JETSON",
"HELLO_JETSON"
"HELLO_JETSON",
"RTC_ENABLE_H265"
],
"compilerPath": "${workspaceFolder}/_install/ubuntu-20.04_armv8_jetson/release/llvm/clang/bin/clang++",
"compilerArgs": ["-nostdinc++"],
Expand Down Expand Up @@ -92,9 +94,11 @@
"OPENSSL_IS_BORINGSSL",
"SORA_CPP_SDK_UBUNTU_2204",
"USE_NVCODEC_ENCODER",
"USE_VPL_ENCODER"
"USE_VPL_ENCODER",
"RTC_ENABLE_H265"
],
"compilerPath": "${workspaceFolder}/_install/ubuntu-22.04_x86_64/release/llvm/clang/bin/clang++",
// "compilerPath": "${workspaceFolder}/_install/ubuntu-22.04_x86_64/release/llvm/clang/bin/clang++",
"compilerPath": "/usr/bin/clang++-18",
"compilerArgs": ["-nostdinc++"],
"cStandard": "gnu17",
"cppStandard": "gnu++17",
Expand Down Expand Up @@ -123,7 +127,8 @@
"OPENSSL_IS_BORINGSSL",
"USE_NVCODEC_ENCODER=0",
"SORA_CPP_SDK_ANDROID",
"HELLO_ANDROID"
"HELLO_ANDROID",
"RTC_ENABLE_H265"
],
"compilerPath": "${workspaceFolder}/_install/android/release/llvm/clang/bin/clang++",
"compilerArgs": ["-nostdinc++"],
Expand All @@ -148,7 +153,8 @@
"defines": [
"WEBRTC_POSIX",
"WEBRTC_MAC",
"OPENSSL_IS_BORINGSSL"
"OPENSSL_IS_BORINGSSL",
"RTC_ENABLE_H265"
],
"cStandard": "gnu17",
"cppStandard": "gnu++17",
Expand All @@ -174,8 +180,9 @@
"defines": [
"SORA_CPP_SDK_WINDOWS",
"WEBRTC_WIN",
"USE_NVCODEC_ENCODER=1",
"USE_VPL_ENCODER=1"
"USE_NVCODEC_ENCODER",
"USE_VPL_ENCODER",
"RTC_ENABLE_H265"
],
"cStandard": "gnu17",
"cppStandard": "gnu++17",
Expand All @@ -200,7 +207,8 @@
"defines": [
"SORA_CPP_SDK_WINDOWS",
"WEBRTC_WIN",
"USE_NVCODEC_ENCODER=1"
"USE_NVCODEC_ENCODER",
"RTC_ENABLE_H265"
],
"cStandard": "gnu17",
"cppStandard": "gnu++17",
Expand Down
45 changes: 45 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,54 @@

## develop

- [CHANGE] `--sora-dir`, `--sora-args``--local-sora-cpp-sdk-dir``--local-sora-cpp-sdk-args` に変更する
- @melpon
- [CHANGE] `--webrtc-build-dir`, `--webrtc-build-args``--local-webrtc-build-dir``--local-webrtc-build-args` に変更する
- @melpon
- [CHANGE] SoraVideoDecoderFactory の CreateVideoDecoder 関数を Create に変更する
- libwebrtc に定義されている継承元クラスが変更されたことに対する追従
- @enm10k
- [CHANGE] SoraVideoEncoderFactory の CreateVideoEncoder 関数を Create に変更する
- libwebrtc に定義されている継承元クラスが変更されたことに対する追従
- @enm10k
- [CHANGE] `CreateOpenH264VideoEncoder()` 関数の第1引数の型を `const cricket::VideoCodec&` から `const webrtc::SdpVideoFormat&` に変更する
- @melpon
- [CHANGE] Jetson 対応をサポートブランチに移動する
- @melpon
- [UPDATE] Boost を 1.85.0 にあげる
- @enm10k
- [UPDATE] SDL2 を 2.30.3 にあげる
- @enm10k
- [UPDATE] CLI11 を 2.4.2 にあげる
- @enm10k
- [UPDATE] libwebrtc を m125.6422.2.5 にあげる
- Android の test アプリがリンクできなくなったため、リンカーを Android NDK のものから libwebrtc のものに変更
- リンカーのバージョンの違いによる互換性の問題でエラーが発生していた
- @melpon @enm10k
- [ADD] sumomo に `--openh264``--use-hardware-encoder` オプションを追加
- @melpon
- [ADD] sumomo に `--video-h264-params``--video-h265-params` オプションを追加
- @enm10k
- [ADD] SoraSignalingConfig に `video_h265_params` を追加
- @enm10k
- [ADD] 古い Intel CPU でも H265 エンコーダが動くようにする
- @melpon
- [ADD] Intel VPL で AV1 デコーダを動くようにする
- @melpon
- [ADD] NVIDIA Video Codec SDK を H265 に対応する
- @melpon
- [ADD] Ubuntu 24.04 に対応する
- @melpon
- [ADD] sumomo に --simulcast-multicodec オプションを追加
- @melpon

## 2024.6.1 (2024-04-16)

- [CHANGE] テストモジュールについて `SoraSignalingConfig``sora_client` に値を設定しないようにする
- @enm10k
- [FIX] VPL デコーダで遅延が起きたりセグフォすることがあるのを修正
- @melpon

## 2024.6.0 (2024-04-01)

- [CHANGE] `VplVideoDecoderImpl``ImplementationName``oneVPL` から `libvpl` に変更する
Expand Down
Loading

0 comments on commit c85ccfd

Please sign in to comment.