tirtc-devtools-cli 0.0.1

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.
Files changed (156) hide show
  1. package/README.md +52 -0
  2. package/USAGE.md +417 -0
  3. package/bin/tirtc-devtool.js +2 -0
  4. package/dist/app-server/protocol-client/index.d.ts +25 -0
  5. package/dist/app-server/protocol-client/index.js +114 -0
  6. package/dist/devtools/cli/src/config.d.ts +46 -0
  7. package/dist/devtools/cli/src/config.js +98 -0
  8. package/dist/devtools/cli/src/dummy.d.ts +0 -0
  9. package/dist/devtools/cli/src/dummy.js +1 -0
  10. package/dist/devtools/cli/src/embedded_paths.d.ts +7 -0
  11. package/dist/devtools/cli/src/embedded_paths.js +85 -0
  12. package/dist/devtools/cli/src/facade.d.ts +723 -0
  13. package/dist/devtools/cli/src/facade.js +194 -0
  14. package/dist/devtools/cli/src/ffmpeg_tool.d.ts +6 -0
  15. package/dist/devtools/cli/src/ffmpeg_tool.js +146 -0
  16. package/dist/devtools/cli/src/guide.d.ts +1 -0
  17. package/dist/devtools/cli/src/guide.js +49 -0
  18. package/dist/devtools/cli/src/index.d.ts +1 -0
  19. package/dist/devtools/cli/src/index.js +753 -0
  20. package/dist/devtools/cli/src/media_assets.d.ts +25 -0
  21. package/dist/devtools/cli/src/media_assets.js +121 -0
  22. package/dist/devtools/cli/src/session_manager.d.ts +25 -0
  23. package/dist/devtools/cli/src/session_manager.js +393 -0
  24. package/dist/devtools/cli/src/token_tool.d.ts +33 -0
  25. package/dist/devtools/cli/src/token_tool.js +217 -0
  26. package/dist/devtools/cli/src/transport.d.ts +30 -0
  27. package/dist/devtools/cli/src/transport.js +84 -0
  28. package/dist/dummy.d.ts +0 -0
  29. package/dist/dummy.js +1 -0
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.js +48 -0
  32. package/package.json +54 -0
  33. package/script/ensure_ffmpeg.sh +22 -0
  34. package/vendor/app-server/bin/native/macos-arm64/credential_napi.node +0 -0
  35. package/vendor/app-server/bin/native/macos-arm64/libcrypto.dylib +0 -0
  36. package/vendor/app-server/bin/native/macos-arm64/libssl.dylib +0 -0
  37. package/vendor/app-server/bin/native/macos-arm64/libtgrtc.dylib +0 -0
  38. package/vendor/app-server/bin/native/macos-arm64/runtime_host_napi.node +0 -0
  39. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_codec.h +23 -0
  40. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_frame.h +36 -0
  41. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io.h +56 -0
  42. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_android.h +19 -0
  43. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_apple.h +19 -0
  44. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_harmony.h +19 -0
  45. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_windows.h +19 -0
  46. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_processing.h +56 -0
  47. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_sample_rate.h +18 -0
  48. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/error.h +20 -0
  49. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/logging.h +53 -0
  50. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_codec.h +21 -0
  51. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_downlink.h +89 -0
  52. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_uplink.h +115 -0
  53. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/runtime.h +236 -0
  54. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_codec.h +57 -0
  55. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_frame.h +55 -0
  56. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io.h +46 -0
  57. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_android.h +32 -0
  58. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_apple.h +34 -0
  59. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_harmony.h +32 -0
  60. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_windows.h +26 -0
  61. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_processing.h +34 -0
  62. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_audio.a +0 -0
  63. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_facade.a +0 -0
  64. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_logging.a +0 -0
  65. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_media.a +0 -0
  66. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_video.a +0 -0
  67. package/vendor/app-server/bin/runtime/linux-x64/lib/libwebrtc_apm.a +0 -0
  68. package/vendor/app-server/bin/runtime/linux-x64/lib/libxlog.a +0 -0
  69. package/vendor/app-server/bin/runtime/linux-x64/manifest.txt +34 -0
  70. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio.h +398 -0
  71. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_codec.h +23 -0
  72. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_frame.h +36 -0
  73. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_io.h +56 -0
  74. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_io_android.h +19 -0
  75. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_io_apple.h +19 -0
  76. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_io_harmony.h +19 -0
  77. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_io_windows.h +19 -0
  78. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_processing.h +56 -0
  79. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio_sample_rate.h +18 -0
  80. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/av.h +452 -0
  81. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/credential.h +34 -0
  82. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/error.h +30 -0
  83. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/foundation/build_info.h +27 -0
  84. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/http.h +57 -0
  85. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/logging.h +55 -0
  86. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_codec.h +21 -0
  87. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_downlink.h +95 -0
  88. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_av_sync.h +61 -0
  89. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_source.h +77 -0
  90. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_live_source.h +71 -0
  91. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_uplink.h +116 -0
  92. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/transport.h +481 -0
  93. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/trp.h +541 -0
  94. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_codec.h +58 -0
  95. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_frame.h +55 -0
  96. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_io.h +46 -0
  97. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_io_android.h +32 -0
  98. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_io_apple.h +47 -0
  99. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_io_harmony.h +32 -0
  100. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_io_windows.h +26 -0
  101. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/video_processing.h +34 -0
  102. package/vendor/app-server/bin/runtime/macos-arm64/lib/libcrypto.a +0 -0
  103. package/vendor/app-server/bin/runtime/macos-arm64/lib/libcrypto.dylib +0 -0
  104. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
  105. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_credential.a +0 -0
  106. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
  107. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_http.a +0 -0
  108. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_logging.a +0 -0
  109. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
  110. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
  111. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
  112. package/vendor/app-server/bin/runtime/macos-arm64/lib/libssl.a +0 -0
  113. package/vendor/app-server/bin/runtime/macos-arm64/lib/libssl.dylib +0 -0
  114. package/vendor/app-server/bin/runtime/macos-arm64/lib/libwebrtc_apm.a +0 -0
  115. package/vendor/app-server/bin/runtime/macos-arm64/lib/libxlog.a +0 -0
  116. package/vendor/app-server/bin/runtime/macos-arm64/manifest.txt +50 -0
  117. package/vendor/app-server/bin/tirtc-devtool-host.js +2 -0
  118. package/vendor/app-server/dist/host/ArtifactManager.d.ts +18 -0
  119. package/vendor/app-server/dist/host/ArtifactManager.js +83 -0
  120. package/vendor/app-server/dist/host/HostProtocol.d.ts +107 -0
  121. package/vendor/app-server/dist/host/HostProtocol.js +256 -0
  122. package/vendor/app-server/dist/host/HostServer.d.ts +49 -0
  123. package/vendor/app-server/dist/host/HostServer.js +635 -0
  124. package/vendor/app-server/dist/host/HostState.d.ts +60 -0
  125. package/vendor/app-server/dist/host/HostState.js +19 -0
  126. package/vendor/app-server/dist/host/RuntimeAdapter.d.ts +81 -0
  127. package/vendor/app-server/dist/host/RuntimeAdapter.js +559 -0
  128. package/vendor/app-server/dist/host/RuntimeCredentialTokenIssuer.d.ts +30 -0
  129. package/vendor/app-server/dist/host/RuntimeCredentialTokenIssuer.js +224 -0
  130. package/vendor/app-server/dist/host/RuntimeReceiveWorker.d.ts +37 -0
  131. package/vendor/app-server/dist/host/RuntimeReceiveWorker.js +186 -0
  132. package/vendor/app-server/dist/host/RuntimeSendWorker.d.ts +42 -0
  133. package/vendor/app-server/dist/host/RuntimeSendWorker.js +274 -0
  134. package/vendor/app-server/dist/host/TokenTool.d.ts +15 -0
  135. package/vendor/app-server/dist/host/TokenTool.js +84 -0
  136. package/vendor/app-server/dist/host/WebPreviewGateway.d.ts +28 -0
  137. package/vendor/app-server/dist/host/WebPreviewGateway.js +815 -0
  138. package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.d.ts +26 -0
  139. package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.js +118 -0
  140. package/vendor/app-server/dist/host/native/RuntimeHostBridge.d.ts +19 -0
  141. package/vendor/app-server/dist/host/native/RuntimeHostBridge.js +141 -0
  142. package/vendor/app-server/dist/host/runtime_backed_preflight.d.ts +10 -0
  143. package/vendor/app-server/dist/host/runtime_backed_preflight.js +78 -0
  144. package/vendor/app-server/dist/host/tests/helpers/host_socket_client.d.ts +28 -0
  145. package/vendor/app-server/dist/host/tests/helpers/host_socket_client.js +85 -0
  146. package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.d.ts +10 -0
  147. package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.js +41 -0
  148. package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.d.ts +11 -0
  149. package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.js +32 -0
  150. package/vendor/app-server/dist/protocol/contract.d.ts +983 -0
  151. package/vendor/app-server/dist/protocol/contract.js +198 -0
  152. package/vendor/app-server/dist/protocol-client/index.d.ts +25 -0
  153. package/vendor/app-server/dist/protocol-client/index.js +114 -0
  154. package/vendor/app-server/dist/src/index.d.ts +1 -0
  155. package/vendor/app-server/dist/src/index.js +294 -0
  156. package/vendor/runtime/script/prepare_runtime_media_dataset.sh +427 -0
