Skip to content

Commit

Permalink
Merge branch 'release/2024.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
miosakuma committed Jul 29, 2024
2 parents 568004b + 2ae9cc6 commit 4f9bd80
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
name:
- windows_x86_64
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Cache
Expand Down
21 changes: 21 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,30 @@

## develop

## 2024.4.0 (2024-07-29)

- [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
- [UPDATE] Sora C++ SDK を `2024.7.0` に上げる
- Sora C++ SDK に追従して H.264 専用となっていた `NvCodecH264Encoder``NvCodecVideoEncoder` に変更する
- WEBRTC_BUILD_VERSION を `m127.6533.1.1` にアップデート
- BOOST_VERSION を 1.85.0 にアップデート
- CMAKE_VERSION を 3.29.6 にアップデート
- @melpon @torikizi
- [UPDATE] Github Actions で利用する Windows を 2022 にあげる
- @torikizi
- [ADD] Ubuntu 22.04 でのビルドに対応する
- 単にローカルビルド可能にしただけで、リリースには含めていない
- @melpon
- [ADD] WebSocket での接続時に User-Agent を設定する
- @melpon

## 2024.3.0 (2024-04-18)

- [UPDATE] Sora C++ SDK を `2024.6.1` に上げる
- Intel VPL H.265 対応( Windows, Ubuntu 22.04 )
- WEBRTC_BUILD_VERSION を `m122.6261.1.0` にあげる
- Ubuntu のビルドを通すために、 __assertion_handler というファイルをコピーする処理を追加した
- @miosakuma @torikizi
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "android")
elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "ubuntu-20.04_x86_64")
add_library(SoraUnitySdk SHARED)

set(SORA_UNITY_SDK_PLATFORM Ubuntu)
elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "ubuntu-22.04_x86_64")
add_library(SoraUnitySdk SHARED)

set(SORA_UNITY_SDK_PLATFORM Ubuntu)
endif()

Expand Down Expand Up @@ -209,6 +213,9 @@ elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "ios")

elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "android")

# ref: https://github.com/shiguredo/sora-cpp-sdk/blob/bfb7ed87f4d4c08212115dce00f4be6629ea65d4/test/android/app/src/main/cpp/CMakeLists.txt#L48-L56
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -B ${CLANG_DIR}/bin")

find_library(ANDROID_LIB_LOG log)
find_library(ANDROID_LIB_ANDROID android)
find_library(ANDROID_LIB_OPENSLES OpenSLES)
Expand Down Expand Up @@ -247,7 +254,7 @@ elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "android")
${_WEBRTC_ANDROID_LDFLAGS}
)

elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "ubuntu-20.04_x86_64")
elseif (SORA_UNITY_SDK_PACKAGE STREQUAL "ubuntu-20.04_x86_64" OR SORA_UNITY_SDK_PACKAGE STREQUAL "ubuntu-22.04_x86_64")

