Skip to content

Commit

Permalink
Merge pull request #42 from shiguredo/feature/rename-momo-sample-to-s…
Browse files Browse the repository at this point in the history
…umomo

momo_sample を sumomo にリネームする
  • Loading branch information
enm10k authored Feb 19, 2024
2 parents 64b7b91 + cccdb92 commit 413e456
Show file tree
Hide file tree
Showing 18 changed files with 89 additions and 87 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
- uses: actions/checkout@v4
- uses: microsoft/[email protected]
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 momo_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build\${{ matrix.name }}\release\sdl_sample\Release\sdl_sample.exe ${{ matrix.name }}
cp _build\${{ matrix.name }}\release\momo_sample\Release\momo_sample.exe ${{ matrix.name }}
cp _build\${{ matrix.name }}\release\sumomo\Release\sumomo.exe ${{ matrix.name }}
cp _build\${{ matrix.name }}\release\messaging_recvonly_sample\Release\messaging_recvonly_sample.exe ${{ matrix.name }}
cp -Recurse _install\${{ matrix.name }}\release\lyra\share\model_coeffs ${{ matrix.name }}\model_coeffs
- name: Upload Artifact
Expand All @@ -46,13 +46,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 momo_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/momo_sample/momo_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }}
cp -r _install/${{ matrix.name }}/release/lyra/share/model_coeffs ${{ matrix.name }}/model_coeffs
- name: Upload Artifact
Expand Down Expand Up @@ -84,13 +84,13 @@ jobs:
sudo apt-get update
sudo apt-get install libdrm-dev libva-dev
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 momo_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/momo_sample/momo_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }}
cp -r _install/${{ matrix.name }}/release/lyra/share/model_coeffs ${{ matrix.name }}/model_coeffs
- name: Upload Artifact
Expand All @@ -114,13 +114,13 @@ jobs:
sudo apt-get update
sudo apt-get install libdrm-dev libva-dev
- run: python3 sdl_sample/${{ matrix.name }}/run.py
- run: python3 momo_sample/${{ matrix.name }}/run.py
- run: python3 sumomo/${{ matrix.name }}/run.py
- run: python3 messaging_recvonly_sample/${{ matrix.name }}/run.py
- name: Create Artifact
run: |
mkdir ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sdl_sample/sdl_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/momo_sample/momo_sample ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/sumomo/sumomo ${{ matrix.name }}
cp _build/${{ matrix.name }}/release/messaging_recvonly_sample/messaging_recvonly_sample ${{ matrix.name }}
cp -r _install/${{ matrix.name }}/release/lyra/share/model_coeffs ${{ matrix.name }}/model_coeffs
- name: Upload Artifact
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

## develop

