Skip to content

Commit 6c5e7df

Browse files
committed
Merge branch 'release/2021.1'
2 parents 3960752 + 17ec9b5 commit 6c5e7df

File tree

36 files changed

+1120
-392
lines changed

36 files changed

+1120
-392
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ jobs:
5959
name: windows.env
6060
path: windows.env
6161
build-macos:
62-
name: Build momo for macOS
63-
runs-on: macos-latest
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
arch:
66+
- arm64
67+
- x86_64
68+
name: Build momo for macOS_${{ matrix.arch }}
69+
runs-on: macos-11.0
6470
steps:
6571
- uses: actions/checkout@v2
6672
- name: Get Versions
@@ -74,17 +80,17 @@ jobs:
7480
with:
7581
path: _cache/boost
7682
key: macos-boost-${{ steps.versions.outputs.boost_version }}.tar.gz.v2
77-
- run: ./build.sh --package macos
83+
- run: ./build.sh --package macos_${{ matrix.arch }}
7884
working-directory: build
7985
timeout-minutes: 120
8086
- name: Output package name
8187
shell: bash
8288
run: |
8389
source VERSION
8490
MACOS_VERSION=`sw_vers -productVersion | cut -d '.' -f-2`
85-
echo "PACKAGE_NAME=momo-${MOMO_VERSION}_macos-${MACOS_VERSION}.tar.gz" >> macos.env
86-
echo "CONTENT_TYPE=application/gzip" >> macos.env
87-
echo "::set-output name=name::momo-${MOMO_VERSION}_macos-${MACOS_VERSION}.tar.gz"
91+
echo "PACKAGE_NAME=momo-${MOMO_VERSION}_macos-${MACOS_VERSION}_${{ matrix.arch }}.tar.gz" >> macos_${{ matrix.arch }}.env
92+
echo "CONTENT_TYPE=application/gzip" >> macos_${{ matrix.arch }}.env
93+
echo "::set-output name=name::momo-${MOMO_VERSION}_macos-${MACOS_VERSION}_${{ matrix.arch }}.tar.gz"
8894
id: package_name
8995
- name: Upload Artifact
9096
uses: actions/upload-artifact@v1
@@ -94,8 +100,8 @@ jobs:
94100
- name: Upload Environment
95101
uses: actions/upload-artifact@v1
96102
with:
97-
name: macos.env
98-
path: macos.env
103+
name: macos_${{ matrix.arch }}.env
104+
path: macos_${{ matrix.arch }}.env
99105
build-linux:
100106
strategy:
101107
fail-fast: false
@@ -181,7 +187,8 @@ jobs:
181187
matrix:
182188
name:
183189
- windows
184-
- macos
190+
- macos_arm64
191+
- macos_x86_64
185192
- raspberry-pi-os_armv6
186193
- raspberry-pi-os_armv7
187194
- raspberry-pi-os_armv8

.github/workflows/daily_build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ jobs:
3131
working-directory: build
3232
timeout-minutes: 120
3333
build-macos:
34-
name: Build momo for macOS
35-
runs-on: macos-latest
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
arch:
38+
- arm64
39+
- x86_64
40+
name: Build momo for macOS_${{ matrix.arch }}
41+
runs-on: macos-11.0
3642
steps:
3743
- uses: actions/checkout@v2
3844
- name: Get Versions
@@ -46,7 +52,7 @@ jobs:
4652
with:
4753
path: _cache/boost
4854
key: macos-boost-${{ steps.versions.outputs.boost_version }}.tar.gz.v2
49-
- run: ./build.sh macos
55+
- run: ./build.sh macos_${{ matrix.arch }}
5056
working-directory: build
5157
timeout-minutes: 120
5258
build-linux:

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ webrtc_logs_0
4444
/build/windows/_source
4545
/build/windows/_build
4646
/build/windows/_install
47-
/build/macos/_source
48-
/build/macos/_build
49-
/build/macos/_install
47+
/build/macos_*/_source
48+
/build/macos_*/_build
49+
/build/macos_*/_install
5050

5151
/src/hwenc_jetson/Nv*

CHANGES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@
1111

1212
## develop
1313

14+
## 2021.1
15+
16+
- [UPDATE] cmake を 3.19.3 に上げる
17+
- @voluntas
18+
- [UPDATE] GitHub Actions の macOS ビルドを macos-11.0 に変更する
19+
- @voluntas
20+
- [UPDATE] Boost 1.75.0 に上げる
21+
- @voluntas
22+
- [UPDATE] nlohmann/json を Boost.JSON に変更
23+
- @melpon
24+
- [ADD] サイマルキャストの active と adaptivePtime に対応
25+
- @melpon
26+
- [ADD] Apple Silicon 対応
27+
- @hakobera
28+
1429
## 2020.11
1530