target_sources(SoraUnitySdk
PRIVATE
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sora Unity SDK

[![libwebrtc](https://img.shields.io/badge/libwebrtc-122.6261-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/6261)
[![libwebrtc](https://img.shields.io/badge/libwebrtc-127.6533-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/6533)
[![GitHub tag](https://img.shields.io/github/tag/shiguredo/sora-unity-sdk.svg)](https://github.com/shiguredo/sora-unity-sdk)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Actions Status](https://github.com/shiguredo/sora-unity-sdk/workflows/build/badge.svg)](https://github.com/shiguredo/sora-unity-sdk/actions)
Expand Down Expand Up @@ -37,7 +37,7 @@ Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use

## システム条件

- WebRTC SFU Sora 2023.2.0 以降
- WebRTC SFU Sora 2024.1.0 以降

## 対応プラットフォーム

Expand Down Expand Up @@ -102,11 +102,11 @@ Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use
- マイクやカメラ等のメディアデバイスをつかまないようにする機能
- 接続確立後のカメラ切り替え機能

## Sora Unity SDK for MS Hololens2
## Sora Unity SDK for MS HoloLens 2

- Discord でのお問い合わせはお受けしておりません
- [support/hololens2](https://github.com/shiguredo/sora-unity-sdk/tree/support/hololens2) ブランチの修正や改善は有償でお受けしています
- 継続的な有償サポートを提供しています
- [support/hololens2](https://github.com/shiguredo/sora-unity-sdk/tree/support/hololens2) ブランチの修正や改善は優先実装としてお受けしています
- 継続的なメンテナンスを有償にて提供しています

## 有償での優先実装

Expand Down
10 changes: 5 additions & 5 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SORA_UNITY_SDK_VERSION=2024.3.0
SORA_CPP_SDK_VERSION=2024.6.1
WEBRTC_BUILD_VERSION=m122.6261.1.0
BOOST_VERSION=1.84.0
CMAKE_VERSION=3.28.1
SORA_UNITY_SDK_VERSION=2024.4.0
SORA_CPP_SDK_VERSION=2024.7.0
WEBRTC_BUILD_VERSION=m127.6533.1.1
BOOST_VERSION=1.85.0
CMAKE_VERSION=3.29.6
PROTOBUF_VERSION=21.1
PROTOC_GEN_JSONIF_VERSION=0.12.0
ANDROID_NDK_VERSION=r26b
Expand Down
62 changes: 36 additions & 26 deletions buildbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,19 +433,19 @@ def install_webrtc(version, source_dir, install_dir, platform: str):
extract(archive, output_dir=install_dir, output_dirname="webrtc")


def build_webrtc(platform, webrtc_build_dir, webrtc_build_args, debug):
with cd(webrtc_build_dir):
def build_webrtc(platform, local_webrtc_build_dir, local_webrtc_build_args, debug):
with cd(local_webrtc_build_dir):
args = ["--webrtc-nobuild-ios-framework", "--webrtc-nobuild-android-aar"]
if debug:
args += ["--debug"]

args += webrtc_build_args
args += local_webrtc_build_args

cmd(["python3", "run.py", "build", platform, *args])

# インクルードディレクトリを増やしたくないので、
# __config_site を libc++ のディレクトリにコピーしておく
webrtc_source_dir = os.path.join(webrtc_build_dir, "_source", platform, "webrtc")
webrtc_source_dir = os.path.join(local_webrtc_build_dir, "_source", platform, "webrtc")
src_config = os.path.join(
webrtc_source_dir, "src", "buildtools", "third_party", "libc++", "__config_site"
)
Expand Down Expand Up @@ -486,11 +486,11 @@ class WebrtcInfo(NamedTuple):


def get_webrtc_info(
platform: str, webrtc_build_dir: Optional[str], install_dir: str, debug: bool
platform: str, local_webrtc_build_dir: Optional[str], install_dir: str, debug: bool
) -> WebrtcInfo:
webrtc_install_dir = os.path.join(install_dir, "webrtc")

if webrtc_build_dir is None:
if local_webrtc_build_dir is None:
return WebrtcInfo(
version_file=os.path.join(webrtc_install_dir, "VERSIONS"),
deps_file=os.path.join(webrtc_install_dir, "DEPS"),
Expand All @@ -501,15 +501,17 @@ def get_webrtc_info(
libcxx_dir=os.path.join(install_dir, "llvm", "libcxx"),
)
else:
webrtc_build_source_dir = os.path.join(webrtc_build_dir, "_source", platform, "webrtc")
webrtc_build_source_dir = os.path.join(
local_webrtc_build_dir, "_source", platform, "webrtc"
)
configuration = "debug" if debug else "release"
webrtc_build_build_dir = os.path.join(
webrtc_build_dir, "_build", platform, configuration, "webrtc"
local_webrtc_build_dir, "_build", platform, configuration, "webrtc"
)

return WebrtcInfo(
version_file=os.path.join(webrtc_build_dir, "VERSION"),
deps_file=os.path.join(webrtc_build_dir, "DEPS"),
version_file=os.path.join(local_webrtc_build_dir, "VERSION"),
deps_file=os.path.join(local_webrtc_build_dir, "DEPS"),
webrtc_include_dir=os.path.join(webrtc_build_source_dir, "src"),
webrtc_source_dir=os.path.join(webrtc_build_source_dir, "src"),
webrtc_library_dir=webrtc_build_build_dir,
Expand Down Expand Up @@ -749,15 +751,23 @@ def install_sora_and_deps(platform: str, source_dir: str, install_dir: str):


def build_sora(
platform: str, sora_dir: str, sora_args: List[str], debug: bool, webrtc_build_dir: Optional[str]
platform: str,
local_sora_cpp_sdk_dir: str,
local_sora_cpp_sdk_args: List[str],
debug: bool,
local_webrtc_build_dir: Optional[str],
):
if debug and "--debug" not in sora_args:
sora_args = ["--debug", *sora_args]
if webrtc_build_dir is not None:
sora_args = ["--webrtc-build-dir", webrtc_build_dir, *sora_args]
if debug and "--debug" not in local_sora_cpp_sdk_args:
local_sora_cpp_sdk_args = ["--debug", *local_sora_cpp_sdk_args]
if local_webrtc_build_dir is not None:
local_sora_cpp_sdk_args = [
"--local-webrtc-build-dir",
local_webrtc_build_dir,
*local_sora_cpp_sdk_args,
]

with cd(sora_dir):
cmd(["python3", "run.py", platform, *sora_args])
with cd(local_sora_cpp_sdk_dir):
cmd(["python3", "run.py", platform, *local_sora_cpp_sdk_args])


class SoraInfo(NamedTuple):
Expand All @@ -766,11 +776,11 @@ class SoraInfo(NamedTuple):


def get_sora_info(
platform: str, sora_dir: Optional[str], install_dir: str, debug: bool
platform: str, local_sora_cpp_sdk_dir: Optional[str], install_dir: str, debug: bool
) -> SoraInfo:
if sora_dir is not None:
if local_sora_cpp_sdk_dir is not None:
configuration = "debug" if debug else "release"
install_dir = os.path.join(sora_dir, "_install", platform, configuration)
install_dir = os.path.join(local_sora_cpp_sdk_dir, "_install", platform, configuration)

return SoraInfo(
sora_install_dir=os.path.join(install_dir, "sora"),
Expand Down Expand Up @@ -1497,32 +1507,32 @@ def get_webrtc_platform(platform: Platform) -> str:
# `--sora-args '--test'` のようにスペースを使うと、ハイフンから始まるオプションが正しく解釈されない
def add_sora_arguments(parser):
parser.add_argument(
"--sora-dir",
"--local-sora-cpp-sdk-dir",
type=os.path.abspath,
default=None,
help="Refer to local Sora C++ SDK. "
"When this option is specified, Sora C++ SDK will also be built.",
)
parser.add_argument(
"--sora-args",
"--local-sora-cpp-sdk-args",
type=shlex.split,
default=[],
help="Options for building local Sora C++ SDK when `--sora-dir` is specified.",
help="Options for building local Sora C++ SDK when `--local-sora-cpp-sdk-dir` is specified.",
)


# add_sora_arguments と同様の注意点があるので注意すること
def add_webrtc_build_arguments(parser):
parser.add_argument(
"--webrtc-build-dir",
"--local-webrtc-build-dir",
type=os.path.abspath,
default=None,
help="Refer to local webrtc-build. "
"When this option is specified, webrtc-build will also be built.",
)
parser.add_argument(
"--webrtc-build-args",
"--local-webrtc-build-args",
type=shlex.split,
default=[],
help="Options for building local webrtc-build when `--webrtc-build-dir` is specified.",
help="Options for building local webrtc-build when `--local-webrtc-build-dir` is specified.",
)
Loading

0 comments on commit 4f9bd80

Please sign in to comment.