- [CHANGE] momo_sample を sumomo にリネームする
- @enm10k
- [CHANGE] JetPack のバージョンを 5.1.2 にあげる
- JetPack 5.1.1, 5.1.2 で動作を確認
- JetPack 5.1 では、互換性の問題で JetsonJpegDecoder がエラーになることを確認
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use
WebRTC SFU Sora と映像の送受信を行い、[SDL (Simple DirectMedia Layer)](https://www.libsdl.org/) を利用して受信映像を表示するサンプルです。
使い方は [SDL サンプルを使ってみる](./doc/USE_SDL_SAMPLE.md) をお読みください。

### Momo サンプル
### Sumomo

[WebRTC Native Client Momo](https://github.com/shiguredo/momo) の sora モードを模したサンプルです。
使い方は [Momo サンプルを使ってみる](./doc/USE_MOMO_SAMPLE.md) をお読みください。
使い方は [Sumomo を使ってみる](./doc/USE_SUMOMO.md) をお読みください。

### メッセージング受信サンプル

Expand Down
2 changes: 1 addition & 1 deletion doc/USE_SDL_SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[WebRTC SFU Sora](https://sora.shiguredo.jp/) と音声や映像の送受信を行い、[SDL (Simple DirectMedia Layer)](https://www.libsdl.org/) を利用して映像を表示するサンプルです。

このサンプルに [Sora Labo](https://sora-labo.shiguredo.app/) / [Sora Cloud](https://sora-cloud.shiguredo.jp/) に接続する機能を用意する予定は現在ありません。[Momo サンプルを使ってみる](./doc/USE_MOMO_SAMPLE.md) か独自に実装していただく必要があります。
このサンプルに [Sora Labo](https://sora-labo.shiguredo.app/) / [Sora Cloud](https://sora-cloud.shiguredo.jp/) に接続する機能を用意する予定は現在ありません。[Sumomo を使ってみる](./doc/USE_SUMOMO.md) か独自に実装していただく必要があります。

- 参考記事 : [sora-cpp-sdk-samples にmomoのオプションを移植した](https://zenn.dev/tetsu_koba/articles/06e11dd4870796)

Expand Down
48 changes: 24 additions & 24 deletions doc/USE_MOMO_SAMPLE.md → doc/USE_SUMOMO.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Momo サンプルを使ってみる
# Sumomo を使ってみる

## 概要

Expand All @@ -25,7 +25,7 @@ $ git clone https://github.com/shiguredo/sora-cpp-sdk-samples.git
$ cd sora-cpp-sdk-samples
```

### Momo サンプルをビルドする
### Sumomo をビルドする

#### Windows x86_64 向けのビルドをする

Expand All @@ -40,14 +40,14 @@ $ cd sora-cpp-sdk-samples
##### ビルド

```powershell
> python3 momo_sample\windows_x86_64\run.py
> python3 sumomo\windows_x86_64\run.py
```

成功した場合、`_build\windows_x86_64\release\momo_sample\Release``momo_sample.exe` が作成されます。
成功した場合、`_build\windows_x86_64\release\sumomo\Release``sumomo.exe` が作成されます。

```
\_BUILD\WINDOWS_X86_64\RELEASE\MOMO_SAMPLE\RELEASE
momo_sample.exe
\_BUILD\WINDOWS_X86_64\RELEASE\sumomo\RELEASE
sumomo.exe
```

#### macOS arm64 向けのビルドをする
Expand All @@ -61,14 +61,14 @@ $ cd sora-cpp-sdk-samples
##### ビルド

```shell
$ python3 momo_sample/macos_arm64/run.py
$ python3 sumomo/macos_arm64/run.py
```

成功した場合、`_build/macos_arm64/release/momo_sample``momo_sample` が作成されます。
成功した場合、`_build/macos_arm64/release/sumomo``sumomo` が作成されます。

```
_build/macos_arm64/release/momo_sample
└── momo_sample
_build/macos_arm64/release/sumomo
└── sumomo
```

#### Ubuntu 20.04 x86_64 向けのビルドをする
Expand All @@ -89,14 +89,14 @@ $ sudo apt install python3
##### ビルド

```shell
$ python3 momo_sample/ubuntu-20.04_x86_64/run.py
$ python3 sumomo/ubuntu-20.04_x86_64/run.py
```

成功した場合、`_build/ubuntu-20.04_x86_64/release/momo_sample``momo_sample` が作成されます。
成功した場合、`_build/ubuntu-20.04_x86_64/release/sumomo``sumomo` が作成されます。

```
_build/ubuntu-20.04_x86_64/release/momo_sample/
└── momo_sample
_build/ubuntu-20.04_x86_64/release/sumomo/
└── sumomo
```

#### Ubuntu 22.04 x86_64 向けのビルドをする
Expand All @@ -117,14 +117,14 @@ $ sudo apt install python3
##### ビルド

```shell
$ python3 momo_sample/ubuntu-22.04_x86_64/run.py
$ python3 sumomo/ubuntu-22.04_x86_64/run.py
```

成功した場合、以下のファイルが作成されます。`_build/ubuntu-22.04_x86_64/release/momo_sample``momo_sample` が作成されます。
成功した場合、以下のファイルが作成されます。`_build/ubuntu-22.04_x86_64/release/sumomo``sumomo` が作成されます。

```
_build/ubuntu-22.04_x86_64/release/momo_sample/
└── momo_sample
_build/ubuntu-22.04_x86_64/release/sumomo/
└── sumomo
```

#### Ubuntu 20.04 x86_64 で Ubuntu 20.04 armv8 Jetson 向けのビルドをする
Expand All @@ -150,14 +150,14 @@ $ sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthentica
##### ビルド

```shell
$ python3 momo_sample/ubuntu-20.04_armv8_jetson/run.py
$ python3 sumomo/ubuntu-20.04_armv8_jetson/run.py
```

成功した場合、以下のファイルが作成されます。`_build/ubuntu-20.04_armv8_jetson/release/momo_sample``momo_sample` が作成されます。
成功した場合、以下のファイルが作成されます。`_build/ubuntu-20.04_armv8_jetson/release/sumomo``sumomo` が作成されます。

```
_build/ubuntu-20.04_armv8_jetson/release/momo_sample/
└── momo_sample
_build/ubuntu-20.04_armv8_jetson/release/sumomo/
└── sumomo
```

## 実行する
Expand All @@ -169,12 +169,12 @@ _build/ubuntu-20.04_armv8_jetson/release/momo_sample/

Windows の場合
```powershell
> .\momo_sample.exe --signaling-url wss://sora.example.com/signaling --role sendrecv --channel-id sora --multistream true --use-sdl
> .\sumomo.exe --signaling-url wss://sora.example.com/signaling --role sendrecv --channel-id sora --multistream true --use-sdl
```

Windows 以外の場合
```shell
$ ./momo_sample --signaling-url wss://sora.example.com/signaling --role sendrecv --channel-id sora --multistream true --use-sdl
$ ./sumomo --signaling-url wss://sora.example.com/signaling --role sendrecv --channel-id sora --multistream true --use-sdl
```

#### 必須オプション
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ find_package(Sora REQUIRED)
find_package(SDL2 REQUIRED)
find_package(Threads REQUIRED)

add_executable(momo_sample)
set_target_properties(momo_sample PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(momo_sample PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(momo_sample PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_sources(momo_sample PRIVATE ../src/momo_sample.cpp ../src/sdl_renderer.cpp)
add_executable(sumomo)
set_target_properties(sumomo PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(sumomo PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(sumomo PROPERTIES CXX_VISIBILITY_PRESET hidden)
target_sources(sumomo PRIVATE ../src/sumomo.cpp ../src/sdl_renderer.cpp)

target_include_directories(momo_sample PRIVATE ${CLI11_DIR}/include)
target_link_libraries(momo_sample PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_compile_definitions(momo_sample PRIVATE CLI11_HAS_FILESYSTEM=0)
target_include_directories(sumomo PRIVATE ${CLI11_DIR}/include)
target_link_libraries(sumomo PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_compile_definitions(sumomo PRIVATE CLI11_HAS_FILESYSTEM=0)

# Lyra ファイルのコピー
add_custom_command(
TARGET momo_sample POST_BUILD
TARGET sumomo POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory
${LYRA_DIR}/share/model_coeffs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def main():

configuration = 'Debug' if args.debug else 'Release'

sample_build_dir = os.path.join(build_dir, 'momo_sample')
sample_build_dir = os.path.join(build_dir, 'sumomo')
mkdir_p(sample_build_dir)
with cd(sample_build_dir):
webrtc_info = get_webrtc_info(False, source_dir, build_dir, install_dir)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@ find_package(Sora REQUIRED)
find_package(SDL2 REQUIRED)
find_package(Threads REQUIRED)

add_executable(momo_sample)
set_target_properties(momo_sample PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(momo_sample PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_sources(momo_sample PRIVATE ../src/momo_sample.cpp ../src/sdl_renderer.cpp)
add_executable(sumomo)
set_target_properties(sumomo PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(sumomo PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_sources(sumomo PRIVATE ../src/sumomo.cpp ../src/sdl_renderer.cpp)

target_compile_options(momo_sample
target_compile_options(sumomo
PRIVATE
"$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>"
"$<$<COMPILE_LANGUAGE:CXX>:-isystem${LIBCXX_INCLUDE_DIR}>"
)
target_include_directories(momo_sample PRIVATE ${CLI11_DIR}/include)
target_link_libraries(momo_sample PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_link_directories(momo_sample PRIVATE ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/tegra)
target_compile_definitions(momo_sample PRIVATE CLI11_HAS_FILESYSTEM=0)
target_include_directories(sumomo PRIVATE ${CLI11_DIR}/include)
target_link_libraries(sumomo PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_link_directories(sumomo PRIVATE ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/tegra)
target_compile_definitions(sumomo PRIVATE CLI11_HAS_FILESYSTEM=0)

# Lyra ファイルのコピー
add_custom_command(
TARGET momo_sample POST_BUILD
TARGET sumomo POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory
${LYRA_DIR}/share/model_coeffs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def main():

configuration = 'Debug' if args.debug else 'Release'

sample_build_dir = os.path.join(build_dir, 'momo_sample')
sample_build_dir = os.path.join(build_dir, 'sumomo')
mkdir_p(sample_build_dir)
with cd(sample_build_dir):
webrtc_info = get_webrtc_info(False, source_dir, build_dir, install_dir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ find_package(Threads REQUIRED)
find_package(Libva REQUIRED)
find_package(Libdrm REQUIRED)

add_executable(momo_sample)
set_target_properties(momo_sample PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(momo_sample PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_sources(momo_sample PRIVATE ../src/momo_sample.cpp ../src/sdl_renderer.cpp)
add_executable(sumomo)
set_target_properties(sumomo PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(sumomo PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_sources(sumomo PRIVATE ../src/sumomo.cpp ../src/sdl_renderer.cpp)

target_compile_options(momo_sample
target_compile_options(sumomo
PRIVATE
"$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>"
"$<$<COMPILE_LANGUAGE:CXX>:-isystem${LIBCXX_INCLUDE_DIR}>"
)
target_include_directories(momo_sample PRIVATE ${CLI11_DIR}/include)
target_link_libraries(momo_sample PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_compile_definitions(momo_sample PRIVATE CLI11_HAS_FILESYSTEM=0)
target_include_directories(sumomo PRIVATE ${CLI11_DIR}/include)
target_link_libraries(sumomo PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_compile_definitions(sumomo PRIVATE CLI11_HAS_FILESYSTEM=0)

# Lyra ファイルのコピー
add_custom_command(
TARGET momo_sample POST_BUILD
TARGET sumomo POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory
${LYRA_DIR}/share/model_coeffs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def main():

configuration = 'Debug' if args.debug else 'Release'

sample_build_dir = os.path.join(build_dir, 'momo_sample')
sample_build_dir = os.path.join(build_dir, 'sumomo')
mkdir_p(sample_build_dir)
with cd(sample_build_dir):
webrtc_info = get_webrtc_info(False, source_dir, build_dir, install_dir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ find_package(Threads REQUIRED)
find_package(Libva REQUIRED)
find_package(Libdrm REQUIRED)

add_executable(momo_sample)
set_target_properties(momo_sample PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(momo_sample PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_sources(momo_sample PRIVATE ../src/momo_sample.cpp ../src/sdl_renderer.cpp)
add_executable(sumomo)
set_target_properties(sumomo PROPERTIES CXX_STANDARD 20 C_STANDARD 20)
set_target_properties(sumomo PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_sources(sumomo PRIVATE ../src/sumomo.cpp ../src/sdl_renderer.cpp)

target_compile_options(momo_sample
target_compile_options(sumomo
PRIVATE
"$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>"
"$<$<COMPILE_LANGUAGE:CXX>:-isystem${LIBCXX_INCLUDE_DIR}>"
)
target_include_directories(momo_sample PRIVATE ${CLI11_DIR}/include)
target_link_libraries(momo_sample PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_compile_definitions(momo_sample PRIVATE CLI11_HAS_FILESYSTEM=0)
target_include_directories(sumomo PRIVATE ${CLI11_DIR}/include)
target_link_libraries(sumomo PRIVATE Sora::sora SDL2::SDL2 SDL2::SDL2main)
target_compile_definitions(sumomo PRIVATE CLI11_HAS_FILESYSTEM=0)

# Lyra ファイルのコピー
add_custom_command(
TARGET momo_sample POST_BUILD
TARGET sumomo POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory
${LYRA_DIR}/share/model_coeffs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def main():

configuration = 'Debug' if args.debug else 'Release'

sample_build_dir = os.path.join(build_dir, 'momo_sample')
sample_build_dir = os.path.join(build_dir, 'sumomo')
mkdir_p(sample_build_dir)
with cd(sample_build_dir):
webrtc_info = get_webrtc_info(False, source_dir, build_dir, install_dir)
Expand Down
Loading

0 comments on commit 413e456

Please sign in to comment.