tirtc-devtools-cli 0.0.9 → 0.0.11
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 +17 -11
- package/USAGE.md +72 -33
- package/bin/tirtc-devtools-cli.js +1 -1
- package/dist/cli/src/bootstrap_flows.d.ts +46 -0
- package/dist/cli/src/bootstrap_flows.js +249 -0
- package/dist/{devtools/cli → cli}/src/config.d.ts +4 -15
- package/dist/{devtools/cli → cli}/src/config.js +7 -31
- package/dist/cli/src/default_paths.d.ts +3 -0
- package/dist/cli/src/default_paths.js +23 -0
- package/dist/{devtools/cli → cli}/src/embedded_paths.d.ts +1 -0
- package/dist/{devtools/cli → cli}/src/embedded_paths.js +18 -1
- package/dist/{devtools/cli → cli}/src/facade.d.ts +41 -235
- package/dist/{devtools/cli → cli}/src/facade.js +8 -27
- package/dist/cli/src/guide.js +47 -0
- package/dist/{devtools/cli → cli}/src/index.js +55 -141
- package/dist/{devtools/cli → cli}/src/session_manager.js +9 -11
- package/dist/{devtools/cli → cli}/src/token_command.js +69 -0
- package/dist/{devtools/cli → cli}/src/token_tool.d.ts +26 -0
- package/dist/{devtools/cli → cli}/src/token_tool.js +123 -22
- package/dist/{devtools/cli → cli}/src/transport.d.ts +1 -1
- package/package.json +6 -2
- package/script/ensure_ffmpeg.sh +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/include/tirtc/credential.h +34 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/error.h +13 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/foundation/build_info.h +27 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/http.h +57 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/logging.h +3 -1
- 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/manifest.txt +2 -32
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/audio.h +176 -133
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/av.h +223 -182
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/error.h +2 -0
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/media_downlink.h +6 -0
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/transport.h +58 -133
- package/vendor/app-server/bin/runtime/macos-arm64/include/tirtc/trp.h +47 -224
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libTGTRP.a +0 -0
- package/vendor/app-server/bin/runtime/macos-arm64/lib/libTiRTC.a +0 -0
- 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 +19 -15
- package/vendor/app-server/dist/host/HostCommandCoordinator.d.ts +19 -0
- package/vendor/app-server/dist/host/HostCommandCoordinator.js +196 -0
- package/vendor/app-server/dist/host/HostProtocol.d.ts +1 -11
- package/vendor/app-server/dist/host/HostProtocol.js +3 -37
- package/vendor/app-server/dist/host/HostServer.d.ts +1 -4
- package/vendor/app-server/dist/host/HostServer.js +16 -152
- package/vendor/app-server/dist/host/RuntimeAdapter.js +2 -2
- package/vendor/app-server/dist/host/native/RuntimeCredentialTokenIssuer.js +3 -3
- package/vendor/app-server/dist/host/native/RuntimeHostBridge.js +4 -4
- package/vendor/app-server/dist/host/runtime_backed_preflight.js +2 -2
- package/vendor/app-server/dist/host/tests/helpers/runtime_e2e_local_config.js +1 -1
- package/vendor/app-server/dist/protocol/contract.d.ts +5 -64
- package/vendor/app-server/dist/protocol/contract.js +3 -12
- package/dist/devtools/cli/src/guide.js +0 -50
- package/dist/dummy.d.ts +0 -0
- package/dist/dummy.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -48
- package/vendor/app-server/bin/native/macos-arm64/libcrypto.dylib +0 -0
- package/vendor/app-server/bin/native/macos-arm64/libssl.dylib +0 -0
- package/vendor/app-server/bin/native/macos-arm64/runtime_host_napi.node +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_codec.h +0 -23
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_frame.h +0 -36
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io.h +0 -56
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_android.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_apple.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_harmony.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_io_windows.h +0 -19
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_processing.h +0 -56
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/audio_sample_rate.h +0 -18
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_codec.h +0 -21
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_downlink.h +0 -89
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/media_uplink.h +0 -115
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/runtime.h +0 -236
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_codec.h +0 -57
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_frame.h +0 -55
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io.h +0 -46
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_android.h +0 -32
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_apple.h +0 -34
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_harmony.h +0 -32
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_io_windows.h +0 -26
- package/vendor/app-server/bin/runtime/linux-x64/include/tirtc/video_processing.h +0 -34
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_audio.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_facade.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_media.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libmatrix_runtime_video.a +0 -0
- package/vendor/app-server/bin/runtime/linux-x64/lib/libwebrtc_apm.a +0 -0
- package/vendor/app-server/dist/host/RuntimeCredentialTokenIssuer.d.ts +0 -30
- package/vendor/app-server/dist/host/RuntimeCredentialTokenIssuer.js +0 -224
- /package/dist/{devtools/cli → cli}/src/dummy.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/dummy.js +0 -0
- /package/dist/{devtools/cli → cli}/src/ffmpeg_tool.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/ffmpeg_tool.js +0 -0
- /package/dist/{devtools/cli → cli}/src/guide.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/index.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/media_assets.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/media_assets.js +0 -0
- /package/dist/{devtools/cli → cli}/src/progress.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/progress.js +0 -0
- /package/dist/{devtools/cli → cli}/src/session_manager.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/token_command.d.ts +0 -0
- /package/dist/{devtools/cli → cli}/src/transport.js +0 -0
- /package/vendor/app-server/bin/{native/macos-arm64 → runtime/macos-arm64/lib}/libtgrtc.dylib +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
#ifndef TIRTC_MEDIA_UPLINK_H_
|
|
2
|
-
#define TIRTC_MEDIA_UPLINK_H_
|
|
3
|
-
|
|
4
|
-
#include <stdint.h>
|
|
5
|
-
|
|
6
|
-
#include "tirtc/audio_frame.h"
|
|
7
|
-
#include "tirtc/audio_io.h"
|
|
8
|
-
#include "tirtc/audio_processing.h"
|
|
9
|
-
#include "tirtc/error.h"
|
|
10
|
-
#include "tirtc/media_codec.h"
|
|
11
|
-
#include "tirtc/video_frame.h"
|
|
12
|
-
#include "tirtc/video_io.h"
|
|
13
|
-
|
|
14
|
-
#ifdef __cplusplus
|
|
15
|
-
extern "C" {
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
|
-
typedef struct TirtcMediaUplinkPtsSource TirtcMediaUplinkPtsSource;
|
|
19
|
-
typedef struct TirtcMediaUplinkAudio TirtcMediaUplinkAudio;
|
|
20
|
-
typedef struct TirtcMediaUplinkVideo TirtcMediaUplinkVideo;
|
|
21
|
-
|
|
22
|
-
typedef enum TirtcMediaUplinkState {
|
|
23
|
-
TIRTC_MEDIA_UPLINK_STATE_IDLE = 0,
|
|
24
|
-
TIRTC_MEDIA_UPLINK_STATE_RUNNING = 1,
|
|
25
|
-
TIRTC_MEDIA_UPLINK_STATE_PAUSED = 2,
|
|
26
|
-
TIRTC_MEDIA_UPLINK_STATE_STOPPED = 3,
|
|
27
|
-
TIRTC_MEDIA_UPLINK_STATE_FAILED = 4,
|
|
28
|
-
} TirtcMediaUplinkState;
|
|
29
|
-
|
|
30
|
-
typedef struct TirtcMediaUplinkAudioOptions {
|
|
31
|
-
TirtcAudioSampleRate sample_rate;
|
|
32
|
-
TirtcAudioAecMode aec_mode;
|
|
33
|
-
TirtcAudioAgcLevel agc_level;
|
|
34
|
-
TirtcAudioAnsLevel ans_level;
|
|
35
|
-
} TirtcMediaUplinkAudioOptions;
|
|
36
|
-
|
|
37
|
-
typedef struct TirtcMediaUplinkVideoOptions {
|
|
38
|
-
TirtcMediaCodec codec;
|
|
39
|
-
uint32_t width;
|
|
40
|
-
uint32_t height;
|
|
41
|
-
uint32_t fps;
|
|
42
|
-
uint32_t bitrate_kbps;
|
|
43
|
-
} TirtcMediaUplinkVideoOptions;
|
|
44
|
-
|
|
45
|
-
typedef struct TirtcMediaUplinkAudioSink {
|
|
46
|
-
void (*on_encoded_frame)(TirtcMediaUplinkAudio* uplink, const TirtcAudioEncodedFrame* frame,
|
|
47
|
-
void* user_data);
|
|
48
|
-
} TirtcMediaUplinkAudioSink;
|
|
49
|
-
|
|
50
|
-
typedef struct TirtcMediaUplinkVideoSink {
|
|
51
|
-
void (*on_encoded_frame)(TirtcMediaUplinkVideo* uplink, const TirtcVideoEncodedFrame* frame,
|
|
52
|
-
void* user_data);
|
|
53
|
-
} TirtcMediaUplinkVideoSink;
|
|
54
|
-
|
|
55
|
-
typedef struct TirtcMediaUplinkAudioObserver {
|
|
56
|
-
void (*on_state_changed)(TirtcMediaUplinkAudio* uplink, TirtcMediaUplinkState state,
|
|
57
|
-
TirtcError error, void* user_data);
|
|
58
|
-
} TirtcMediaUplinkAudioObserver;
|
|
59
|
-
|
|
60
|
-
typedef struct TirtcMediaUplinkVideoObserver {
|
|
61
|
-
void (*on_state_changed)(TirtcMediaUplinkVideo* uplink, TirtcMediaUplinkState state,
|
|
62
|
-
TirtcError error, void* user_data);
|
|
63
|
-
void (*on_output_size_changed)(TirtcMediaUplinkVideo* uplink, uint32_t width, uint32_t height,
|
|
64
|
-
void* user_data);
|
|
65
|
-
} TirtcMediaUplinkVideoObserver;
|
|
66
|
-
|
|
67
|
-
TirtcError tirtc_media_uplink_pts_source_create(TirtcMediaUplinkPtsSource** out_pts_source);
|
|
68
|
-
void tirtc_media_uplink_pts_source_destroy(TirtcMediaUplinkPtsSource* pts_source);
|
|
69
|
-
|
|
70
|
-
TirtcError tirtc_media_uplink_audio_create(TirtcMediaUplinkAudio** out_uplink);
|
|
71
|
-
void tirtc_media_uplink_audio_destroy(TirtcMediaUplinkAudio* uplink);
|
|
72
|
-
TirtcError tirtc_media_uplink_audio_set_pts_source(TirtcMediaUplinkAudio* uplink,
|
|
73
|
-
TirtcMediaUplinkPtsSource* pts_source);
|
|
74
|
-
TirtcError tirtc_media_uplink_audio_set_ain(TirtcMediaUplinkAudio* uplink, TirtcAudioAin* ain);
|
|
75
|
-
TirtcError tirtc_media_uplink_audio_set_options(TirtcMediaUplinkAudio* uplink,
|
|
76
|
-
const TirtcMediaUplinkAudioOptions* options);
|
|
77
|
-
TirtcError tirtc_media_uplink_audio_set_sink(TirtcMediaUplinkAudio* uplink,
|
|
78
|
-
const TirtcMediaUplinkAudioSink* sink,
|
|
79
|
-
void* user_data);
|
|
80
|
-
TirtcError tirtc_media_uplink_audio_clear_sink(TirtcMediaUplinkAudio* uplink);
|
|
81
|
-
TirtcError tirtc_media_uplink_audio_set_observer(TirtcMediaUplinkAudio* uplink,
|
|
82
|
-
const TirtcMediaUplinkAudioObserver* observer,
|
|
83
|
-
void* user_data);
|
|
84
|
-
TirtcError tirtc_media_uplink_audio_clear_observer(TirtcMediaUplinkAudio* uplink);
|
|
85
|
-
TirtcError tirtc_media_uplink_audio_start(TirtcMediaUplinkAudio* uplink);
|
|
86
|
-
TirtcError tirtc_media_uplink_audio_stop(TirtcMediaUplinkAudio* uplink);
|
|
87
|
-
|
|
88
|
-
TirtcError tirtc_media_uplink_video_create(TirtcMediaUplinkVideo** out_uplink);
|
|
89
|
-
void tirtc_media_uplink_video_destroy(TirtcMediaUplinkVideo* uplink);
|
|
90
|
-
TirtcError tirtc_media_uplink_video_set_pts_source(TirtcMediaUplinkVideo* uplink,
|
|
91
|
-
TirtcMediaUplinkPtsSource* pts_source);
|
|
92
|
-
TirtcError tirtc_media_uplink_video_set_vin(TirtcMediaUplinkVideo* uplink, TirtcVideoVin* vin);
|
|
93
|
-
TirtcError tirtc_media_uplink_video_set_options(TirtcMediaUplinkVideo* uplink,
|
|
94
|
-
const TirtcMediaUplinkVideoOptions* options);
|
|
95
|
-
TirtcError tirtc_media_uplink_video_set_sink(TirtcMediaUplinkVideo* uplink,
|
|
96
|
-
const TirtcMediaUplinkVideoSink* sink,
|
|
97
|
-
void* user_data);
|
|
98
|
-
TirtcError tirtc_media_uplink_video_clear_sink(TirtcMediaUplinkVideo* uplink);
|
|
99
|
-
TirtcError tirtc_media_uplink_video_set_observer(TirtcMediaUplinkVideo* uplink,
|
|
100
|
-
const TirtcMediaUplinkVideoObserver* observer,
|
|
101
|
-
void* user_data);
|
|
102
|
-
TirtcError tirtc_media_uplink_video_clear_observer(TirtcMediaUplinkVideo* uplink);
|
|
103
|
-
TirtcError tirtc_media_uplink_video_set_preview_vout(TirtcMediaUplinkVideo* uplink,
|
|
104
|
-
TirtcVideoVout* vout);
|
|
105
|
-
TirtcError tirtc_media_uplink_video_clear_preview_vout(TirtcMediaUplinkVideo* uplink);
|
|
106
|
-
TirtcError tirtc_media_uplink_video_get_output_size(TirtcMediaUplinkVideo* uplink,
|
|
107
|
-
uint32_t* out_width, uint32_t* out_height);
|
|
108
|
-
TirtcError tirtc_media_uplink_video_start(TirtcMediaUplinkVideo* uplink);
|
|
109
|
-
TirtcError tirtc_media_uplink_video_stop(TirtcMediaUplinkVideo* uplink);
|
|
110
|
-
|
|
111
|
-
#ifdef __cplusplus
|
|
112
|
-
}
|
|
113
|
-
#endif
|
|
114
|
-
|
|
115
|
-
#endif // TIRTC_MEDIA_UPLINK_H_
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
#ifndef TIRTC_FACADE_RUNTIME_H_
|
|
2
|
-
#define TIRTC_FACADE_RUNTIME_H_
|
|
3
|
-
|
|
4
|
-
#include <stddef.h>
|
|
5
|
-
#include <stdint.h>
|
|
6
|
-
|
|
7
|
-
#include "tirtc/audio_io.h"
|
|
8
|
-
#include "tirtc/audio_processing.h"
|
|
9
|
-
#include "tirtc/error.h"
|
|
10
|
-
#include "tirtc/media_codec.h"
|
|
11
|
-
#include "tirtc/video_io.h"
|
|
12
|
-
|
|
13
|
-
#ifdef __cplusplus
|
|
14
|
-
extern "C" {
|
|
15
|
-
#endif
|
|
16
|
-
|
|
17
|
-
typedef struct TirtcOptions {
|
|
18
|
-
const char* endpoint;
|
|
19
|
-
} TirtcOptions;
|
|
20
|
-
|
|
21
|
-
typedef struct TirtcConnServiceStartOptions {
|
|
22
|
-
const char* license;
|
|
23
|
-
} TirtcConnServiceStartOptions;
|
|
24
|
-
|
|
25
|
-
typedef struct TirtcConnOptions {
|
|
26
|
-
const char* peer_id;
|
|
27
|
-
const char* token;
|
|
28
|
-
} TirtcConnOptions;
|
|
29
|
-
|
|
30
|
-
typedef struct TirtcConnService TirtcConnService;
|
|
31
|
-
typedef struct TirtcConn TirtcConn;
|
|
32
|
-
typedef struct TirtcAudioInput TirtcAudioInput;
|
|
33
|
-
typedef struct TirtcAudioOutput TirtcAudioOutput;
|
|
34
|
-
typedef struct TirtcVideoInput TirtcVideoInput;
|
|
35
|
-
typedef struct TirtcVideoOutput TirtcVideoOutput;
|
|
36
|
-
|
|
37
|
-
typedef enum TirtcConnState {
|
|
38
|
-
TIRTC_CONN_STATE_CONNECTING = 1,
|
|
39
|
-
TIRTC_CONN_STATE_CONNECTED = 2,
|
|
40
|
-
TIRTC_CONN_STATE_DISCONNECTED = 3,
|
|
41
|
-
} TirtcConnState;
|
|
42
|
-
|
|
43
|
-
typedef enum TirtcConnDisconnectReason {
|
|
44
|
-
TIRTC_CONN_DISCONNECT_REASON_UNKNOWN = 0,
|
|
45
|
-
TIRTC_CONN_DISCONNECT_REASON_LOCAL_CLOSED = 1,
|
|
46
|
-
TIRTC_CONN_DISCONNECT_REASON_REMOTE_CLOSED = 2,
|
|
47
|
-
TIRTC_CONN_DISCONNECT_REASON_CONNECT_FAILED = 3,
|
|
48
|
-
TIRTC_CONN_DISCONNECT_REASON_INVALID_DESCRIPTOR = 4,
|
|
49
|
-
TIRTC_CONN_DISCONNECT_REASON_BACKEND_ERROR = 5,
|
|
50
|
-
} TirtcConnDisconnectReason;
|
|
51
|
-
|
|
52
|
-
typedef enum TirtcInputState {
|
|
53
|
-
TIRTC_INPUT_STATE_IDLE = 0,
|
|
54
|
-
TIRTC_INPUT_STATE_RUNNING = 1,
|
|
55
|
-
TIRTC_INPUT_STATE_PAUSED = 2,
|
|
56
|
-
TIRTC_INPUT_STATE_STOPPED = 3,
|
|
57
|
-
TIRTC_INPUT_STATE_FAILED = 4,
|
|
58
|
-
} TirtcInputState;
|
|
59
|
-
|
|
60
|
-
typedef enum TirtcAudioOutputState {
|
|
61
|
-
TIRTC_AUDIO_OUTPUT_STATE_IDLE = 0,
|
|
62
|
-
TIRTC_AUDIO_OUTPUT_STATE_PLAYING = 1,
|
|
63
|
-
TIRTC_AUDIO_OUTPUT_STATE_BUFFERING = 2,
|
|
64
|
-
TIRTC_AUDIO_OUTPUT_STATE_PAUSED = 3,
|
|
65
|
-
TIRTC_AUDIO_OUTPUT_STATE_COMPLETED = 4,
|
|
66
|
-
TIRTC_AUDIO_OUTPUT_STATE_FAILED = 5,
|
|
67
|
-
} TirtcAudioOutputState;
|
|
68
|
-
|
|
69
|
-
typedef enum TirtcVideoOutputState {
|
|
70
|
-
TIRTC_VIDEO_OUTPUT_STATE_IDLE = 0,
|
|
71
|
-
TIRTC_VIDEO_OUTPUT_STATE_RENDERING = 1,
|
|
72
|
-
TIRTC_VIDEO_OUTPUT_STATE_BUFFERING = 2,
|
|
73
|
-
TIRTC_VIDEO_OUTPUT_STATE_PAUSED = 3,
|
|
74
|
-
TIRTC_VIDEO_OUTPUT_STATE_COMPLETED = 4,
|
|
75
|
-
TIRTC_VIDEO_OUTPUT_STATE_FAILED = 5,
|
|
76
|
-
} TirtcVideoOutputState;
|
|
77
|
-
|
|
78
|
-
typedef struct TirtcStreamMessage {
|
|
79
|
-
uint32_t timestamp_ms;
|
|
80
|
-
const void* data;
|
|
81
|
-
size_t length;
|
|
82
|
-
} TirtcStreamMessage;
|
|
83
|
-
|
|
84
|
-
typedef struct TirtcCommand {
|
|
85
|
-
uint16_t sequence_number;
|
|
86
|
-
uint16_t command_id;
|
|
87
|
-
uint8_t is_response;
|
|
88
|
-
const void* data;
|
|
89
|
-
size_t length;
|
|
90
|
-
} TirtcCommand;
|
|
91
|
-
|
|
92
|
-
typedef struct TirtcConnServiceObserver {
|
|
93
|
-
void (*on_started)(TirtcConnService* service, void* user_data);
|
|
94
|
-
void (*on_stopped)(TirtcConnService* service, void* user_data);
|
|
95
|
-
void (*on_connected)(TirtcConnService* service, TirtcConn* connection, void* user_data);
|
|
96
|
-
void (*on_error)(TirtcConnService* service, TirtcError error, const char* message,
|
|
97
|
-
void* user_data);
|
|
98
|
-
} TirtcConnServiceObserver;
|
|
99
|
-
|
|
100
|
-
typedef struct TirtcConnObserver {
|
|
101
|
-
void (*on_state_changed)(TirtcConn* connection, TirtcConnState state, void* user_data);
|
|
102
|
-
void (*on_disconnected)(TirtcConn* connection, TirtcConnDisconnectReason reason, void* user_data);
|
|
103
|
-
void (*on_stream_message)(TirtcConn* connection, uint8_t stream_id,
|
|
104
|
-
const TirtcStreamMessage* message, void* user_data);
|
|
105
|
-
void (*on_command)(TirtcConn* connection, const TirtcCommand* command, void* user_data);
|
|
106
|
-
void (*on_error)(TirtcConn* connection, TirtcError error, const char* message, void* user_data);
|
|
107
|
-
void (*on_request_iframe)(TirtcConn* connection, uint8_t stream_id, void* user_data);
|
|
108
|
-
int (*on_request_video)(TirtcConn* connection, uint8_t stream_id, void* user_data);
|
|
109
|
-
void (*on_release_video)(TirtcConn* connection, uint8_t stream_id, void* user_data);
|
|
110
|
-
int (*on_request_audio)(TirtcConn* connection, uint8_t stream_id, void* user_data);
|
|
111
|
-
void (*on_release_audio)(TirtcConn* connection, uint8_t stream_id, void* user_data);
|
|
112
|
-
} TirtcConnObserver;
|
|
113
|
-
|
|
114
|
-
typedef struct TirtcAudioInputOptions {
|
|
115
|
-
TirtcAudioSampleRate sample_rate;
|
|
116
|
-
TirtcAudioAecMode aec_mode;
|
|
117
|
-
TirtcAudioAgcLevel agc_level;
|
|
118
|
-
TirtcAudioAnsLevel ans_level;
|
|
119
|
-
} TirtcAudioInputOptions;
|
|
120
|
-
|
|
121
|
-
typedef struct TirtcAudioOutputOptions {
|
|
122
|
-
uint32_t volume_percent;
|
|
123
|
-
int gain_level;
|
|
124
|
-
int noise_reduction_level;
|
|
125
|
-
} TirtcAudioOutputOptions;
|
|
126
|
-
|
|
127
|
-
typedef struct TirtcVideoInputOptions {
|
|
128
|
-
TirtcMediaCodec codec;
|
|
129
|
-
uint32_t width;
|
|
130
|
-
uint32_t height;
|
|
131
|
-
uint32_t fps;
|
|
132
|
-
uint32_t bitrate_kbps;
|
|
133
|
-
} TirtcVideoInputOptions;
|
|
134
|
-
|
|
135
|
-
typedef struct TirtcAudioInputObserver {
|
|
136
|
-
void (*on_state_changed)(TirtcAudioInput* input, TirtcInputState state, TirtcError error,
|
|
137
|
-
void* user_data);
|
|
138
|
-
} TirtcAudioInputObserver;
|
|
139
|
-
|
|
140
|
-
typedef struct TirtcVideoInputObserver {
|
|
141
|
-
void (*on_state_changed)(TirtcVideoInput* input, TirtcInputState state, TirtcError error,
|
|
142
|
-
void* user_data);
|
|
143
|
-
void (*on_output_size_changed)(TirtcVideoInput* input, uint32_t width, uint32_t height,
|
|
144
|
-
void* user_data);
|
|
145
|
-
} TirtcVideoInputObserver;
|
|
146
|
-
|
|
147
|
-
typedef struct TirtcAudioOutputObserver {
|
|
148
|
-
void (*on_state_changed)(TirtcAudioOutput* output, TirtcAudioOutputState state, TirtcError error,
|
|
149
|
-
void* user_data);
|
|
150
|
-
} TirtcAudioOutputObserver;
|
|
151
|
-
|
|
152
|
-
typedef struct TirtcVideoOutputObserver {
|
|
153
|
-
void (*on_state_changed)(TirtcVideoOutput* output, TirtcVideoOutputState state, TirtcError error,
|
|
154
|
-
void* user_data);
|
|
155
|
-
void (*on_output_size_changed)(TirtcVideoOutput* output, uint32_t width, uint32_t height,
|
|
156
|
-
void* user_data);
|
|
157
|
-
} TirtcVideoOutputObserver;
|
|
158
|
-
|
|
159
|
-
TirtcError tirtc_init(const TirtcOptions* options);
|
|
160
|
-
void tirtc_uninit(void);
|
|
161
|
-
|
|
162
|
-
TirtcError tirtc_conn_service_start(const TirtcConnServiceStartOptions* options,
|
|
163
|
-
const TirtcConnServiceObserver* observer, void* user_data,
|
|
164
|
-
TirtcConnService** out_service);
|
|
165
|
-
TirtcError tirtc_conn_service_stop(TirtcConnService* service);
|
|
166
|
-
|
|
167
|
-
TirtcError tirtc_connect(const TirtcConnOptions* options, TirtcConn** out_connection);
|
|
168
|
-
TirtcError tirtc_conn_set_observer(TirtcConn* connection, const TirtcConnObserver* observer,
|
|
169
|
-
void* user_data);
|
|
170
|
-
TirtcError tirtc_disconnect(TirtcConn* connection);
|
|
171
|
-
void tirtc_conn_destroy(TirtcConn* connection);
|
|
172
|
-
|
|
173
|
-
TirtcError tirtc_send_stream_message(TirtcConn* connection, uint8_t stream_id,
|
|
174
|
-
const TirtcStreamMessage* message);
|
|
175
|
-
TirtcError tirtc_send_command(TirtcConn* connection, const TirtcCommand* command);
|
|
176
|
-
TirtcError tirtc_conn_request_iframe(TirtcConn* connection, uint8_t stream_id);
|
|
177
|
-
TirtcError tirtc_conn_request_video(TirtcConn* connection, uint8_t stream_id);
|
|
178
|
-
TirtcError tirtc_conn_release_video(TirtcConn* connection, uint8_t stream_id);
|
|
179
|
-
TirtcError tirtc_conn_request_audio(TirtcConn* connection, uint8_t stream_id);
|
|
180
|
-
TirtcError tirtc_conn_release_audio(TirtcConn* connection, uint8_t stream_id);
|
|
181
|
-
|
|
182
|
-
TirtcError tirtc_conn_bind_audio_input(TirtcConn* connection, uint8_t stream_id,
|
|
183
|
-
TirtcAudioInput* input);
|
|
184
|
-
TirtcError tirtc_conn_bind_audio_output(TirtcConn* connection, TirtcAudioOutput* output);
|
|
185
|
-
TirtcError tirtc_conn_bind_video_input(TirtcConn* connection, uint8_t stream_id,
|
|
186
|
-
TirtcVideoInput* input);
|
|
187
|
-
TirtcError tirtc_conn_bind_video_output(TirtcConn* connection, uint8_t stream_id,
|
|
188
|
-
TirtcVideoOutput* output);
|
|
189
|
-
TirtcError tirtc_conn_unbind_audio_input(TirtcConn* connection, uint8_t stream_id);
|
|
190
|
-
TirtcError tirtc_conn_unbind_audio_output(TirtcConn* connection);
|
|
191
|
-
TirtcError tirtc_conn_unbind_video_input(TirtcConn* connection, uint8_t stream_id);
|
|
192
|
-
TirtcError tirtc_conn_unbind_video_output(TirtcConn* connection, uint8_t stream_id);
|
|
193
|
-
|
|
194
|
-
TirtcError tirtc_audio_input_create(TirtcAudioInput** out_input);
|
|
195
|
-
void tirtc_audio_input_destroy(TirtcAudioInput* input);
|
|
196
|
-
TirtcError tirtc_audio_input_set_ain(TirtcAudioInput* input, TirtcAudioAin* ain);
|
|
197
|
-
TirtcError tirtc_audio_input_set_options(TirtcAudioInput* input,
|
|
198
|
-
const TirtcAudioInputOptions* options);
|
|
199
|
-
TirtcError tirtc_audio_input_set_observer(TirtcAudioInput* input,
|
|
200
|
-
const TirtcAudioInputObserver* observer, void* user_data);
|
|
201
|
-
TirtcError tirtc_audio_input_start(TirtcAudioInput* input);
|
|
202
|
-
TirtcError tirtc_audio_input_stop(TirtcAudioInput* input);
|
|
203
|
-
|
|
204
|
-
TirtcError tirtc_audio_output_create(TirtcAudioOutput** out_output);
|
|
205
|
-
void tirtc_audio_output_destroy(TirtcAudioOutput* output);
|
|
206
|
-
TirtcError tirtc_audio_output_set_aout(TirtcAudioOutput* output, TirtcAudioAout* aout);
|
|
207
|
-
TirtcError tirtc_audio_output_set_options(TirtcAudioOutput* output,
|
|
208
|
-
const TirtcAudioOutputOptions* options);
|
|
209
|
-
TirtcError tirtc_audio_output_set_observer(TirtcAudioOutput* output,
|
|
210
|
-
const TirtcAudioOutputObserver* observer,
|
|
211
|
-
void* user_data);
|
|
212
|
-
|
|
213
|
-
TirtcError tirtc_video_input_create(TirtcVideoInput** out_input);
|
|
214
|
-
void tirtc_video_input_destroy(TirtcVideoInput* input);
|
|
215
|
-
TirtcError tirtc_video_input_set_vin(TirtcVideoInput* input, TirtcVideoVin* vin);
|
|
216
|
-
TirtcError tirtc_video_input_set_options(TirtcVideoInput* input,
|
|
217
|
-
const TirtcVideoInputOptions* options);
|
|
218
|
-
TirtcError tirtc_video_input_set_observer(TirtcVideoInput* input,
|
|
219
|
-
const TirtcVideoInputObserver* observer, void* user_data);
|
|
220
|
-
TirtcError tirtc_video_input_set_preview_output(TirtcVideoInput* input, TirtcVideoOutput* output);
|
|
221
|
-
TirtcError tirtc_video_input_clear_preview_output(TirtcVideoInput* input);
|
|
222
|
-
TirtcError tirtc_video_input_start(TirtcVideoInput* input);
|
|
223
|
-
TirtcError tirtc_video_input_stop(TirtcVideoInput* input);
|
|
224
|
-
|
|
225
|
-
TirtcError tirtc_video_output_create(TirtcVideoOutput** out_output);
|
|
226
|
-
void tirtc_video_output_destroy(TirtcVideoOutput* output);
|
|
227
|
-
TirtcError tirtc_video_output_set_vout(TirtcVideoOutput* output, TirtcVideoVout* vout);
|
|
228
|
-
TirtcError tirtc_video_output_set_observer(TirtcVideoOutput* output,
|
|
229
|
-
const TirtcVideoOutputObserver* observer,
|
|
230
|
-
void* user_data);
|
|
231
|
-
|
|
232
|
-
#ifdef __cplusplus
|
|
233
|
-
}
|
|
234
|
-
#endif
|
|
235
|
-
|
|
236
|
-
#endif // TIRTC_FACADE_RUNTIME_H_
|
|
@@ -1,57 +0,0 @@
|
|
|
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 struct TirtcVideoEncoderConfig {
|
|
18
|
-
TirtcMediaCodec codec;
|
|
19
|
-
TirtcVideoBitstreamFormat bitstream_format;
|
|
20
|
-
uint32_t width;
|
|
21
|
-
uint32_t height;
|
|
22
|
-
uint32_t fps;
|
|
23
|
-
uint32_t bitrate_kbps;
|
|
24
|
-
TirtcVideoPixelFormat input_pixel_format;
|
|
25
|
-
} TirtcVideoEncoderConfig;
|
|
26
|
-
|
|
27
|
-
typedef struct TirtcVideoDecoderConfig {
|
|
28
|
-
TirtcMediaCodec codec;
|
|
29
|
-
TirtcVideoBitstreamFormat bitstream_format;
|
|
30
|
-
TirtcVideoPixelFormat output_pixel_format;
|
|
31
|
-
} TirtcVideoDecoderConfig;
|
|
32
|
-
|
|
33
|
-
TirtcError tirtc_video_encoder_create(const TirtcVideoEncoderConfig* config,
|
|
34
|
-
TirtcVideoEncoder** out_encoder);
|
|
35
|
-
void tirtc_video_encoder_destroy(TirtcVideoEncoder* encoder);
|
|
36
|
-
TirtcError tirtc_video_encoder_reset(TirtcVideoEncoder* encoder);
|
|
37
|
-
TirtcError tirtc_video_encoder_encode(TirtcVideoEncoder* encoder,
|
|
38
|
-
const TirtcVideoPixelFrame* in_frame, void* out_buffer,
|
|
39
|
-
size_t out_buffer_capacity,
|
|
40
|
-
TirtcVideoEncodedFrame* out_frame);
|
|
41
|
-
|
|
42
|
-
TirtcError tirtc_video_decoder_create(const TirtcVideoDecoderConfig* config,
|
|
43
|
-
TirtcVideoDecoder** out_decoder);
|
|
44
|
-
void tirtc_video_decoder_destroy(TirtcVideoDecoder* decoder);
|
|
45
|
-
TirtcError tirtc_video_decoder_reset(TirtcVideoDecoder* decoder);
|
|
46
|
-
TirtcError tirtc_video_decoder_decode(TirtcVideoDecoder* decoder,
|
|
47
|
-
const TirtcVideoEncodedFrame* in_frame,
|
|
48
|
-
TirtcVideoPixelFrame* out_frame);
|
|
49
|
-
|
|
50
|
-
TirtcError tirtc_video_snapshot_export_jpeg(const TirtcVideoPixelFrame* frame,
|
|
51
|
-
const char* output_path);
|
|
52
|
-
|
|
53
|
-
#ifdef __cplusplus
|
|
54
|
-
}
|
|
55
|
-
#endif
|
|
56
|
-
|
|
57
|
-
#endif // TIRTC_VIDEO_CODEC_H_
|
|
@@ -1,55 +0,0 @@
|
|
|
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_
|
|
@@ -1,46 +0,0 @@
|
|
|
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 void (*TirtcVideoVinOnFrameFn)(TirtcVideoVin* vin, const TirtcVideoPixelFrame* frame,
|
|
25
|
-
void* user_data);
|
|
26
|
-
|
|
27
|
-
TirtcError tirtc_video_vin_open(TirtcVideoVin* vin, const TirtcVideoIoConfig* config,
|
|
28
|
-
TirtcVideoVinOnFrameFn on_frame, void* user_data);
|
|
29
|
-
TirtcError tirtc_video_vin_get_actual_config(TirtcVideoVin* vin, TirtcVideoIoConfig* out_config);
|
|
30
|
-
TirtcError tirtc_video_vin_start(TirtcVideoVin* vin);
|
|
31
|
-
TirtcError tirtc_video_vin_stop(TirtcVideoVin* vin);
|
|
32
|
-
TirtcError tirtc_video_vin_close(TirtcVideoVin* vin);
|
|
33
|
-
void tirtc_video_vin_destroy(TirtcVideoVin* vin);
|
|
34
|
-
|
|
35
|
-
TirtcError tirtc_video_vout_open(TirtcVideoVout* vout, const TirtcVideoIoConfig* config);
|
|
36
|
-
TirtcError tirtc_video_vout_get_actual_config(TirtcVideoVout* vout, TirtcVideoIoConfig* out_config);
|
|
37
|
-
TirtcError tirtc_video_vout_render_frame(TirtcVideoVout* vout, const TirtcVideoPixelFrame* frame);
|
|
38
|
-
TirtcError tirtc_video_vout_flush(TirtcVideoVout* vout);
|
|
39
|
-
TirtcError tirtc_video_vout_close(TirtcVideoVout* vout);
|
|
40
|
-
void tirtc_video_vout_destroy(TirtcVideoVout* vout);
|
|
41
|
-
|
|
42
|
-
#ifdef __cplusplus
|
|
43
|
-
}
|
|
44
|
-
#endif
|
|
45
|
-
|
|
46
|
-
#endif // TIRTC_VIDEO_IO_H_
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#ifndef TIRTC_VIDEO_IO_ANDROID_H_
|
|
2
|
-
#define TIRTC_VIDEO_IO_ANDROID_H_
|
|
3
|
-
|
|
4
|
-
#include "tirtc/video_io.h"
|
|
5
|
-
|
|
6
|
-
#ifdef __cplusplus
|
|
7
|
-
extern "C" {
|
|
8
|
-
#endif
|
|
9
|
-
|
|
10
|
-
#if defined(__ANDROID__)
|
|
11
|
-
struct ANativeWindow;
|
|
12
|
-
|
|
13
|
-
typedef enum TirtcVideoAndroidVoutRenderer {
|
|
14
|
-
TIRTC_VIDEO_ANDROID_VOUT_RENDERER_GLES = 0,
|
|
15
|
-
TIRTC_VIDEO_ANDROID_VOUT_RENDERER_NATIVE_WINDOW_RGBA = 1,
|
|
16
|
-
} TirtcVideoAndroidVoutRenderer;
|
|
17
|
-
|
|
18
|
-
typedef struct TirtcVideoAndroidSurfaceTextureVoutOptions {
|
|
19
|
-
struct ANativeWindow* native_window;
|
|
20
|
-
TirtcVideoAndroidVoutRenderer renderer;
|
|
21
|
-
} TirtcVideoAndroidSurfaceTextureVoutOptions;
|
|
22
|
-
|
|
23
|
-
TirtcError tirtc_video_android_create_surface_texture_vout(TirtcVideoVout** out_vout);
|
|
24
|
-
TirtcError tirtc_video_android_surface_texture_vout_set_options(
|
|
25
|
-
TirtcVideoVout* vout, const TirtcVideoAndroidSurfaceTextureVoutOptions* options);
|
|
26
|
-
#endif
|
|
27
|
-
|
|
28
|
-
#ifdef __cplusplus
|
|
29
|
-
}
|
|
30
|
-
#endif
|
|
31
|
-
|
|
32
|
-
#endif // TIRTC_VIDEO_IO_ANDROID_H_
|
|
@@ -1,34 +0,0 @@
|
|
|
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 int (*TirtcVideoAppleOnPixelBufferFn)(void* pixel_buffer, void* user_data);
|
|
18
|
-
|
|
19
|
-
typedef struct TirtcVideoAppleCoreVideoVoutOptions {
|
|
20
|
-
TirtcVideoAppleVoutTarget target;
|
|
21
|
-
TirtcVideoAppleOnPixelBufferFn on_pixel_buffer;
|
|
22
|
-
void* user_data;
|
|
23
|
-
} TirtcVideoAppleCoreVideoVoutOptions;
|
|
24
|
-
|
|
25
|
-
TirtcError tirtc_video_apple_create_core_video_vout(TirtcVideoVout** out_vout);
|
|
26
|
-
TirtcError tirtc_video_apple_core_video_vout_set_options(
|
|
27
|
-
TirtcVideoVout* vout, const TirtcVideoAppleCoreVideoVoutOptions* options);
|
|
28
|
-
#endif
|
|
29
|
-
|
|
30
|
-
#ifdef __cplusplus
|
|
31
|
-
}
|
|
32
|
-
#endif
|
|
33
|
-
|
|
34
|
-
#endif // TIRTC_VIDEO_IO_APPLE_H_
|
|
@@ -1,32 +0,0 @@
|
|
|
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_
|
|
@@ -1,26 +0,0 @@
|
|
|
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_
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|