tirtc-devtools-cli 0.0.15 → 0.1.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.
- package/README.md +5 -1
- package/USAGE.md +6 -3
- package/dist/cli/src/index.js +19 -3
- package/dist/cli/src/media_assets.js +27 -6
- package/dist/cli/src/role_driver.js +8 -3
- package/package.json +1 -1
- package/vendor/devtools/driver/linux-x64/devtools_driver_probe +0 -0
- package/vendor/devtools/driver/macos-arm64/devtools_driver_probe +0 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio.h +237 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_codec.h +23 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_frame.h +36 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_io.h +65 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_io_android.h +19 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_io_apple.h +19 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_io_harmony.h +19 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_io_windows.h +19 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_processing.h +56 -0
- package/vendor/runtime/linux-x64/include/tirtc/audio_sample_rate.h +18 -0
- package/vendor/runtime/linux-x64/include/tirtc/av.h +236 -0
- package/vendor/runtime/linux-x64/include/tirtc/error.h +102 -0
- package/vendor/runtime/linux-x64/include/tirtc/foundation/build_info.h +27 -0
- package/vendor/runtime/linux-x64/include/tirtc/http.h +57 -0
- package/vendor/runtime/linux-x64/include/tirtc/logging.h +55 -0
- package/vendor/runtime/linux-x64/include/tirtc/media_codec.h +21 -0
- package/vendor/runtime/linux-x64/include/tirtc/media_downlink.h +199 -0
- package/vendor/runtime/linux-x64/include/tirtc/media_uplink.h +120 -0
- package/vendor/runtime/linux-x64/include/tirtc/transport.h +445 -0
- package/vendor/runtime/linux-x64/include/tirtc/trp.h +187 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_codec.h +112 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_frame.h +55 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_io.h +53 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_io_android.h +34 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_io_apple.h +47 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_io_harmony.h +32 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_io_windows.h +26 -0
- package/vendor/runtime/linux-x64/include/tirtc/video_processing.h +34 -0
- package/vendor/runtime/linux-x64/lib/libTiRTC.a +0 -0
- package/vendor/runtime/linux-x64/lib/libcrypto.a +0 -0
- package/vendor/runtime/linux-x64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/runtime/linux-x64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/runtime/linux-x64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/runtime/linux-x64/lib/libmatrix_runtime_foundation_logging.a +0 -0
- package/vendor/runtime/linux-x64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/runtime/linux-x64/lib/libmatrix_runtime_transport.a +0 -0
- package/vendor/runtime/linux-x64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/runtime/linux-x64/lib/libssl.a +0 -0
- package/vendor/runtime/linux-x64/lib/libwebrtc_apm.a +0 -0
- package/vendor/runtime/linux-x64/lib/libxlog.a +0 -0
- package/vendor/runtime/linux-x64/manifest.txt +45 -0
- package/vendor/runtime/macos-arm64/include/tirtc/audio.h +21 -0
- package/vendor/runtime/macos-arm64/include/tirtc/av.h +28 -0
- package/vendor/runtime/macos-arm64/include/tirtc/error.h +41 -2
- package/vendor/runtime/macos-arm64/include/tirtc/media_downlink.h +45 -0
- package/vendor/runtime/macos-arm64/include/tirtc/video_codec.h +13 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/runtime/macos-arm64/lib/libmatrix_runtime_foundation_http.a +0 -0
- package/vendor/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/runtime/macos-arm64/manifest.txt +13 -13
- package/vendor/runtime/script/prepare_runtime_media_dataset.sh +15 -0
- package/vendor/devtools/driver/macos-arm64/runtime_validation_client_bin +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#ifndef TIRTC_VIDEO_CODEC_H_
|
|
2
|
+
#define TIRTC_VIDEO_CODEC_H_
|
|
3
|
+
|
|
4
|
+
#include <stddef.h>
|
|
5
|
+
#include <stdint.h>
|
|
6
|
+
|
|
7
|
+
#include "tirtc/error.h"
|
|
8
|
+
#include "tirtc/video_frame.h"
|
|
9
|
+
|
|
10
|
+
#ifdef __cplusplus
|
|
11
|
+
extern "C" {
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
typedef struct TirtcVideoEncoder TirtcVideoEncoder;
|
|
15
|
+
typedef struct TirtcVideoDecoder TirtcVideoDecoder;
|
|
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
|
+
/**
|
|
30
|
+
* Backend family that is actually handling a video decoder route.
|
|
31
|
+
*
|
|
32
|
+
* `UNKNOWN` means the runtime has not locked a decoder route or the current snapshot cannot prove
|
|
33
|
+
* one. The enum intentionally reports only the supported backend family; platform-specific decoder
|
|
34
|
+
* names and native handles are not part of this public surface.
|
|
35
|
+
*/
|
|
36
|
+
typedef enum TirtcVideoDecoderBackendKind {
|
|
37
|
+
TIRTC_VIDEO_DECODER_BACKEND_KIND_UNKNOWN = 0,
|
|
38
|
+
TIRTC_VIDEO_DECODER_BACKEND_KIND_SOFTWARE = 1,
|
|
39
|
+
TIRTC_VIDEO_DECODER_BACKEND_KIND_HARDWARE = 2,
|
|
40
|
+
} TirtcVideoDecoderBackendKind;
|
|
41
|
+
|
|
42
|
+
typedef enum TirtcVideoEncoderBackendKind {
|
|
43
|
+
TIRTC_VIDEO_ENCODER_BACKEND_KIND_SOFTWARE = 1,
|
|
44
|
+
TIRTC_VIDEO_ENCODER_BACKEND_KIND_HARDWARE = 2,
|
|
45
|
+
} TirtcVideoEncoderBackendKind;
|
|
46
|
+
|
|
47
|
+
typedef struct TirtcVideoEncoderRuntimeInfo {
|
|
48
|
+
TirtcVideoEncoderBackendKind actual_backend;
|
|
49
|
+
TirtcVideoEncoderPreference requested_encoder_preference;
|
|
50
|
+
int did_fallback;
|
|
51
|
+
TirtcVideoPixelFormat resolved_input_pixel_format;
|
|
52
|
+
} TirtcVideoEncoderRuntimeInfo;
|
|
53
|
+
|
|
54
|
+
typedef struct TirtcVideoEncoderConfig {
|
|
55
|
+
TirtcMediaCodec codec;
|
|
56
|
+
TirtcVideoBitstreamFormat bitstream_format;
|
|
57
|
+
uint32_t width;
|
|
58
|
+
uint32_t height;
|
|
59
|
+
uint32_t fps;
|
|
60
|
+
uint32_t bitrate_kbps;
|
|
61
|
+
TirtcVideoPixelFormat input_pixel_format;
|
|
62
|
+
/**
|
|
63
|
+
* Selects the encoder backend family before the encoder is created.
|
|
64
|
+
*
|
|
65
|
+
* Zero-initialized configs use `AUTO`, which currently preserves the software encoder path.
|
|
66
|
+
* `HARDWARE` is strict: if the requested hardware backend is unavailable or cannot initialize,
|
|
67
|
+
* create fails with a video encoder error instead of falling back to software.
|
|
68
|
+
*/
|
|
69
|
+
TirtcVideoEncoderPreference encoder_preference;
|
|
70
|
+
} TirtcVideoEncoderConfig;
|
|
71
|
+
|
|
72
|
+
typedef struct TirtcVideoDecoderConfig {
|
|
73
|
+
TirtcMediaCodec codec;
|
|
74
|
+
TirtcVideoBitstreamFormat bitstream_format;
|
|
75
|
+
TirtcVideoPixelFormat output_pixel_format;
|
|
76
|
+
} TirtcVideoDecoderConfig;
|
|
77
|
+
|
|
78
|
+
TirtcError tirtc_video_encoder_create(const TirtcVideoEncoderConfig* config,
|
|
79
|
+
TirtcVideoEncoder** out_encoder);
|
|
80
|
+
void tirtc_video_encoder_destroy(TirtcVideoEncoder* encoder);
|
|
81
|
+
TirtcError tirtc_video_encoder_reset(TirtcVideoEncoder* encoder);
|
|
82
|
+
TirtcError tirtc_video_encoder_request_key_frame(TirtcVideoEncoder* encoder);
|
|
83
|
+
/**
|
|
84
|
+
* Returns the backend decision made during encoder creation.
|
|
85
|
+
*
|
|
86
|
+
* `out_info` is caller-owned storage. The function writes a value copy and does not allocate or
|
|
87
|
+
* transfer ownership. It may be called after successful create and before destroy, including while
|
|
88
|
+
* another thread is using the encoder through the normal encode/control API.
|
|
89
|
+
*/
|
|
90
|
+
TirtcError tirtc_video_encoder_get_runtime_info(const TirtcVideoEncoder* encoder,
|
|
91
|
+
TirtcVideoEncoderRuntimeInfo* out_info);
|
|
92
|
+
TirtcError tirtc_video_encoder_encode(TirtcVideoEncoder* encoder,
|
|
93
|
+
const TirtcVideoPixelFrame* in_frame, void* out_buffer,
|
|
94
|
+
size_t out_buffer_capacity,
|
|
95
|
+
TirtcVideoEncodedFrame* out_frame);
|
|
96
|
+
|
|
97
|
+
TirtcError tirtc_video_decoder_create(const TirtcVideoDecoderConfig* config,
|
|
98
|
+
TirtcVideoDecoder** out_decoder);
|
|
99
|
+
void tirtc_video_decoder_destroy(TirtcVideoDecoder* decoder);
|
|
100
|
+
TirtcError tirtc_video_decoder_reset(TirtcVideoDecoder* decoder);
|
|
101
|
+
TirtcError tirtc_video_decoder_decode(TirtcVideoDecoder* decoder,
|
|
102
|
+
const TirtcVideoEncodedFrame* in_frame,
|
|
103
|
+
TirtcVideoPixelFrame* out_frame);
|
|
104
|
+
|
|
105
|
+
TirtcError tirtc_video_snapshot_export_jpeg(const TirtcVideoPixelFrame* frame,
|
|
106
|
+
const char* output_path);
|
|
107
|
+
|
|
108
|
+
#ifdef __cplusplus
|
|
109
|
+
}
|
|
110
|
+
#endif
|
|
111
|
+
|
|
112
|
+
#endif // TIRTC_VIDEO_CODEC_H_
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#ifndef TIRTC_VIDEO_FRAME_H_
|
|
2
|
+
#define TIRTC_VIDEO_FRAME_H_
|
|
3
|
+
|
|
4
|
+
#include <stddef.h>
|
|
5
|
+
#include <stdint.h>
|
|
6
|
+
|
|
7
|
+
#include "tirtc/media_codec.h"
|
|
8
|
+
|
|
9
|
+
#ifdef __cplusplus
|
|
10
|
+
extern "C" {
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
#define TIRTC_VIDEO_MAX_PLANES 4
|
|
14
|
+
|
|
15
|
+
typedef enum TirtcVideoPixelFormat {
|
|
16
|
+
TIRTC_VIDEO_PIXEL_FORMAT_NONE = 0,
|
|
17
|
+
TIRTC_VIDEO_PIXEL_FORMAT_I420 = 1,
|
|
18
|
+
TIRTC_VIDEO_PIXEL_FORMAT_NV12 = 2,
|
|
19
|
+
TIRTC_VIDEO_PIXEL_FORMAT_RGBA8888 = 3,
|
|
20
|
+
} TirtcVideoPixelFormat;
|
|
21
|
+
|
|
22
|
+
typedef enum TirtcVideoBitstreamFormat {
|
|
23
|
+
TIRTC_VIDEO_BITSTREAM_FORMAT_NONE = 0,
|
|
24
|
+
TIRTC_VIDEO_BITSTREAM_FORMAT_H264_ANNEXB = 1,
|
|
25
|
+
TIRTC_VIDEO_BITSTREAM_FORMAT_H265_ANNEXB = 2,
|
|
26
|
+
TIRTC_VIDEO_BITSTREAM_FORMAT_MJPEG_JFIF = 3,
|
|
27
|
+
} TirtcVideoBitstreamFormat;
|
|
28
|
+
|
|
29
|
+
typedef struct TirtcVideoPixelFrame {
|
|
30
|
+
uint32_t width;
|
|
31
|
+
uint32_t height;
|
|
32
|
+
TirtcVideoPixelFormat pixel_format;
|
|
33
|
+
int64_t pts_us;
|
|
34
|
+
uint32_t plane_count;
|
|
35
|
+
void* planes[TIRTC_VIDEO_MAX_PLANES];
|
|
36
|
+
uint32_t strides[TIRTC_VIDEO_MAX_PLANES];
|
|
37
|
+
size_t plane_bytes[TIRTC_VIDEO_MAX_PLANES];
|
|
38
|
+
} TirtcVideoPixelFrame;
|
|
39
|
+
|
|
40
|
+
typedef struct TirtcVideoEncodedFrame {
|
|
41
|
+
TirtcMediaCodec codec;
|
|
42
|
+
TirtcVideoBitstreamFormat bitstream_format;
|
|
43
|
+
uint32_t width;
|
|
44
|
+
uint32_t height;
|
|
45
|
+
int64_t pts_us;
|
|
46
|
+
int is_key_frame;
|
|
47
|
+
const void* data;
|
|
48
|
+
size_t data_bytes;
|
|
49
|
+
} TirtcVideoEncodedFrame;
|
|
50
|
+
|
|
51
|
+
#ifdef __cplusplus
|
|
52
|
+
}
|
|
53
|
+
#endif
|
|
54
|
+
|
|
55
|
+
#endif // TIRTC_VIDEO_FRAME_H_
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#ifndef TIRTC_VIDEO_IO_H_
|
|
2
|
+
#define TIRTC_VIDEO_IO_H_
|
|
3
|
+
|
|
4
|
+
#include <stdint.h>
|
|
5
|
+
|
|
6
|
+
#include "tirtc/error.h"
|
|
7
|
+
#include "tirtc/video_frame.h"
|
|
8
|
+
|
|
9
|
+
#ifdef __cplusplus
|
|
10
|
+
extern "C" {
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
typedef struct TirtcVideoVin TirtcVideoVin;
|
|
14
|
+
typedef struct TirtcVideoVout TirtcVideoVout;
|
|
15
|
+
|
|
16
|
+
typedef struct TirtcVideoIoConfig {
|
|
17
|
+
uint32_t width;
|
|
18
|
+
uint32_t height;
|
|
19
|
+
uint32_t fps;
|
|
20
|
+
/* Preferred pixel format; actual format resolution is backend-specific. */
|
|
21
|
+
TirtcVideoPixelFormat pixel_format;
|
|
22
|
+
} TirtcVideoIoConfig;
|
|
23
|
+
|
|
24
|
+
typedef struct TirtcVideoHeadlessVoutOptions {
|
|
25
|
+
const char* first_frame_json_path;
|
|
26
|
+
const char* first_frame_raw_path;
|
|
27
|
+
} TirtcVideoHeadlessVoutOptions;
|
|
28
|
+
|
|
29
|
+
typedef void (*TirtcVideoVinOnFrameFn)(TirtcVideoVin* vin, const TirtcVideoPixelFrame* frame,
|
|
30
|
+
void* user_data);
|
|
31
|
+
|
|
32
|
+
TirtcError tirtc_video_vin_open(TirtcVideoVin* vin, const TirtcVideoIoConfig* config,
|
|
33
|
+
TirtcVideoVinOnFrameFn on_frame, void* user_data);
|
|
34
|
+
TirtcError tirtc_video_vin_get_actual_config(TirtcVideoVin* vin, TirtcVideoIoConfig* out_config);
|
|
35
|
+
TirtcError tirtc_video_vin_start(TirtcVideoVin* vin);
|
|
36
|
+
TirtcError tirtc_video_vin_stop(TirtcVideoVin* vin);
|
|
37
|
+
TirtcError tirtc_video_vin_close(TirtcVideoVin* vin);
|
|
38
|
+
void tirtc_video_vin_destroy(TirtcVideoVin* vin);
|
|
39
|
+
|
|
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);
|
|
43
|
+
TirtcError tirtc_video_vout_get_actual_config(TirtcVideoVout* vout, TirtcVideoIoConfig* out_config);
|
|
44
|
+
TirtcError tirtc_video_vout_render_frame(TirtcVideoVout* vout, const TirtcVideoPixelFrame* frame);
|
|
45
|
+
TirtcError tirtc_video_vout_flush(TirtcVideoVout* vout);
|
|
46
|
+
TirtcError tirtc_video_vout_close(TirtcVideoVout* vout);
|
|
47
|
+
void tirtc_video_vout_destroy(TirtcVideoVout* vout);
|
|
48
|
+
|
|
49
|
+
#ifdef __cplusplus
|
|
50
|
+
}
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
#endif // TIRTC_VIDEO_IO_H_
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
const char* h264_decoder_name;
|
|
22
|
+
const char* h265_decoder_name;
|
|
23
|
+
} TirtcVideoAndroidSurfaceTextureVoutOptions;
|
|
24
|
+
|
|
25
|
+
TirtcError tirtc_video_android_create_surface_texture_vout(TirtcVideoVout** out_vout);
|
|
26
|
+
TirtcError tirtc_video_android_surface_texture_vout_set_options(
|
|
27
|
+
TirtcVideoVout* vout, const TirtcVideoAndroidSurfaceTextureVoutOptions* options);
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
#ifdef __cplusplus
|
|
31
|
+
}
|
|
32
|
+
#endif
|
|
33
|
+
|
|
34
|
+
#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_
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
platform=linux-x64
|
|
2
|
+
profile=full
|
|
3
|
+
staged_at_utc=2026-04-30T09:36:57Z
|
|
4
|
+
source_sdk=/Users/allenfeng/Development/Repositories/tirtc-nexus/tirtc-matrix/.build/sdk/linux-x64
|
|
5
|
+
|
|
6
|
+
bfc096be1484ac2b1c2776ccabfa2a4c6a982e869abf875192ff06fad85e82ca include/tirtc/audio.h
|
|
7
|
+
6d972ccfe150a3b4f2d7f18fa92b3ade9210c1c8bb754d061ac6b7997b59e2cb include/tirtc/audio_codec.h
|
|
8
|
+
7bacbdb2d8bb10d6444036a8fef42f2a8e3ea34dfc38e165ee678d61f189db41 include/tirtc/audio_frame.h
|
|
9
|
+
fb8ea35263167c33487bd3aa503c26ed2dfbf97877f7bda92c10065cd5c97c13 include/tirtc/audio_io.h
|
|
10
|
+
c2e1f31dcc75be461c577d18b1cebe32774f212d51cb4dd2a5b5a9bfe62b693e include/tirtc/audio_io_android.h
|
|
11
|
+
878bb18220ac62304ec95807f31e83e050c8dac14811f873454f9b045028694a include/tirtc/audio_io_apple.h
|
|
12
|
+
0569eb1d043ee7fa8d45ca43143eca1a22e4c4bf1507ca7e045e010a3ecbc288 include/tirtc/audio_io_harmony.h
|
|
13
|
+
51cbc911fe9f9834046f0e0a1a7cdd814a8e194a615894a8b4d11f9e5f095610 include/tirtc/audio_io_windows.h
|
|
14
|
+
21f60729117260a44af22c1af986ef17d22673b102b7b7a035f492d0665cce16 include/tirtc/audio_processing.h
|
|
15
|
+
0ca7c3c630b1242f51a0fd8154097c0a332b4c816a5707090e4381719852998c include/tirtc/audio_sample_rate.h
|
|
16
|
+
58807ba56770f38f47aec995661cadf9d3c1d6ea7bfc940767f1ce67317c7546 include/tirtc/av.h
|
|
17
|
+
0f3e2f454c35e8c2f79bdc93ed77f9f1622751e5a05defa8c9d4213ed8a797c5 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
|
+
ca63fe4fa0c787f20923e264e116fa6d7cb8194a227c03be4e9843d0ce5a9864 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
|
+
92b3db6e2cb02265ad5db01881edce9d4e095b1dadf449dce5d8bb5362957e33 include/tirtc/video_codec.h
|
|
27
|
+
e51379666c199588cc33279ccf52248035d1cae3d1d468b1615ebf29f0b39c9c include/tirtc/video_frame.h
|
|
28
|
+
2a02645d82c58d433c7306a9f0bcd31d0f3e560b63822f7e80919761b81a6284 include/tirtc/video_io.h
|
|
29
|
+
9930dce5e8e2b12a1ab28ee91f3fb46f6cf3487e515ea2b4ec0e00009bd5f070 include/tirtc/video_io_android.h
|
|
30
|
+
005114b9213ec826e18d11eca4b9d65cce2ca0e7c781f03d85292365d9d5dfdd include/tirtc/video_io_apple.h
|
|
31
|
+
cae0bbeb884e5466a56da15182c78cc22baab6c743f349a58d3595f623333585 include/tirtc/video_io_harmony.h
|
|
32
|
+
65b5d24fe3a6bc2a299a2220148a153ba4eb0955a49c1c3baabf1fdfed8aabdd include/tirtc/video_io_windows.h
|
|
33
|
+
8cd6b66bea14890a665cc317f8572429b2c3e4463773f8b77c1e4dc30a4a8747 include/tirtc/video_processing.h
|
|
34
|
+
ceb7cdd45efae57e5bd53d4177cb20c4a0cb9917fcdd23127b050d69c8b919ac lib/libTiRTC.a
|
|
35
|
+
b1f4135025cb8e8520a14268d831b9998920a4239f84bb6b409d0e4909fd5bee lib/libcrypto.a
|
|
36
|
+
8e3aff3a400fe0971c61511947c0e69d06754002d970e21eaab2339ae38b4a42 lib/libmatrix_runtime_audio.a
|
|
37
|
+
09696896a45a4fab199f0767979471c947b252fc8741a0e803624cdac6953b59 lib/libmatrix_runtime_facade.a
|
|
38
|
+
2c8cc881eeeae679129360df5813dec17d0e33935f196d79cf79671dbd0c8581 lib/libmatrix_runtime_foundation_http.a
|
|
39
|
+
e5aff9f5d9221b9cf08dd8a9144c6039d9dba7bdee3892af2d0e7f7d69633461 lib/libmatrix_runtime_foundation_logging.a
|
|
40
|
+
fe6b5575ce5e80f81e07a7799a05d0a8ee5a338915a28ada86d9009eee952e96 lib/libmatrix_runtime_media.a
|
|
41
|
+
86d9b41f84c6bcc13f8d23a1f9b46d97fe6769573758722f9f6c8d4a130306be lib/libmatrix_runtime_transport.a
|
|
42
|
+
6ac178f5cd371e9a5be1989dd1e8a3767291f4c4d9d30dcf12ecdd75a2081afa lib/libmatrix_runtime_video.a
|
|
43
|
+
511d521f7972df3993e5976d6e2dbcad7a6fbce9be15071274d0cbd9d51157f5 lib/libssl.a
|
|
44
|
+
a67ec9034848ef24a1b17671e444daa62a8f9e6b8319a1e932593908720ff2a1 lib/libwebrtc_apm.a
|
|
45
|
+
700e455255897e3cffab13ca593a6e4d9d11383ae609215cbbd6043a63d47161 lib/libxlog.a
|
|
@@ -96,6 +96,17 @@ typedef struct TirtcAudioOutputMetricsSnapshot {
|
|
|
96
96
|
TirtcPendingDurationMetrics pending;
|
|
97
97
|
} TirtcAudioOutputMetricsSnapshot;
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Diagnostic facts currently known for an audio output.
|
|
101
|
+
*
|
|
102
|
+
* The snapshot is a caller-owned value copy. Zero-initialized fields mean the output has not yet
|
|
103
|
+
* observed a matching runtime fact or only cached zero-state is available. This diagnostic API is
|
|
104
|
+
* intended for UI/debug visibility and logs, not for playback control decisions.
|
|
105
|
+
*/
|
|
106
|
+
typedef struct TirtcAudioOutputDebugSnapshot {
|
|
107
|
+
TirtcMediaCodec codec;
|
|
108
|
+
} TirtcAudioOutputDebugSnapshot;
|
|
109
|
+
|
|
99
110
|
/**
|
|
100
111
|
* Audio input observer.
|
|
101
112
|
*
|
|
@@ -209,6 +220,16 @@ TirtcError tirtc_audio_output_stop_raw_dump(TirtcAudioOutput* output);
|
|
|
209
220
|
TirtcError tirtc_metrics_audio_output_get_snapshot(TirtcAudioOutput* output,
|
|
210
221
|
TirtcAudioOutputMetricsSnapshot* out_snapshot);
|
|
211
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Copies the current or cached audio output diagnostic snapshot.
|
|
225
|
+
*
|
|
226
|
+
* The output owns the underlying media downlink. Callers provide only `out_snapshot` storage and do
|
|
227
|
+
* not receive ownership of any runtime object. The function returns `TIRTC_ERROR_INVALID_ARGUMENT`
|
|
228
|
+
* for null arguments and does not emit output callbacks or change output state.
|
|
229
|
+
*/
|
|
230
|
+
TirtcError tirtc_audio_output_get_debug_snapshot(TirtcAudioOutput* output,
|
|
231
|
+
TirtcAudioOutputDebugSnapshot* out_snapshot);
|
|
232
|
+
|
|
212
233
|
#ifdef __cplusplus
|
|
213
234
|
}
|
|
214
235
|
#endif
|
|
@@ -48,6 +48,23 @@ typedef struct TirtcVideoOutputMetricsSnapshot {
|
|
|
48
48
|
TirtcPendingDurationMetrics pending;
|
|
49
49
|
} TirtcVideoOutputMetricsSnapshot;
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Diagnostic facts currently known for a video output.
|
|
53
|
+
*
|
|
54
|
+
* The snapshot is a caller-owned value copy. `resolved_decoder_backend` is the runtime route that
|
|
55
|
+
* has actually locked, so AUTO fallback reports the concrete backend family instead of the request.
|
|
56
|
+
* Zero values mean no current fact or only cached zero-state is available. Additive changes require
|
|
57
|
+
* a new V2 struct/function instead of extending this layout.
|
|
58
|
+
*/
|
|
59
|
+
typedef struct TirtcVideoOutputDebugSnapshot {
|
|
60
|
+
TirtcMediaCodec codec;
|
|
61
|
+
TirtcVideoBitstreamFormat bitstream_format;
|
|
62
|
+
uint32_t width;
|
|
63
|
+
uint32_t height;
|
|
64
|
+
TirtcVideoDecoderPreference requested_decoder_preference;
|
|
65
|
+
TirtcVideoDecoderBackendKind resolved_decoder_backend;
|
|
66
|
+
} TirtcVideoOutputDebugSnapshot;
|
|
67
|
+
|
|
51
68
|
typedef struct TirtcVideoOutputOptions {
|
|
52
69
|
TirtcVideoDecoderPreference decoder_preference;
|
|
53
70
|
} TirtcVideoOutputOptions;
|
|
@@ -201,6 +218,17 @@ TirtcError tirtc_video_output_stop_raw_dump(TirtcVideoOutput* output);
|
|
|
201
218
|
TirtcError tirtc_metrics_video_output_get_snapshot(TirtcVideoOutput* output,
|
|
202
219
|
TirtcVideoOutputMetricsSnapshot* out_snapshot);
|
|
203
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Copies the current or cached video output diagnostic snapshot.
|
|
223
|
+
*
|
|
224
|
+
* The output owns the underlying media downlink and the returned data is only a value copy. Use
|
|
225
|
+
* this for diagnostics and UI visibility, not to drive decoder selection. The function returns
|
|
226
|
+
* `TIRTC_ERROR_INVALID_ARGUMENT` for null arguments and does not emit output callbacks or change
|
|
227
|
+
* output state.
|
|
228
|
+
*/
|
|
229
|
+
TirtcError tirtc_video_output_get_debug_snapshot(TirtcVideoOutput* output,
|
|
230
|
+
TirtcVideoOutputDebugSnapshot* out_snapshot);
|
|
231
|
+
|
|
204
232
|
#ifdef __cplusplus
|
|
205
233
|
}
|
|
206
234
|
#endif
|
|
@@ -9,8 +9,6 @@ typedef enum TirtcError {
|
|
|
9
9
|
TIRTC_ERROR_OK = 0,
|
|
10
10
|
TIRTC_ERROR_INVALID_ARGUMENT = 6000,
|
|
11
11
|
TIRTC_ERROR_NOT_INITIALIZED = 6001,
|
|
12
|
-
TIRTC_ERROR_INTERNAL = 6002,
|
|
13
|
-
TIRTC_ERROR_NOT_READY = 6003,
|
|
14
12
|
TIRTC_ERROR_UNSUPPORTED_LOOP_POLICY = 6004,
|
|
15
13
|
TIRTC_ERROR_SOURCE_HASH_MISMATCH = 6005,
|
|
16
14
|
TIRTC_ERROR_ALREADY_STOPPED = 6006,
|
|
@@ -52,6 +50,47 @@ typedef enum TirtcError {
|
|
|
52
50
|
TIRTC_ERROR_VIDEO_DECODER_RUNTIME_FAILED = 6040,
|
|
53
51
|
TIRTC_ERROR_VIDEO_OUTPUT_TARGET_UNAVAILABLE = 6041,
|
|
54
52
|
TIRTC_ERROR_VIDEO_OUTPUT_RENDER_FAILED = 6042,
|
|
53
|
+
TIRTC_ERROR_RESOURCE_EXHAUSTED = 6043,
|
|
54
|
+
TIRTC_ERROR_FILE_OPEN_FAILED = 6044,
|
|
55
|
+
TIRTC_ERROR_FILE_READ_FAILED = 6045,
|
|
56
|
+
TIRTC_ERROR_FILE_WRITE_FAILED = 6046,
|
|
57
|
+
TIRTC_ERROR_HTTP_REQUEST_FAILED = 6047,
|
|
58
|
+
TIRTC_ERROR_LOG_EXPORT_FAILED = 6048,
|
|
59
|
+
TIRTC_ERROR_LOG_UPLOAD_FAILED = 6049,
|
|
60
|
+
TIRTC_ERROR_S3_UPLOAD_FAILED = 6050,
|
|
61
|
+
TIRTC_ERROR_AUDIO_INPUT_OPEN_FAILED = 6051,
|
|
62
|
+
TIRTC_ERROR_AUDIO_INPUT_RUNTIME_FAILED = 6052,
|
|
63
|
+
TIRTC_ERROR_AUDIO_OUTPUT_OPEN_FAILED = 6053,
|
|
64
|
+
TIRTC_ERROR_AUDIO_OUTPUT_RUNTIME_FAILED = 6054,
|
|
65
|
+
TIRTC_ERROR_AUDIO_PROCESSING_INITIALIZATION_FAILED = 6055,
|
|
66
|
+
TIRTC_ERROR_AUDIO_PROCESSING_RUNTIME_FAILED = 6056,
|
|
67
|
+
TIRTC_ERROR_VIDEO_ENCODER_RUNTIME_FAILED = 6057,
|
|
68
|
+
TIRTC_ERROR_VIDEO_PROCESSING_RUNTIME_FAILED = 6058,
|
|
69
|
+
TIRTC_ERROR_VIDEO_INPUT_OPEN_FAILED = 6059,
|
|
70
|
+
TIRTC_ERROR_VIDEO_INPUT_RUNTIME_FAILED = 6060,
|
|
71
|
+
TIRTC_ERROR_VIDEO_OUTPUT_OPEN_FAILED = 6061,
|
|
72
|
+
TIRTC_ERROR_MEDIA_UPLINK_CREATE_FAILED = 6062,
|
|
73
|
+
TIRTC_ERROR_MEDIA_UPLINK_START_FAILED = 6063,
|
|
74
|
+
TIRTC_ERROR_MEDIA_DOWNLINK_DECODE_FAILED = 6064,
|
|
75
|
+
TIRTC_ERROR_MEDIA_RAW_DUMP_FAILED = 6065,
|
|
76
|
+
TIRTC_ERROR_FACADE_RUNTIME_FAILED = 6066,
|
|
77
|
+
TIRTC_ERROR_LOG_WRITE_FAILED = 6067,
|
|
78
|
+
TIRTC_ERROR_AUDIO_ENCODER_RUNTIME_FAILED = 6068,
|
|
79
|
+
TIRTC_ERROR_AUDIO_DECODER_RUNTIME_FAILED = 6069,
|
|
80
|
+
TIRTC_ERROR_HTTP_CLIENT_UNAVAILABLE = 6070,
|
|
81
|
+
TIRTC_ERROR_HTTP_TLS_UNSUPPORTED = 6071,
|
|
82
|
+
TIRTC_ERROR_UPLOAD_TOKEN_EXPIRED = 6072,
|
|
83
|
+
TIRTC_ERROR_STREAM_ID_IN_USE = 6073,
|
|
84
|
+
TIRTC_ERROR_VIDEO_PREVIEW_IN_USE = 6074,
|
|
85
|
+
TIRTC_ERROR_FACADE_PEER_ID_UNAVAILABLE = 6075,
|
|
86
|
+
TIRTC_ERROR_MEDIA_DOWNLINK_QUEUE_FULL = 6076,
|
|
87
|
+
TIRTC_ERROR_MEDIA_DOWNLINK_OUTPUT_PENDING = 6077,
|
|
88
|
+
TIRTC_ERROR_TRANSPORT_INVALID_HANDLE = 6078,
|
|
89
|
+
TIRTC_ERROR_VIDEO_ENCODER_INPUT_PENDING = 6079,
|
|
90
|
+
TIRTC_ERROR_VIDEO_ENCODER_OUTPUT_PENDING = 6080,
|
|
91
|
+
TIRTC_ERROR_VIDEO_DECODER_INPUT_PENDING = 6081,
|
|
92
|
+
TIRTC_ERROR_VIDEO_DECODER_OUTPUT_PENDING = 6082,
|
|
93
|
+
TIRTC_ERROR_MEDIA_UPLINK_INPUT_MODE_MISMATCH = 6083,
|
|
55
94
|
} TirtcError;
|
|
56
95
|
|
|
57
96
|
const char* tirtc_error_to_string(TirtcError error);
|
|
@@ -86,6 +86,33 @@ typedef struct TirtcMediaDownlinkVideoMetricsSnapshot {
|
|
|
86
86
|
TirtcMediaDownlinkPendingMetricsSnapshot pending;
|
|
87
87
|
} TirtcMediaDownlinkVideoMetricsSnapshot;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Diagnostic facts currently known by an audio downlink.
|
|
91
|
+
*
|
|
92
|
+
* The snapshot is a value copy into caller-owned storage. `codec` is
|
|
93
|
+
* `TIRTC_MEDIA_CODEC_NONE` until the downlink accepts a valid encoded audio frame.
|
|
94
|
+
*/
|
|
95
|
+
typedef struct TirtcMediaDownlinkAudioDebugSnapshot {
|
|
96
|
+
TirtcMediaCodec codec;
|
|
97
|
+
} TirtcMediaDownlinkAudioDebugSnapshot;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Diagnostic facts currently known by a video downlink.
|
|
101
|
+
*
|
|
102
|
+
* The snapshot is a value copy into caller-owned storage. Zero values mean the downlink has not
|
|
103
|
+
* observed the corresponding fact since start/reset. `requested_decoder_preference` reflects the
|
|
104
|
+
* configured option; `resolved_decoder_backend` is only set after the runtime locks a concrete
|
|
105
|
+
* decode route.
|
|
106
|
+
*/
|
|
107
|
+
typedef struct TirtcMediaDownlinkVideoDebugSnapshot {
|
|
108
|
+
TirtcMediaCodec codec;
|
|
109
|
+
TirtcVideoBitstreamFormat bitstream_format;
|
|
110
|
+
uint32_t width;
|
|
111
|
+
uint32_t height;
|
|
112
|
+
TirtcVideoDecoderPreference requested_decoder_preference;
|
|
113
|
+
TirtcVideoDecoderBackendKind resolved_decoder_backend;
|
|
114
|
+
} TirtcMediaDownlinkVideoDebugSnapshot;
|
|
115
|
+
|
|
89
116
|
TirtcError tirtc_media_downlink_audio_create(TirtcMediaDownlinkAudio** out_downlink);
|
|
90
117
|
void tirtc_media_downlink_audio_retain(TirtcMediaDownlinkAudio* downlink);
|
|
91
118
|
void tirtc_media_downlink_audio_release(TirtcMediaDownlinkAudio* downlink);
|
|
@@ -147,6 +174,24 @@ TirtcError tirtc_media_downlink_video_get_metrics_snapshot(
|
|
|
147
174
|
TirtcMediaDownlinkVideo* downlink, TirtcMediaDownlinkVideoMetricsSnapshot* out_snapshot);
|
|
148
175
|
void tirtc_media_downlink_video_reset_metrics_session(TirtcMediaDownlinkVideo* downlink);
|
|
149
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Copies the current audio downlink diagnostic snapshot.
|
|
179
|
+
*
|
|
180
|
+
* This call does not start, stop, flush, or otherwise change the downlink. It returns
|
|
181
|
+
* `TIRTC_ERROR_INVALID_ARGUMENT` when `downlink` or `out_snapshot` is null.
|
|
182
|
+
*/
|
|
183
|
+
TirtcError tirtc_media_downlink_audio_get_debug_snapshot(
|
|
184
|
+
TirtcMediaDownlinkAudio* downlink, TirtcMediaDownlinkAudioDebugSnapshot* out_snapshot);
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Copies the current video downlink diagnostic snapshot.
|
|
188
|
+
*
|
|
189
|
+
* This call does not start, stop, flush, or otherwise change the downlink. It returns
|
|
190
|
+
* `TIRTC_ERROR_INVALID_ARGUMENT` when `downlink` or `out_snapshot` is null.
|
|
191
|
+
*/
|
|
192
|
+
TirtcError tirtc_media_downlink_video_get_debug_snapshot(
|
|
193
|
+
TirtcMediaDownlinkVideo* downlink, TirtcMediaDownlinkVideoDebugSnapshot* out_snapshot);
|
|
194
|
+
|
|
150
195
|
#ifdef __cplusplus
|
|
151
196
|
}
|
|
152
197
|
#endif
|