@@ -0,0 +1,32 @@
1
+ #ifndef TIRTC_VIDEO_IO_ANDROID_H_
2
+ #define TIRTC_VIDEO_IO_ANDROID_H_
3
+
4
+ #include "tirtc/video_io.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #if defined(__ANDROID__)
11
+ struct ANativeWindow;
12
+
13
+ typedef enum TirtcVideoAndroidVoutRenderer {
14
+ TIRTC_VIDEO_ANDROID_VOUT_RENDERER_GLES = 0,
15
+ TIRTC_VIDEO_ANDROID_VOUT_RENDERER_NATIVE_WINDOW_RGBA = 1,
16
+ } TirtcVideoAndroidVoutRenderer;
17
+
18
+ typedef struct TirtcVideoAndroidSurfaceTextureVoutOptions {
19
+ struct ANativeWindow* native_window;
20
+ TirtcVideoAndroidVoutRenderer renderer;
21
+ } TirtcVideoAndroidSurfaceTextureVoutOptions;
22
+
23
+ TirtcError tirtc_video_android_create_surface_texture_vout(TirtcVideoVout** out_vout);
24
+ TirtcError tirtc_video_android_surface_texture_vout_set_options(
25
+ TirtcVideoVout* vout, const TirtcVideoAndroidSurfaceTextureVoutOptions* options);
26
+ #endif
27
+
28
+ #ifdef __cplusplus
29
+ }
30
+ #endif
31
+
32
+ #endif // TIRTC_VIDEO_IO_ANDROID_H_
@@ -0,0 +1,47 @@
1
+ #ifndef TIRTC_VIDEO_IO_APPLE_H_
2
+ #define TIRTC_VIDEO_IO_APPLE_H_
3
+
4
+ #include "tirtc/video_io.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #if defined(__APPLE__)
11
+ typedef enum TirtcVideoAppleVoutTarget {
12
+ TIRTC_VIDEO_APPLE_VOUT_TARGET_DEFAULT = 0,
13
+ TIRTC_VIDEO_APPLE_VOUT_TARGET_APPKIT_WINDOW = 1,
14
+ TIRTC_VIDEO_APPLE_VOUT_TARGET_PIXEL_BUFFER_CALLBACK = 2,
15
+ } TirtcVideoAppleVoutTarget;
16
+
17
+ typedef enum TirtcVideoAppleWindowSlot {
18
+ TIRTC_VIDEO_APPLE_WINDOW_SLOT_NONE = 0,
19
+ TIRTC_VIDEO_APPLE_WINDOW_SLOT_LEFT = 1,
20
+ TIRTC_VIDEO_APPLE_WINDOW_SLOT_RIGHT = 2,
21
+ } TirtcVideoAppleWindowSlot;
22
+
23
+ typedef int (*TirtcVideoAppleOnPixelBufferFn)(void* pixel_buffer, void* user_data);
24
+
25
+ typedef struct TirtcVideoAppleCoreVideoVoutOptions {
26
+ TirtcVideoAppleVoutTarget target;
27
+ TirtcVideoAppleOnPixelBufferFn on_pixel_buffer;
28
+ void* user_data;
29
+ const char* window_title;
30
+ TirtcVideoAppleWindowSlot window_slot;
31
+ int use_window_frame;
32
+ int32_t window_x;
33
+ int32_t window_y;
34
+ uint32_t window_width;
35
+ uint32_t window_height;
36
+ } TirtcVideoAppleCoreVideoVoutOptions;
37
+
38
+ TirtcError tirtc_video_apple_create_core_video_vout(TirtcVideoVout** out_vout);
39
+ TirtcError tirtc_video_apple_core_video_vout_set_options(
40
+ TirtcVideoVout* vout, const TirtcVideoAppleCoreVideoVoutOptions* options);
41
+ #endif
42
+
43
+ #ifdef __cplusplus
44
+ }
45
+ #endif
46
+
47
+ #endif // TIRTC_VIDEO_IO_APPLE_H_
@@ -0,0 +1,32 @@
1
+ #ifndef TIRTC_VIDEO_IO_HARMONY_H_
2
+ #define TIRTC_VIDEO_IO_HARMONY_H_
3
+
4
+ #include "tirtc/video_io.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #if defined(__OHOS__)
11
+ typedef struct NativeWindow OHNativeWindow;
12
+
13
+ typedef enum TirtcVideoHarmonyVoutRenderer {
14
+ TIRTC_VIDEO_HARMONY_VOUT_RENDERER_GLES = 0,
15
+ TIRTC_VIDEO_HARMONY_VOUT_RENDERER_NATIVE_WINDOW_RGBA = 1,
16
+ } TirtcVideoHarmonyVoutRenderer;
17
+
18
+ typedef struct TirtcVideoHarmonyNativeImageVoutOptions {
19
+ OHNativeWindow* native_window;
20
+ TirtcVideoHarmonyVoutRenderer renderer;
21
+ } TirtcVideoHarmonyNativeImageVoutOptions;
22
+
23
+ TirtcError tirtc_video_harmony_create_native_image_vout(TirtcVideoVout** out_vout);
24
+ TirtcError tirtc_video_harmony_native_image_vout_set_options(
25
+ TirtcVideoVout* vout, const TirtcVideoHarmonyNativeImageVoutOptions* options);
26
+ #endif
27
+
28
+ #ifdef __cplusplus
29
+ }
30
+ #endif
31
+
32
+ #endif // TIRTC_VIDEO_IO_HARMONY_H_
@@ -0,0 +1,26 @@
1
+ #ifndef TIRTC_VIDEO_IO_WINDOWS_H_
2
+ #define TIRTC_VIDEO_IO_WINDOWS_H_
3
+
4
+ #include "tirtc/video_io.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #if defined(_WIN32)
11
+ typedef struct HWND__* TirtcVideoWindowsHwnd;
12
+
13
+ typedef struct TirtcVideoWindowsDirect2dVoutOptions {
14
+ TirtcVideoWindowsHwnd hwnd;
15
+ } TirtcVideoWindowsDirect2dVoutOptions;
16
+
17
+ TirtcError tirtc_video_windows_create_direct2d_vout(TirtcVideoVout** out_vout);
18
+ TirtcError tirtc_video_windows_direct2d_vout_set_options(
19
+ TirtcVideoVout* vout, const TirtcVideoWindowsDirect2dVoutOptions* options);
20
+ #endif
21
+
22
+ #ifdef __cplusplus
23
+ }
24
+ #endif
25
+
26
+ #endif // TIRTC_VIDEO_IO_WINDOWS_H_
@@ -0,0 +1,34 @@
1
+ #ifndef TIRTC_VIDEO_PROCESSING_H_
2
+ #define TIRTC_VIDEO_PROCESSING_H_
3
+
4
+ #include "tirtc/error.h"
5
+ #include "tirtc/video_frame.h"
6
+
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+
11
+ typedef struct TirtcVideoProcessor TirtcVideoProcessor;
12
+
13
+ typedef struct TirtcVideoProcessorConfig {
14
+ uint32_t output_width;
15
+ uint32_t output_height;
16
+ TirtcVideoPixelFormat output_pixel_format;
17
+ } TirtcVideoProcessorConfig;
18
+
19
+ TirtcError tirtc_video_processor_create(const TirtcVideoProcessorConfig* config,
20
+ TirtcVideoProcessor** out_processor);
21
+ void tirtc_video_processor_destroy(TirtcVideoProcessor* processor);
22
+
23
+ TirtcError tirtc_video_processor_set_config(TirtcVideoProcessor* processor,
24
+ const TirtcVideoProcessorConfig* config);
25
+ TirtcError tirtc_video_processor_process(TirtcVideoProcessor* processor,
26
+ const TirtcVideoPixelFrame* in_frame,
27
+ TirtcVideoPixelFrame* out_frame);
28
+ TirtcError tirtc_video_processor_reset(TirtcVideoProcessor* processor);
29
+
30
+ #ifdef __cplusplus
31
+ }
32
+ #endif
33
+
34
+ #endif // TIRTC_VIDEO_PROCESSING_H_
@@ -0,0 +1,50 @@
1
+ platform=macos-arm64
2
+ staged_at_utc=2026-04-09T05:05:37Z
3
+ source_sdk=/Users/allenfeng/Development/Repositories/tirtc-nexus/tirtc-matrix/.build/sdk/macos-arm64
4
+
5
+ 58cbe872af5a68a1f5832912ab9deb7ef5af1ac5d19439b523ce6619978214c0 include/tirtc/audio.h
6
+ 6d972ccfe150a3b4f2d7f18fa92b3ade9210c1c8bb754d061ac6b7997b59e2cb include/tirtc/audio_codec.h
7
+ 7bacbdb2d8bb10d6444036a8fef42f2a8e3ea34dfc38e165ee678d61f189db41 include/tirtc/audio_frame.h
8
+ 84f1bbe67efa15ab3b2d995d661025aac43e2fe547a14a012a24d89cfe3cb859 include/tirtc/audio_io.h
9
+ c2e1f31dcc75be461c577d18b1cebe32774f212d51cb4dd2a5b5a9bfe62b693e include/tirtc/audio_io_android.h
10
+ 878bb18220ac62304ec95807f31e83e050c8dac14811f873454f9b045028694a include/tirtc/audio_io_apple.h
11
+ 0569eb1d043ee7fa8d45ca43143eca1a22e4c4bf1507ca7e045e010a3ecbc288 include/tirtc/audio_io_harmony.h
12
+ 51cbc911fe9f9834046f0e0a1a7cdd814a8e194a615894a8b4d11f9e5f095610 include/tirtc/audio_io_windows.h
13
+ 21f60729117260a44af22c1af986ef17d22673b102b7b7a035f492d0665cce16 include/tirtc/audio_processing.h
14
+ 0ca7c3c630b1242f51a0fd8154097c0a332b4c816a5707090e4381719852998c include/tirtc/audio_sample_rate.h
15
+ 64d0005d726ed7d29e6c5a9c7bc25e931693ba8fa4ab6af8d21e7adc8767f66e include/tirtc/av.h
16
+ 4198c95c48ae579d1c782635b00fa5c9009d0c56ba466e6e3873e8298faae029 include/tirtc/credential.h
17
+ 92da1614c1cbc22d5ba7c1aefd3bbfba88be4a698d1b9990f470fe959ddd84ba include/tirtc/error.h
18
+ ae805545a9515edc9b94262e72ad2c7b7d649288166f4daeb450d8a55e82ae0b include/tirtc/foundation/build_info.h
19
+ 7cf8b372a3d48d4de4a65a04c7f102281a7b42cebb9ec247853d3c53afb63b6a include/tirtc/http.h
20
+ 70bbf93b84d9d1a85f376d9986de570c1f658319e1e5ab6d621f7a4d41033f5c include/tirtc/logging.h
21
+ 7e2f7f81afe37e22f5414d9db32438edd948ff775230c3a0a17ff9ac1a0b560e include/tirtc/media_codec.h
22
+ 71eab7553274dee4cc6ea3cbaf345a9858e2bf73fe7e928a1a23851d431f3b4d include/tirtc/media_downlink.h
23
+ 21ef53b4d120aab600168c4082e7622c791ab4929fb20b3fb31f73ed01eee02a include/tirtc/media_fixture_av_sync.h
24
+ 037d9a581cef71afe9233456b1f4ef866c3739150532f3c30a67d361e8af9eef include/tirtc/media_fixture_source.h
25
+ a4f8ab44c1a20ad37f250363a403a9d4d007e61ddb2426c7966dbc05f6a04b4f include/tirtc/media_live_source.h
26
+ 1b3be6954e547f91a047866438bff1820c8406afaf91cef68ddee29a6ac70234 include/tirtc/media_uplink.h
27
+ 1e12daf9c5fc2e2f848444688081c9be0cb738245f0155327e8003b49308058f include/tirtc/transport.h
28
+ f836768a4dd8b8595bd53cd96cca98bb56e802dd3ee3e520b18546d999908928 include/tirtc/trp.h
29
+ dff5b0a0ac4a40ad17c93e1e56b3c416371c81ab365e287ea8cd6ce37ccbed3b include/tirtc/video_codec.h
30
+ e51379666c199588cc33279ccf52248035d1cae3d1d468b1615ebf29f0b39c9c include/tirtc/video_frame.h
31
+ d920afad955b9f206b02b19ca152315190fa84ab6f24e895a5b24c3ab9ffd701 include/tirtc/video_io.h
32
+ 9294d144dbc56415ddbc06c68a26b4a662b51a3808f49ded81a37776ad243293 include/tirtc/video_io_android.h
33
+ 005114b9213ec826e18d11eca4b9d65cce2ca0e7c781f03d85292365d9d5dfdd include/tirtc/video_io_apple.h
34
+ cae0bbeb884e5466a56da15182c78cc22baab6c743f349a58d3595f623333585 include/tirtc/video_io_harmony.h
35
+ 65b5d24fe3a6bc2a299a2220148a153ba4eb0955a49c1c3baabf1fdfed8aabdd include/tirtc/video_io_windows.h
36
+ 8cd6b66bea14890a665cc317f8572429b2c3e4463773f8b77c1e4dc30a4a8747 include/tirtc/video_processing.h
37
+ b39daee6a3d39bf0ca20c45084601133c4198de8dca848dcff6dd9c70ae99016 lib/libcrypto.a
38
+ c052857ef315e3d61db9c862cad10709a3a6b2487dc41799cbe4d74a805de875 lib/libcrypto.dylib
39
+ e96e6d57ff90f3cb34d98d69036987c4d4839c48094168261fbe776a524185a1 lib/libmatrix_runtime_audio.a
40
+ 8255fc3eb34a44c5ee5cd6f1ca88d06392527fbe91d492692152eb719fda9887 lib/libmatrix_runtime_credential.a
41
+ 467c2440813c73211dd71775d7a49fdeb785975c998ab1c7268e967c07650399 lib/libmatrix_runtime_facade.a
42
+ 9499a182dde5cd3cd908ddd2d44b1d6b2cd884bd5041379f2d1144cbb49297b3 lib/libmatrix_runtime_foundation_http.a
43
+ 79aba2a4f43ca5f4aca9187d07c656b6696e9b644bf678418ed2e79ed718ce2e lib/libmatrix_runtime_foundation_logging.a
44
+ 99ae6ebbe3f3faa3b9591e049691842cef8bdbc3fd6f1e0cb82c7f9acb7ac85e lib/libmatrix_runtime_media.a
45
+ a9cba88ca9db63c2712b3e0088c8525e55763ce62836b238b042bb0514b0f669 lib/libmatrix_runtime_transport.a
46
+ 86845113a79fa1c7503b17bcf44cff061b5491127d38995206c2afce59aa4560 lib/libmatrix_runtime_video.a
47
+ c11c65d373a127028350c41fa58cd2d1223f2b5d70a84e13b115d90daaba25ca lib/libssl.a
48
+ ef1c1104bbdd2528ed7b958fb7252bd6249875f92300b0c9577d6c4bd6c0d88a lib/libssl.dylib
49
+ dc3e0e6ded26e90fd59c166933a5289d57f4cf25fbe6246b6b83c86fe898e63d lib/libwebrtc_apm.a
50
+ 6b1b182cb43ad0b81b19d10f4762b137ee7571a527d0b500f31a227e5e162cb1 lib/libxlog.a
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/src/index.js');
@@ -0,0 +1,18 @@
1
+ export interface ArtifactPaths {
2
+ rootPath: string;
3
+ reportPath: string;
4
+ logsPath: string;
5
+ eventsPath: string;
6
+ receivedMediaPath: string;
7
+ prepareCachePath: string;
8
+ }
9
+ export declare class ArtifactManager {
10
+ private paths;
11
+ constructor(basePath: string);
12
+ setupLayout(): void;
13
+ getPaths(): ArtifactPaths;
14
+ getHostLogPath(): string;
15
+ appendHostLog(line: string): void;
16
+ writeReport(report: unknown): void;
17
+ writeEvent(event: unknown): void;
18
+ }
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.ArtifactManager = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ class ArtifactManager {
40
+ paths;
41
+ constructor(basePath) {
42
+ this.paths = {
43
+ rootPath: basePath,
44
+ reportPath: path.join(basePath, 'report.json'),
45
+ logsPath: path.join(basePath, 'logs'),
46
+ eventsPath: path.join(basePath, 'events.jsonl'),
47
+ receivedMediaPath: path.join(basePath, 'received-media'),
48
+ prepareCachePath: path.join(basePath, 'prepare-cache'),
49
+ };
50
+ }
51
+ setupLayout() {
52
+ const dirs = [
53
+ this.paths.rootPath,
54
+ this.paths.logsPath,
55
+ this.paths.receivedMediaPath,
56
+ this.paths.prepareCachePath,
57
+ ];
58
+ for (const dir of dirs) {
59
+ if (!fs.existsSync(dir)) {
60
+ fs.mkdirSync(dir, { recursive: true });
61
+ }
62
+ }
63
+ if (!fs.existsSync(this.paths.eventsPath)) {
64
+ fs.writeFileSync(this.paths.eventsPath, '');
65
+ }
66
+ }
67
+ getPaths() {
68
+ return this.paths;
69
+ }
70
+ getHostLogPath() {
71
+ return path.join(this.paths.logsPath, 'host.log');
72
+ }
73
+ appendHostLog(line) {
74
+ fs.appendFileSync(this.getHostLogPath(), line);
75
+ }
76
+ writeReport(report) {
77
+ fs.writeFileSync(this.paths.reportPath, JSON.stringify(report, null, 2));
78
+ }
79
+ writeEvent(event) {
80
+ fs.appendFileSync(this.paths.eventsPath, `${JSON.stringify(event)}\n`);
81
+ }
82
+ }
83
+ exports.ArtifactManager = ArtifactManager;
@@ -0,0 +1,107 @@
1
+ import { StreamRequestPolicyMode, StreamSource } from './HostState';
2
+ export type JsonRpcId = string | number;
3
+ export type JsonRpcRequest = {
4
+ id?: JsonRpcId;
5
+ method: string;
6
+ params?: unknown;
7
+ };
8
+ export type ProtocolErrorPayload = {
9
+ reasonCode: string;
10
+ message: string;
11
+ retryable: boolean;
12
+ };
13
+ export type ProtocolErrorResponse = {
14
+ id?: JsonRpcId;
15
+ error: {
16
+ code: number;
17
+ message: string;
18
+ data?: ProtocolErrorPayload;
19
+ };
20
+ };
21
+ export type ServiceStartParams = {
22
+ serviceEntry?: string;
23
+ license: string;
24
+ timeoutMs: number;
25
+ };
26
+ export type ConnectionAutoTokenConfig = {
27
+ openapiEntry?: string;
28
+ accessId: string;
29
+ secretKey: string;
30
+ localId?: string;
31
+ userTtlSeconds?: number;
32
+ channelTtlSeconds?: number;
33
+ };
34
+ export type ConnectionConnectParams = {
35
+ serviceEntry?: string;
36
+ peerId: string;
37
+ token?: string;
38
+ tokenMode?: 'manual' | 'auto';
39
+ autoToken?: ConnectionAutoTokenConfig;
40
+ timeoutMs: number;
41
+ };
42
+ export type StreamSendStartParams = {
43
+ streamId: number;
44
+ media: 'audio' | 'video';
45
+ source: StreamSource;
46
+ };
47
+ export type StreamStopParams = {
48
+ streamId: number;
49
+ };
50
+ export type StreamReceiveStartParams = {
51
+ streamId: number;
52
+ media: 'audio' | 'video';
53
+ };
54
+ export type OutputAttachParams = {
55
+ streamId: number;
56
+ consumer: string;
57
+ mediaView: string;
58
+ format: string;
59
+ delivery: string;
60
+ targetPath?: string;
61
+ maxFiles?: number;
62
+ };
63
+ export type OutputDetachParams = {
64
+ outputId: string;
65
+ };
66
+ export type CommandSendParams = {
67
+ commandId: number;
68
+ kind: string;
69
+ payloadEncoding: string;
70
+ payload: string;
71
+ replyToSequenceNumber?: number;
72
+ awaitResponse?: boolean;
73
+ timeoutMs?: number;
74
+ };
75
+ export type EventsSubscribeParams = {
76
+ families?: string[];
77
+ };
78
+ export type ArtifactExportParams = {
79
+ outputPath: string;
80
+ };
81
+ export type StreamRequestPolicySetParams = {
82
+ mode: StreamRequestPolicyMode;
83
+ };
84
+ export type DebugTokenQrcodeParams = {
85
+ payload: string;
86
+ outputStem?: string;
87
+ };
88
+ export declare class HostProtocolError extends Error {
89
+ readonly reasonCode: string;
90
+ readonly retryable: boolean;
91
+ constructor(reasonCode: string, message: string, retryable: boolean);
92
+ }
93
+ export declare function parseRequest(message: string): JsonRpcRequest;
94
+ export declare function toParamsRecord(params: unknown): Record<string, unknown>;
95
+ export declare function parseServiceStartParams(params: Record<string, unknown>): ServiceStartParams;
96
+ export declare function parseConnectionConnectParams(params: Record<string, unknown>): ConnectionConnectParams;
97
+ export declare function parseStreamSendStartParams(params: Record<string, unknown>): StreamSendStartParams;
98
+ export declare function parseStreamStopParams(params: Record<string, unknown>): StreamStopParams;
99
+ export declare function parseStreamReceiveStartParams(params: Record<string, unknown>): StreamReceiveStartParams;
100
+ export declare function parseOutputAttachParams(params: Record<string, unknown>): OutputAttachParams;
101
+ export declare function parseOutputDetachParams(params: Record<string, unknown>): OutputDetachParams;
102
+ export declare function parseCommandSendParams(params: Record<string, unknown>): CommandSendParams;
103
+ export declare function parseEventsSubscribeParams(params: Record<string, unknown>): EventsSubscribeParams;
104
+ export declare function parseArtifactExportParams(params: Record<string, unknown>): ArtifactExportParams;
105
+ export declare function parseStreamRequestPolicySetParams(params: Record<string, unknown>): StreamRequestPolicySetParams;
106
+ export declare function parseDebugTokenQrcodeParams(params: Record<string, unknown>): DebugTokenQrcodeParams;
107
+ export declare function normalizeError(error: unknown): HostProtocolError;