sora-sdk 2025.2.1.dev0__tar.gz → 2025.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of sora-sdk might be problematic. Click here for more details.
- {sora_sdk-2025.2.1.dev0/src/sora_sdk.egg-info → sora_sdk-2025.2.3}/PKG-INFO +3 -2
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/README.md +2 -1
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/buildbase.py +211 -46
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/pyproject.toml +1 -1
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk/sora_sdk_ext.cpython-311-darwin.so +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk/sora_sdk_ext.pyi +1 -1
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3/src/sora_sdk.egg-info}/PKG-INFO +3 -2
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_openh264.py +11 -9
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/LICENSE +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/MANIFEST.in +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/pypath.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/run.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/setup.cfg +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/setup.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk/__init__.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk/py.typed +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk.egg-info/SOURCES.txt +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk.egg-info/dependency_links.txt +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk.egg-info/top_level.txt +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_amd_amf.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_apple_video_toolbox.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_authz.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_authz_simulcast.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_ca_cert.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_capability.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_degradation_preference.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_encoded_transform.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_intel_vpl.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_messaging.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_messaging_header.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_nvidia_video_codec_sdk.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_openh264_simulcast.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_opus.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_re_offer_re_answer_sdp.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_sendonly_recvonly.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_signaling.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_signaling_message.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_signaling_notify.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_simulcast.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_sora_disconnect.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_type_disconnect.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_type_switched.py +0 -0
- {sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/tests/test_vad.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sora_sdk
|
|
3
|
-
Version: 2025.2.
|
|
3
|
+
Version: 2025.2.3
|
|
4
4
|
Summary: WebRTC SFU Sora Python SDK
|
|
5
5
|
Home-page: https://github.com/shiguredo/sora-python-sdk
|
|
6
6
|
Author-email: "Shiguredo Inc." <contact+pypi@shiguredo.jp>
|
|
@@ -52,6 +52,7 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
|
|
|
52
52
|
- [WebRTC Encoded Transform](https://www.w3.org/TR/webrtc-encoded-transform/) に対応
|
|
53
53
|
- 回線が不安定になった際、解像度とフレームレートどちらを維持するかの設定をする [DegradationPreference](https://w3c.github.io/mst-content-hint/#degradation-preference-when-encoding) に対応
|
|
54
54
|
- MAINTAIN_FRAMERATE / MAINTAIN_RESOLUTION / BALANCED が指定できる
|
|
55
|
+
- 発話区間の検出が可能な VAD (Voice Activity Detection) に対応
|
|
55
56
|
- Intel / Apple / NVIDIA のハードウェアデコーダー/エンコーダーに対応
|
|
56
57
|
- Apple Video Toolbox (H.264 / H.265)
|
|
57
58
|
- macOS arm64 で利用できる
|
|
@@ -132,7 +133,7 @@ PyPI 経由ではインストールできません。
|
|
|
132
133
|
- macOS Sequoia 15 arm64
|
|
133
134
|
- macOS Ventura 14 arm64
|
|
134
135
|
- Windows 11 x86_64
|
|
135
|
-
- Windows Server
|
|
136
|
+
- Windows Server 2025 x86_64
|
|
136
137
|
|
|
137
138
|
### macOS の対応バージョン
|
|
138
139
|
|
|
@@ -32,6 +32,7 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
|
|
|
32
32
|
- [WebRTC Encoded Transform](https://www.w3.org/TR/webrtc-encoded-transform/) に対応
|
|
33
33
|
- 回線が不安定になった際、解像度とフレームレートどちらを維持するかの設定をする [DegradationPreference](https://w3c.github.io/mst-content-hint/#degradation-preference-when-encoding) に対応
|
|
34
34
|
- MAINTAIN_FRAMERATE / MAINTAIN_RESOLUTION / BALANCED が指定できる
|
|
35
|
+
- 発話区間の検出が可能な VAD (Voice Activity Detection) に対応
|
|
35
36
|
- Intel / Apple / NVIDIA のハードウェアデコーダー/エンコーダーに対応
|
|
36
37
|
- Apple Video Toolbox (H.264 / H.265)
|
|
37
38
|
- macOS arm64 で利用できる
|
|
@@ -112,7 +113,7 @@ PyPI 経由ではインストールできません。
|
|
|
112
113
|
- macOS Sequoia 15 arm64
|
|
113
114
|
- macOS Ventura 14 arm64
|
|
114
115
|
- Windows 11 x86_64
|
|
115
|
-
- Windows Server
|
|
116
|
+
- Windows Server 2025 x86_64
|
|
116
117
|
|
|
117
118
|
### macOS の対応バージョン
|
|
118
119
|
|
|
@@ -172,7 +172,7 @@ def download(url: str, output_dir: Optional[str] = None, filename: Optional[str]
|
|
|
172
172
|
def read_version_file(path: str) -> Dict[str, str]:
|
|
173
173
|
versions = {}
|
|
174
174
|
|
|
175
|
-
lines = open(path).readlines()
|
|
175
|
+
lines = open(path, encoding="utf-8").readlines()
|
|
176
176
|
for line in lines:
|
|
177
177
|
line = line.strip()
|
|
178
178
|
|
|
@@ -205,13 +205,13 @@ def versioned(func):
|
|
|
205
205
|
del kwargs["ignore_version"]
|
|
206
206
|
|
|
207
207
|
if os.path.exists(version_file):
|
|
208
|
-
ver = open(version_file).read()
|
|
208
|
+
ver = open(version_file, encoding="utf-8").read()
|
|
209
209
|
if ver.strip() == version.strip():
|
|
210
210
|
return
|
|
211
211
|
|
|
212
212
|
r = func(version=version, *args, **kwargs)
|
|
213
213
|
|
|
214
|
-
with open(version_file, "w") as f:
|
|
214
|
+
with open(version_file, "w", encoding="utf-8") as f:
|
|
215
215
|
f.write(version)
|
|
216
216
|
|
|
217
217
|
return r
|
|
@@ -266,7 +266,7 @@ def _extractzip(z: zipfile.ZipFile, path: str):
|
|
|
266
266
|
mod = info.external_attr >> 16
|
|
267
267
|
if (mod & 0o120000) == 0o120000:
|
|
268
268
|
# シンボリックリンク
|
|
269
|
-
with open(filepath, "r") as f:
|
|
269
|
+
with open(filepath, "r", encoding="utf-8") as f:
|
|
270
270
|
src = f.read()
|
|
271
271
|
os.remove(filepath)
|
|
272
272
|
with cd(os.path.dirname(filepath)):
|
|
@@ -389,11 +389,12 @@ def apply_patch(patch, dir, depth):
|
|
|
389
389
|
"--ignore-space-change",
|
|
390
390
|
"--ignore-whitespace",
|
|
391
391
|
"--whitespace=nowarn",
|
|
392
|
+
"--reject",
|
|
392
393
|
patch,
|
|
393
394
|
]
|
|
394
395
|
)
|
|
395
396
|
else:
|
|
396
|
-
with open(patch) as stdin:
|
|
397
|
+
with open(patch, encoding="utf-8") as stdin:
|
|
397
398
|
cmd(["patch", f"-p{depth}"], stdin=stdin)
|
|
398
399
|
|
|
399
400
|
|
|
@@ -410,10 +411,11 @@ def apply_patch_text(patch_text, dir, depth):
|
|
|
410
411
|
"--ignore-space-change",
|
|
411
412
|
"--ignore-whitespace",
|
|
412
413
|
"--whitespace=nowarn",
|
|
414
|
+
"--reject",
|
|
413
415
|
f"--directory={directory}",
|
|
414
416
|
"-",
|
|
415
417
|
],
|
|
416
|
-
input=
|
|
418
|
+
input=patch_text,
|
|
417
419
|
text=True,
|
|
418
420
|
encoding="utf-8",
|
|
419
421
|
)
|
|
@@ -460,7 +462,7 @@ def replace_vcproj_static_runtime(project_file: str):
|
|
|
460
462
|
@versioned
|
|
461
463
|
def install_webrtc(version, source_dir, install_dir, platform: str):
|
|
462
464
|
win = platform.startswith("windows_")
|
|
463
|
-
filename = f
|
|
465
|
+
filename = f"webrtc.{platform}.{'zip' if win else 'tar.gz'}"
|
|
464
466
|
rm_rf(os.path.join(source_dir, filename))
|
|
465
467
|
archive = download(
|
|
466
468
|
f"https://github.com/shiguredo-webrtc-build/webrtc-build/releases/download/{version}/{filename}",
|
|
@@ -570,7 +572,7 @@ def get_webrtc_info(
|
|
|
570
572
|
def install_boost(version, source_dir, install_dir, sora_version, platform: str):
|
|
571
573
|
win = platform.startswith("windows_")
|
|
572
574
|
filename = (
|
|
573
|
-
f
|
|
575
|
+
f"boost-{version}_sora-cpp-sdk-{sora_version}_{platform}.{'zip' if win else 'tar.gz'}"
|
|
574
576
|
)
|
|
575
577
|
rm_rf(os.path.join(source_dir, filename))
|
|
576
578
|
archive = download(
|
|
@@ -695,16 +697,29 @@ def build_and_install_boost(
|
|
|
695
697
|
native_api_level,
|
|
696
698
|
address_model="64",
|
|
697
699
|
runtime_link=None,
|
|
700
|
+
android_build_platform="linux-x86_64",
|
|
698
701
|
):
|
|
699
702
|
version_underscore = version.replace(".", "_")
|
|
700
703
|
archive = download(
|
|
701
|
-
|
|
704
|
+
# 公式サイトに負荷をかけないための時雨堂によるミラー
|
|
705
|
+
f"https://oss-mirrors.shiguredo.jp/boost_{version_underscore}.tar.gz",
|
|
706
|
+
# Boost 公式のミラー
|
|
707
|
+
# f"https://archives.boost.io/release/{version}/source/boost_{version_underscore}.tar.gz",
|
|
702
708
|
source_dir,
|
|
703
709
|
)
|
|
704
710
|
extract(archive, output_dir=build_dir, output_dirname="boost")
|
|
705
711
|
with cd(os.path.join(build_dir, "boost")):
|
|
706
|
-
|
|
707
|
-
|
|
712
|
+
if target_os == "windows":
|
|
713
|
+
bootstrap = ".\\bootstrap.bat"
|
|
714
|
+
b2 = "b2"
|
|
715
|
+
elif target_os == "android" and android_build_platform == "windows-x86_64":
|
|
716
|
+
# Android を Windows でビルドする場合
|
|
717
|
+
bootstrap = ".\\bootstrap.bat"
|
|
718
|
+
b2 = "b2"
|
|
719
|
+
else:
|
|
720
|
+
bootstrap = "./bootstrap.sh"
|
|
721
|
+
b2 = "./b2"
|
|
722
|
+
|
|
708
723
|
if runtime_link is None:
|
|
709
724
|
runtime_link = "static" if target_os == "windows" else "shared"
|
|
710
725
|
|
|
@@ -720,7 +735,7 @@ def build_and_install_boost(
|
|
|
720
735
|
clangpp = cmdcap(["xcodebuild", "-find", "clang++"])
|
|
721
736
|
sysroot = cmdcap(["xcrun", "--sdk", sdk, "--show-sdk-path"])
|
|
722
737
|
boost_arch = "x86" if arch == "x86_64" else "arm"
|
|
723
|
-
with open("project-config.jam", "w") as f:
|
|
738
|
+
with open("project-config.jam", "w", encoding="utf-8") as f:
|
|
724
739
|
f.write(
|
|
725
740
|
f"using clang \
|
|
726
741
|
: iphone \
|
|
@@ -737,16 +752,16 @@ def build_and_install_boost(
|
|
|
737
752
|
b2,
|
|
738
753
|
"install",
|
|
739
754
|
"-d+0",
|
|
740
|
-
f
|
|
741
|
-
f
|
|
755
|
+
f"--build-dir={os.path.join(build_dir, 'boost', f'build-{arch}-{sdk}')}",
|
|
756
|
+
f"--prefix={os.path.join(build_dir, 'boost', f'install-{arch}-{sdk}')}",
|
|
742
757
|
"--with-json",
|
|
743
758
|
"--with-filesystem",
|
|
744
759
|
"--layout=system",
|
|
745
760
|
"--ignore-site-config",
|
|
746
|
-
f
|
|
747
|
-
f
|
|
748
|
-
f
|
|
749
|
-
f
|
|
761
|
+
f"variant={'debug' if debug else 'release'}",
|
|
762
|
+
f"cflags={' '.join(cflags)}",
|
|
763
|
+
f"cxxflags={' '.join(cxxflags)}",
|
|
764
|
+
f"linkflags={' '.join(linkflags)}",
|
|
750
765
|
f"toolset={toolset}",
|
|
751
766
|
f"visibility={visibility}",
|
|
752
767
|
f"target-os={target_os}",
|
|
@@ -785,21 +800,25 @@ def build_and_install_boost(
|
|
|
785
800
|
)
|
|
786
801
|
elif target_os == "android":
|
|
787
802
|
# Android の場合、android-ndk を使ってビルドする
|
|
788
|
-
with open("project-config.jam", "w") as f:
|
|
803
|
+
with open("project-config.jam", "w", encoding="utf-8") as f:
|
|
789
804
|
bin = os.path.join(
|
|
790
|
-
android_ndk, "toolchains", "llvm", "prebuilt",
|
|
805
|
+
android_ndk, "toolchains", "llvm", "prebuilt", android_build_platform, "bin"
|
|
791
806
|
)
|
|
792
807
|
sysroot = os.path.join(
|
|
793
|
-
android_ndk, "toolchains", "llvm", "prebuilt",
|
|
808
|
+
android_ndk, "toolchains", "llvm", "prebuilt", android_build_platform, "sysroot"
|
|
794
809
|
)
|
|
810
|
+
|
|
811
|
+
def escape(s):
|
|
812
|
+
return s.replace("\\", "/").replace(":", "\\:")
|
|
813
|
+
|
|
795
814
|
f.write(
|
|
796
815
|
f"using clang \
|
|
797
816
|
: android \
|
|
798
|
-
: {os.path.join(bin, 'clang++')} \
|
|
817
|
+
: {escape(os.path.join(bin, 'clang++'))} \
|
|
799
818
|
--target=aarch64-none-linux-android{native_api_level} \
|
|
800
|
-
--sysroot={sysroot} \
|
|
801
|
-
: <archiver>{os.path.join(bin, 'llvm-ar')} \
|
|
802
|
-
<ranlib>{os.path.join(bin, 'llvm-ranlib')} \
|
|
819
|
+
--sysroot={escape(sysroot)} \
|
|
820
|
+
: <archiver>{escape(os.path.join(bin, 'llvm-ar'))} \
|
|
821
|
+
<ranlib>{escape(os.path.join(bin, 'llvm-ranlib'))} \
|
|
803
822
|
; \
|
|
804
823
|
"
|
|
805
824
|
)
|
|
@@ -808,16 +827,16 @@ def build_and_install_boost(
|
|
|
808
827
|
b2,
|
|
809
828
|
"install",
|
|
810
829
|
"-d+0",
|
|
811
|
-
f
|
|
830
|
+
f"--prefix={os.path.join(install_dir, 'boost')}",
|
|
812
831
|
"--with-json",
|
|
813
832
|
"--with-filesystem",
|
|
814
833
|
"--layout=system",
|
|
815
834
|
"--ignore-site-config",
|
|
816
|
-
f
|
|
835
|
+
f"variant={'debug' if debug else 'release'}",
|
|
817
836
|
f"compileflags=--sysroot={sysroot}",
|
|
818
|
-
f
|
|
819
|
-
f
|
|
820
|
-
f
|
|
837
|
+
f"cflags={' '.join(cflags)}",
|
|
838
|
+
f"cxxflags={' '.join(cxxflags)}",
|
|
839
|
+
f"linkflags={' '.join(linkflags)}",
|
|
821
840
|
f"toolset={toolset}",
|
|
822
841
|
f"visibility={visibility}",
|
|
823
842
|
f"target-os={target_os}",
|
|
@@ -830,22 +849,22 @@ def build_and_install_boost(
|
|
|
830
849
|
)
|
|
831
850
|
else:
|
|
832
851
|
if len(cxx) != 0:
|
|
833
|
-
with open("project-config.jam", "w") as f:
|
|
852
|
+
with open("project-config.jam", "w", encoding="utf-8") as f:
|
|
834
853
|
f.write(f"using {toolset} : : {cxx} : ;")
|
|
835
854
|
cmd(
|
|
836
855
|
[
|
|
837
856
|
b2,
|
|
838
857
|
"install",
|
|
839
858
|
"-d+0",
|
|
840
|
-
f
|
|
859
|
+
f"--prefix={os.path.join(install_dir, 'boost')}",
|
|
841
860
|
"--with-json",
|
|
842
861
|
"--with-filesystem",
|
|
843
862
|
"--layout=system",
|
|
844
863
|
"--ignore-site-config",
|
|
845
|
-
f
|
|
846
|
-
f
|
|
847
|
-
f
|
|
848
|
-
f
|
|
864
|
+
f"variant={'debug' if debug else 'release'}",
|
|
865
|
+
f"cflags={' '.join(cflags)}",
|
|
866
|
+
f"cxxflags={' '.join(cxxflags)}",
|
|
867
|
+
f"linkflags={' '.join(linkflags)}",
|
|
849
868
|
f"toolset={toolset}",
|
|
850
869
|
f"visibility={visibility}",
|
|
851
870
|
f"target-os={target_os}",
|
|
@@ -861,7 +880,7 @@ def build_and_install_boost(
|
|
|
861
880
|
@versioned
|
|
862
881
|
def install_sora(version, source_dir, install_dir, platform: str):
|
|
863
882
|
win = platform.startswith("windows_")
|
|
864
|
-
filename = f
|
|
883
|
+
filename = f"sora-cpp-sdk-{version}_{platform}.{'zip' if win else 'tar.gz'}"
|
|
865
884
|
rm_rf(os.path.join(source_dir, filename))
|
|
866
885
|
archive = download(
|
|
867
886
|
f"https://github.com/shiguredo/sora-cpp-sdk/releases/download/{version}/{filename}",
|
|
@@ -958,7 +977,7 @@ def install_rootfs(version, install_dir, conf, arch="arm64"):
|
|
|
958
977
|
continue
|
|
959
978
|
# 相対パスに置き換える
|
|
960
979
|
relpath = os.path.relpath(targetpath, dir)
|
|
961
|
-
logging.debug(f"{linkpath[len(rootfs_dir):]} targets {target} to {relpath}")
|
|
980
|
+
logging.debug(f"{linkpath[len(rootfs_dir) :]} targets {target} to {relpath}")
|
|
962
981
|
os.remove(linkpath)
|
|
963
982
|
os.symlink(relpath, linkpath)
|
|
964
983
|
|
|
@@ -983,18 +1002,19 @@ def install_rootfs(version, install_dir, conf, arch="arm64"):
|
|
|
983
1002
|
|
|
984
1003
|
@versioned
|
|
985
1004
|
def install_android_ndk(version, install_dir, source_dir, platform="linux"):
|
|
986
|
-
if platform not in ("darwin", "linux"):
|
|
1005
|
+
if platform not in ("windows", "darwin", "linux"):
|
|
987
1006
|
raise Exception(f"Not supported platform: {platform}")
|
|
988
1007
|
|
|
989
|
-
if platform == "
|
|
1008
|
+
if platform == "windows":
|
|
1009
|
+
url = f"https://dl.google.com/android/repository/android-ndk-{version}-{platform}.zip"
|
|
1010
|
+
elif platform == "darwin":
|
|
990
1011
|
url = f"https://dl.google.com/android/repository/android-ndk-{version}-{platform}.dmg"
|
|
991
|
-
file = f"android-ndk-{version}-{platform}.dmg"
|
|
992
1012
|
else:
|
|
993
1013
|
url = f"https://dl.google.com/android/repository/android-ndk-{version}-{platform}.zip"
|
|
994
1014
|
archive = download(url, source_dir)
|
|
995
1015
|
rm_rf(os.path.join(install_dir, "android-ndk"))
|
|
996
1016
|
if platform == "darwin":
|
|
997
|
-
cap = cmdcap(["hdiutil", "attach",
|
|
1017
|
+
cap = cmdcap(["hdiutil", "attach", archive])
|
|
998
1018
|
# 以下のような結果が得られるはずなので、ここから /Volumes/Android NDK r26 のところだけ取り出す
|
|
999
1019
|
# /dev/disk4 GUID_partition_scheme
|
|
1000
1020
|
# /dev/disk4s1 EFI
|
|
@@ -1100,7 +1120,10 @@ def install_cmake(version, source_dir, install_dir, platform: str, ext):
|
|
|
1100
1120
|
def install_sdl2(
|
|
1101
1121
|
version, source_dir, build_dir, install_dir, debug: bool, platform: str, cmake_args: List[str]
|
|
1102
1122
|
):
|
|
1103
|
-
url =
|
|
1123
|
+
url = (
|
|
1124
|
+
f"https://github.com/libsdl-org/SDL/releases/download/release-{version}/SDL2-{version}.zip"
|
|
1125
|
+
)
|
|
1126
|
+
# url = f"http://www.libsdl.org/release/SDL2-{version}.zip"
|
|
1104
1127
|
path = download(url, source_dir)
|
|
1105
1128
|
sdl2_source_dir = os.path.join(source_dir, "sdl2")
|
|
1106
1129
|
sdl2_build_dir = os.path.join(build_dir, "sdl2")
|
|
@@ -1380,7 +1403,7 @@ def install_openh264(version, source_dir, install_dir, is_windows):
|
|
|
1380
1403
|
file, os.path.join(install_dir, "openh264", "include", "wels", file)
|
|
1381
1404
|
)
|
|
1382
1405
|
else:
|
|
1383
|
-
cmd(["make", f
|
|
1406
|
+
cmd(["make", f"PREFIX={os.path.join(install_dir, 'openh264')}", "install-headers"])
|
|
1384
1407
|
|
|
1385
1408
|
|
|
1386
1409
|
@versioned
|
|
@@ -1597,7 +1620,15 @@ index 7f1b69f..bcf5577 100644
|
|
|
1597
1620
|
|
|
1598
1621
|
|
|
1599
1622
|
@versioned
|
|
1600
|
-
def install_grpc(
|
|
1623
|
+
def install_grpc(
|
|
1624
|
+
version,
|
|
1625
|
+
source_dir,
|
|
1626
|
+
build_dir,
|
|
1627
|
+
install_dir,
|
|
1628
|
+
debug: bool,
|
|
1629
|
+
cmake_args: List[str],
|
|
1630
|
+
cmake_build_args: List[str] = [],
|
|
1631
|
+
):
|
|
1601
1632
|
grpc_source_dir = os.path.join(source_dir, "grpc")
|
|
1602
1633
|
grpc_build_dir = os.path.join(build_dir, "grpc")
|
|
1603
1634
|
grpc_install_dir = os.path.join(install_dir, "grpc")
|
|
@@ -1619,7 +1650,15 @@ def install_grpc(version, source_dir, build_dir, install_dir, debug: bool, cmake
|
|
|
1619
1650
|
]
|
|
1620
1651
|
)
|
|
1621
1652
|
cmd(
|
|
1622
|
-
[
|
|
1653
|
+
[
|
|
1654
|
+
"cmake",
|
|
1655
|
+
"--build",
|
|
1656
|
+
".",
|
|
1657
|
+
f"-j{multiprocessing.cpu_count()}",
|
|
1658
|
+
"--config",
|
|
1659
|
+
configuration,
|
|
1660
|
+
*cmake_build_args,
|
|
1661
|
+
]
|
|
1623
1662
|
)
|
|
1624
1663
|
cmd(["cmake", "--install", ".", "--config", configuration])
|
|
1625
1664
|
|
|
@@ -1638,6 +1677,132 @@ def install_spdlog(version, install_dir):
|
|
|
1638
1677
|
git_clone_shallow("https://github.com/gabime/spdlog.git", version, spdlog_install_dir)
|
|
1639
1678
|
|
|
1640
1679
|
|
|
1680
|
+
BORINGSSL_PATCH_NO_BSSL = r"""
|
|
1681
|
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
1682
|
+
index 38d63db..b97b175 100644
|
|
1683
|
+
--- a/CMakeLists.txt
|
|
1684
|
+
+++ b/CMakeLists.txt
|
|
1685
|
+
@@ -795,7 +795,7 @@ endif()
|
|
1686
|
+
|
|
1687
|
+
if(INSTALL_ENABLED)
|
|
1688
|
+
install(TARGETS crypto ssl EXPORT OpenSSLTargets)
|
|
1689
|
+
- install(TARGETS bssl)
|
|
1690
|
+
+ # install(TARGETS bssl)
|
|
1691
|
+
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
1692
|
+
install(EXPORT OpenSSLTargets
|
|
1693
|
+
FILE OpenSSLTargets.cmake
|
|
1694
|
+
"""
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
@versioned
|
|
1698
|
+
def install_boringssl(
|
|
1699
|
+
version,
|
|
1700
|
+
source_dir: str,
|
|
1701
|
+
build_dir: str,
|
|
1702
|
+
install_dir: str,
|
|
1703
|
+
configuration: str,
|
|
1704
|
+
cmake_args: List[str],
|
|
1705
|
+
):
|
|
1706
|
+
boringssl_source_dir = os.path.join(source_dir, "boringssl")
|
|
1707
|
+
boringssl_build_dir = os.path.join(build_dir, "boringssl")
|
|
1708
|
+
boringssl_install_dir = os.path.join(install_dir, "boringssl")
|
|
1709
|
+
rm_rf(boringssl_source_dir)
|
|
1710
|
+
rm_rf(boringssl_build_dir)
|
|
1711
|
+
rm_rf(boringssl_install_dir)
|
|
1712
|
+
git_clone_shallow("https://boringssl.googlesource.com/boringssl", version, boringssl_source_dir)
|
|
1713
|
+
apply_patch_text(BORINGSSL_PATCH_NO_BSSL, boringssl_source_dir, 1)
|
|
1714
|
+
mkdir_p(boringssl_build_dir)
|
|
1715
|
+
with cd(boringssl_build_dir):
|
|
1716
|
+
cmd(
|
|
1717
|
+
[
|
|
1718
|
+
"cmake",
|
|
1719
|
+
f"-DCMAKE_INSTALL_PREFIX={cmake_path(boringssl_install_dir)}",
|
|
1720
|
+
f"-DCMAKE_BUILD_TYPE={configuration}",
|
|
1721
|
+
"-DBUILD_SHARED_LIBS=OFF",
|
|
1722
|
+
boringssl_source_dir,
|
|
1723
|
+
*cmake_args,
|
|
1724
|
+
]
|
|
1725
|
+
)
|
|
1726
|
+
cmd(
|
|
1727
|
+
["cmake", "--build", ".", f"-j{multiprocessing.cpu_count()}", "--config", configuration]
|
|
1728
|
+
)
|
|
1729
|
+
cmd(["cmake", "--install", ".", "--config", configuration])
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
@versioned
|
|
1733
|
+
def install_opus(
|
|
1734
|
+
version, source_dir, build_dir, install_dir, configuration: str, cmake_args: List[str]
|
|
1735
|
+
):
|
|
1736
|
+
opus_source_dir = os.path.join(source_dir, "opus")
|
|
1737
|
+
opus_build_dir = os.path.join(build_dir, "opus")
|
|
1738
|
+
opus_install_dir = os.path.join(install_dir, "opus")
|
|
1739
|
+
rm_rf(opus_source_dir)
|
|
1740
|
+
rm_rf(opus_build_dir)
|
|
1741
|
+
rm_rf(opus_install_dir)
|
|
1742
|
+
git_clone_shallow("https://gitlab.xiph.org/xiph/opus", version, opus_source_dir)
|
|
1743
|
+
mkdir_p(opus_build_dir)
|
|
1744
|
+
with cd(opus_build_dir):
|
|
1745
|
+
cmd(
|
|
1746
|
+
[
|
|
1747
|
+
"cmake",
|
|
1748
|
+
f"-DCMAKE_INSTALL_PREFIX={cmake_path(opus_install_dir)}",
|
|
1749
|
+
f"-DCMAKE_BUILD_TYPE={configuration}",
|
|
1750
|
+
"-DOPUS_BUILD_SHARED_LIBRARY=OFF",
|
|
1751
|
+
"-DOPUS_BUILD_TESTING=OFF",
|
|
1752
|
+
"-DOPUS_BUILD_PROGRAMS=OFF",
|
|
1753
|
+
"-DOPUS_STATIC_RUNTIME=ON",
|
|
1754
|
+
opus_source_dir,
|
|
1755
|
+
*cmake_args,
|
|
1756
|
+
]
|
|
1757
|
+
)
|
|
1758
|
+
cmd(
|
|
1759
|
+
["cmake", "--build", ".", f"-j{multiprocessing.cpu_count()}", "--config", configuration]
|
|
1760
|
+
)
|
|
1761
|
+
cmd(["cmake", "--install", ".", "--config", configuration])
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
@versioned
|
|
1765
|
+
def install_nasm(version, source_dir, install_dir, platform: str):
|
|
1766
|
+
if platform not in ("macosx", "win32", "win64"):
|
|
1767
|
+
raise Exception(f"Unsupported platform: {platform}")
|
|
1768
|
+
url = f"https://www.nasm.us/pub/nasm/releasebuilds/{version}/{platform}/nasm-{version}-{platform}.zip"
|
|
1769
|
+
path = download(url, source_dir)
|
|
1770
|
+
nasm_install_dir = os.path.join(install_dir, "nasm")
|
|
1771
|
+
rm_rf(nasm_install_dir)
|
|
1772
|
+
extract(path, install_dir, "nasm")
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
@versioned
|
|
1776
|
+
def install_ninja(version, source_dir, install_dir, platform):
|
|
1777
|
+
if platform not in ("win", "winarm64", "linux-aarch64", "linux", "mac"):
|
|
1778
|
+
raise Exception(f"Unsupported platform: {platform}")
|
|
1779
|
+
url = f"https://github.com/ninja-build/ninja/releases/download/{version}/ninja-{platform}.zip"
|
|
1780
|
+
path = download(url, source_dir)
|
|
1781
|
+
ninja_install_dir = os.path.join(install_dir, "ninja")
|
|
1782
|
+
rm_rf(ninja_install_dir)
|
|
1783
|
+
extract(path, install_dir, "ninja")
|
|
1784
|
+
|
|
1785
|
+
|
|
1786
|
+
@versioned
|
|
1787
|
+
def install_vswhere(version, install_dir):
|
|
1788
|
+
url = f"https://github.com/microsoft/vswhere/releases/download/{version}/vswhere.exe"
|
|
1789
|
+
vswhere_install_dir = os.path.join(install_dir, "vswhere")
|
|
1790
|
+
rm_rf(vswhere_install_dir)
|
|
1791
|
+
mkdir_p(vswhere_install_dir)
|
|
1792
|
+
download(url, vswhere_install_dir)
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
@versioned
|
|
1796
|
+
def install_amf(version, install_dir):
|
|
1797
|
+
# AMF はライブラリというよりは便利関数+サンプルコードという感じなので
|
|
1798
|
+
# ここではソースだけダウンロードをして、必要に応じて利用者側でファイルを参照してインクルード/コンパイルする
|
|
1799
|
+
amf_install_dir = os.path.join(install_dir, "amf")
|
|
1800
|
+
rm_rf(amf_install_dir)
|
|
1801
|
+
git_clone_shallow(
|
|
1802
|
+
"https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git", version, amf_install_dir
|
|
1803
|
+
)
|
|
1804
|
+
|
|
1805
|
+
|
|
1641
1806
|
class PlatformTarget(object):
|
|
1642
1807
|
def __init__(self, os, osver, arch, extra=None):
|
|
1643
1808
|
self.os = os
|
{sora_sdk-2025.2.1.dev0 → sora_sdk-2025.2.3}/src/sora_sdk/sora_sdk_ext.cpython-311-darwin.so
RENAMED
|
Binary file
|
|
@@ -454,7 +454,7 @@ class SoraVideoCodecPreference:
|
|
|
454
454
|
def __init__(self) -> None: ...
|
|
455
455
|
|
|
456
456
|
@overload
|
|
457
|
-
def __init__(self, type: SoraVideoCodecType, encoder: SoraVideoCodecImplementation | None = None, decoder: SoraVideoCodecImplementation | None = None, parameters: SoraVideoCodecPreference.Parameters =
|
|
457
|
+
def __init__(self, type: SoraVideoCodecType, encoder: SoraVideoCodecImplementation | None = None, decoder: SoraVideoCodecImplementation | None = None, parameters: SoraVideoCodecPreference.Parameters | None = None) -> None: ...
|
|
458
458
|
|
|
459
459
|
@property
|
|
460
460
|
def type(self) -> SoraVideoCodecType: ...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sora_sdk
|
|
3
|
-
Version: 2025.2.
|
|
3
|
+
Version: 2025.2.3
|
|
4
4
|
Summary: WebRTC SFU Sora Python SDK
|
|
5
5
|
Home-page: https://github.com/shiguredo/sora-python-sdk
|
|
6
6
|
Author-email: "Shiguredo Inc." <contact+pypi@shiguredo.jp>
|
|
@@ -52,6 +52,7 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
|
|
|
52
52
|
- [WebRTC Encoded Transform](https://www.w3.org/TR/webrtc-encoded-transform/) に対応
|
|
53
53
|
- 回線が不安定になった際、解像度とフレームレートどちらを維持するかの設定をする [DegradationPreference](https://w3c.github.io/mst-content-hint/#degradation-preference-when-encoding) に対応
|
|
54
54
|
- MAINTAIN_FRAMERATE / MAINTAIN_RESOLUTION / BALANCED が指定できる
|
|
55
|
+
- 発話区間の検出が可能な VAD (Voice Activity Detection) に対応
|
|
55
56
|
- Intel / Apple / NVIDIA のハードウェアデコーダー/エンコーダーに対応
|
|
56
57
|
- Apple Video Toolbox (H.264 / H.265)
|
|
57
58
|
- macOS arm64 で利用できる
|
|
@@ -132,7 +133,7 @@ PyPI 経由ではインストールできません。
|
|
|
132
133
|
- macOS Sequoia 15 arm64
|
|
133
134
|
- macOS Ventura 14 arm64
|
|
134
135
|
- Windows 11 x86_64
|
|
135
|
-
- Windows Server
|
|
136
|
+
- Windows Server 2025 x86_64
|
|
136
137
|
|
|
137
138
|
### macOS の対応バージョン
|
|
138
139
|
|
|
@@ -31,17 +31,19 @@ def test_openh264_get_codec_capability(setup):
|
|
|
31
31
|
if e.name == SoraVideoCodecImplementation.CISCO_OPENH264:
|
|
32
32
|
continue
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
# encoder/decoder どちらかが true であれば採用する
|
|
34
|
+
if e.name == SoraVideoCodecImplementation.CISCO_OPENH264:
|
|
35
|
+
for c in e.codecs:
|
|
37
36
|
if c.decoder or c.encoder:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
# encoder/decoder どちらかが true であれば採用する
|
|
38
|
+
if c.decoder or c.encoder:
|
|
39
|
+
codecs.append(
|
|
40
|
+
SoraVideoCodecPreference.Codec(
|
|
41
|
+
type=c.type,
|
|
42
|
+
decoder=e.name,
|
|
43
|
+
encoder=e.name,
|
|
44
|
+
parameters=SoraVideoCodecPreference.Parameters(),
|
|
45
|
+
)
|
|
43
46
|
)
|
|
44
|
-
)
|
|
45
47
|
|
|
46
48
|
# エラーにならないことを確認する
|
|
47
49
|
Sora(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|