tirtc-devtools-cli 0.0.13 → 0.0.15

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 (137) hide show
  1. package/README.md +42 -46
  2. package/USAGE.md +87 -312
  3. package/dist/cli/src/embedded_paths.d.ts +0 -2
  4. package/dist/cli/src/embedded_paths.js +3 -25
  5. package/dist/cli/src/index.js +82 -584
  6. package/dist/cli/src/role_driver.d.ts +33 -0
  7. package/dist/cli/src/role_driver.js +500 -0
  8. package/dist/cli/src/token_command.js +4 -2
  9. package/dist/cli/src/token_issue.d.ts +9 -0
  10. package/dist/cli/src/token_issue.js +138 -0
  11. package/dist/cli/src/token_tool.d.ts +2 -4
  12. package/dist/cli/src/token_tool.js +12 -186
  13. package/package.json +3 -2
  14. package/vendor/devtools/driver/macos-arm64/devtools_driver_probe +0 -0
  15. package/vendor/devtools/driver/macos-arm64/runtime_validation_client_bin +0 -0
  16. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio.h +56 -2
  17. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io.h +9 -0
  18. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/av.h +52 -0
  19. package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/error.h +11 -0
  20. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_downlink.h +11 -5
  21. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_uplink.h +4 -0
  22. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/transport.h +52 -15
  23. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/trp.h +7 -5
  24. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_codec.h +41 -0
  25. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io.h +7 -0
  26. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_android.h +2 -0
  27. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
  28. package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
  29. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_foundation_http.a +0 -0
  30. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_foundation_logging.a +0 -0
  31. package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
  32. package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
  33. package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
  34. package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/manifest.txt +20 -25
  35. package/vendor/runtime/script/prepare_runtime_media_dataset.sh +308 -12
  36. package/dist/app-server/protocol-client/index.d.ts +0 -25
  37. package/dist/app-server/protocol-client/index.js +0 -114
  38. package/dist/cli/src/bootstrap_flows.d.ts +0 -46
  39. package/dist/cli/src/bootstrap_flows.js +0 -249
  40. package/dist/cli/src/config.d.ts +0 -26
  41. package/dist/cli/src/config.js +0 -62
  42. package/dist/cli/src/facade.d.ts +0 -430
  43. package/dist/cli/src/facade.js +0 -170
  44. package/dist/cli/src/guide.d.ts +0 -1
  45. package/dist/cli/src/guide.js +0 -48
  46. package/dist/cli/src/session_manager.d.ts +0 -25
  47. package/dist/cli/src/session_manager.js +0 -391
  48. package/dist/cli/src/transport.d.ts +0 -30
  49. package/dist/cli/src/transport.js +0 -84
  50. package/vendor/app-server/bin/native/linux-x64/credential_napi.node +0 -0
  51. package/vendor/app-server/bin/native/macos-arm64/credential_napi.node +0 -0
  52. package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/credential.h +0 -34
  53. package/vendor/app-server/bin/runtime/linux-x64/lib/libcrypto.a +0 -0
  54. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_credential.a +0 -0
  55. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_http.a +0 -0
  56. package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_logging.a +0 -0
  57. package/vendor/app-server/bin/runtime/linux-x64/lib/libssl.a +0 -0
  58. package/vendor/app-server/bin/runtime/linux-x64/lib/libxlog.a +0 -0
  59. package/vendor/app-server/bin/runtime/linux-x64/manifest.txt +0 -4
  60. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/credential.h +0 -34
  61. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/error.h +0 -52
  62. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/foundation/build_info.h +0 -27
  63. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/http.h +0 -57
  64. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/logging.h +0 -55
  65. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_av_sync.h +0 -61
  66. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_source.h +0 -77
  67. package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_live_source.h +0 -71
  68. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_credential.a +0 -0
  69. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
  70. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
  71. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
  72. package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
  73. package/vendor/app-server/bin/tirtc-devtool-host.js +0 -2
  74. package/vendor/app-server/dist/host/ArtifactManager.d.ts +0 -18
  75. package/vendor/app-server/dist/host/ArtifactManager.js +0 -98
  76. package/vendor/app-server/dist/host/HostCommandCoordinator.d.ts +0 -19
  77. package/vendor/app-server/dist/host/HostCommandCoordinator.js +0 -196
  78. package/vendor/app-server/dist/host/HostProtocol.d.ts +0 -103
  79. package/vendor/app-server/dist/host/HostProtocol.js +0 -239
  80. package/vendor/app-server/dist/host/HostServer.d.ts +0 -52
  81. package/vendor/app-server/dist/host/HostServer.js +0 -727
  82. package/vendor/app-server/dist/host/HostState.d.ts +0 -69
  83. package/vendor/app-server/dist/host/HostState.js +0 -19
  84. package/vendor/app-server/dist/host/RuntimeAdapter.d.ts +0 -95
  85. package/vendor/app-server/dist/host/RuntimeAdapter.js +0 -636
  86. package/vendor/app-server/dist/host/RuntimeReceiveWorker.d.ts +0 -37
  87. package/vendor/app-server/dist/host/RuntimeReceiveWorker.js +0 -186
  88. package/vendor/app-server/dist/host/RuntimeSendWorker.d.ts +0 -58
  89. package/vendor/app-server/dist/host/RuntimeSendWorker.js +0 -438
  90. package/vendor/app-server/dist/host/TokenTool.d.ts +0 -15
  91. package/vendor/app-server/dist/host/TokenTool.js +0 -84
  92. package/vendor/app-server/dist/host/WebPreviewGateway.d.ts +0 -28
  93. package/vendor/app-server/dist/host/WebPreviewGateway.js +0 -815
  94. package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.d.ts +0 -23
  95. package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.js +0 -115
  96. package/vendor/app-server/dist/host/native/RuntimeHostBridge.d.ts +0 -32
  97. package/vendor/app-server/dist/host/native/RuntimeHostBridge.js +0 -157
  98. package/vendor/app-server/dist/host/runtime_backed_preflight.d.ts +0 -10
  99. package/vendor/app-server/dist/host/runtime_backed_preflight.js +0 -78
  100. package/vendor/app-server/dist/host/tests/helpers/host_socket_client.d.ts +0 -28
  101. package/vendor/app-server/dist/host/tests/helpers/host_socket_client.js +0 -85
  102. package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.d.ts +0 -10
  103. package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.js +0 -41
  104. package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.d.ts +0 -11
  105. package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.js +0 -32
  106. package/vendor/app-server/dist/protocol/contract.d.ts +0 -1128
  107. package/vendor/app-server/dist/protocol/contract.js +0 -217
  108. package/vendor/app-server/dist/protocol-client/index.d.ts +0 -25
  109. package/vendor/app-server/dist/protocol-client/index.js +0 -114
  110. package/vendor/app-server/dist/src/index.d.ts +0 -1
  111. package/vendor/app-server/dist/src/index.js +0 -294
  112. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_codec.h +0 -0
  113. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_frame.h +0 -0
  114. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_android.h +0 -0
  115. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_apple.h +0 -0
  116. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_harmony.h +0 -0
  117. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_windows.h +0 -0
  118. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_processing.h +0 -0
  119. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_sample_rate.h +0 -0
  120. /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/foundation/build_info.h +0 -0
  121. /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/http.h +0 -0
  122. /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/logging.h +0 -0
  123. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_codec.h +0 -0
  124. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_frame.h +0 -0
  125. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_apple.h +0 -0
  126. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_harmony.h +0 -0
  127. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_windows.h +0 -0
  128. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_processing.h +0 -0
  129. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libTGTRP.a +0 -0
  130. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libTiRTC.a +0 -0
  131. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libcrypto.a +0 -0
  132. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libcrypto.dylib +0 -0
  133. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libssl.a +0 -0
  134. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libssl.dylib +0 -0
  135. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libtgrtc.dylib +0 -0
  136. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libwebrtc_apm.a +0 -0
  137. /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libxlog.a +0 -0
