tirtc-devtools-cli 0.0.11 → 0.0.12
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 +1 -1
- package/USAGE.md +79 -11
- package/dist/cli/src/guide.js +1 -1
- package/dist/cli/src/index.js +13 -13
- package/dist/cli/src/token_command.js +15 -20
- package/dist/cli/src/token_tool.d.ts +8 -17
- package/dist/cli/src/token_tool.js +24 -29
- package/package.json +1 -1
- 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/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/manifest.txt +1 -1
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio.h +12 -316
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/av.h +11 -372
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/trp.h +47 -325
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
- 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_foundation_http.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_logging.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/runtime/macos-arm64/manifest.txt +12 -12
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** @file trp.h
|
|
2
|
+
* @brief Facade transport-facing public C API.
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
#ifndef TIRTC_FACADE_TRP_H_
|
|
2
6
|
#define TIRTC_FACADE_TRP_H_
|
|
3
7
|
|
|
@@ -10,444 +14,162 @@
|
|
|
10
14
|
extern "C" {
|
|
11
15
|
#endif
|
|
12
16
|
|
|
13
|
-
/**
|
|
14
|
-
* @file tirtc/trp.h
|
|
15
|
-
* @brief Base transport-facing facade API for TiRTC.
|
|
16
|
-
*
|
|
17
|
-
* This header defines the public control-plane contract that every higher
|
|
18
|
-
* facade layer builds on.
|
|
19
|
-
*
|
|
20
|
-
* Typical usage:
|
|
21
|
-
* 1. Call ::tirtc_init once for the process.
|
|
22
|
-
* 2. Either start a service with ::tirtc_conn_service_start, or create a
|
|
23
|
-
* standalone connection with ::tirtc_conn_create and then connect it with
|
|
24
|
-
* ::tirtc_conn_connect.
|
|
25
|
-
* 3. Install callbacks if the caller needs connection, command, or stream
|
|
26
|
-
* events.
|
|
27
|
-
* 4. Exchange stream messages and commands while the connection is alive.
|
|
28
|
-
* 5. Explicitly close resources with the matching stop, disconnect, destroy,
|
|
29
|
-
* and uninit calls.
|
|
30
|
-
*
|
|
31
|
-
* Higher-level headers extend this contract rather than replace it:
|
|
32
|
-
* - `tirtc/audio.h` adds audio input and audio output objects.
|
|
33
|
-
* - `tirtc/av.h` adds video input and video output objects.
|
|
34
|
-
*
|
|
35
|
-
* Ownership model:
|
|
36
|
-
* - The caller owns every public handle returned by this facade.
|
|
37
|
-
* - The runtime owns internal transport and media pipelines.
|
|
38
|
-
* - Public handles must be released with their documented matching API.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @brief Global runtime options passed to ::tirtc_init.
|
|
43
|
-
*
|
|
44
|
-
* The runtime resolves the effective endpoint during initialization and copies
|
|
45
|
-
* the values it needs. String pointers only need to remain valid for the
|
|
46
|
-
* duration of the ::tirtc_init call.
|
|
47
|
-
*/
|
|
48
17
|
typedef struct TirtcOptions {
|
|
49
|
-
/**
|
|
50
|
-
* @brief Optional explicit service endpoint.
|
|
51
|
-
*
|
|
52
|
-
* When non-NULL and not empty, this value overrides the built-in endpoint
|
|
53
|
-
* selected by ::environment.
|
|
54
|
-
*/
|
|
55
18
|
const char* endpoint;
|
|
56
19
|
|
|
57
|
-
/**
|
|
58
|
-
* @brief Optional directory used to initialize file logging.
|
|
59
|
-
*
|
|
60
|
-
* Pass NULL or an empty string to disable file logging.
|
|
61
|
-
*/
|
|
62
20
|
const char* log_root_dir;
|
|
63
21
|
|
|
64
|
-
/**
|
|
65
|
-
* @brief Non-zero to enable console logging; zero to disable it.
|
|
66
|
-
*/
|
|
67
22
|
int enable_console_log;
|
|
68
23
|
|
|
69
|
-
/**
|
|
70
|
-
* @brief Built-in environment selector used when ::endpoint is not supplied.
|
|
71
|
-
*
|
|
72
|
-
* The current implementation recognizes these values:
|
|
73
|
-
* - `0`: test
|
|
74
|
-
* - `1`: pre-production
|
|
75
|
-
* - `2`: production
|
|
76
|
-
*
|
|
77
|
-
* Any other value currently falls back to the production endpoint.
|
|
78
|
-
*/
|
|
79
|
-
int environment;
|
|
80
24
|
} TirtcOptions;
|
|
81
25
|
|
|
82
|
-
/**
|
|
83
|
-
* @brief Default media send policy applied by the facade.
|
|
84
|
-
*
|
|
85
|
-
* The effective send gate still uses `connection + stream_id + media_kind` as
|
|
86
|
-
* the smallest scope. The policy only decides how those gates become open.
|
|
87
|
-
*/
|
|
88
26
|
typedef enum TirtcMediaSendPolicy {
|
|
89
|
-
|
|
90
|
-
* @brief Keep send gates closed until the consumer explicitly opens them.
|
|
91
|
-
*/
|
|
27
|
+
|
|
92
28
|
TIRTC_MEDIA_SEND_POLICY_ON_REQUEST = 0,
|
|
93
29
|
|
|
94
|
-
/**
|
|
95
|
-
* @brief Open send gates automatically once the accepted connection exists.
|
|
96
|
-
*
|
|
97
|
-
* When the bound input is ready, the facade may start sending without first
|
|
98
|
-
* waiting for an explicit remote request.
|
|
99
|
-
*/
|
|
100
30
|
TIRTC_MEDIA_SEND_POLICY_AUTO_ON_CONNECTED = 1,
|
|
101
31
|
} TirtcMediaSendPolicy;
|
|
102
32
|
|
|
103
|
-
/**
|
|
104
|
-
* @brief Options for starting a service-side connection listener.
|
|
105
|
-
*
|
|
106
|
-
* A service accepts inbound transport connections and exposes them through
|
|
107
|
-
* ::TirtcConnServiceCallbacks.on_connected.
|
|
108
|
-
*/
|
|
109
33
|
typedef struct TirtcConnServiceStartOptions {
|
|
110
|
-
/**
|
|
111
|
-
* @brief Non-empty service license string.
|
|
112
|
-
*
|
|
113
|
-
* This field is required.
|
|
114
|
-
*/
|
|
115
34
|
const char* license;
|
|
116
35
|
|
|
117
|
-
/**
|
|
118
|
-
* @brief Maximum number of concurrently accepted connections.
|
|
119
|
-
*
|
|
120
|
-
* This is a service-level capacity contract. It applies to the listener as a
|
|
121
|
-
* whole, not to any single connection and not to any individual stream.
|
|
122
|
-
*
|
|
123
|
-
* This field is required and must be non-zero.
|
|
124
|
-
*/
|
|
125
36
|
uint32_t max_connections;
|
|
126
37
|
|
|
127
|
-
/**
|
|
128
|
-
* @brief Service-level media send policy applied to accepted connections.
|
|
129
|
-
*
|
|
130
|
-
* This policy controls how the facade opens per-connection send gates after
|
|
131
|
-
* a connection becomes available. It does not change the underlying
|
|
132
|
-
* transport request/release primitives.
|
|
133
|
-
*/
|
|
134
38
|
TirtcMediaSendPolicy media_send_policy;
|
|
135
39
|
} TirtcConnServiceStartOptions;
|
|
136
40
|
|
|
137
|
-
/**
|
|
138
|
-
* @brief Options for connecting an outbound connection object.
|
|
139
|
-
*/
|
|
140
41
|
typedef struct TirtcConnConnectOptions {
|
|
141
|
-
/**
|
|
142
|
-
* @brief Remote peer identifier.
|
|
143
|
-
*
|
|
144
|
-
* This field is required and must be non-empty.
|
|
145
|
-
*/
|
|
146
42
|
const char* peer_id;
|
|
147
43
|
|
|
148
|
-
/**
|
|
149
|
-
* @brief Authentication or session token embedded into the transport
|
|
150
|
-
* descriptor.
|
|
151
|
-
*
|
|
152
|
-
* This field is required and must be non-empty.
|
|
153
|
-
*/
|
|
154
44
|
const char* token;
|
|
155
45
|
} TirtcConnConnectOptions;
|
|
156
46
|
|
|
157
|
-
/**
|
|
158
|
-
* @brief Optional callbacks bound when a connection object is created.
|
|
159
|
-
*
|
|
160
|
-
* The implementation copies the callback table and stores the supplied
|
|
161
|
-
* user_data pointer with the created connection handle.
|
|
162
|
-
*/
|
|
163
47
|
typedef struct TirtcConnCreateOptions {
|
|
164
|
-
/** @brief Optional callbacks copied into the new connection object. */
|
|
165
48
|
const struct TirtcConnCallbacks* callbacks;
|
|
166
49
|
|
|
167
|
-
/** @brief Opaque pointer returned to connection callbacks. */
|
|
168
50
|
void* user_data;
|
|
169
51
|
} TirtcConnCreateOptions;
|
|
170
52
|
|
|
171
|
-
/** @brief Opaque handle returned by ::tirtc_conn_service_start. */
|
|
172
53
|
typedef struct TirtcConnService TirtcConnService;
|
|
173
54
|
|
|
174
|
-
/**
|
|
175
|
-
* @brief Opaque connection handle.
|
|
176
|
-
*
|
|
177
|
-
* A handle may come from either ::tirtc_conn_create or a service callback's
|
|
178
|
-
* ::TirtcConnServiceCallbacks.on_connected callback.
|
|
179
|
-
*/
|
|
180
55
|
typedef struct TirtcConn TirtcConn;
|
|
181
56
|
|
|
182
|
-
/**
|
|
183
|
-
* @brief High-level connection state reported through ::TirtcConnCallbacks.
|
|
184
|
-
*/
|
|
185
57
|
typedef enum TirtcConnState {
|
|
186
|
-
|
|
58
|
+
|
|
187
59
|
TIRTC_CONN_STATE_IDLE = 0,
|
|
188
60
|
|
|
189
|
-
/** Connection establishment is in progress. */
|
|
190
61
|
TIRTC_CONN_STATE_CONNECTING = 1,
|
|
191
62
|
|
|
192
|
-
/** Transport is connected and ready for control or media attachment. */
|
|
193
63
|
TIRTC_CONN_STATE_CONNECTED = 2,
|
|
194
64
|
|
|
195
|
-
/** Connection has entered its terminal disconnected state. */
|
|
196
65
|
TIRTC_CONN_STATE_DISCONNECTED = 3,
|
|
197
66
|
} TirtcConnState;
|
|
198
67
|
|
|
199
|
-
/**
|
|
200
|
-
* @brief Binary stream-message payload.
|
|
201
|
-
*
|
|
202
|
-
* Stream messages are intended for lightweight application-defined payloads on
|
|
203
|
-
* stream identifiers that are not currently reserved by attached audio or video
|
|
204
|
-
* routes.
|
|
205
|
-
*/
|
|
206
68
|
typedef struct TirtcStreamMessage {
|
|
207
|
-
/** @brief Sender-defined timestamp in milliseconds. */
|
|
208
69
|
uint32_t timestamp_ms;
|
|
209
70
|
|
|
210
|
-
/**
|
|
211
|
-
* @brief Pointer to payload bytes.
|
|
212
|
-
*
|
|
213
|
-
* The pointer may be NULL only when ::length is zero.
|
|
214
|
-
*/
|
|
215
71
|
const void* data;
|
|
216
72
|
|
|
217
|
-
/** @brief Payload size in bytes. */
|
|
218
73
|
size_t length;
|
|
219
74
|
} TirtcStreamMessage;
|
|
220
75
|
|
|
221
|
-
/**
|
|
222
|
-
* @brief Application-defined command payload.
|
|
223
|
-
*
|
|
224
|
-
* command is an opaque raw 32-bit value. The facade forwards it unchanged to
|
|
225
|
-
* and from the underlying transport backend.
|
|
226
|
-
*/
|
|
227
76
|
typedef struct TirtcConnCommand {
|
|
228
|
-
/** @brief Opaque raw 32-bit command word agreed with the remote peer. */
|
|
229
77
|
uint32_t command;
|
|
230
78
|
|
|
231
|
-
/** @brief Payload bytes, or NULL when ::length is zero. */
|
|
232
79
|
const void* data;
|
|
233
80
|
|
|
234
|
-
/** @brief Payload size in bytes. */
|
|
235
81
|
size_t length;
|
|
236
82
|
} TirtcConnCommand;
|
|
237
83
|
|
|
238
|
-
/**
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
84
|
+
/** Heap-owned byte payload allocated by facade callback dispatch. */
|
|
85
|
+
typedef struct TirtcOwnedBytes {
|
|
86
|
+
/** Payload buffer allocated by facade, or `NULL` for zero-length payloads. */
|
|
87
|
+
void* data;
|
|
88
|
+
|
|
89
|
+
/** Number of bytes stored in `data`. */
|
|
90
|
+
size_t length;
|
|
91
|
+
} TirtcOwnedBytes;
|
|
92
|
+
|
|
93
|
+
/** Heap-owned UTF-8 string allocated by facade callback dispatch. */
|
|
94
|
+
typedef struct TirtcOwnedString {
|
|
95
|
+
/** Null-terminated UTF-8 buffer allocated by facade, or `NULL` when no message is available. */
|
|
96
|
+
char* data;
|
|
97
|
+
} TirtcOwnedString;
|
|
98
|
+
|
|
245
99
|
typedef struct TirtcConnServiceCallbacks {
|
|
246
|
-
/** @brief Called after the service has started successfully. */
|
|
247
100
|
void (*on_started)(TirtcConnService* service, void* user_data);
|
|
248
101
|
|
|
249
|
-
/** @brief Called after the service has stopped successfully. */
|
|
250
102
|
void (*on_stopped)(TirtcConnService* service, void* user_data);
|
|
251
103
|
|
|
252
|
-
/**
|
|
253
|
-
* @brief Called for each inbound connection accepted by the service.
|
|
254
|
-
*
|
|
255
|
-
* Ownership of the returned ::TirtcConn handle belongs to the caller. The
|
|
256
|
-
* caller must eventually disconnect and destroy that connection.
|
|
257
|
-
*
|
|
258
|
-
* The runtime will not dispatch other user-facing callbacks for that
|
|
259
|
-
* accepted connection until this callback returns. Callers that need full
|
|
260
|
-
* callback coverage should install the connection callbacks synchronously
|
|
261
|
-
* inside this callback before returning.
|
|
262
|
-
*/
|
|
263
104
|
void (*on_connected)(TirtcConnService* service, TirtcConn* connection, void* user_data);
|
|
264
105
|
|
|
265
|
-
/**
|
|
266
|
-
* @brief Called when the service reports an error or a promoted system event.
|
|
267
|
-
*/
|
|
268
106
|
void (*on_error)(TirtcConnService* service, TirtcError error, const char* message,
|
|
269
107
|
void* user_data);
|
|
270
108
|
} TirtcConnServiceCallbacks;
|
|
271
109
|
|
|
272
110
|
/**
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* The implementation stores a copy of this structure inside the owning
|
|
276
|
-
* connection object.
|
|
111
|
+
* Connection observer installed through `tirtc_conn_create()` or `tirtc_conn_set_callbacks()`.
|
|
277
112
|
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
113
|
+
* For `on_command()` and `on_stream_message()`, facade copies the variable-length payload to heap
|
|
114
|
+
* memory before dispatch. The callback receives ownership of that payload and must release it with
|
|
115
|
+
* `tirtc_owned_bytes_release()` after converting or copying the bytes it needs. The release API is
|
|
116
|
+
* NULL-safe. If facade cannot allocate an owned copy for a non-empty payload, it drops that
|
|
117
|
+
* callback delivery rather than dispatching a borrowed pointer.
|
|
282
118
|
*/
|
|
283
119
|
typedef struct TirtcConnCallbacks {
|
|
284
|
-
/** @brief Called when the connection state changes or is replayed. */
|
|
285
120
|
void (*on_state_changed)(TirtcConn* connection, TirtcConnState state, TirtcError error,
|
|
286
121
|
void* user_data);
|
|
287
122
|
|
|
288
|
-
|
|
289
|
-
|
|
123
|
+
void (*on_command)(TirtcConn* connection, uint32_t command, TirtcOwnedBytes* owned_payload,
|
|
124
|
+
void* user_data);
|
|
290
125
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
*/
|
|
294
|
-
void (*on_stream_message)(TirtcConn* connection, uint8_t stream_id,
|
|
295
|
-
const TirtcStreamMessage* message, void* user_data);
|
|
126
|
+
void (*on_stream_message)(TirtcConn* connection, uint8_t stream_id, uint32_t timestamp_ms,
|
|
127
|
+
TirtcOwnedBytes* owned_payload, void* user_data);
|
|
296
128
|
} TirtcConnCallbacks;
|
|
297
129
|
|
|
298
|
-
/**
|
|
299
|
-
* @brief Initialize the global runtime.
|
|
300
|
-
*
|
|
301
|
-
* Call this exactly once before creating services, connections, audio objects,
|
|
302
|
-
* or video objects.
|
|
303
|
-
*
|
|
304
|
-
* @param options Non-NULL runtime options.
|
|
305
|
-
* @return ::TIRTC_ERROR_OK on success, or an error code when initialization
|
|
306
|
-
* fails or the runtime is already initialized.
|
|
307
|
-
*/
|
|
308
130
|
TirtcError tirtc_init(const TirtcOptions* options);
|
|
309
131
|
|
|
310
|
-
/**
|
|
311
|
-
* @brief Shut down the global runtime.
|
|
312
|
-
*
|
|
313
|
-
* This function is intentionally conservative. If any public handles are still
|
|
314
|
-
* alive, the current implementation leaves the runtime initialized and returns
|
|
315
|
-
* without tearing it down. Destroy every connection, stop every service, and
|
|
316
|
-
* destroy every media object before calling this function.
|
|
317
|
-
*/
|
|
318
132
|
void tirtc_uninit(void);
|
|
319
133
|
|
|
320
|
-
/**
|
|
321
|
-
* @brief Start a service-side listener.
|
|
322
|
-
*
|
|
323
|
-
* Only one live service is supported at a time.
|
|
324
|
-
*
|
|
325
|
-
* @param options Non-NULL start options with a non-empty license and a non-zero
|
|
326
|
-
* max_connections.
|
|
327
|
-
* @param observer Optional callback table copied by value.
|
|
328
|
-
* @param user_data Opaque pointer returned to service callbacks.
|
|
329
|
-
* @param out_service Receives the created service handle on success.
|
|
330
|
-
* @return ::TIRTC_ERROR_OK on success.
|
|
331
|
-
*/
|
|
332
134
|
TirtcError tirtc_conn_service_start(const TirtcConnServiceStartOptions* options,
|
|
333
135
|
const TirtcConnServiceCallbacks* observer, void* user_data,
|
|
334
136
|
TirtcConnService** out_service);
|
|
335
137
|
|
|
336
|
-
/**
|
|
337
|
-
* @brief Stop a service handle.
|
|
338
|
-
*
|
|
339
|
-
* Accepted connections are separate resources and are not destroyed by stopping
|
|
340
|
-
* the service. Each accepted ::TirtcConn remains the caller's responsibility.
|
|
341
|
-
* On success, the service handle is released and must not be used again.
|
|
342
|
-
*
|
|
343
|
-
* @param service Service handle to stop.
|
|
344
|
-
* @return ::TIRTC_ERROR_OK on success.
|
|
345
|
-
*/
|
|
346
138
|
TirtcError tirtc_conn_service_stop(TirtcConnService* service);
|
|
347
139
|
|
|
348
|
-
/**
|
|
349
|
-
* @brief Allocate a standalone connection handle.
|
|
350
|
-
*
|
|
351
|
-
* The runtime must already be initialized. The returned handle starts in
|
|
352
|
-
* ::TIRTC_CONN_STATE_IDLE and must be released with ::tirtc_conn_destroy.
|
|
353
|
-
*
|
|
354
|
-
* The callbacks, when provided, become part of the connection object's stable
|
|
355
|
-
* lifecycle contract. After creation succeeds, reconnects on the same handle
|
|
356
|
-
* keep using that callback table.
|
|
357
|
-
*
|
|
358
|
-
* @param options Optional creation options. Pass NULL to create a connection
|
|
359
|
-
* without callbacks.
|
|
360
|
-
* @param out_connection Receives the created connection handle on success.
|
|
361
|
-
* @return ::TIRTC_ERROR_OK on success.
|
|
362
|
-
*/
|
|
363
140
|
TirtcError tirtc_conn_create(const TirtcConnCreateOptions* options, TirtcConn** out_connection);
|
|
364
141
|
|
|
365
|
-
/**
|
|
366
|
-
* @brief Install, replace, or clear the connection callbacks.
|
|
367
|
-
*
|
|
368
|
-
* This API remains available for accepted service connections and existing
|
|
369
|
-
* consumers that still bind callbacks after handle creation. New
|
|
370
|
-
* standalone-connection callers should prefer binding callbacks through
|
|
371
|
-
* ::TirtcConnCreateOptions.
|
|
372
|
-
*
|
|
373
|
-
* Passing NULL for ::callbacks clears the current callbacks and their user
|
|
374
|
-
* data. After non-NULL callbacks are installed, the implementation
|
|
375
|
-
* immediately replays the current state through ::on_state_changed. When the
|
|
376
|
-
* current state is ::TIRTC_CONN_STATE_DISCONNECTED, the replayed callback also
|
|
377
|
-
* carries the final disconnect error.
|
|
378
|
-
*/
|
|
379
142
|
TirtcError tirtc_conn_set_callbacks(TirtcConn* connection, const TirtcConnCallbacks* callbacks,
|
|
380
143
|
void* user_data);
|
|
381
144
|
|
|
382
|
-
/**
|
|
383
|
-
* @brief Connect a standalone connection handle to a remote peer.
|
|
384
|
-
*
|
|
385
|
-
* This function is valid only for handles created by ::tirtc_conn_create.
|
|
386
|
-
* Connections accepted from a service are already transport-owned and cannot be
|
|
387
|
-
* manually connected again.
|
|
388
|
-
*
|
|
389
|
-
* After a disconnect, the same handle may be connected again.
|
|
390
|
-
*
|
|
391
|
-
* @param connection Target connection created by ::tirtc_conn_create.
|
|
392
|
-
* @param options Non-NULL connect options with non-empty peer and token values.
|
|
393
|
-
* @return ::TIRTC_ERROR_OK on success.
|
|
394
|
-
*/
|
|
395
145
|
TirtcError tirtc_conn_connect(TirtcConn* connection, const TirtcConnConnectOptions* options);
|
|
396
146
|
|
|
397
|
-
/**
|
|
398
|
-
* @brief Disconnect a connection.
|
|
399
|
-
*
|
|
400
|
-
* This call is idempotent once the connection is already idle or disconnected.
|
|
401
|
-
* Disconnecting does not destroy the handle.
|
|
402
|
-
*
|
|
403
|
-
* @param connection Target connection.
|
|
404
|
-
* @return ::TIRTC_ERROR_OK on success.
|
|
405
|
-
*/
|
|
406
147
|
TirtcError tirtc_conn_disconnect(TirtcConn* connection);
|
|
407
148
|
|
|
408
|
-
/**
|
|
409
|
-
* @brief Destroy a connection handle and release its internal transport state.
|
|
410
|
-
*
|
|
411
|
-
* Destroying a connection also detaches any currently attached audio or video
|
|
412
|
-
* objects. Those media objects are not destroyed; they return to an unbound
|
|
413
|
-
* state and remain owned by the caller.
|
|
414
|
-
*
|
|
415
|
-
* After this call returns, the connection handle is invalid and must not be
|
|
416
|
-
* reused.
|
|
417
|
-
*
|
|
418
|
-
* @param connection Connection handle to destroy.
|
|
419
|
-
*/
|
|
420
149
|
void tirtc_conn_destroy(TirtcConn* connection);
|
|
421
150
|
|
|
422
|
-
/**
|
|
423
|
-
* @brief Send an application-defined stream message.
|
|
424
|
-
*
|
|
425
|
-
* Use a stream identifier that is not currently occupied by an attached audio
|
|
426
|
-
* input, video input, or video output on the same connection.
|
|
427
|
-
*
|
|
428
|
-
* @param connection Target connection.
|
|
429
|
-
* @param stream_id Application-defined stream identifier for this message.
|
|
430
|
-
* @param message Non-NULL payload descriptor.
|
|
431
|
-
* @return ::TIRTC_ERROR_OK on success.
|
|
432
|
-
*/
|
|
433
151
|
TirtcError tirtc_conn_send_stream_message(TirtcConn* connection, uint8_t stream_id,
|
|
434
152
|
const TirtcStreamMessage* message);
|
|
435
153
|
|
|
436
|
-
/**
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
154
|
+
/** Copies a stream-message payload into a releasable owned buffer. */
|
|
155
|
+
TirtcOwnedBytes* tirtc_stream_message_copy_payload(const TirtcStreamMessage* message);
|
|
156
|
+
|
|
157
|
+
/** Copies a command payload into a releasable owned buffer. */
|
|
158
|
+
TirtcOwnedBytes* tirtc_conn_command_copy_payload(const TirtcConnCommand* command);
|
|
159
|
+
|
|
160
|
+
/** Copies a UTF-8 string into a releasable owned buffer. */
|
|
161
|
+
TirtcOwnedString* tirtc_string_copy_owned(const char* message);
|
|
162
|
+
|
|
163
|
+
/** Releases a payload received from facade owned-memory callback APIs. Safe to call with `NULL`. */
|
|
164
|
+
void tirtc_owned_bytes_release(TirtcOwnedBytes* owned);
|
|
165
|
+
|
|
166
|
+
/** Releases a string received from facade owned-memory callback APIs. Safe to call with `NULL`. */
|
|
167
|
+
void tirtc_owned_string_release(TirtcOwnedString* owned);
|
|
168
|
+
|
|
447
169
|
TirtcError tirtc_conn_send_command(TirtcConn* connection, const TirtcConnCommand* command);
|
|
448
170
|
|
|
449
171
|
#ifdef __cplusplus
|
|
450
172
|
}
|
|
451
173
|
#endif
|
|
452
174
|
|
|
453
|
-
#endif
|
|
175
|
+
#endif
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/vendor/app-server/bin/runtime/macos-arm64/lib/libmatrix_runtime_foundation_logging.a
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
platform=macos-arm64
|
|
2
2
|
profile=credential
|
|
3
|
-
staged_at_utc=2026-04-
|
|
3
|
+
staged_at_utc=2026-04-21T13:44:23Z
|
|
4
4
|
source_sdk=/Users/allenfeng/Development/Repositories/tirtc-nexus/tirtc-matrix/.build/sdk/macos-arm64
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
bfea7c19fdc3f25680946a575db9b3e60e8cd2b3fe1ddde8c7c93b57a6a3902c include/tirtc/audio.h
|
|
7
7
|
6d972ccfe150a3b4f2d7f18fa92b3ade9210c1c8bb754d061ac6b7997b59e2cb include/tirtc/audio_codec.h
|
|
8
8
|
7bacbdb2d8bb10d6444036a8fef42f2a8e3ea34dfc38e165ee678d61f189db41 include/tirtc/audio_frame.h
|
|
9
9
|
84f1bbe67efa15ab3b2d995d661025aac43e2fe547a14a012a24d89cfe3cb859 include/tirtc/audio_io.h
|
|
@@ -13,7 +13,7 @@ c2e1f31dcc75be461c577d18b1cebe32774f212d51cb4dd2a5b5a9bfe62b693e include/tirtc/
|
|
|
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
|
-
|
|
16
|
+
339508d784d3114dd3cbf14ad90dd6345d633ec647ca0f9bb8942eb1b83533b2 include/tirtc/av.h
|
|
17
17
|
4198c95c48ae579d1c782635b00fa5c9009d0c56ba466e6e3873e8298faae029 include/tirtc/credential.h
|
|
18
18
|
d29f24fc665d01ab45f993c06c09fccca2bd5c844250ddbdc3c9d8d0c8548803 include/tirtc/error.h
|
|
19
19
|
ae805545a9515edc9b94262e72ad2c7b7d649288166f4daeb450d8a55e82ae0b include/tirtc/foundation/build_info.h
|
|
@@ -26,7 +26,7 @@ ae805545a9515edc9b94262e72ad2c7b7d649288166f4daeb450d8a55e82ae0b include/tirtc/
|
|
|
26
26
|
a4f8ab44c1a20ad37f250363a403a9d4d007e61ddb2426c7966dbc05f6a04b4f include/tirtc/media_live_source.h
|
|
27
27
|
1b3be6954e547f91a047866438bff1820c8406afaf91cef68ddee29a6ac70234 include/tirtc/media_uplink.h
|
|
28
28
|
26b831c7b8bd69b7699017427f3243cd22393c90c9518a820f5eb87eb3792483 include/tirtc/transport.h
|
|
29
|
-
|
|
29
|
+
185183a736774cdf737504c091e4648d7f476c16abf18ee8c8ac0da2eb9a5c79 include/tirtc/trp.h
|
|
30
30
|
dff5b0a0ac4a40ad17c93e1e56b3c416371c81ab365e287ea8cd6ce37ccbed3b include/tirtc/video_codec.h
|
|
31
31
|
e51379666c199588cc33279ccf52248035d1cae3d1d468b1615ebf29f0b39c9c include/tirtc/video_frame.h
|
|
32
32
|
d920afad955b9f206b02b19ca152315190fa84ab6f24e895a5b24c3ab9ffd701 include/tirtc/video_io.h
|
|
@@ -39,14 +39,14 @@ cae0bbeb884e5466a56da15182c78cc22baab6c743f349a58d3595f623333585 include/tirtc/
|
|
|
39
39
|
8db86d6714264047e8fd4086ddd7315722d675749719e6175f89eb5a636b48a1 lib/libTiRTC.a
|
|
40
40
|
b39daee6a3d39bf0ca20c45084601133c4198de8dca848dcff6dd9c70ae99016 lib/libcrypto.a
|
|
41
41
|
c052857ef315e3d61db9c862cad10709a3a6b2487dc41799cbe4d74a805de875 lib/libcrypto.dylib
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
a3cbd2372889b96346fb211846de94edb5ec7f5d15af02a150c3c24efb999187 lib/libmatrix_runtime_audio.a
|
|
43
|
+
012cf0bd9aaa49fe42a43de19edddb01b654df741a0f5782568c52f0d3c8dfbb lib/libmatrix_runtime_credential.a
|
|
44
|
+
75554a31b1c99be83d22f168de91584f19dc9ee69a13fe8b62d5dfdab6baf016 lib/libmatrix_runtime_facade.a
|
|
45
|
+
a5235f14059d7807968353b32cefcddbebec2cc5808912898078a6c6cf9bdd50 lib/libmatrix_runtime_foundation_http.a
|
|
46
|
+
dcb14497951c566352cf4b14a7b870872069824d6a2a067bfe5b421fc6500216 lib/libmatrix_runtime_foundation_logging.a
|
|
47
|
+
1b1b7980f498b603132bf11dce7d24f60bdc8a11d6a0ac916c4454dde4ebbc3f lib/libmatrix_runtime_media.a
|
|
48
|
+
6d6bf7d07cc35df568582218193487235452ef47dd736f36d7de3c95ac1bde18 lib/libmatrix_runtime_transport.a
|
|
49
|
+
0abee197077a906f6af3f5e05c72bcfe5b874478b65ad454b3013ab9df398af1 lib/libmatrix_runtime_video.a
|
|
50
50
|
c11c65d373a127028350c41fa58cd2d1223f2b5d70a84e13b115d90daaba25ca lib/libssl.a
|
|
51
51
|
ef1c1104bbdd2528ed7b958fb7252bd6249875f92300b0c9577d6c4bd6c0d88a lib/libssl.dylib
|
|
52
52
|
e14e846e43d64e240fa0e5745bf4e702b79d0f2442e7f768beb990610735c71b lib/libtgrtc.dylib
|