Windows(C++)[v1.7.5.0]
PanoRtcDefs.h
浏览该文件的文档.
1
3#pragma once
4
5#include <inttypes.h>
6#include <cstddef>
7
8#include "PanoConf.h"
9
10#ifdef PANO_OS_WIN
11# if defined PANORTC_EXPORTS || defined PANOWB_EXPORTS
12# define PANORTC_API __declspec(dllexport)
13# else
14# define PANORTC_API __declspec(dllimport)
15# endif
16#else
17# if defined PANORTC_EXPORTS || defined PANOWB_EXPORTS
18# define PANORTC_API __attribute__ ((visibility ("default")))
19# else
20# define PANORTC_API
21# endif
22#endif
23
24#define PANORTC_NS_BEGIN namespace panortc {
25#define PANORTC_NS_END }
26#define PANORTC_NS_USING using namespace panortc;
27
34PANORTC_NS_BEGIN
35
37const int kMaxDeviceNameLength = 256;
39const int kMaxDeviceIDLength = 256;
41const int kMaxVideoPlaneCount = 4;
44
45
54enum class QResult : int {
56 OK = 0,
58 FAILED = -1,
60 FATAL = -2,
62 INVALID_ARGS = -3,
64 INVALID_STATE = -4,
66 INVALID_INDEX = -5,
68 ALREADY_EXIST = -6,
70 NOT_EXIST = -7,
72 NOT_FOUND = -8,
74 NOT_SUPPORTED = -9,
76 NOT_IMPLEMENTED = -10,
78 NOT_INITIALIZED = -11,
80 LIMIT_REACHED = -12,
82 NO_PRIVILEGE = -13,
84 IN_PROGRESS = -14,
86 WRONG_THREAD = -15,
88 TIMEOUT = -16,
90 ABORTED = -17,
92 TOO_MANY_OPS = -18,
94 OUT_OF_MEMORY = -19,
97
99 AUTH_FAILED = -101,
101 USER_REJECTED = -102,
103 USER_EXPELED = -103,
105 USER_DUPLICATE = -104,
106
108 CHANNEL_CLOSED = -151,
110 CHANNEL_FULL = -152,
112 CHANNEL_LOCKED = -153,
114 CHANNEL_MODE = -154,
116 CHANNEL_CRYPTOTYPE = -155,
117
119 GROUP_DISMISSED = -190,
120
122 NETWORK_ERROR = -301,
123};
124
131enum class AudioType {
133 PCM = 0,
134};
135
142enum class VideoType {
144 I420 = 0,
145};
146
147
154enum class MediaType {
156 Audio = 0,
158 Video,
159};
160
167enum class AudioDeviceType {
169 Unknown = 0,
171 Record,
173 Playout,
174};
175
184 Active = 0,
186 Inactive,
187};
188
189
196enum class VideoDeviceType {
198 Unknown = 0,
200 Capture,
201};
202
211 Added = 0,
213 Removed,
214};
215
224 Unknown = 0,
226 Normal,
228 Suspended,
229};
230
237enum class VideoRotation {
239 Rotation_0 = 0,
241 Rotation_90 = 90,
243 Rotation_180 = 180,
245 Rotation_270 = 270,
246};
247
256 Lowest = 0,
258 Low,
260 Standard,
262 HD720P,
264 HD1080P,
266 None,
268 Max = HD1080P,
269};
270
271
280 Unspecified = 0,
282 Back,
284 Front,
285};
286
295 None = 0,
301 Both
302};
303
310enum class AudioAecType {
312 Off = 0,
314 Default,
316 Software,
318 BuiltIn,
319};
320
329 Off = 0,
331 Default,
333 AEC3,
335 AEC,
337 AECM,
338};
339
348 Default = 0,
350 Bypass,
352 Linear,
354 Normal,
355};
356
363enum class AudioAgcType {
365 Off = 0,
367 Default,
369 Soft,
371 BuiltIn,
374};
375
382enum class AudioNsType {
384 Off = 0,
386 Default,
388 Soft,
390 BuiltIn,
393};
394
401enum class AudioNsLevel {
403 Default = 0,
405 Low,
407 Mid,
409 High,
411 VeryHigh,
412};
413
420enum class AudioLayer {
433};
434
441enum class AudioSampleRate {
443 SampleRate16KHz = 16000,
445 SampleRate48KHz = 48000,
446};
447
454enum class AudioChannel {
456 Mono = 1,
458 Stereo = 2,
459};
460
467enum class AudioCallType {
469 VoIP = 0,
471 PSTN = 1,
473 SIP = 2,
475 H323 = 3
476};
477
484enum class UserLeaveReason {
486 Normal = 0,
488 Expelled = 1,
490 Disconnected = 2,
492 ChannelEnd = 3,
494 DuplicateUserID = 4,
495};
496
505 Success,
507 Failed,
512};
513
520enum class ChannelMode {
522 Mode_1v1,
525};
526
528const uint32_t kChannelServiceMedia = 0x01;
530const uint32_t kChannelServiceWhiteboard = 0x02;
532const uint32_t kChannelServiceMessage = 0x04;
539
546enum class FailoverState {
548 Reconnecting = 0,
550 Success = 1,
552 Failed = 2,
553};
554
561enum class LogLevel {
563 Fatal,
565 Error,
567 Warning,
569 Info,
571 Verbos,
573 Debug
574};
575
584 Display,
588 Window,
589};
590
591// Values are platform-specific for Screen type:
592// - On Windows: HMONITOR.
593// - On macOS: CGDirectDisplayID.
594// Values are platform-specific for Application type:
595// - On Windows: DWORD.
596// - On macOS: pid_t.
597// Values are platform-specific for Window type:
598// - On Windows: HWND.
599// - On macOS: CGWindowID.
600using ScreenSourceID = uintptr_t;
601
608struct KRect {
610 int left{ 0 };
612 int top{ 0 };
614 int right{ 0 };
616 int bottom{ 0 };
617};
618
627 ScreenSourceID wid{ 0 }; // window id
630};
631
632
633//{ options
640enum class OptionType {
641 Unknown = -1,
643 FaceBeautify = 0,
651 AudioReverbMode = 4,
653 VideoFrameRate = 5,
711 EnableAudioBwe = 22,
732 // type 18 & 19 are reserved
733};
734
743 Default = 0,
745 Enable = 1,
747 Disable = 2,
748};
749
758 Default = 0,
760 Disable = 1,
762 Low = 2,
764 High = 3,
766 VeryHigh = 4,
767};
768
777 Default = 0,
779 Enable = 1,
781 Disable = 2,
782};
783
792 bool enable = false;
794 float intensity = 0.5f;
795};
796
805 bool enable = false;
807 bool bReset = false;
809 float xScaling = 1.0f;
811 float yScaling = 1.0f;
813 float xRotation = 0.0f;
815 float yRotation = 0.0f;
817 float zRotation = 0.0f;
819 float xProjection = 0.0f;
821 float yProjection = 0.0f;
822};
823
830enum class QuadIndex {
832 TopLeft = 0,
834 TopRight = 1,
836 BottomLeft = 2,
838 BottomRight = 3,
839};
849 bool enable = false;
852 bool bReset = false;
858 float xDeltaAxis = 0.0f;
861 float yDeltaAxis = 0.0f;
864 bool bMirror = false;
865};
866
875 Low = 0,
877 Standard = 1,
878};
879
886enum class VideoCodecType {
888 UNKNOWN = 0,
890 H264 = 1,
892 AV1X = 2,
893};
894
901enum class AudioCodecType {
903 UNKNOWN = 0,
905 G711 = 1,
907 G722 = 2,
909 ILBC = 3,
911 ISAC = 4,
913 OPUS = 5,
914};
915//} options
916
923enum class FeedbackType {
924 Unknown = -1,
926 General = 0,
928 Audio,
930 Video,
934 Screen,
935};
936
945 Started = 0,
947 Finished = 1,
948};
949
958 None = 0,
960 Bass = 1,
962 Loud = 2,
964 VocalMusic = 3,
966 Strong = 4,
968 Pop = 5,
970 Live = 6,
972 DanceMusic = 7,
974 Club = 8,
976 Soft = 9,
978 Rock = 10,
980 Party = 11,
982 Classical = 12,
984 Test = 13,
985};
986
995 None = 0,
997 VocalI = 1,
999 VocalII = 2,
1001 Bathroom = 3,
1003 SmallRoomBright = 4,
1005 SmallRoomDark = 5,
1007 MediumRoom = 6,
1009 LargeRoom = 7,
1011 ChurchHall = 8,
1013 Cathedral = 9,
1014};
1015
1024 None = 0,
1026 Monster = 1,
1028 Male = 2,
1030 Female = 3,
1032 Echo = 4,
1034 Thriller = 5,
1036 Loli = 6,
1037};
1038
1046 JPEG = 0,
1048 PNG = 1,
1050 BMP = 2,
1051};
1052
1062 bool mirror = false;
1063};
1064
1072 bool active = false;
1074 uint32_t level = 0;
1076 uint64_t userId = 0;
1077};
1078
1092 bool dtx = false;
1093};
1094
1106 const char* productName = nullptr;
1109 const char* description = nullptr;
1111 const char* contact = nullptr;
1113 const char* extraInfo = nullptr;
1115 bool uploadLogs = false;
1116};
1117
1123enum class QualityRating {
1125 Unavailable = 0,
1127 VeryBad = 1,
1129 Bad = 2,
1131 Poor = 3,
1133 Good = 4,
1135 Excellent = 5,
1136};
1142enum class DeviceRating {
1144 Unavailable = 0,
1146 VeryBad = 1,
1148 Bad = 2,
1150 Poor = 3,
1152 Good = 4,
1154 Excellent = 5,
1155};
1156
1166 float txLoss{ 0 };
1168 float rxLoss{ 0 };
1170 int rtt{ 0 };
1171};
1172
1203
1204
1210 VideoPreprocessor = 100,
1219};
1220
1226enum class ActionType
1227{
1229 Add,
1231 Update,
1233 Remove,
1234};
1235
1244 Unknown = 0,
1246 Normal,
1248 Stopped,
1249};
1250
1256struct PanoData {
1257 void* data{ nullptr };
1258 size_t size{ 0 };
1259};
1260
1267{
1268 ActionType type;
1269 const char *propName{ nullptr };
1270 PanoData propValue;
1271};
1272
1273PANORTC_NS_END
VideoDeviceType
视频设备类型
Definition: PanoRtcDefs.h:196
const int kDefaultAudioEncodeBitrate
音频编码码率
Definition: PanoRtcDefs.h:43
FeedbackType
用户反馈问题类型
Definition: PanoRtcDefs.h:923
MediaType
媒体类型
Definition: PanoRtcDefs.h:154
AudioEqualizationOption
音频均衡器选项
Definition: PanoRtcDefs.h:956
const int kMaxDeviceIDLength
设备标识长度的最大值
Definition: PanoRtcDefs.h:39
ChannelMode
频道模式
Definition: PanoRtcDefs.h:520
QualityRating
质量评分分值
Definition: PanoRtcDefs.h:1123
AudioPreProcessModeOption
音频预处理
Definition: PanoRtcDefs.h:741
ActionType
操作类型
Definition: PanoRtcDefs.h:1227
AudioCodecType
音频编解码器类型
Definition: PanoRtcDefs.h:901
const int kMaxVideoPlaneCount
视频数据的最大平面数
Definition: PanoRtcDefs.h:41
UserLeaveReason
用户离开原因
Definition: PanoRtcDefs.h:484
AudioDeviceType
音频设备类型
Definition: PanoRtcDefs.h:167
QResult
返回值
Definition: PanoRtcDefs.h:54
@ NOT_INITIALIZED
@ CHANNEL_MODE
@ USER_EXPELED
@ GROUP_DISMISSED
@ CHANNEL_LOCKED
@ NOT_IMPLEMENTED
@ LIMIT_REACHED
@ NOT_SUPPORTED
@ NETWORK_ERROR
@ CHANNEL_CRYPTOTYPE
@ INVALID_STATE
@ WRONG_THREAD
@ ALREADY_EXIST
@ INVALID_ARGS
@ USER_REJECTED
@ OUT_OF_DISK_SPACE
@ USER_DUPLICATE
@ OUT_OF_MEMORY
@ TOO_MANY_OPS
@ CHANNEL_CLOSED
@ CHANNEL_FULL
@ INVALID_INDEX
@ NO_PRIVILEGE
AudioNoiseSuppressionLevelOption
音频降噪等级配置
Definition: PanoRtcDefs.h:756
const uint32_t kChannelServiceWhiteboard
Definition: PanoRtcDefs.h:530
AudioAgcType
音频自动增益控制
Definition: PanoRtcDefs.h:363
const int kMaxDeviceNameLength
设备名字长度的最大值
Definition: PanoRtcDefs.h:37
DeviceRating
设备评分分值
Definition: PanoRtcDefs.h:1142
AudioType
音频数据类型
Definition: PanoRtcDefs.h:131
AudioChannel
音频采样率
Definition: PanoRtcDefs.h:454
MediaSubscribeResult
用户媒体订阅结果
Definition: PanoRtcDefs.h:503
const uint32_t kChannelServiceMedia
Definition: PanoRtcDefs.h:528
VideoCaptureState
视频采集状态
Definition: PanoRtcDefs.h:222
AudioLayer
音频采集和播放系统API选择
Definition: PanoRtcDefs.h:420
@ AndroidJavaInputAndOpenSLESOutputAudio
@ PlatformDefaultAudio
@ AndroidJavaInputAndAAudioOutputAudio
@ AndroidOpenSLAudio
@ AndroidAAudioAudio
AudioAutoGainControlOption
音频自动增益控制
Definition: PanoRtcDefs.h:775
VideoHwAccelerationType
视频编解码硬件加速配置。
Definition: PanoRtcDefs.h:293
AudioReverbOption
音频混响器选项
Definition: PanoRtcDefs.h:993
VideoProfileType
视频能力类型
Definition: PanoRtcDefs.h:254
FailoverState
错误恢复状态
Definition: PanoRtcDefs.h:546
const uint32_t kChannelServiceMessage
Definition: PanoRtcDefs.h:532
OptionType
选项
Definition: PanoRtcDefs.h:640
@ EnableVideoQualityAdaption
@ EnableMediaTcpCandidate
@ EnableUploadDebugLogs
@ EnableUploadDebugLogsAtFailure
@ AudioEqualizationMode
@ VideoQuadTransform
@ EnableAudioProfile
@ EnableAudioAecSuppressionLevel
@ MaxSimulcastLayerNum
@ EnableAudioEarMonitoring
@ AudioAutoGainControl
@ AudioVoiceChangerMode
@ EnableAudioAnalogAgc
@ DisableAV1Encoding
@ AudioNoiseSuppressionLevel
@ EnableAudioStartWithPlayback
@ ScreenOptimization
@ EnableUploadAudioDump
@ AudioPreProcessMode
AudioSoftwareAecLevel
回音消除软件算法消除等级
Definition: PanoRtcDefs.h:346
AudioSampleRate
音频采样率
Definition: PanoRtcDefs.h:441
AudioNsType
音频噪声抑制类型
Definition: PanoRtcDefs.h:382
ScreenCaptureState
屏幕采集状态
Definition: PanoRtcDefs.h:1242
AudioDeviceState
音频设备状态
Definition: PanoRtcDefs.h:182
QuadIndex
四边形顶点索引
Definition: PanoRtcDefs.h:830
VideoCodecType
视频编解码器类型
Definition: PanoRtcDefs.h:886
AudioMixingState
混音任务状态
Definition: PanoRtcDefs.h:943
AudioSoftwareAecType
回音消除软件算法类型
Definition: PanoRtcDefs.h:327
VideoRotation
视频旋转角度
Definition: PanoRtcDefs.h:237
AudioNsLevel
音频噪声抑制强度
Definition: PanoRtcDefs.h:401
ScreenSourceType
桌面采集源类型
Definition: PanoRtcDefs.h:582
LogLevel
日志等级
Definition: PanoRtcDefs.h:561
MediaProcessorType
媒体处理类型
Definition: PanoRtcDefs.h:1178
VideoType
视频数据类型
Definition: PanoRtcDefs.h:142
VideoDevicePosition
视频采集设备位置
Definition: PanoRtcDefs.h:278
AudioVoiceChangerOption
音频变声器选项
Definition: PanoRtcDefs.h:1022
VideoDeviceState
视频设备状态
Definition: PanoRtcDefs.h:209
AudioCallType
音频接入类型
Definition: PanoRtcDefs.h:467
const int kDefaultVideoStreamId
Definition: PanoRtcDefs.h:538
ImageFileFormat
图片文件格式。
Definition: PanoRtcDefs.h:1044
AudioAecType
回音消除类型
Definition: PanoRtcDefs.h:310
VideoFrameRateType
视频帧率类型
Definition: PanoRtcDefs.h:873
音频配置。
Definition: PanoRtcDefs.h:1084
int encodeBitrate
Definition: PanoRtcDefs.h:1090
AudioSampleRate sampleRate
Definition: PanoRtcDefs.h:1086
bool dtx
Definition: PanoRtcDefs.h:1092
AudioChannel channel
Definition: PanoRtcDefs.h:1088
内嵌视频形变参数
Definition: PanoRtcDefs.h:803
float yProjection
Definition: PanoRtcDefs.h:821
bool bReset
Definition: PanoRtcDefs.h:807
float xScaling
Definition: PanoRtcDefs.h:809
float xRotation
Definition: PanoRtcDefs.h:813
bool enable
Definition: PanoRtcDefs.h:805
float xProjection
Definition: PanoRtcDefs.h:819
float zRotation
Definition: PanoRtcDefs.h:817
float yScaling
Definition: PanoRtcDefs.h:811
float yRotation
Definition: PanoRtcDefs.h:815
美颜参数
Definition: PanoRtcDefs.h:790
float intensity
Definition: PanoRtcDefs.h:794
bool enable
Definition: PanoRtcDefs.h:792
用户反馈信息,用于发送用户反馈。
Definition: PanoRtcDefs.h:1101
const char * productName
Definition: PanoRtcDefs.h:1106
const char * contact
Definition: PanoRtcDefs.h:1111
FeedbackType type
Definition: PanoRtcDefs.h:1103
const char * description
Definition: PanoRtcDefs.h:1109
bool uploadLogs
Definition: PanoRtcDefs.h:1115
const char * extraInfo
Definition: PanoRtcDefs.h:1113
矩形
Definition: PanoRtcDefs.h:608
int left
左边位置
Definition: PanoRtcDefs.h:610
int right
右边位置
Definition: PanoRtcDefs.h:614
int bottom
底部位置
Definition: PanoRtcDefs.h:616
int top
顶部位置
Definition: PanoRtcDefs.h:612
网络质量报告
Definition: PanoRtcDefs.h:1162
QualityRating rating
Definition: PanoRtcDefs.h:1164
float txLoss
Definition: PanoRtcDefs.h:1166
float rxLoss
Definition: PanoRtcDefs.h:1168
int rtt
Definition: PanoRtcDefs.h:1170
数据类型
Definition: PanoRtcDefs.h:1256
属性操作类型
Definition: PanoRtcDefs.h:1267
视频四边形形变参数
Definition: PanoRtcDefs.h:846
bool enable
Definition: PanoRtcDefs.h:849
QuadIndex index
Definition: PanoRtcDefs.h:855
bool bMirror
Definition: PanoRtcDefs.h:864
float yDeltaAxis
Definition: PanoRtcDefs.h:861
bool bReset
Definition: PanoRtcDefs.h:852
float xDeltaAxis
Definition: PanoRtcDefs.h:858
图片文件格式。
Definition: PanoRtcDefs.h:1058
ImageFileFormat format
Definition: PanoRtcDefs.h:1060
bool mirror
Definition: PanoRtcDefs.h:1062
用户音频强度。
Definition: PanoRtcDefs.h:1070
bool active
Definition: PanoRtcDefs.h:1072
uint32_t level
Definition: PanoRtcDefs.h:1074
uint64_t userId
Definition: PanoRtcDefs.h:1076
窗口信息
Definition: PanoRtcDefs.h:625
ScreenSourceID wid
窗口标识
Definition: PanoRtcDefs.h:627
KRect rect
窗口区域矩形
Definition: PanoRtcDefs.h:629