1631
- [UPDATE] cmake を 3.19.2 に上げる

CMakeLists.txt

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ set(USE_LINUX_PULSE_AUDIO OFF CACHE BOOL "Linux で ALSA の代わりに PulseAu
1919
set(USE_SCREEN_CAPTURER OFF CACHE BOOL "スクリーンキャプチャラを利用するかどうか")
2020
set(BOOST_ROOT_DIR "" CACHE PATH "Boost のインストール先ディレクトリ\n空文字だった場合はデフォルト検索パスの Boost を利用する")
2121
set(SDL2_ROOT_DIR "" CACHE PATH "SDL2 のインストール先ディレクトリ\n空文字だった場合はデフォルト検索パスの SDL2 を利用する")
22-
set(JSON_ROOT_DIR "" CACHE PATH "nlohmann/json のインストール先ディレクトリ")
2322
set(CLI11_ROOT_DIR "" CACHE PATH "CLI11 のインストール先ディレクトリ")
2423
set(NVCODEC_ROOT_DIR "" CACHE PATH "NVIDIA VIDEO CODEC SDK のインストール先ディレクトリ")
2524
set(WEBRTC_INCLUDE_DIR "" CACHE PATH "WebRTC のインクルードディレクトリ")
@@ -46,17 +45,35 @@ if(MOMO_PACKAGE_NAME STREQUAL "windows")
4645
set(USE_SCREEN_CAPTURER ON)
4746
set(BOOST_ROOT_DIR ${_INSTALL_DIR}/boost)
4847
set(SDL2_ROOT_DIR ${_INSTALL_DIR}/SDL2)
49-
set(JSON_ROOT_DIR ${_INSTALL_DIR}/json)
5048
set(CLI11_ROOT_DIR ${_INSTALL_DIR}/CLI11)
5149
set(WEBRTC_INCLUDE_DIR ${_INSTALL_DIR}/webrtc/include)
5250
set(WEBRTC_LIBRARY_DIR ${_INSTALL_DIR}/webrtc/release)
5351

5452
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${SDL2_ROOT_DIR}/cmake)
5553
list(APPEND CMAKE_PREFIX_PATH ${BOOST_ROOT_DIR} ${SDL2_ROOT_DIR})
5654

57-
elseif(MOMO_PACKAGE_NAME STREQUAL "macos")
55+
elseif(MOMO_PACKAGE_NAME STREQUAL "macos_arm64")
5856

59-
set(_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/macos/_install)
57+
set(_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/macos_arm64/_install)
58+
59+
set(TARGET_OS "macos")
60+
set(TARGET_ARCH "arm64")
61+
set(USE_H264 ON)
62+
set(USE_SDL2 ON)
63+
set(USE_SCREEN_CAPTURER ON)
64+
set(BOOST_ROOT_DIR ${_INSTALL_DIR}/boost)
65+
set(SDL2_ROOT_DIR ${_INSTALL_DIR}/SDL2)
66+
set(CLI11_ROOT_DIR ${_INSTALL_DIR}/CLI11)
67+
set(WEBRTC_INCLUDE_DIR ${_INSTALL_DIR}/webrtc/include)
68+
set(WEBRTC_LIBRARY_DIR ${_INSTALL_DIR}/webrtc/lib)
69+
set(CLANG_ROOT ${_INSTALL_DIR}/llvm/clang)
70+
71+
set(USE_LIBCXX ON)
72+
set(LIBCXX_INCLUDE_DIR ${_INSTALL_DIR}/llvm/libcxx/include)
73+
74+
elseif(MOMO_PACKAGE_NAME STREQUAL "macos_x86_64")
75+
76+
set(_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/macos_x86_64/_install)
6077