@@ -5,7 +5,9 @@
5
5
 
6
6
  #include "tirtc/audio_frame.h"
7
7
  #include "tirtc/audio_io.h"
8
+ #include "tirtc/audio_processing.h"
8
9
  #include "tirtc/error.h"
10
+ #include "tirtc/video_codec.h"
9
11
  #include "tirtc/video_frame.h"
10
12
  #include "tirtc/video_io.h"
11
13
 
@@ -20,17 +22,19 @@ typedef enum TirtcMediaDownlinkState {
20
22
  TIRTC_MEDIA_DOWNLINK_STATE_IDLE = 0,
21
23
  TIRTC_MEDIA_DOWNLINK_STATE_RENDERING = 1,
22
24
  TIRTC_MEDIA_DOWNLINK_STATE_BUFFERING = 2,
23
- TIRTC_MEDIA_DOWNLINK_STATE_PAUSED = 3,
24
- TIRTC_MEDIA_DOWNLINK_STATE_COMPLETED = 4,
25
- TIRTC_MEDIA_DOWNLINK_STATE_FAILED = 5,
25
+ TIRTC_MEDIA_DOWNLINK_STATE_FAILED = 3,
26
26
  } TirtcMediaDownlinkState;
27
27
 
28
28
  typedef struct TirtcMediaDownlinkAudioOptions {
29
29
  uint32_t volume_percent;
30
- int gain_level;
31
- int noise_reduction_level;
30
+ TirtcAudioAgcLevel agc_level;
31
+ TirtcAudioAnsLevel ans_level;
32
32
  } TirtcMediaDownlinkAudioOptions;
