Namespaces | |
liteav | |
Data Structures | |
struct | RECT |
struct | SIZE |
struct | TRTCParams |
struct | TRTCVideoEncParam |
struct | TRTCNetworkQosParam |
struct | TRTCRenderParams |
struct | TRTCQualityInfo |
struct | TRTCVolumeInfo |
struct | TRTCSpeedTestParams |
struct | TRTCSpeedTestResult |
struct | TRTCVideoFrame |
struct | TRTCAudioFrame |
struct | TRTCMixUser |
struct | TRTCTranscodingConfig |
struct | TRTCPublishCDNParam |
struct | TRTCAudioRecordingParams |
struct | TRTCLocalRecordingParams |
struct | TRTCAudioEffectParam |
struct | TRTCSwitchRoomConfig |
struct | TRTCAudioFrameCallbackFormat |
struct | TRTCImageBuffer |
struct | TRTCScreenCaptureSourceInfo |
class | ITRTCScreenCaptureSourceList |
struct | TRTCScreenCaptureProperty |
struct | TRTCAudioParallelParams |
Macros | |
#define | __TRTCTYPEDEF_H__ |
#define | WIN32_LEAN_AND_MEAN |
#define | TRTC_API __declspec(dllexport) |
#define | TRTC_API __declspec(dllimport) |
#define | TRTC_API __attribute__((visibility("default"))) |
#define | TRTC_API __attribute__((visibility("default"))) |
#define | TRTC_API |
#define | TARGET_PLATFORM_DESKTOP ((__APPLE__ && TARGET_OS_MAC && !TARGET_OS_IPHONE) || _WIN32) |
#define | TARGET_PLATFORM_PHONE (__ANDROID__ || (__APPLE__ && TARGET_OS_IOS)) |
#define | TARGET_PLATFORM_MAC (__APPLE__ && TARGET_OS_MAC && !TARGET_OS_IPHONE) |
#define | TRTCDeviceTypeUnknow TXMediaDeviceTypeUnknown |
#define | TRTCDeviceTypeMic TXMediaDeviceTypeMic |
#define | TRTCDeviceTypeSpeaker TXMediaDeviceTypeSpeaker |
#define | TRTCDeviceTypeCamera TXMediaDeviceTypeCamera |
#define | TRTCDeviceStateAdd TXMediaDeviceStateAdd |
#define | TRTCDeviceStateRemove TXMediaDeviceStateRemove |
#define | TRTCDeviceStateActive TXMediaDeviceStateActive |
Typedefs | |
typedef HWND | TXView |
typedef TXMediaDeviceType | TRTCDeviceType |
typedef TXMediaDeviceState | TRTCDeviceState |
typedef ITXDeviceCollection | ITRTCDeviceCollection |
typedef ITXDeviceInfo | ITRTCDeviceInfo |
Enumerations | |
enum | TRTCVideoResolution |
enum | TRTCVideoResolutionMode |
enum | TRTCVideoStreamType |
enum | TRTCVideoFillMode |
enum | TRTCVideoRotation |
enum | TRTCBeautyStyle |
enum | TRTCVideoPixelFormat |
enum | TRTCVideoBufferType |
enum | TRTCVideoMirrorType |
enum | TRTCSnapshotSourceType |
enum | TRTCAppScene |
enum | TRTCRoleType |
enum | TRTCQosControlMode |
enum | TRTCVideoQosPreference |
enum | TRTCQuality |
enum | TRTCAVStatusType |
enum | TRTCAVStatusChangeReason |
enum | TRTCAudioQuality |
enum | TRTCAudioFrameFormat |
enum | TRTCLogLevel |
enum | TRTCScreenCaptureSourceType |
enum | TRTCTranscodingConfigMode |
enum | TRTCLocalRecordType |
enum | TRTCMixInputType |
enum | TRTCWaterMarkSrcType |
enum | TRTCAudioRecordingContent |
Tencent Cloud TRTC Key Type Definition.
Module: TRTC key class definition Description: definitions of enumerated and constant values such as resolution and quality level
struct liteav::TRTCParams |
Room entry parameters
As the room entry parameters in the TRTC SDK, these parameters must be correctly set so that the user can successfully enter the audio/video room specified by roomId
or strRoomId
. For historical reasons, TRTC supports two types of room IDs: roomId
and strRoomId
. Note: do not mix roomId
and strRoomId
, because they are not interchangeable. For example, the number 123
and the string 123
are two completely different rooms in TRTC.
Public Member Functions | |
TRTCParams () | |
Data Fields | |
uint32_t | sdkAppId |
const char * | userId |
const char * | userSig |
uint32_t | roomId |
const char * | strRoomId |
TRTCRoleType | role |
const char * | streamId |
const char * | userDefineRecordId |
const char * | privateMapKey |
const char * | businessInfo |
|
inline |
const char* businessInfo |
const char* privateMapKey |
TRTCRoleType role |
uint32_t roomId |
uint32_t sdkAppId |
const char* streamId |
const char* strRoomId |
const char* userDefineRecordId |
const char* userId |
const char* userSig |
struct liteav::TRTCVideoEncParam |
Video encoding parameters
These settings determine the quality of image viewed by remote users as well as the image quality of recorded video files in the cloud.
Public Member Functions | |
TRTCVideoEncParam () | |
Data Fields | |
TRTCVideoResolution | videoResolution |
TRTCVideoResolutionMode | resMode |
uint32_t | videoFps |
uint32_t | videoBitrate |
uint32_t | minVideoBitrate |
bool | enableAdjustRes |
|
inline |
bool enableAdjustRes |
uint32_t minVideoBitrate |
TRTCVideoResolutionMode resMode |
uint32_t videoBitrate |
uint32_t videoFps |
Recommended value: 15 or 20 fps. If the frame rate is lower than 5 fps, there will be obvious lagging; if lower than 10 fps but higher than 5 fps, there will be slight lagging; if higher than 20 fps, the bandwidth will be wasted (the frame rate of movies is generally 24 fps). Note: the front cameras on certain Android phones do not support a capturing frame rate higher than 15 fps. For some Android phones that focus on beautification features, the capturing frame rate of the front cameras may be lower than 10 fps.
TRTCVideoResolution videoResolution |
struct liteav::TRTCNetworkQosParam |
Network QoS control parameter set
Network QoS control parameter. The settings determine the QoS control policy of the SDK in weak network conditions (e.g., whether to "ensure clarity" or "ensure smoothness").
Public Member Functions | |
TRTCNetworkQosParam () | |
Data Fields | |
TRTCVideoQosPreference | preference |
TRTCQosControlMode | controlMode |
|
inline |
TRTCQosControlMode controlMode |
TRTCVideoQosPreference preference |
struct liteav::TRTCRenderParams |
Rendering parameters of video image
You can use these parameters to control the video image rotation angle, fill mode, and mirror mode.
Public Member Functions | |
TRTCRenderParams () | |
Data Fields | |
TRTCVideoRotation | rotation |
TRTCVideoFillMode | fillMode |
TRTCVideoMirrorType | mirrorType |
|
inline |
TRTCVideoFillMode fillMode |
TRTCVideoMirrorType mirrorType |
TRTCVideoRotation rotation |
struct liteav::TRTCQualityInfo |
Network quality
This indicates the quality of the network. You can use it to display the network quality of each user on the UI.
Public Member Functions | |
TRTCQualityInfo () | |
Data Fields | |
const char * | userId |
TRTCQuality | quality |
|
inline |
TRTCQuality quality |
Network quality.
const char* userId |
User ID.
struct liteav::TRTCVolumeInfo |
Volume
This indicates the audio volume value. You can use it to display the volume of each user in the UI.
Public Member Functions | |
TRTCVolumeInfo () | |
Data Fields | |
const char * | userId |
uint32_t | volume |
|
inline |
const char* userId |
userId
of the speaker. An empty value indicates the local user.
uint32_t volume |
Volume of the speaker. Value range: 0–100.
struct liteav::TRTCSpeedTestParams |
Network speed testing parameters
You can test the network speed through the startSpeedTest: interface before the user enters the room (this API cannot be called during a call).
Public Member Functions | |
TRTCSpeedTestParams () | |
Data Fields | |
int | sdkAppId |
const char * | userId |
const char * | userSig |
int | expectedUpBandwidth |
int | expectedDownBandwidth |
|
inline |
int expectedDownBandwidth |
Expected downstream bandwidth (kbps, value range: 10 to 5000, no downlink bandwidth test when it is 0).
int expectedUpBandwidth |
Expected upstream bandwidth (kbps, value range: 10 to 5000, no uplink bandwidth test when it is 0).
int sdkAppId |
Application identification, please refer to the relevant instructions in TRTCParams.
const char* userId |
User identification, please refer to the relevant instructions in TRTCParams.
const char* userSig |
User signature, please refer to the relevant instructions in TRTCParams.
struct liteav::TRTCSpeedTestResult |
Network speed test result
The startSpeedTest: API can be used to test the network speed before a user enters a room (this API cannot be called during a call).
Public Member Functions | |
TRTCSpeedTestResult () | |
Data Fields | |
bool | success |
const char * | errMsg |
const char * | ip |
TRTCQuality | quality |
float | upLostRate |
float | downLostRate |
int | rtt |
int | availableUpBandwidth |
int | availableDownBandwidth |
|
inline |
int availableDownBandwidth |
Downstream bandwidth (in kbps, -1: invalid value).
int availableUpBandwidth |
Upstream bandwidth (in kbps, -1: invalid value).
float downLostRate |
Downstream packet loss rate between 0 and 1.0. For example, 0.2 indicates that 2 data packets may be lost in every 10 packets received from the server.
const char* errMsg |
Error message for network speed test.
const char* ip |
Server IP address.
TRTCQuality quality |
Network quality, which is tested and calculated based on the internal evaluation algorithm. For more information, please see TRTCQuality.
int rtt |
Delay in milliseconds, which is the round-trip time between the current device and TRTC server. The smaller the value, the better. The normal value range is 10–100 ms.
bool success |
Whether the network speed test is successful.
float upLostRate |
Upstream packet loss rate between 0 and 1.0. For example, 0.3 indicates that 3 data packets may be lost in every 10 packets sent to the server.
struct liteav::TRTCVideoFrame |
Video frame information
TRTCVideoFrame
is used to describe the raw data of a frame of the video image, which is the image data before frame encoding or after frame decoding.
Data Fields | ||
---|---|---|
uint32_t | height | |
uint64_t | timestamp | |
uint32_t | width |
Field description:** video pixel format TRTCVideoPixelFormat videoFormat; /**Field description:** video data structure type TRTCVideoBufferType bufferType; /**Field description:** video data when /**Field description:** video texture ID, i.e., video data when /**Field description:** video data length in bytes. For I420, length = width * height * 3 / 2; for BGRA32, length = width * height * 4. uint32_t length; /****Field description:** video width Recommended value: please enter the width of the video data passed in. |
struct liteav::TRTCAudioFrame |
Audio frame data
struct liteav::TRTCMixUser |
Description information of each video image in On-Cloud MixTranscoding
TRTCMixUser
is used to specify the location, size, layer, and stream type of each video image in On-Cloud MixTranscoding.
Public Member Functions | |
TRTCMixUser () | |
Data Fields | |
bool | pureAudio |
TRTCMixInputType | inputType |
uint32_t | renderMode |
const char * | image |
|
inline |
const char* image |
TRTCMixInputType inputType |
bool pureAudio |
Field description:** user ID const char *userId;
/**Field description:** ID of the room where this audio/video stream is located (an empty value indicates the local room ID) const char *roomId;
/**Field description:** specify the coordinate area of this video image in px RECT rect;
/**Field description:** specify the level of this video image (value range: 1–15; the value must be unique) int zOrder;
/**Field description:** specify whether this video image is the primary stream image (TRTCVideoStreamTypeBig) or substream image (TRTCVideoStreamTypeSub). TRTCVideoStreamType streamType;
/****Field description:** specify whether this stream mixes audio only Recommended value: default value: false Note: this field has been disused. We recommend you use the new field inputType
introduced in v8.5.
uint32_t renderMode |
struct liteav::TRTCTranscodingConfig |
Layout and transcoding parameters of On-Cloud MixTranscoding
These parameters are used to specify the layout position information of each video image and the encoding parameters of mixtranscoding during On-Cloud MixTranscoding.
Public Member Functions | |
TRTCTranscodingConfig () | |
Data Fields | |
TRTCTranscodingConfigMode | mode |
uint32_t | appId |
uint32_t | bizId |
uint32_t | videoWidth |
uint32_t | videoHeight |
uint32_t | videoBitrate |
uint32_t | videoFramerate |
uint32_t | videoGOP |
uint32_t | backgroundColor |
const char * | backgroundImage |
uint32_t | audioSampleRate |
uint32_t | audioBitrate |
uint32_t | audioChannels |
uint32_t | audioCodec |
TRTCMixUser * | mixUsersArray |
const char * | streamId |
|
inline |
uint32_t appId |
uint32_t audioBitrate |
uint32_t audioChannels |
uint32_t audioCodec |
uint32_t audioSampleRate |
uint32_t backgroundColor |
const char* backgroundImage |
uint32_t bizId |
TRTCMixUser* mixUsersArray |
const char* streamId |
Field description:** number of elements in the mixUsersArray
array uint32_t mixUsersArraySize;
/****Field description:** ID of the live stream output to CDN Recommended value: default value: null, that is, the audio/video streams in the room will be mixed into the audio/video stream of the caller of this API.
streamId
you specify). uint32_t videoBitrate |
uint32_t videoFramerate |
uint32_t videoGOP |
uint32_t videoHeight |
uint32_t videoWidth |
struct liteav::TRTCPublishCDNParam |
Push parameters required to be set when publishing audio/video streams to non-Tencent Cloud CDN
TRTC's backend service supports publishing audio/video streams to third-party live CDN service providers through the standard RTMP protocol. If you use the Tencent Cloud CSS CDN service, you don't need to care about this parameter; instead, just use the startPublish API.
Public Member Functions | |
TRTCPublishCDNParam () | |
Data Fields | |
uint32_t | appId |
uint32_t | bizId |
const char * | url |
const char * | streamId |
|
inline |
uint32_t appId |
uint32_t bizId |
const char* streamId |
const char* url |
struct liteav::TRTCAudioRecordingParams |
Local audio file recording parameters
This parameter is used to specify the recording parameters in the audio recording API startAudioRecording.
Public Member Functions | |
TRTCAudioRecordingParams () | |
Data Fields | |
const char * | filePath |
TRTCAudioRecordingContent | recordingContent |
|
inline |
const char* filePath |
TRTCAudioRecordingContent recordingContent |
struct liteav::TRTCLocalRecordingParams |
Local media file recording parameters
This parameter is used to specify the recording parameters in the local media file recording API startLocalRecording. The startLocalRecording
API is an enhanced version of the startAudioRecording
API. The former can record video files, while the latter can only record audio files.
Data Fields | ||
---|---|---|
const char * | filePath |
struct liteav::TRTCAudioEffectParam |
Sound effect parameter (disused)
"Sound effects" in TRTC refer to some short audio files (usually only a few seconds), such as "applause" and "laughter". This parameter is used to specify the path and number of playback times of a sound effect file (short audio file) in the sound effect playback API TRTCCloud#playAudioEffect on legacy versions. After v7.3, the sound effect API has been replaced by a new TXAudioEffectManager#startPlayMusic API. When you specify the TXAudioMusicParam parameter of startPlayMusic
, if isShortFile
is set to true
, the file is a "sound effect" file.
Public Member Functions | |
TRTCAudioEffectParam (const int _effectId, const char *_path) | |
Data Fields | |
int | effectId |
int | loopCount |
bool | publish |
int | volume |
|
inline |
int effectId |
int loopCount |
Field description:** sound effect file path. Supported file formats include AAC, MP3, and M4A. const char *path;
/****Field description:** number of times the sound effect is looped Valid values: 0 or any positive integer. 0 (default) indicates that the sound effect is played once, 1 twice, and so on.
bool publish |
int volume |
struct liteav::TRTCSwitchRoomConfig |
Room switch parameter
This parameter is used for the room switch API switchRoom, which can quickly switch a user from one room to another.
Public Member Functions | |
TRTCSwitchRoomConfig () | |
Data Fields | |
uint32_t | roomId |
const char * | strRoomId |
const char * | userSig |
const char * | privateMapKey |
|
inline |
const char* privateMapKey |
uint32_t roomId |
const char* strRoomId |
const char* userSig |
struct liteav::TRTCAudioFrameCallbackFormat |
Format parameter of custom audio callback
This parameter is used to set the relevant format (including sample rate and number of channels) of the audio data called back by the SDK in the APIs related to custom audio callback.
Public Member Functions | |
TRTCAudioFrameCallbackFormat () | |
Data Fields | |
int | sampleRate |
int | channel |
int | samplesPerCall |
|
inline |
int channel |
int sampleRate |
int samplesPerCall |
struct liteav::TRTCImageBuffer |
Screen sharing target information (for desktop systems only)
When users share the screen, they can choose to share the entire desktop or only the window of a certain program. TRTCScreenCaptureSourceInfo
is used to describe the information of the target to be shared, including ID, name, and thumbnail. The fields in this structure are read-only.
Public Member Functions | |
TRTCImageBuffer () | |
Data Fields | |
const char * | buffer |
uint32_t | length |
uint32_t | width |
uint32_t | height |
|
inline |
const char* buffer |
image content in BGRA format
uint32_t height |
image height
uint32_t length |
buffer size
uint32_t width |
image width
struct liteav::TRTCScreenCaptureSourceInfo |
class liteav::ITRTCScreenCaptureSourceList |
List of sharable screens and windows
This structure is equivalent to std::vector<TRTCScreenCaptureSourceInfo>
, which is used to solve the binary compatibility problem of different versions of STL containers.
Public Member Functions | |
virtual uint32_t | getCount ()=0 |
virtual TRTCScreenCaptureSourceInfo | getSourceInfo (uint32_t index)=0 |
virtual void | release ()=0 |
Protected Member Functions | |
virtual | ~ITRTCScreenCaptureSourceList () |
|
inlineprotectedvirtual |
|
pure virtual |
Size of this list.
|
pure virtual |
Get element(TRTCScreenCaptureSourceInfo) by index.
|
pure virtual |
Don't use delete!!!
struct liteav::TRTCScreenCaptureProperty |
Advanced control parameter of screen sharing
This parameter is used in the screen sharing-related API selectScreenCaptureTarget to set a series of advanced control parameters when specifying the sharing target. For example, whether to capture the cursor, whether to capture the subwindow, and whether to draw a frame around the shared target.
struct liteav::TRTCAudioParallelParams |
parameter of the parallel strategy of remote audio streams
This parameter is used to set the parallel strategy of remote audio streams.
Public Member Functions | |
TRTCAudioParallelParams () | |
Data Fields | |
uint32_t | maxCount |
char ** | includeUsers |
uint32_t | includeUsersCount |
|
inline |
char** includeUsers |
uint32_t includeUsersCount |
uint32_t maxCount |
#define __TRTCTYPEDEF_H__ |
#define TARGET_PLATFORM_DESKTOP ((__APPLE__ && TARGET_OS_MAC && !TARGET_OS_IPHONE) || _WIN32) |
#define TARGET_PLATFORM_MAC (__APPLE__ && TARGET_OS_MAC && !TARGET_OS_IPHONE) |
#define TARGET_PLATFORM_PHONE (__ANDROID__ || (__APPLE__ && TARGET_OS_IOS)) |
#define TRTC_API __declspec(dllexport) |
#define TRTC_API __declspec(dllimport) |
#define TRTC_API __attribute__((visibility("default"))) |
#define TRTC_API __attribute__((visibility("default"))) |
#define TRTC_API |
#define TRTCDeviceStateActive TXMediaDeviceStateActive |
#define TRTCDeviceStateAdd TXMediaDeviceStateAdd |
#define TRTCDeviceStateRemove TXMediaDeviceStateRemove |
#define TRTCDeviceTypeCamera TXMediaDeviceTypeCamera |
#define TRTCDeviceTypeMic TXMediaDeviceTypeMic |
#define TRTCDeviceTypeSpeaker TXMediaDeviceTypeSpeaker |
#define TRTCDeviceTypeUnknow TXMediaDeviceTypeUnknown |
#define WIN32_LEAN_AND_MEAN |
typedef ITXDeviceInfo ITRTCDeviceInfo |
typedef TXMediaDeviceState TRTCDeviceState |
Device operation
This enumerated value is used to notify the status change of the local device onDeviceChange.
typedef TXMediaDeviceType TRTCDeviceType |
Device type (for desktop platforms only)
This enumerated value is used to define three types of audio/video devices, namely, camera, mic, and speaker, so that the same device management API can control the three different types of devices. Starting from v8.0, TRTC redefines TXMediaDeviceType
in TXDeviceManager
to replace TRTCMediaDeviceType
on legacy versions. Only the definition of TRTCMediaDeviceType
is retained here for compatibility with customer code on legacy versions.
typedef void * TXView |
[VIEW] Rendering control that renders the video image
There are many APIs in TRTC that need to manipulate the video image, for which you should specify the video rendering control. The SDK provides rendering controls for different terminal platforms. As the all-platform C++ APIs need to use a unified parameter type, you should uniformly convert the rendering controls into pointers in TXView
type when calling these APIs:
UIView
object as the rendering control. When calling the C++ APIs, please pass in the pointer to the UIView
object (which needs to be forcibly converted to the void*
type).NSView
object as the rendering control. When calling the C++ APIs, please pass in the pointer to the NSView
object (which needs to be forcibly converted to the void*
type).jobject
pointer to the TXCloudVideoView
object (which needs to be forcibly converted to the void*
type).HWND
as the rendering control. When calling the C++ APIs, you need to forcibly convert the HWND
to void*
type.Code sample 1. Use the all-platform C++ APIs under QT
QWidget *videoView; // The relevant code for setting the videoView is omitted here... getTRTCShareInstance()->startLocalPreview(reinterpret_cast<TXView>(videoView->winId()));
Code sample 2. Call the all-platform C++ APIs through JNI on Android
native void nativeStartLocalPreview(String userId, int streamType, TXCloudVideoView view); //... Java_com_example_test_MainActivity_nativeStartRemoteView(JNIEnv *env, jobject thiz, jstring user_id, jint stream_type, jobject view) { const char *user_id_chars = env->GetStringUTFChars(user_id, nullptr); trtc_cloud->startRemoteView(user_id_chars, (trtc::TRTCVideoStreamType)stream_type, view); env->ReleaseStringUTFChars(user_id, user_id_chars); }
enum TRTCAppScene |
Use cases
TRTC features targeted optimizations for common audio/video application scenarios to meet the differentiated requirements in various verticals. The main scenarios can be divided into the following two categories:
LIVE
(audio + video) and VoiceChatRoom
(pure audio). In the live streaming scenario, users are divided into two roles: "anchor" and "audience". A single room can sustain up to 100,000 concurrent online users. This is suitable for live streaming to a large audience.VideoCall
(audio + video) and AudioCall
(pure audio). In the real-time scenario, there is no role difference between users, but a single room can sustain only up to 300 concurrent online users. This is suitable for small-scale real-time communication. enum TRTCAudioFrameFormat |
enum TRTCAudioQuality |
Sound quality
TRTC provides three well-tuned modes to meet the differentiated requirements for sound quality in various verticals:
Speech
and Music
. In this mode, the reproduction of music is better than that in Speech
mode, and the amount of transferred data is much lower than that in Music
mode; therefore, this mode has good adaptability to various scenarios. Audio recording content type
This enumerated type is used in the audio recording API startAudioRecording to specify the content of the recorded audio.
Enumerator | |
---|---|
TRTCAudioRecordingContentAll | Record both local and remote audio. |
TRTCAudioRecordingContentLocal | Record local audio only. |
TRTCAudioRecordingContentRemote | Record remote audio only. |
Reasons for playback status changes
This enumerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the reason for the current video status change.
enum TRTCAVStatusType |
Audio/Video playback status
This enumerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the current video status.
Enumerator | |
---|---|
TRTCAVStatusStopped | Stopped. |
TRTCAVStatusPlaying | Playing. |
TRTCAVStatusLoading | Loading. |
enum TRTCBeautyStyle |
Beauty (skin smoothing) filter algorithm
TRTC has multiple built-in skin smoothing algorithms. You can select the one most suitable for your product.
enum TRTCLocalRecordType |
Media recording type
This enumerated type is used in the local media recording API startLocalRecording to specify whether to record audio/video files or pure audio files.
Enumerator | |
---|---|
TRTCLocalRecordType_Audio | Record audio only. |
TRTCLocalRecordType_Video | Record video only. |
TRTCLocalRecordType_Both | Record both audio and video. |
enum TRTCLogLevel |
Log level
Different log levels indicate different levels of details and number of logs. We recommend you set the log level to TRTCLogLevelInfo
generally.
enum TRTCMixInputType |
Stream mix input type
enum TRTCQosControlMode |
enum TRTCQuality |
Network quality
TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels: Excellent
indicates the best, and Down
indicates the worst.
enum TRTCRoleType |
Role
Role is applicable only to live streaming scenarios (TRTCAppSceneLIVE
and TRTCAppSceneVoiceChatRoom
). Users are divided into two roles:
Enumerator | |
---|---|
TRTCRoleAnchor | An anchor can publish their audio/video streams. There is a limit on the number of anchors. Up to 50 anchors are allowed to publish streams at the same time in one room. |
TRTCRoleAudience | Audience can only listen to or watch audio/video streams of anchors in the room. If they want to publish their streams, they need to switch to the "anchor" role first through switchRole. One room can sustain up to 100,000 concurrent online users in the audience role. |
Screen sharing target type (for desktops only)
Data source of local video screenshot
The SDK can take screenshots from the following two data sources and save them as local files:
Layout mode of On-Cloud MixTranscoding
TRTC's On-Cloud MixTranscoding service can mix multiple audio/video streams in the room into one stream. Therefore, you need to specify the layout scheme of the video images. The following layout modes are provided:
enum TRTCVideoBufferType |
Video data transfer method
For custom capturing and rendering features, you need to use the following enumerated values to specify the method of transferring video data:
enum TRTCVideoFillMode |
Video image fill mode
If the aspect ratio of the video display area is not equal to that of the video image, you need to specify the fill mode:
enum TRTCVideoMirrorType |
Video mirror type
Video mirroring refers to the left-to-right flipping of the video image, especially for the local camera preview image. After mirroring is enabled, it can bring anchors a familiar "look into the mirror" experience.
enum TRTCVideoPixelFormat |
Video pixel format
TRTC provides custom video capturing and rendering features.
Image quality preference
TRTC has two control modes in weak network environments: "ensuring clarity" and "ensuring smoothness". Both modes will give priority to the transfer of audio data.
enum TRTCVideoResolution |
Video resolution
Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used, Portrait
must be selected for TRTCVideoResolutionMode
.
Video aspect ratio mode
Only the landscape resolution (e.g., 640x360) is defined in TRTCVideoResolution
. If the portrait resolution (e.g., 360x640) needs to be used, Portrait
must be selected for TRTCVideoResolutionMode
.
enum TRTCVideoRotation |
Video image rotation direction
TRTC provides rotation angle setting APIs for local and remote images. The following rotation angles are all clockwise.
enum TRTCVideoStreamType |
Video stream type
TRTC provides three different video streams, including:
enum TRTCWaterMarkSrcType |