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.
- package/README.md +42 -46
- package/USAGE.md +87 -312
- package/dist/cli/src/embedded_paths.d.ts +0 -2
- package/dist/cli/src/embedded_paths.js +3 -25
- package/dist/cli/src/index.js +82 -584
- package/dist/cli/src/role_driver.d.ts +33 -0
- package/dist/cli/src/role_driver.js +500 -0
- package/dist/cli/src/token_command.js +4 -2
- package/dist/cli/src/token_issue.d.ts +9 -0
- package/dist/cli/src/token_issue.js +138 -0
- package/dist/cli/src/token_tool.d.ts +2 -4
- package/dist/cli/src/token_tool.js +12 -186
- package/package.json +3 -2
- package/vendor/devtools/driver/macos-arm64/devtools_driver_probe +0 -0
- package/vendor/devtools/driver/macos-arm64/runtime_validation_client_bin +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio.h +56 -2
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io.h +9 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/av.h +52 -0
- package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/error.h +11 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_downlink.h +11 -5
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_uplink.h +4 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/transport.h +52 -15
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/trp.h +7 -5
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_codec.h +41 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io.h +7 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_android.h +2 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/manifest.txt +20 -25
- package/vendor/runtime/script/prepare_runtime_media_dataset.sh +308 -12
- package/dist/app-server/protocol-client/index.d.ts +0 -25
- package/dist/app-server/protocol-client/index.js +0 -114
- package/dist/cli/src/bootstrap_flows.d.ts +0 -46
- package/dist/cli/src/bootstrap_flows.js +0 -249
- package/dist/cli/src/config.d.ts +0 -26
- package/dist/cli/src/config.js +0 -62
- package/dist/cli/src/facade.d.ts +0 -430
- package/dist/cli/src/facade.js +0 -170
- package/dist/cli/src/guide.d.ts +0 -1
- package/dist/cli/src/guide.js +0 -48
- package/dist/cli/src/session_manager.d.ts +0 -25
- package/dist/cli/src/session_manager.js +0 -391
- package/dist/cli/src/transport.d.ts +0 -30
- package/dist/cli/src/transport.js +0 -84
- package/vendor/app-server/bin/native/linux-x64/credential_napi.node +0 -0
- package/vendor/app-server/bin/native/macos-arm64/credential_napi.node +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/credential.h +0 -34
- package/vendor/app-server/bin/runtime/linux-x64/lib/libcrypto.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_credential.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libssl.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libxlog.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/manifest.txt +0 -4
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/credential.h +0 -34
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/error.h +0 -52
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/foundation/build_info.h +0 -27
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/http.h +0 -57
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/logging.h +0 -55
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_av_sync.h +0 -61
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_fixture_source.h +0 -77
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_live_source.h +0 -71
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_credential.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_transport.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/app-server/bin/tirtc-devtool-host.js +0 -2
- package/vendor/app-server/dist/host/ArtifactManager.d.ts +0 -18
- package/vendor/app-server/dist/host/ArtifactManager.js +0 -98
- package/vendor/app-server/dist/host/HostCommandCoordinator.d.ts +0 -19
- package/vendor/app-server/dist/host/HostCommandCoordinator.js +0 -196
- package/vendor/app-server/dist/host/HostProtocol.d.ts +0 -103
- package/vendor/app-server/dist/host/HostProtocol.js +0 -239
- package/vendor/app-server/dist/host/HostServer.d.ts +0 -52
- package/vendor/app-server/dist/host/HostServer.js +0 -727
- package/vendor/app-server/dist/host/HostState.d.ts +0 -69
- package/vendor/app-server/dist/host/HostState.js +0 -19
- package/vendor/app-server/dist/host/RuntimeAdapter.d.ts +0 -95
- package/vendor/app-server/dist/host/RuntimeAdapter.js +0 -636
- package/vendor/app-server/dist/host/RuntimeReceiveWorker.d.ts +0 -37
- package/vendor/app-server/dist/host/RuntimeReceiveWorker.js +0 -186
- package/vendor/app-server/dist/host/RuntimeSendWorker.d.ts +0 -58
- package/vendor/app-server/dist/host/RuntimeSendWorker.js +0 -438
- package/vendor/app-server/dist/host/TokenTool.d.ts +0 -15
- package/vendor/app-server/dist/host/TokenTool.js +0 -84
- package/vendor/app-server/dist/host/WebPreviewGateway.d.ts +0 -28
- package/vendor/app-server/dist/host/WebPreviewGateway.js +0 -815
- package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.d.ts +0 -23
- package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.js +0 -115
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.d.ts +0 -32
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.js +0 -157
- package/vendor/app-server/dist/host/runtime_backed_preflight.d.ts +0 -10
- package/vendor/app-server/dist/host/runtime_backed_preflight.js +0 -78
- package/vendor/app-server/dist/host/tests/helpers/host_socket_client.d.ts +0 -28
- package/vendor/app-server/dist/host/tests/helpers/host_socket_client.js +0 -85
- package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.d.ts +0 -10
- package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.js +0 -41
- package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.d.ts +0 -11
- package/vendor/app-server/dist/host/tests/helpers/runtime_test_env.js +0 -32
- package/vendor/app-server/dist/protocol/contract.d.ts +0 -1128
- package/vendor/app-server/dist/protocol/contract.js +0 -217
- package/vendor/app-server/dist/protocol-client/index.d.ts +0 -25
- package/vendor/app-server/dist/protocol-client/index.js +0 -114
- package/vendor/app-server/dist/src/index.d.ts +0 -1
- package/vendor/app-server/dist/src/index.js +0 -294
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_codec.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_frame.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_android.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_apple.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_harmony.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_io_windows.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_processing.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/audio_sample_rate.h +0 -0
- /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/foundation/build_info.h +0 -0
- /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/http.h +0 -0
- /package/vendor/{app-server/bin/runtime/linux-x64 → runtime/macos-arm64}/include/tirtc/logging.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_codec.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_frame.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_apple.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_harmony.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_windows.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_processing.h +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libTGTRP.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libTiRTC.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libcrypto.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libcrypto.dylib +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libssl.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libssl.dylib +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libtgrtc.dylib +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libwebrtc_apm.a +0 -0
- /package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/lib/libxlog.a +0 -0
package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/media_downlink.h
RENAMED
|
@@ -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
|
-
|
|
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
|
-
|
|
31
|
-
|
|
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
|
|
86
|
-
*/
|
|
87
|
-
typedef
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
|
|
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
|
|
102
|
-
const
|
|
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
|
|
121
|
-
const char*
|
|
122
|
-
/** Required
|
|
123
|
-
const
|
|
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
|
|
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
|
|
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
|
|
24
|
+
int console_log_enabled;
|
|
23
25
|
|
|
24
|
-
}
|
|
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*
|
|
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
|
|
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);
|
package/vendor/{app-server/bin/runtime → runtime}/macos-arm64/include/tirtc/video_io_android.h
RENAMED
|
@@ -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);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
platform=macos-arm64
|
|
2
|
-
profile=
|
|
3
|
-
staged_at_utc=2026-04-
|
|
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
|
-
|
|
6
|
+
e962631f85675937fd973797720466fd75717f74335c8102c664814d59179113 include/tirtc/audio.h
|
|
7
7
|
6d972ccfe150a3b4f2d7f18fa92b3ade9210c1c8bb754d061ac6b7997b59e2cb include/tirtc/audio_codec.h
|
|
8
8
|
7bacbdb2d8bb10d6444036a8fef42f2a8e3ea34dfc38e165ee678d61f189db41 include/tirtc/audio_frame.h
|
|
9
|
-
|
|
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
|
-
|
|
17
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
33
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|