33
33
 
34
+ typedef struct TirtcMediaDownlinkVideoOptions {
35
+ TirtcVideoDecoderPreference decoder_preference;
36
+ } TirtcMediaDownlinkVideoOptions;
37
+
34
38
  typedef struct TirtcMediaDownlinkAudioObserver {
35
39
  void (*on_state_changed)(TirtcMediaDownlinkAudio* downlink, TirtcMediaDownlinkState state,
36
40
  TirtcError error, void* user_data);
@@ -111,6 +115,8 @@ void tirtc_media_downlink_video_release(TirtcMediaDownlinkVideo* downlink);
111
115
  void tirtc_media_downlink_video_destroy(TirtcMediaDownlinkVideo* downlink);
112
116
  TirtcError tirtc_media_downlink_video_set_vout(TirtcMediaDownlinkVideo* downlink,
113
117
  TirtcVideoVout* vout);
118
+ TirtcError tirtc_media_downlink_video_set_options(TirtcMediaDownlinkVideo* downlink,
119
+ const TirtcMediaDownlinkVideoOptions* options);
114
120
  TirtcError tirtc_media_downlink_video_set_observer(TirtcMediaDownlinkVideo* downlink,
115
121
  const TirtcMediaDownlinkVideoObserver* observer,
116
122
  void* user_data);
@@ -8,6 +8,7 @@
8
8
  #include "tirtc/audio_processing.h"
9
9
  #include "tirtc/error.h"
10
10
  #include "tirtc/media_codec.h"
11
+ #include "tirtc/video_codec.h"
11
12
  #include "tirtc/video_frame.h"
12
13
  #include "tirtc/video_io.h"
13
14
 
@@ -40,6 +41,7 @@ typedef struct TirtcMediaUplinkVideoOptions {
40
41
  uint32_t height;
41
42
  uint32_t fps;
42
43
  uint32_t bitrate_kbps;
44
+ TirtcVideoEncoderPreference encoder_preference;
43
45
  } TirtcMediaUplinkVideoOptions;
44
46
 
45
47
  typedef struct TirtcMediaUplinkAudioSink {
@@ -108,6 +110,8 @@ TirtcError tirtc_media_uplink_video_get_output_size(TirtcMediaUplinkVideo* uplin
108
110
  TirtcError tirtc_media_uplink_video_request_key_frame(TirtcMediaUplinkVideo* uplink);
109
111
  TirtcError tirtc_media_uplink_video_start(TirtcMediaUplinkVideo* uplink);
110
112
  TirtcError tirtc_media_uplink_video_stop(TirtcMediaUplinkVideo* uplink);
113
+ TirtcError tirtc_media_uplink_video_submit_encoded_frame(TirtcMediaUplinkVideo* uplink,
114
+ const TirtcVideoEncodedFrame* frame);
111
115
 
112
116
  #ifdef __cplusplus
113
117
  }
@@ -82,14 +82,42 @@ typedef enum TirtcTransportAudioSample {
82
82
  #define TIRTC_TRANSPORT_FRAME_FLAG_KEY_FRAME 0x01
83
83
 
84
84
  /**
85
- * @brief Opaque descriptor payload passed to transport backend.
86
- */
87
- typedef struct TirtcTransportDescriptor {
88
- /** Pointer to descriptor bytes. */
89
- const void* data;
90
- /** Descriptor byte length. */
91
- size_t length;
92
- } TirtcTransportDescriptor;
85
+ * @brief Network type hint passed to the transport backend.
86
+ */
87
+ typedef enum TirtcTransportNetworkType {
88
+ /** Use the backend default network behavior. */
89
+ TIRTC_TRANSPORT_NETWORK_TYPE_DEFAULT = 0,
90
+ /** Wi-Fi network path. */
91
+ TIRTC_TRANSPORT_NETWORK_TYPE_WIFI = 1,
92
+ /** 4G cellular network path. */
93
+ TIRTC_TRANSPORT_NETWORK_TYPE_4G = 2,
94
+ } TirtcTransportNetworkType;
95
+
96
+ /**
97
+ * @brief Transport runtime options shared by service and outgoing connection paths.
98
+ */
99
+ typedef struct TirtcTransportRuntimeOptions {
100
+ /** Required service endpoint URL. */
101
+ const char* endpoint;
102
+ /** Optional network type hint. Zero-initialized options use the backend default. */
103
+ TirtcTransportNetworkType network_type;
104
+ /** Non-zero enables backend wakeup support. */
105
+ uint8_t wakeup_enabled;
106
+ /** Non-zero enables restricted-network mode. */
107
+ uint8_t restricted_network;
108
+ } TirtcTransportRuntimeOptions;
109
+
110
+ /**
111
+ * @brief Connect-parameter cache policy for outgoing connections.
112
+ */
113
+ typedef enum TirtcTransportConnectCacheMode {
114
+ /** Use backend default cache policy. */
115
+ TIRTC_TRANSPORT_CONNECT_CACHE_DEFAULT = 0,
116
+ /** Disable backend connection-parameter cache. */
117
+ TIRTC_TRANSPORT_CONNECT_CACHE_DISABLED = 1,
118
+ /** Enable backend connection-parameter cache. */
119
+ TIRTC_TRANSPORT_CONNECT_CACHE_ENABLED = 2,
120
+ } TirtcTransportConnectCacheMode;
93
121
 
94
122
  typedef struct TirtcTransportConnService TirtcTransportConnService;
95
123
  typedef struct TirtcTransportConn TirtcTransportConn;
@@ -98,8 +126,11 @@ typedef struct TirtcTransportConn TirtcTransportConn;
98
126
  * @brief Options for starting service runtime.
99
127
  */
100
128
  typedef struct TirtcTransportConnServiceOptions {
101
- /** Required transport descriptor for service runtime. */
102
- const TirtcTransportDescriptor* descriptor;
129
+ /** Required service license. */
130
+ const char* license;
131
+
132
+ /** Required runtime options. */
133
+ TirtcTransportRuntimeOptions runtime_options;
103
134
 
104
135
  /**
105
136
  * @brief Maximum number of concurrently accepted connections for this
@@ -117,10 +148,16 @@ typedef struct TirtcTransportConnServiceOptions {
117
148
  * @brief Options for creating outgoing connection.
118
149
  */
119
150
  typedef struct TirtcTransportConnOptions {
120
- /** Target peer identifier. */
121
- const char* peer_id;
122
- /** Required transport descriptor for client connection. */
123
- const TirtcTransportDescriptor* descriptor;
151
+ /** Target remote identifier. */
152
+ const char* remote_id;
153
+ /** Required one-shot bootstrap token. */
154
+ const char* token;
155
+ /** Required runtime options. */
156
+ TirtcTransportRuntimeOptions runtime_options;
157
+ /** Backend connection-parameter cache policy. */
158
+ TirtcTransportConnectCacheMode connect_cache_mode;
159
+ /** Non-zero asks backend to try cached connect parameters before the explicit token. */
160
+ uint8_t prefer_cached_connect_params;
124
161
  } TirtcTransportConnOptions;
125
162
 
126
163
  /**
@@ -271,7 +308,7 @@ TirtcError tirtc_transport_enable_debug(uint8_t enabled);
271
308
  void tirtc_transport_uninit(void);
272
309
 
273
310
  /**
274
- * @brief Start service runtime with descriptor and service observer.
311
+ * @brief Start service runtime with typed options and service observer.
275
312
  */
276
313
  TirtcError tirtc_transport_conn_service_start(const TirtcTransportConnServiceOptions* options,
277
314
  const TirtcTransportConnServiceCallbacks* callbacks,
@@ -14,14 +14,16 @@
14
14
  extern "C" {
15
15
  #endif
16
16
 
17
- typedef struct TirtcOptions {
17
+ typedef struct TirtcInitOptions {
18
+ const char* app_id;
19
+
18
20
  const char* endpoint;
19
21
 
20
22
  const char* log_root_dir;
21
23
 
22
- int enable_console_log;
24
+ int console_log_enabled;
23
25
 
24
- } TirtcOptions;
26
+ } TirtcInitOptions;
25
27
 
26
28
  typedef enum TirtcMediaSendPolicy {
27
29
 
@@ -39,7 +41,7 @@ typedef struct TirtcConnServiceStartOptions {
39
41
  } TirtcConnServiceStartOptions;
40
42
 
41
43
  typedef struct TirtcConnConnectOptions {
42
- const char* peer_id;
44
+ const char* remote_id;
43
45
 
44
46
  const char* token;
45
47
  } TirtcConnConnectOptions;
@@ -134,7 +136,7 @@ typedef struct TirtcConnCallbacks {
134
136
  TirtcOwnedBytes* owned_payload, void* user_data);
135
137
  } TirtcConnCallbacks;
136
138
 
137
- TirtcError tirtc_init(const TirtcOptions* options);
139
+ TirtcError tirtc_init(const TirtcInitOptions* options);
138
140
 
139
141
  void tirtc_uninit(void);
140
142
 
@@ -14,6 +14,30 @@ extern "C" {
14
14
  typedef struct TirtcVideoEncoder TirtcVideoEncoder;
15
15
  typedef struct TirtcVideoDecoder TirtcVideoDecoder;
16
16
 
17
+ typedef enum TirtcVideoEncoderPreference {
18
+ TIRTC_VIDEO_ENCODER_PREFERENCE_AUTO = 0,
19
+ TIRTC_VIDEO_ENCODER_PREFERENCE_SOFTWARE = 1,
20
+ TIRTC_VIDEO_ENCODER_PREFERENCE_HARDWARE = 2,
21
+ } TirtcVideoEncoderPreference;
22
+
23
+ typedef enum TirtcVideoDecoderPreference {
24
+ TIRTC_VIDEO_DECODER_PREFERENCE_AUTO = 0,
25
+ TIRTC_VIDEO_DECODER_PREFERENCE_SOFTWARE = 1,
26
+ TIRTC_VIDEO_DECODER_PREFERENCE_HARDWARE = 2,
27
+ } TirtcVideoDecoderPreference;
28
+
29
+ typedef enum TirtcVideoEncoderBackendKind {
30
+ TIRTC_VIDEO_ENCODER_BACKEND_KIND_SOFTWARE = 1,
31
+ TIRTC_VIDEO_ENCODER_BACKEND_KIND_HARDWARE = 2,
32
+ } TirtcVideoEncoderBackendKind;
33
+
34
+ typedef struct TirtcVideoEncoderRuntimeInfo {
35
+ TirtcVideoEncoderBackendKind actual_backend;
36
+ TirtcVideoEncoderPreference requested_encoder_preference;
37
+ int did_fallback;
38
+ TirtcVideoPixelFormat resolved_input_pixel_format;
39
+ } TirtcVideoEncoderRuntimeInfo;
40
+
17
41
  typedef struct TirtcVideoEncoderConfig {
18
42
  TirtcMediaCodec codec;
19
43
  TirtcVideoBitstreamFormat bitstream_format;
@@ -22,6 +46,14 @@ typedef struct TirtcVideoEncoderConfig {
22
46
  uint32_t fps;
23
47
  uint32_t bitrate_kbps;
24
48
  TirtcVideoPixelFormat input_pixel_format;
49
+ /**
50
+ * Selects the encoder backend family before the encoder is created.
51
+ *
52
+ * Zero-initialized configs use `AUTO`, which currently preserves the software encoder path.
53
+ * `HARDWARE` is strict: if the requested hardware backend is unavailable or cannot initialize,
54
+ * create fails with a video encoder error instead of falling back to software.
55
+ */
56
+ TirtcVideoEncoderPreference encoder_preference;
25
57
  } TirtcVideoEncoderConfig;
26
58
 
27
59
  typedef struct TirtcVideoDecoderConfig {
@@ -35,6 +67,15 @@ TirtcError tirtc_video_encoder_create(const TirtcVideoEncoderConfig* config,
35
67
  void tirtc_video_encoder_destroy(TirtcVideoEncoder* encoder);
36
68
  TirtcError tirtc_video_encoder_reset(TirtcVideoEncoder* encoder);
37
69
  TirtcError tirtc_video_encoder_request_key_frame(TirtcVideoEncoder* encoder);
70
+ /**
71
+ * Returns the backend decision made during encoder creation.
72
+ *
73
+ * `out_info` is caller-owned storage. The function writes a value copy and does not allocate or
74
+ * transfer ownership. It may be called after successful create and before destroy, including while
75
+ * another thread is using the encoder through the normal encode/control API.
76
+ */
77
+ TirtcError tirtc_video_encoder_get_runtime_info(const TirtcVideoEncoder* encoder,
78
+ TirtcVideoEncoderRuntimeInfo* out_info);
38
79
  TirtcError tirtc_video_encoder_encode(TirtcVideoEncoder* encoder,
39
80
  const TirtcVideoPixelFrame* in_frame, void* out_buffer,
40
81
  size_t out_buffer_capacity,
@@ -21,6 +21,11 @@ typedef struct TirtcVideoIoConfig {
21
21
  TirtcVideoPixelFormat pixel_format;
22
22
  } TirtcVideoIoConfig;
23
23
 
24
+ typedef struct TirtcVideoHeadlessVoutOptions {
25
+ const char* first_frame_json_path;
26
+ const char* first_frame_raw_path;
27
+ } TirtcVideoHeadlessVoutOptions;
28
+
24
29
  typedef void (*TirtcVideoVinOnFrameFn)(TirtcVideoVin* vin, const TirtcVideoPixelFrame* frame,
25
30
  void* user_data);
26
31
 
@@ -33,6 +38,8 @@ TirtcError tirtc_video_vin_close(TirtcVideoVin* vin);
33
38
  void tirtc_video_vin_destroy(TirtcVideoVin* vin);
34
39
 
35
40
  TirtcError tirtc_video_vout_open(TirtcVideoVout* vout, const TirtcVideoIoConfig* config);
41
+ TirtcError tirtc_video_vout_create_headless_capture(const TirtcVideoHeadlessVoutOptions* options,
42
+ TirtcVideoVout** out_vout);
36
43
  TirtcError tirtc_video_vout_get_actual_config(TirtcVideoVout* vout, TirtcVideoIoConfig* out_config);
37
44
  TirtcError tirtc_video_vout_render_frame(TirtcVideoVout* vout, const TirtcVideoPixelFrame* frame);
38
45
  TirtcError tirtc_video_vout_flush(TirtcVideoVout* vout);
@@ -18,6 +18,8 @@ typedef enum TirtcVideoAndroidVoutRenderer {
18
18
  typedef struct TirtcVideoAndroidSurfaceTextureVoutOptions {
19
19
  struct ANativeWindow* native_window;
20
20
  TirtcVideoAndroidVoutRenderer renderer;
21
+ const char* h264_decoder_name;
22
+ const char* h265_decoder_name;
21
23
  } TirtcVideoAndroidSurfaceTextureVoutOptions;
22
24
 
23
25
  TirtcError tirtc_video_android_create_surface_texture_vout(TirtcVideoVout** out_vout);
@@ -1,36 +1,32 @@
1
1
  platform=macos-arm64
2
- profile=credential
3
- staged_at_utc=2026-04-23T07:09:53Z
2
+ profile=full
3
+ staged_at_utc=2026-04-30T07:29:42Z
4
4
  source_sdk=/Users/allenfeng/Development/Repositories/tirtc-nexus/tirtc-matrix/.build/sdk/macos-arm64
5
5
 
6
- 959ad21722979cf6a26ab90aaa32102d2496cc4bf7eed33c29da5c752d0c9893 include/tirtc/audio.h
6
+ e962631f85675937fd973797720466fd75717f74335c8102c664814d59179113 include/tirtc/audio.h
7
7
  6d972ccfe150a3b4f2d7f18fa92b3ade9210c1c8bb754d061ac6b7997b59e2cb include/tirtc/audio_codec.h
8
8
  7bacbdb2d8bb10d6444036a8fef42f2a8e3ea34dfc38e165ee678d61f189db41 include/tirtc/audio_frame.h
9
- 84f1bbe67efa15ab3b2d995d661025aac43e2fe547a14a012a24d89cfe3cb859 include/tirtc/audio_io.h
9
+ fb8ea35263167c33487bd3aa503c26ed2dfbf97877f7bda92c10065cd5c97c13 include/tirtc/audio_io.h
10
10
  c2e1f31dcc75be461c577d18b1cebe32774f212d51cb4dd2a5b5a9bfe62b693e include/tirtc/audio_io_android.h
11
11
  878bb18220ac62304ec95807f31e83e050c8dac14811f873454f9b045028694a include/tirtc/audio_io_apple.h
12
12
  0569eb1d043ee7fa8d45ca43143eca1a22e4c4bf1507ca7e045e010a3ecbc288 include/tirtc/audio_io_harmony.h
13
13
  51cbc911fe9f9834046f0e0a1a7cdd814a8e194a615894a8b4d11f9e5f095610 include/tirtc/audio_io_windows.h
14
14
  21f60729117260a44af22c1af986ef17d22673b102b7b7a035f492d0665cce16 include/tirtc/audio_processing.h
15
15
  0ca7c3c630b1242f51a0fd8154097c0a332b4c816a5707090e4381719852998c include/tirtc/audio_sample_rate.h
16
- 42a84eb93594b9e30d98ebd2eaf829b023a0f45433cd487a523c171f0dd4ced1 include/tirtc/av.h
17
- 4198c95c48ae579d1c782635b00fa5c9009d0c56ba466e6e3873e8298faae029 include/tirtc/credential.h
18
- fbab0b33a735aedd07284a4f1f839bd3a6613707830a18487cad5596dd47d529 include/tirtc/error.h
16
+ 94f378da8bc728a1b9a44fbe74a0367b06ad2401ae55fa5bb6bee63b447ce511 include/tirtc/av.h
17
+ 70d0e950f78309e12c927b37a6f7184fe3724edc5391176a697f7d7c7f49ab5a include/tirtc/error.h
19
18
  ae805545a9515edc9b94262e72ad2c7b7d649288166f4daeb450d8a55e82ae0b include/tirtc/foundation/build_info.h
20
19
  7cf8b372a3d48d4de4a65a04c7f102281a7b42cebb9ec247853d3c53afb63b6a include/tirtc/http.h
21
20
  70bbf93b84d9d1a85f376d9986de570c1f658319e1e5ab6d621f7a4d41033f5c include/tirtc/logging.h
22
21
  7e2f7f81afe37e22f5414d9db32438edd948ff775230c3a0a17ff9ac1a0b560e include/tirtc/media_codec.h
23
- b541637a57758af98f87700ec3e929edcaa064ca7604ab45dd292ea5ad48f647 include/tirtc/media_downlink.h
24
- 21ef53b4d120aab600168c4082e7622c791ab4929fb20b3fb31f73ed01eee02a include/tirtc/media_fixture_av_sync.h
25
- 037d9a581cef71afe9233456b1f4ef866c3739150532f3c30a67d361e8af9eef include/tirtc/media_fixture_source.h
26
- a4f8ab44c1a20ad37f250363a403a9d4d007e61ddb2426c7966dbc05f6a04b4f include/tirtc/media_live_source.h
27
- 1b3be6954e547f91a047866438bff1820c8406afaf91cef68ddee29a6ac70234 include/tirtc/media_uplink.h
28
- 26b831c7b8bd69b7699017427f3243cd22393c90c9518a820f5eb87eb3792483 include/tirtc/transport.h
29
- f664c51d7df17b50f27f64d489c74d0647624b5cce1493b3df90bb6b508bf0ca include/tirtc/trp.h
30
- dff5b0a0ac4a40ad17c93e1e56b3c416371c81ab365e287ea8cd6ce37ccbed3b include/tirtc/video_codec.h
22
+ 0d1c3a8d1537a839cb6050fe5b35079087f094673dd9eb5b4d9acdcc9a2dd5fc include/tirtc/media_downlink.h
23
+ e64191a39004165cdcd11b2ca824af34d4bfe02f7ec3c3101fa9291f56488c30 include/tirtc/media_uplink.h
24
+ 489f6c9caa3e4094566b660ef0a002a39c66c1956ef0a1bdb6eacca3798c849a include/tirtc/transport.h
25
+ bb9c1bf46f2ab51a9f7adb211276c8563b09e7968031c0c6abeebc0eddd66acb include/tirtc/trp.h
26
+ 118593dd6e57d1a982c4b861e7d26f066a4eb4b5f2e152dbf7b7205d87b467f2 include/tirtc/video_codec.h
31
27
  e51379666c199588cc33279ccf52248035d1cae3d1d468b1615ebf29f0b39c9c include/tirtc/video_frame.h
32
- d920afad955b9f206b02b19ca152315190fa84ab6f24e895a5b24c3ab9ffd701 include/tirtc/video_io.h
33
- 9294d144dbc56415ddbc06c68a26b4a662b51a3808f49ded81a37776ad243293 include/tirtc/video_io_android.h
28
+ 2a02645d82c58d433c7306a9f0bcd31d0f3e560b63822f7e80919761b81a6284 include/tirtc/video_io.h
29
+ 9930dce5e8e2b12a1ab28ee91f3fb46f6cf3487e515ea2b4ec0e00009bd5f070 include/tirtc/video_io_android.h
34
30
  005114b9213ec826e18d11eca4b9d65cce2ca0e7c781f03d85292365d9d5dfdd include/tirtc/video_io_apple.h
35
31
  cae0bbeb884e5466a56da15182c78cc22baab6c743f349a58d3595f623333585 include/tirtc/video_io_harmony.h
36
32
  65b5d24fe3a6bc2a299a2220148a153ba4eb0955a49c1c3baabf1fdfed8aabdd include/tirtc/video_io_windows.h
@@ -39,14 +35,13 @@ cae0bbeb884e5466a56da15182c78cc22baab6c743f349a58d3595f623333585 include/tirtc/
39
35
  8db86d6714264047e8fd4086ddd7315722d675749719e6175f89eb5a636b48a1 lib/libTiRTC.a
40
36
  b39daee6a3d39bf0ca20c45084601133c4198de8dca848dcff6dd9c70ae99016 lib/libcrypto.a
41
37
  c052857ef315e3d61db9c862cad10709a3a6b2487dc41799cbe4d74a805de875 lib/libcrypto.dylib
42
- 797a8b58938be816650925cbec1a947e5765464625326a1a57ac66c9328b64f4 lib/libmatrix_runtime_audio.a
43
- b822f5666456bbc62d17dfc3585a75c9bbfda07f3f768c74e3fed457f945422e lib/libmatrix_runtime_credential.a
44
- d42e207ee2f1ab2233a30cfd0294ef8bb467c1d9c7c21a01f74d4422aab32c1d lib/libmatrix_runtime_facade.a
45
- 8c4f3e214392b4542cee913221ab27f75618da4e4caecb22874cb7cc06659ace lib/libmatrix_runtime_foundation_http.a
46
- 0672955c878a537a94d9ffd7089add8fe226bcecb2fd192929a28f69a8915f0e lib/libmatrix_runtime_foundation_logging.a
47
- fea63056a3c41fa9055cd537dc9e7b0203d8411a3084f63d9b6623349eff1ec6 lib/libmatrix_runtime_media.a
48
- d5fffd76c16881c68d984284c8bb6872d5df71ec7e3f2c345ee8cf7dd7aa5d35 lib/libmatrix_runtime_transport.a
49
- f2b3fcca7d07c10fec6bd01ba18adabedd3e68489a7ef5786bf8d2bb85148d25 lib/libmatrix_runtime_video.a
38
+ 4d88c4089e7cffec1087ea5c1f4dfd35c2b13317f6000f034ddd6880ffed3871 lib/libmatrix_runtime_audio.a
39
+ e3c58d5093b7300c4286c9fc422b73bcaa1b6b1a3d6296453d89ae048acca0d1 lib/libmatrix_runtime_facade.a
40
+ 1237b2e2c3cdd4200bd49e26377c930f5584a8d88278416c18eb90bbe97fc76c lib/libmatrix_runtime_foundation_http.a
41
+ c2219b645ef42db2220f148d2ebd4646c6fd998733b76633be7869865087473d lib/libmatrix_runtime_foundation_logging.a
42
+ 660a52af5ceb951ff99a25a250c07458401b3f48dbfc21d901a6b49d25c8cf5c lib/libmatrix_runtime_media.a
43
+ 0ba5f360e11b2fff11ae57b0dd5a3499eaa5d55782fa6561599dc1924aabc22e lib/libmatrix_runtime_transport.a
44
+ 438133c4d86ab4ff52d9e9fee6f37c1e4b31e8db36af3c6a0917326767b93dc9 lib/libmatrix_runtime_video.a
50
45
  c11c65d373a127028350c41fa58cd2d1223f2b5d70a84e13b115d90daaba25ca lib/libssl.a
51
46
  ef1c1104bbdd2528ed7b958fb7252bd6249875f92300b0c9577d6c4bd6c0d88a lib/libssl.dylib
52
47
  e14e846e43d64e240fa0e5745bf4e702b79d0f2442e7f768beb990610735c71b lib/libtgrtc.dylib