sora-sdk 2025.1.0.dev4__tar.gz → 2025.1.0.dev6__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.1.0.dev4/src/sora_sdk.egg-info → sora_sdk-2025.1.0.dev6}/PKG-INFO +6 -5
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/README.md +5 -4
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/buildbase.py +13 -3
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/pyproject.toml +5 -1
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/run.py +16 -5
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk/sora_sdk_ext.cpython-310-darwin.so +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk/sora_sdk_ext.pyi +123 -1
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6/src/sora_sdk.egg-info}/PKG-INFO +6 -5
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk.egg-info/SOURCES.txt +4 -1
- sora_sdk-2025.1.0.dev4/tests/test_macos.py → sora_sdk-2025.1.0.dev6/tests/test_apple_video_toolbox.py +1 -7
- sora_sdk-2025.1.0.dev6/tests/test_capability.py +94 -0
- sora_sdk-2025.1.0.dev6/tests/test_intel_vpl.py +643 -0
- sora_sdk-2025.1.0.dev6/tests/test_nvidia_video_codec_sdk.py +362 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_openh264.py +31 -5
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/LICENSE +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/MANIFEST.in +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/NOTICE.md +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/pypath.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/setup.cfg +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/setup.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk/__init__.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk/py.typed +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk.egg-info/dependency_links.txt +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk.egg-info/top_level.txt +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_authz.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_authz_simulcast.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_ca_cert.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_degradation_preference.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_encoded_transform.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_messaging.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_messaging_header.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_re_offer_re_answer_sdp.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_sendonly_recvonly.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_signaling.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_signaling_message.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_signaling_notify.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_simulcast.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_sora_disconnect.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_type_disconnect.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_type_switched.py +0 -0
- {sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/tests/test_vad.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sora_sdk
|
|
3
|
-
Version: 2025.1.0.
|
|
3
|
+
Version: 2025.1.0.dev6
|
|
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>
|
|
@@ -290,15 +290,15 @@ PyPI 経由ではインストールできません。
|
|
|
290
290
|
|
|
291
291
|
## 対応プラットフォーム
|
|
292
292
|
|
|
293
|
-
- Windows 11 x86_64
|
|
294
|
-
- Windows Server 2022 x86_64
|
|
295
|
-
- macOS Sequoia 15 arm64
|
|
296
|
-
- macOS Ventura 14 arm64
|
|
297
293
|
- Ubuntu 24.04 LTS x86_64
|
|
298
294
|
- Ubuntu 24.04 LTS arm64
|
|
299
295
|
- Ubuntu 22.04 LTS x86_64
|
|
300
296
|
- Ubuntu 22.04 LTS arm64 (NVIDIA Jetson JetPack SDK 6)
|
|
301
297
|
- PyPI からではなくパッケージファイルを利用してください
|
|
298
|
+
- macOS Sequoia 15 arm64
|
|
299
|
+
- macOS Ventura 14 arm64
|
|
300
|
+
- Windows 11 x86_64
|
|
301
|
+
- Windows Server 2022 x86_64
|
|
302
302
|
|
|
303
303
|
### macOS の対応バージョン
|
|
304
304
|
|
|
@@ -323,6 +323,7 @@ PyPI 経由ではインストールできません。
|
|
|
323
323
|
|
|
324
324
|
- Windows 11 arm64
|
|
325
325
|
- Ubuntu 22.04 arm64
|
|
326
|
+
- Ubuntu 22.04 arm64 (NVIDIA Jetson JetPack SDK 6.1)
|
|
326
327
|
- Ubuntu 20.04 arm64 (NVIDIA Jetson JetPack SDK 5)
|
|
327
328
|
- AMD Video Core Next (VCN) 対応
|
|
328
329
|
- VP9 / AV1 / H.264 / H.265
|
|
@@ -91,15 +91,15 @@ PyPI 経由ではインストールできません。
|
|
|
91
91
|
|
|
92
92
|
## 対応プラットフォーム
|
|
93
93
|
|
|
94
|
-
- Windows 11 x86_64
|
|
95
|
-
- Windows Server 2022 x86_64
|
|
96
|
-
- macOS Sequoia 15 arm64
|
|
97
|
-
- macOS Ventura 14 arm64
|
|
98
94
|
- Ubuntu 24.04 LTS x86_64
|
|
99
95
|
- Ubuntu 24.04 LTS arm64
|
|
100
96
|
- Ubuntu 22.04 LTS x86_64
|
|
101
97
|
- Ubuntu 22.04 LTS arm64 (NVIDIA Jetson JetPack SDK 6)
|
|
102
98
|
- PyPI からではなくパッケージファイルを利用してください
|
|
99
|
+
- macOS Sequoia 15 arm64
|
|
100
|
+
- macOS Ventura 14 arm64
|
|
101
|
+
- Windows 11 x86_64
|
|
102
|
+
- Windows Server 2022 x86_64
|
|
103
103
|
|
|
104
104
|
### macOS の対応バージョン
|
|
105
105
|
|
|
@@ -124,6 +124,7 @@ PyPI 経由ではインストールできません。
|
|
|
124
124
|
|
|
125
125
|
- Windows 11 arm64
|
|
126
126
|
- Ubuntu 22.04 arm64
|
|
127
|
+
- Ubuntu 22.04 arm64 (NVIDIA Jetson JetPack SDK 6.1)
|
|
127
128
|
- Ubuntu 20.04 arm64 (NVIDIA Jetson JetPack SDK 5)
|
|
128
129
|
- AMD Video Core Next (VCN) 対応
|
|
129
130
|
- VP9 / AV1 / H.264 / H.265
|
|
@@ -520,6 +520,7 @@ class WebrtcInfo(NamedTuple):
|
|
|
520
520
|
webrtc_library_dir: str
|
|
521
521
|
clang_dir: str
|
|
522
522
|
libcxx_dir: str
|
|
523
|
+
libcxxabi_dir: str
|
|
523
524
|
|
|
524
525
|
|
|
525
526
|
def get_webrtc_info(
|
|
@@ -536,6 +537,9 @@ def get_webrtc_info(
|
|
|
536
537
|
webrtc_library_dir=os.path.join(webrtc_install_dir, "lib"),
|
|
537
538
|
clang_dir=os.path.join(install_dir, "llvm", "clang"),
|
|
538
539
|
libcxx_dir=os.path.join(install_dir, "llvm", "libcxx"),
|
|
540
|
+
libcxxabi_dir=os.path.join(
|
|
541
|
+
webrtc_install_dir, "include", "third_party", "libc++abi", "src"
|
|
542
|
+
),
|
|
539
543
|
)
|
|
540
544
|
else:
|
|
541
545
|
webrtc_build_source_dir = os.path.join(
|
|
@@ -556,6 +560,9 @@ def get_webrtc_info(
|
|
|
556
560
|
webrtc_build_source_dir, "src", "third_party", "llvm-build", "Release+Asserts"
|
|
557
561
|
),
|
|
558
562
|
libcxx_dir=os.path.join(webrtc_build_source_dir, "src", "third_party", "libc++", "src"),
|
|
563
|
+
libcxxabi_dir=os.path.join(
|
|
564
|
+
webrtc_build_source_dir, "src", "third_party", "libc++abi", "src"
|
|
565
|
+
),
|
|
559
566
|
)
|
|
560
567
|
|
|
561
568
|
|
|
@@ -1701,7 +1708,10 @@ def get_build_platform() -> PlatformTarget:
|
|
|
1701
1708
|
if arch in ("AMD64", "x86_64"):
|
|
1702
1709
|
arch = "x86_64"
|
|
1703
1710
|
elif arch in ("aarch64", "arm64"):
|
|
1704
|
-
|
|
1711
|
+
if os == "ubuntu":
|
|
1712
|
+
arch = "armv8"
|
|
1713
|
+
else:
|
|
1714
|
+
arch = "arm64"
|
|
1705
1715
|
else:
|
|
1706
1716
|
raise Exception(f"Arch {arch} not supported")
|
|
1707
1717
|
|
|
@@ -1800,8 +1810,8 @@ class Platform(object):
|
|
|
1800
1810
|
self._check(build.arch in ("x86_64", "arm64"))
|
|
1801
1811
|
if target.os == "ubuntu":
|
|
1802
1812
|
self._check(build.os == "ubuntu")
|
|
1803
|
-
self._check(build.arch
|
|
1804
|
-
if
|
|
1813
|
+
self._check(build.arch in ("x86_64", "armv8"))
|
|
1814
|
+
if build.arch == target.arch:
|
|
1805
1815
|
self._check(build.osver == target.osver)
|
|
1806
1816
|
if target.os == "raspberry-pi-os":
|
|
1807
1817
|
self._check(build.os == "ubuntu")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "sora_sdk"
|
|
3
3
|
authors = [{ name = "Shiguredo Inc.", email = "contact+pypi@shiguredo.jp" }]
|
|
4
|
-
version = "2025.1.0.
|
|
4
|
+
version = "2025.1.0.dev6"
|
|
5
5
|
description = "WebRTC SFU Sora Python SDK"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
license = { file = "LICENSE" }
|
|
@@ -74,3 +74,7 @@ dev-dependencies = [
|
|
|
74
74
|
[tool.ruff]
|
|
75
75
|
target-version = "py310"
|
|
76
76
|
line-length = 100
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
[tool.pytest.ini_options]
|
|
80
|
+
xfail_strict = true
|
|
@@ -127,7 +127,7 @@ def install_deps(
|
|
|
127
127
|
install_cmake_args["platform"] = "macos-universal"
|
|
128
128
|
elif platform.build.os == "ubuntu" and platform.build.arch == "x86_64":
|
|
129
129
|
install_cmake_args["platform"] = "linux-x86_64"
|
|
130
|
-
elif platform.build.os == "ubuntu" and platform.build.arch == "
|
|
130
|
+
elif platform.build.os == "ubuntu" and platform.build.arch == "armv8":
|
|
131
131
|
install_cmake_args["platform"] = "linux-aarch64"
|
|
132
132
|
else:
|
|
133
133
|
raise Exception("Failed to install CMake")
|
|
@@ -261,12 +261,24 @@ def main():
|
|
|
261
261
|
if platform.target.os == "ubuntu":
|
|
262
262
|
# クロスコンパイルの設定。
|
|
263
263
|
# 本来は toolchain ファイルに書く内容
|
|
264
|
+
|
|
265
|
+
if platform.build.arch == "armv8":
|
|
266
|
+
# ビルド環境が armv8 の場合は libwebrtc のバイナリが使えないのでローカルの clang を利用する
|
|
267
|
+
cmake_args += [
|
|
268
|
+
"-DCMAKE_C_COMPILER=clang-18",
|
|
269
|
+
"-DCMAKE_CXX_COMPILER=clang++-18",
|
|
270
|
+
]
|
|
271
|
+
else:
|
|
272
|
+
cmake_args += [
|
|
273
|
+
f"-DCMAKE_C_COMPILER={os.path.join(webrtc_info.clang_dir, 'bin', 'clang')}",
|
|
274
|
+
f"-DCMAKE_CXX_COMPILER={os.path.join(webrtc_info.clang_dir, 'bin', 'clang++')}",
|
|
275
|
+
]
|
|
264
276
|
cmake_args += [
|
|
265
|
-
f"-DCMAKE_C_COMPILER={os.path.join(webrtc_info.clang_dir, 'bin', 'clang')}",
|
|
266
|
-
f"-DCMAKE_CXX_COMPILER={os.path.join(webrtc_info.clang_dir, 'bin', 'clang++')}",
|
|
267
277
|
f"-DLIBCXX_INCLUDE_DIR={cmake_path(os.path.join(webrtc_info.libcxx_dir, 'include'))}",
|
|
278
|
+
f"-DLIBCXXABI_INCLUDE_DIR={cmake_path(os.path.join(webrtc_info.libcxxabi_dir, 'include'))}",
|
|
268
279
|
]
|
|
269
|
-
|
|
280
|
+
|
|
281
|
+
if platform.build.arch != platform.target.arch:
|
|
270
282
|
sysroot = os.path.join(install_dir, "rootfs")
|
|
271
283
|
nb_cmake_dir = cmdcap(["uv", "run", "python", "-m", "nanobind", "--cmake_dir"])
|
|
272
284
|
cmake_args += [
|
|
@@ -279,7 +291,6 @@ def main():
|
|
|
279
291
|
"-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH",
|
|
280
292
|
"-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH",
|
|
281
293
|
"-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH",
|
|
282
|
-
f"-DCMAKE_SYSROOT={sysroot}",
|
|
283
294
|
f"-DPython_ROOT_DIR={cmake_path(os.path.join(sysroot, 'usr', 'include', 'python3.12'))}",
|
|
284
295
|
f"-DCMAKE_SYSROOT={sysroot}",
|
|
285
296
|
f"-DNB_CMAKE_DIR={nb_cmake_dir}",
|
{sora_sdk-2025.1.0.dev4 → sora_sdk-2025.1.0.dev6}/src/sora_sdk/sora_sdk_ext.cpython-310-darwin.so
RENAMED
|
Binary file
|
|
@@ -6,7 +6,7 @@ from numpy.typing import ArrayLike
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class Sora:
|
|
9
|
-
def __init__(self,
|
|
9
|
+
def __init__(self, openh264: str | None = None, video_codec_preference: SoraVideoCodecPreference | None = None) -> None: ...
|
|
10
10
|
|
|
11
11
|
def create_connection(self, signaling_urls: list[str], role: str, channel_id: str, client_id: Optional[str] = None, bundle_id: Optional[str] = None, metadata: Optional[dict] = None, signaling_notify_metadata: Optional[dict] = None, audio_source: Optional[SoraTrackInterface] = None, video_source: Optional[SoraTrackInterface] = None, audio_frame_transformer: Optional[SoraAudioFrameTransformer] = None, video_frame_transformer: Optional[SoraVideoFrameTransformer] = None, audio: Optional[bool] = None, video: Optional[bool] = None, audio_codec_type: Optional[str] = None, video_codec_type: Optional[str] = None, video_bit_rate: Optional[int] = None, audio_bit_rate: Optional[int] = None, video_vp9_params: Optional[dict] = None, video_av1_params: Optional[dict] = None, video_h264_params: Optional[dict] = None, audio_opus_params: Optional[dict] = None, simulcast: Optional[bool] = None, spotlight: Optional[bool] = None, spotlight_number: Optional[int] = None, simulcast_rid: Optional[str] = None, spotlight_focus_rid: Optional[str] = None, spotlight_unfocus_rid: Optional[str] = None, forwarding_filter: Optional[dict] = None, forwarding_filters: Optional[list[dict]] = None, data_channels: Optional[list[dict]] = None, data_channel_signaling: Optional[bool] = None, ignore_disconnect_websocket: Optional[bool] = None, data_channel_signaling_timeout: Optional[int] = None, disconnect_wait_timeout: Optional[int] = None, websocket_close_timeout: Optional[int] = None, websocket_connection_timeout: Optional[int] = None, audio_streaming_language_code: Optional[str] = None, insecure: Optional[bool] = None, client_cert: Optional[bytes] = None, client_key: Optional[bytes] = None, ca_cert: Optional[bytes] = None, proxy_url: Optional[str] = None, proxy_username: Optional[str] = None, proxy_password: Optional[str] = None, proxy_agent: Optional[str] = None, degradation_preference: Optional[SoraDegradationPreference] = None) -> SoraConnection: ...
|
|
12
12
|
|
|
@@ -322,6 +322,124 @@ class SoraVAD:
|
|
|
322
322
|
|
|
323
323
|
def analyze(self, frame: SoraAudioFrame) -> float: ...
|
|
324
324
|
|
|
325
|
+
class SoraVideoCodecCapability:
|
|
326
|
+
@property
|
|
327
|
+
def engines(self) -> list[SoraVideoCodecCapability.Engine]: ...
|
|
328
|
+
|
|
329
|
+
def to_json(self) -> object: ...
|
|
330
|
+
|
|
331
|
+
class Parameters:
|
|
332
|
+
@property
|
|
333
|
+
def version(self) -> str | None: ...
|
|
334
|
+
|
|
335
|
+
@property
|
|
336
|
+
def openh264_path(self) -> str | None: ...
|
|
337
|
+
|
|
338
|
+
@property
|
|
339
|
+
def vpl_impl(self) -> str | None: ...
|
|
340
|
+
|
|
341
|
+
@property
|
|
342
|
+
def vpl_impl_value(self) -> int | None: ...
|
|
343
|
+
|
|
344
|
+
@property
|
|
345
|
+
def nvcodec_gpu_device_name(self) -> str | None: ...
|
|
346
|
+
|
|
347
|
+
class Codec:
|
|
348
|
+
@property
|
|
349
|
+
def type(self) -> SoraVideoCodecType: ...
|
|
350
|
+
|
|
351
|
+
@property
|
|
352
|
+
def encoder(self) -> bool: ...
|
|
353
|
+
|
|
354
|
+
@property
|
|
355
|
+
def decoder(self) -> bool: ...
|
|
356
|
+
|
|
357
|
+
@property
|
|
358
|
+
def parameters(self) -> SoraVideoCodecCapability.Parameters: ...
|
|
359
|
+
|
|
360
|
+
class Engine:
|
|
361
|
+
@property
|
|
362
|
+
def name(self) -> SoraVideoCodecImplementation: ...
|
|
363
|
+
|
|
364
|
+
@property
|
|
365
|
+
def codecs(self) -> list[SoraVideoCodecCapability.Codec]: ...
|
|
366
|
+
|
|
367
|
+
@property
|
|
368
|
+
def parameters(self) -> SoraVideoCodecCapability.Parameters: ...
|
|
369
|
+
|
|
370
|
+
class SoraVideoCodecImplementation(enum.IntEnum):
|
|
371
|
+
INTERNAL = 0
|
|
372
|
+
|
|
373
|
+
CISCO_OPENH264 = 1
|
|
374
|
+
|
|
375
|
+
INTEL_VPL = 2
|
|
376
|
+
|
|
377
|
+
NVIDIA_VIDEO_CODEC_SDK = 3
|
|
378
|
+
|
|
379
|
+
class SoraVideoCodecPreference:
|
|
380
|
+
def __init__(self, codecs: Sequence[SoraVideoCodecPreference.Codec] = []) -> None: ...
|
|
381
|
+
|
|
382
|
+
@property
|
|
383
|
+
def codecs(self) -> list[SoraVideoCodecPreference.Codec]: ...
|
|
384
|
+
|
|
385
|
+
@codecs.setter
|
|
386
|
+
def codecs(self, arg: Sequence[SoraVideoCodecPreference.Codec], /) -> None: ...
|
|
387
|
+
|
|
388
|
+
def to_json(self) -> object: ...
|
|
389
|
+
|
|
390
|
+
def find(self, arg: SoraVideoCodecType, /) -> int | None: ...
|
|
391
|
+
|
|
392
|
+
def get_or_add(self, arg: SoraVideoCodecType, /) -> int: ...
|
|
393
|
+
|
|
394
|
+
def has_implementation(self, arg: SoraVideoCodecImplementation, /) -> bool: ...
|
|
395
|
+
|
|
396
|
+
def merge(self, arg: SoraVideoCodecPreference, /) -> None: ...
|
|
397
|
+
|
|
398
|
+
class Parameters:
|
|
399
|
+
def __init__(self) -> None: ...
|
|
400
|
+
|
|
401
|
+
class Codec:
|
|
402
|
+
@overload
|
|
403
|
+
def __init__(self) -> None: ...
|
|
404
|
+
|
|
405
|
+
@overload
|
|
406
|
+
def __init__(self, type: SoraVideoCodecType, encoder: SoraVideoCodecImplementation | None = None, decoder: SoraVideoCodecImplementation | None = None, parameters: SoraVideoCodecPreference.Parameters = ...) -> None: ...
|
|
407
|
+
|
|
408
|
+
@property
|
|
409
|
+
def type(self) -> SoraVideoCodecType: ...
|
|
410
|
+
|
|
411
|
+
@type.setter
|
|
412
|
+
def type(self, arg: SoraVideoCodecType, /) -> None: ...
|
|
413
|
+
|
|
414
|
+
@property
|
|
415
|
+
def encoder(self) -> SoraVideoCodecImplementation | None: ...
|
|
416
|
+
|
|
417
|
+
@encoder.setter
|
|
418
|
+
def encoder(self, arg: SoraVideoCodecImplementation, /) -> None: ...
|
|
419
|
+
|
|
420
|
+
@property
|
|
421
|
+
def decoder(self) -> SoraVideoCodecImplementation | None: ...
|
|
422
|
+
|
|
423
|
+
@decoder.setter
|
|
424
|
+
def decoder(self, arg: SoraVideoCodecImplementation, /) -> None: ...
|
|
425
|
+
|
|
426
|
+
@property
|
|
427
|
+
def parameters(self) -> SoraVideoCodecPreference.Parameters: ...
|
|
428
|
+
|
|
429
|
+
@parameters.setter
|
|
430
|
+
def parameters(self, arg: SoraVideoCodecPreference.Parameters, /) -> None: ...
|
|
431
|
+
|
|
432
|
+
class SoraVideoCodecType(enum.IntEnum):
|
|
433
|
+
VP8 = 1
|
|
434
|
+
|
|
435
|
+
VP9 = 2
|
|
436
|
+
|
|
437
|
+
H264 = 4
|
|
438
|
+
|
|
439
|
+
H265 = 5
|
|
440
|
+
|
|
441
|
+
AV1 = 3
|
|
442
|
+
|
|
325
443
|
class SoraVideoFrame:
|
|
326
444
|
def data(self) -> Annotated[ArrayLike, dict(dtype='uint8', shape=(None, None, 3))]: ...
|
|
327
445
|
|
|
@@ -357,4 +475,8 @@ class SoraVideoSource(SoraTrackInterface):
|
|
|
357
475
|
@overload
|
|
358
476
|
def on_captured(self, ndarray: Annotated[ArrayLike, dict(dtype='uint8', shape=(None, None, 3), order='C', device='cpu')], timestamp_us: int) -> None: ...
|
|
359
477
|
|
|
478
|
+
def create_video_codec_preference_from_implementation(arg0: SoraVideoCodecCapability, arg1: SoraVideoCodecImplementation, /) -> SoraVideoCodecPreference: ...
|
|
479
|
+
|
|
360
480
|
def enable_libwebrtc_log(arg: SoraLoggingSeverity, /) -> None: ...
|
|
481
|
+
|
|
482
|
+
def get_video_codec_capability(openh264: str | None = None) -> SoraVideoCodecCapability: ...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sora_sdk
|
|
3
|
-
Version: 2025.1.0.
|
|
3
|
+
Version: 2025.1.0.dev6
|
|
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>
|
|
@@ -290,15 +290,15 @@ PyPI 経由ではインストールできません。
|
|
|
290
290
|
|
|
291
291
|
## 対応プラットフォーム
|
|
292
292
|
|
|
293
|
-
- Windows 11 x86_64
|
|
294
|
-
- Windows Server 2022 x86_64
|
|
295
|
-
- macOS Sequoia 15 arm64
|
|
296
|
-
- macOS Ventura 14 arm64
|
|
297
293
|
- Ubuntu 24.04 LTS x86_64
|
|
298
294
|
- Ubuntu 24.04 LTS arm64
|
|
299
295
|
- Ubuntu 22.04 LTS x86_64
|
|
300
296
|
- Ubuntu 22.04 LTS arm64 (NVIDIA Jetson JetPack SDK 6)
|
|
301
297
|
- PyPI からではなくパッケージファイルを利用してください
|
|
298
|
+
- macOS Sequoia 15 arm64
|
|
299
|
+
- macOS Ventura 14 arm64
|
|
300
|
+
- Windows 11 x86_64
|
|
301
|
+
- Windows Server 2022 x86_64
|
|
302
302
|
|
|
303
303
|
### macOS の対応バージョン
|
|
304
304
|
|
|
@@ -323,6 +323,7 @@ PyPI 経由ではインストールできません。
|
|
|
323
323
|
|
|
324
324
|
- Windows 11 arm64
|
|
325
325
|
- Ubuntu 22.04 arm64
|
|
326
|
+
- Ubuntu 22.04 arm64 (NVIDIA Jetson JetPack SDK 6.1)
|
|
326
327
|
- Ubuntu 20.04 arm64 (NVIDIA Jetson JetPack SDK 5)
|
|
327
328
|
- AMD Video Core Next (VCN) 対応
|
|
328
329
|
- VP9 / AV1 / H.264 / H.265
|
|
@@ -15,14 +15,17 @@ src/sora_sdk.egg-info/PKG-INFO
|
|
|
15
15
|
src/sora_sdk.egg-info/SOURCES.txt
|
|
16
16
|
src/sora_sdk.egg-info/dependency_links.txt
|
|
17
17
|
src/sora_sdk.egg-info/top_level.txt
|
|
18
|
+
tests/test_apple_video_toolbox.py
|
|
18
19
|
tests/test_authz.py
|
|
19
20
|
tests/test_authz_simulcast.py
|
|
20
21
|
tests/test_ca_cert.py
|
|
22
|
+
tests/test_capability.py
|
|
21
23
|
tests/test_degradation_preference.py
|
|
22
24
|
tests/test_encoded_transform.py
|
|
23
|
-
tests/
|
|
25
|
+
tests/test_intel_vpl.py
|
|
24
26
|
tests/test_messaging.py
|
|
25
27
|
tests/test_messaging_header.py
|
|
28
|
+
tests/test_nvidia_video_codec_sdk.py
|
|
26
29
|
tests/test_openh264.py
|
|
27
30
|
tests/test_re_offer_re_answer_sdp.py
|
|
28
31
|
tests/test_sendonly_recvonly.py
|
|
@@ -31,7 +31,6 @@ def test_macos_video_hwa_sendonly(setup, video_codec_type):
|
|
|
31
31
|
video=True,
|
|
32
32
|
video_codec_type=video_codec_type,
|
|
33
33
|
metadata=metadata,
|
|
34
|
-
use_hwa=True,
|
|
35
34
|
)
|
|
36
35
|
sendonly.connect(fake_video=True)
|
|
37
36
|
|
|
@@ -117,7 +116,6 @@ def test_macos_simulcast(
|
|
|
117
116
|
metadata=metadata,
|
|
118
117
|
video_width=video_width,
|
|
119
118
|
video_height=video_height,
|
|
120
|
-
use_hwa=True,
|
|
121
119
|
)
|
|
122
120
|
sendonly.connect(fake_video=True)
|
|
123
121
|
|
|
@@ -157,7 +155,7 @@ def test_macos_simulcast(
|
|
|
157
155
|
assert "SimulcastEncoderAdapter" in s["encoderImplementation"]
|
|
158
156
|
assert expected_implementation in s["encoderImplementation"]
|
|
159
157
|
|
|
160
|
-
assert s["bytesSent"] >
|
|
158
|
+
assert s["bytesSent"] > 500
|
|
161
159
|
assert s["packetsSent"] > 5
|
|
162
160
|
# targetBitrate が指定したビットレートの 90% 以上、100% 以下に収まることを確認
|
|
163
161
|
expected_bitrate = video_bit_rate * 1000
|
|
@@ -204,7 +202,6 @@ def test_macos_h264_sendonly_recvonly(setup):
|
|
|
204
202
|
video=True,
|
|
205
203
|
video_codec_type="H264",
|
|
206
204
|
metadata=metadata,
|
|
207
|
-
use_hwa=True,
|
|
208
205
|
)
|
|
209
206
|
sendonly.connect()
|
|
210
207
|
|
|
@@ -213,7 +210,6 @@ def test_macos_h264_sendonly_recvonly(setup):
|
|
|
213
210
|
SoraRole.RECVONLY,
|
|
214
211
|
channel_id,
|
|
215
212
|
metadata=metadata,
|
|
216
|
-
use_hwa=True,
|
|
217
213
|
)
|
|
218
214
|
recvonly.connect()
|
|
219
215
|
|
|
@@ -264,7 +260,6 @@ def test_macos_h265_sendonly_recvonly(setup):
|
|
|
264
260
|
video=True,
|
|
265
261
|
video_codec_type="H265",
|
|
266
262
|
metadata=metadata,
|
|
267
|
-
use_hwa=True,
|
|
268
263
|
)
|
|
269
264
|
sendonly.connect()
|
|
270
265
|
|
|
@@ -273,7 +268,6 @@ def test_macos_h265_sendonly_recvonly(setup):
|
|
|
273
268
|
SoraRole.RECVONLY,
|
|
274
269
|
channel_id,
|
|
275
270
|
metadata=metadata,
|
|
276
|
-
use_hwa=True,
|
|
277
271
|
)
|
|
278
272
|
recvonly.connect()
|
|
279
273
|
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import time
|
|
3
|
+
import uuid
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from client import SoraClient, SoraRole
|
|
7
|
+
|
|
8
|
+
from sora_sdk import (
|
|
9
|
+
SoraVideoCodecImplementation,
|
|
10
|
+
SoraVideoCodecPreference,
|
|
11
|
+
SoraVideoCodecType,
|
|
12
|
+
create_video_codec_preference_from_implementation,
|
|
13
|
+
get_video_codec_capability,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def test_capability(setup):
|
|
18
|
+
openh264_path = setup.get("openh264_path")
|
|
19
|
+
capability = get_video_codec_capability(openh264=openh264_path)
|
|
20
|
+
has_internal = False
|
|
21
|
+
has_openh264 = False
|
|
22
|
+
for engine in capability.engines:
|
|
23
|
+
if engine.name == SoraVideoCodecImplementation.INTERNAL:
|
|
24
|
+
has_internal = True
|
|
25
|
+
if engine.name == SoraVideoCodecImplementation.CISCO_OPENH264:
|
|
26
|
+
has_openh264 = True
|
|
27
|
+
assert has_internal and has_openh264
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def test_preference(setup):
|
|
31
|
+
openh264_path = setup.get("openh264_path")
|
|
32
|
+
capability = get_video_codec_capability(openh264=openh264_path)
|
|
33
|
+
preference = create_video_codec_preference_from_implementation(
|
|
34
|
+
capability, SoraVideoCodecImplementation.CISCO_OPENH264
|
|
35
|
+
)
|
|
36
|
+
assert preference.has_implementation(SoraVideoCodecImplementation.CISCO_OPENH264)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def test_preference_invalid(setup):
|
|
40
|
+
signaling_urls = setup.get("signaling_urls")
|
|
41
|
+
channel_id_prefix = setup.get("channel_id_prefix")
|
|
42
|
+
metadata = setup.get("metadata")
|
|
43
|
+
|
|
44
|
+
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
45
|
+
|
|
46
|
+
# opneh264 のパスを設定してないのに H264 エンコーダを使おうとしているので Sora 生成時にエラーになる
|
|
47
|
+
with pytest.raises(RuntimeError):
|
|
48
|
+
SoraClient(
|
|
49
|
+
signaling_urls,
|
|
50
|
+
SoraRole.SENDONLY,
|
|
51
|
+
channel_id,
|
|
52
|
+
metadata=metadata,
|
|
53
|
+
audio=False,
|
|
54
|
+
video=True,
|
|
55
|
+
video_codec_type="H264",
|
|
56
|
+
video_codec_preference=SoraVideoCodecPreference(
|
|
57
|
+
codecs=[
|
|
58
|
+
SoraVideoCodecPreference.Codec(
|
|
59
|
+
type=SoraVideoCodecType.H264,
|
|
60
|
+
encoder=SoraVideoCodecImplementation.CISCO_OPENH264,
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def test_preference_vp8(setup):
|
|
68
|
+
signaling_urls = setup.get("signaling_urls")
|
|
69
|
+
channel_id_prefix = setup.get("channel_id_prefix")
|
|
70
|
+
metadata = setup.get("metadata")
|
|
71
|
+
|
|
72
|
+
channel_id = f"{channel_id_prefix}_{__name__}_{sys._getframe().f_code.co_name}_{uuid.uuid4()}"
|
|
73
|
+
|
|
74
|
+
sendonly = SoraClient(
|
|
75
|
+
signaling_urls,
|
|
76
|
+
SoraRole.SENDONLY,
|
|
77
|
+
channel_id,
|
|
78
|
+
metadata=metadata,
|
|
79
|
+
audio=False,
|
|
80
|
+
video=True,
|
|
81
|
+
video_codec_type="VP8",
|
|
82
|
+
video_codec_preference=SoraVideoCodecPreference(
|
|
83
|
+
codecs=[
|
|
84
|
+
SoraVideoCodecPreference.Codec(
|
|
85
|
+
type=SoraVideoCodecType.VP8, encoder=SoraVideoCodecImplementation.INTERNAL
|
|
86
|
+
)
|
|
87
|
+
]
|
|
88
|
+
),
|
|
89
|
+
)
|
|
90
|
+
sendonly.connect(fake_video=True)
|
|
91
|
+
|
|
92
|
+
time.sleep(5)
|
|
93
|
+
|
|
94
|
+
sendonly.disconnect()
|