6178
set(TARGET_OS "macos")
6279
set(TARGET_ARCH "x86_64")
@@ -65,7 +82,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "macos")
6582
set(USE_SCREEN_CAPTURER ON)
6683
set(BOOST_ROOT_DIR ${_INSTALL_DIR}/boost)
6784
set(SDL2_ROOT_DIR ${_INSTALL_DIR}/SDL2)
68-
set(JSON_ROOT_DIR ${_INSTALL_DIR}/json)
6985
set(CLI11_ROOT_DIR ${_INSTALL_DIR}/CLI11)
7086
set(WEBRTC_INCLUDE_DIR ${_INSTALL_DIR}/webrtc/include)
7187
set(WEBRTC_LIBRARY_DIR ${_INSTALL_DIR}/webrtc/lib)
@@ -83,7 +99,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "raspberry-pi-os_armv6")
8399
set(USE_MMAL_ENCODER ON)
84100
set(USE_H264 ON)
85101
set(BOOST_ROOT_DIR /root/boost)
86-
set(JSON_ROOT_DIR /root/json)
87102
set(CLI11_ROOT_DIR /root/CLI11)
88103
set(WEBRTC_INCLUDE_DIR /root/webrtc/include)
89104
set(WEBRTC_LIBRARY_DIR /root/webrtc/lib)
@@ -106,7 +121,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "raspberry-pi-os_armv7")
106121
set(USE_SDL2 ON)
107122
set(BOOST_ROOT_DIR /root/boost)
108123
set(SDL2_ROOT_DIR /root/SDL2)
109-
set(JSON_ROOT_DIR /root/json)
110124
set(CLI11_ROOT_DIR /root/CLI11)
111125
set(WEBRTC_INCLUDE_DIR /root/webrtc/include)
112126
set(WEBRTC_LIBRARY_DIR /root/webrtc/lib)
@@ -125,7 +139,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "raspberry-pi-os_armv8")
125139
set(TARGET_ARCH "arm")
126140
set(TARGET_ARCH_ARM "armv8")
127141
set(BOOST_ROOT_DIR /root/boost)
128-
set(JSON_ROOT_DIR /root/json)
129142
set(CLI11_ROOT_DIR /root/CLI11)
130143
set(WEBRTC_INCLUDE_DIR /root/webrtc/include)
131144
set(WEBRTC_LIBRARY_DIR /root/webrtc/lib)
@@ -146,7 +159,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "ubuntu-18.04_armv8_jetson_nano")
146159
set(USE_SDL2 ON)
147160
set(USE_LINUX_PULSE_AUDIO ON)
148161
set(BOOST_ROOT_DIR /root/boost)
149-
set(JSON_ROOT_DIR /root/json)
150162
set(CLI11_ROOT_DIR /root/CLI11)
151163
set(SDL2_ROOT_DIR /root/SDL2)
152164
set(WEBRTC_INCLUDE_DIR /root/webrtc/include)
@@ -168,7 +180,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "ubuntu-18.04_armv8_jetson_xavier")
168180
set(USE_SDL2 ON)
169181
set(USE_LINUX_PULSE_AUDIO ON)
170182
set(BOOST_ROOT_DIR /root/boost)
171-
set(JSON_ROOT_DIR /root/json)
172183
set(CLI11_ROOT_DIR /root/CLI11)
173184
set(SDL2_ROOT_DIR /root/SDL2)
174185
set(WEBRTC_INCLUDE_DIR /root/webrtc/include)
@@ -189,7 +200,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "ubuntu-18.04_x86_64")
189200
set(USE_NVCODEC_ENCODER ON)
190201
set(USE_SCREEN_CAPTURER ON)
191202
set(BOOST_ROOT_DIR /root/boost)
192-
set(JSON_ROOT_DIR /root/json)
193203
set(CLI11_ROOT_DIR /root/CLI11)
194204
set(SDL2_ROOT_DIR /root/SDL2)
195205
set(WEBRTC_INCLUDE_DIR /root/webrtc/include)
@@ -212,7 +222,6 @@ elseif(MOMO_PACKAGE_NAME STREQUAL "ubuntu-20.04_x86_64")
212222
set(USE_NVCODEC_ENCODER ON)
213223
set(USE_SCREEN_CAPTURER ON)
214224
set(BOOST_ROOT_DIR /root/boost)
215-
set(JSON_ROOT_DIR /root/json)
216225
set(CLI11_ROOT_DIR /root/CLI11)
217226
set(SDL2_ROOT_DIR /root/SDL2)
218227
set(WEBRTC_INCLUDE_DIR /root/webrtc/include)
@@ -272,6 +281,17 @@ if (TARGET_OS STREQUAL "linux")
272281
endif()
273282
endif()
274283

284+
if (TARGET_OS STREQUAL "macos")
285+
if (TARGET_ARCH STREQUAL "x86_64")
286+
set(ARCH_NAME x86_64-apple-darwin)
287+
else()
288+
set(ARCH_NAME aarch64-apple-darwin)
289+
set(CMAKE_SYSTEM_PROCESSOR arm64)
290+
endif()
291+
292+
set(CMAKE_C_COMPILER_TARGET ${ARCH_NAME})
293+
set(CMAKE_CXX_COMPILER_TARGET ${ARCH_NAME})
294+
endif()
275295

276296
project(momo C CXX)
277297

@@ -285,8 +305,7 @@ else()
285305
endif()
286306

287307
find_package(WebRTC REQUIRED)
288-
find_package(Boost REQUIRED COMPONENTS filesystem)
289-
find_package(JSON REQUIRED)
308+
find_package(Boost REQUIRED COMPONENTS filesystem json)
290309
find_package(CLI11 REQUIRED)
291310
if (USE_SDL2)
292311
find_package(SDL2 REQUIRED)
@@ -338,7 +357,7 @@ target_link_libraries(momo
338357
PRIVATE
339358
WebRTC::WebRTC
340359
Boost::filesystem
341-
JSON::JSON
360+
Boost::json
342361
CLI11::CLI11
343362
)
344363

@@ -492,7 +511,7 @@ elseif (TARGET_OS STREQUAL "macos")
492511
src/mac_helper/objc_codec_factory_helper.mm
493512
)
494513

495-
target_compile_options(momo PRIVATE -fconstant-string-class=NSConstantString)
514+
target_compile_options(momo PRIVATE -fconstant-string-class=NSConstantString -mmacosx-version-min=11.0)
496515
target_link_options(momo PRIVATE -ObjC)
497516
set_target_properties(momo PROPERTIES CXX_VISIBILITY_PRESET hidden)
498517

NOTICE

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,6 @@ misrepresented as being the original software.
2121
3. This notice may not be removed or altered from any source distribution.
2222
```
2323

24-
# JSON for Modern C++
25-
26-
https://github.com/nlohmann/json
27-
28-
```
29-
MIT License
30-
31-
Copyright (c) 2013-2018 Niels Lohmann
32-
33-
Permission is hereby granted, free of charge, to any person obtaining a copy
34-
of this software and associated documentation files (the "Software"), to deal
35-
in the Software without restriction, including without limitation the rights
36-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37-
copies of the Software, and to permit persons to whom the Software is
38-
furnished to do so, subject to the following conditions:
39-
40-
The above copyright notice and this permission notice shall be included in all
41-
copies or substantial portions of the Software.
42-
43-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
47-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
48-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
49-
SOFTWARE.
50-
```
51-
5224
# Boost C++ Libraries
5325

5426
https://www.boost.org/LICENSE_1_0.txt

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
66
[![Actions Status](https://github.com/shiguredo/momo/workflows/daily-build-workflow/badge.svg)](https://github.com/shiguredo/momo/actions)
77

8-
## About Support
8+
## About Shiguredo's open source software
99

10-
We check PRs or Issues only when written in JAPANESE.
11-
In other languages, we won't be able to deal with them. Thank you for your understanding.
10+
We will not respond to PRs or issues that have not been discussed on Discord. Also, Discord is only available in Japanese.
11+
12+
Please read https://github.com/shiguredo/oss before use.
1213

1314
## 時雨堂のオープンソースソフトウェアについて
1415

@@ -89,7 +90,9 @@ https://github.com/shiguredo/momo/releases
8990
- [NVIDIA Jetson Nano](https://www.nvidia.com/ja-jp/autonomous-machines/embedded-systems/jetson-nano/)
9091
- [NVIDIA Jetson Xavier NX](https://www.nvidia.com/ja-jp/autonomous-machines/embedded-systems/jetson-xavier-nx/)
9192
- [NVIDIA Jetson AGX Xavier](https://www.nvidia.com/ja-jp/autonomous-machines/embedded-systems/jetson-agx-xavier/)
92-
- macOS 10.15 x86_64 以降
93+
- macOS 11 x86_64 以降
94+
- 2021 年内に終了予定
95+
- macOS 11 arm64 以降
9396
- Windows 10.1809 x86_64 以降
9497

9598
### 以下はビルドが通ること以外は確認していません
@@ -133,7 +136,7 @@ Apache License 2.0
133136

134137
```
135138
Copyright 2015-2020, tnoho (Original Author)
136-
Copyright 2018-2020, Shiguredo Inc.
139+
Copyright 2018-2021, Shiguredo Inc.
137140
138141
Licensed under the Apache License, Version 2.0 (the "License");
139142
you may not use this file except in compliance with the License.
@@ -197,7 +200,7 @@ limitations under the License.
197200
- MP4 形式での出力
198201
- WebM 形式での出力
199202
- 録画合成対応
200-
- Sora E2EE 対応
203+
- Sora モード利用時の E2EE 機能
201204

202205
## Momo についての電子書籍
203206

VERSION

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
MOMO_VERSION=2020.11
2-
WEBRTC_BUILD_VERSION=88.4324.3.0
3-
BOOST_VERSION=1.74.0
4-
JSON_VERSION=3.9.1
1+
MOMO_VERSION=2021.1
2+
WEBRTC_BUILD_VERSION=88.4324.3.1
3+
BOOST_VERSION=1.75.0
54
CLI11_VERSION=1.9.1
6-
SDL2_VERSION=2.0.12
7-
CMAKE_VERSION=3.19.2
5+
SDL2_VERSION=2.0.14
6+
CMAKE_VERSION=3.19.3
87
CUDA_VERSION=11.0.2-1

0 commit comments

Comments
 (0)