LiteAVSDK
Tencent Cloud TRTC SDK, is a high availability components serving tens of thousands of enterprise customers, which is committed to helping you to minimize your research and development costs.
TXLiveBase

Data Structures

protocol  <TXLiveBaseDelegate>
 
class  TXLiveBase
 

Enumerations

enum  TX_Enum_Type_LogLevel : NSInteger
 

Detailed Description

Tencent Cloud Basic Function Class.


Data Structure Documentation

◆ TXLiveBaseDelegate-p

protocol TXLiveBaseDelegate-p
+ Inheritance diagram for <TXLiveBaseDelegate>:

Instance Methods

(void) - onLog:LogLevel:WhichModule:
 
(void) - onUpdateNetworkTime:message:
 
(void) - onLicenceLoaded:Reason:
 

Method Documentation

◆ onLicenceLoaded:Reason:()

- (void) onLicenceLoaded: (int)  result
Reason: (NSString *)  reason 
optional

Callback of setLicenceURL interface, result = 0 for success, negative number for failure. @discussion The delegate needs to be set before calling setLicenceURL.

◆ onLog:LogLevel:WhichModule:()

- (void) onLog: (NSString *)  log
LogLevel: (int)  level
WhichModule: (NSString *)  module 
optional

Log callback @discussion 1.Implement TXLiveBaseDelegate, it is recommended to use it in an earlier initialization class such as AppDelegate 2.Set this callback during initialization, eg:[TXLiveBase sharedInstance].delegate = self; 3.For the level type, see TX_Enum_Type_LogLevel 4.The module value has no specific meaning for now, it is currently a fixed value of TXLiteAVSDK.

◆ onUpdateNetworkTime:message:()

- (void) onUpdateNetworkTime: (int)  errCode
message: (NSString *)  errMsg 
optional

NTP time synchronization, trigger after called TXLiveBase::updateNetworkTime.

Parameters
errCode0: indicates that the time adjustment is successful and the deviation is within 30ms, 1: indicates that the time adjustment is successful but the deviation may be more than 30ms, -1: indicates that the time adjustment fails

◆ TXLiveBase

class TXLiveBase
+ Inheritance diagram for TXLiveBase:

Class Methods

(instancetype) + sharedInstance
 
(int) + setGlobalEnv:
 
(void) + setLogLevel:
 
(void) + setConsoleEnabled:
 
(void) + setAppVersion:
 
(void) + setAudioSessionDelegate:
 
(NSString *) + getSDKVersionStr
 
(NSString *) + getPituSDKVersion
 
(void) + setAppID:
 
(void) + setLicenceURL:key:
 
(void) + setUserId:
 
(NSString *) + getLicenceInfo
 
(void) + setExternalDecoderFactory:
 
(NSInteger) + updateNetworkTime
 
(NSInteger) + getNetworkTimestamp
 

Properties

id< TXLiveBaseDelegatedelegate
 

Method Documentation

◆ getLicenceInfo()

+ (NSString *) getLicenceInfo

Get license information.

Returns
Licence Information

◆ getNetworkTimestamp()

+ (NSInteger) getNetworkTimestamp

Get NTP timestamp (milliseconds), please use after receiving onUpdateNetworkTime callback

Returns
NTP timestamp (milliseconds), if it returns 0: NTP time synchronization is not started or failed, please restart the time synchronization

◆ getPituSDKVersion()

+ (NSString *) getPituSDKVersion

Get pitu version information.

Returns
pitu version information

◆ getSDKVersionStr()

+ (NSString *) getSDKVersionStr

Get SDK version information.

Returns
SDK version information

◆ setAppID:()

+ (void) setAppID: (NSString *)  appID

Set appID, used by server control.

◆ setAppVersion:()

+ (void) setAppVersion: (NSString *)  verNum

◆ setAudioSessionDelegate:()

+ (void) setAudioSessionDelegate: (nullable id< TXLiveAudioSessionDelegate >)  delegate

◆ setConsoleEnabled:()

+ (void) setConsoleEnabled: (BOOL)  enabled

Enable or disable console log printing

Parameters
enabledSpecifies whether to enable

◆ setExternalDecoderFactory:()

+ (void) setExternalDecoderFactory: (id)  decoderFactory

Set the HEVC external decoder factory instance.

◆ setGlobalEnv:()

+ (int) setGlobalEnv: (const char *)  env_config

Set the environment for liteav SDK to access. The deployment environment of Tencent Cloud in various regions of the world requires access to access points in different regions according to the requirements of policies and regulations in each region.

Parameters
env_configThe environment that needs to be connected, the default access environment of the SDK is: the default official environment.
Returns
0: success; other: error
Attention
Do not call this interface if target market is mainland China. If the target market is overseas users, please contact us through technical support to understand the configuration method of env_config to ensure that the App complies with the GDPR standard.

◆ setLicenceURL:key:()

+ (void) setLicenceURL: (NSString *)  url
key: (NSString *)  key 

Set the license download url and key of the sdk.

◆ setLogLevel:()

+ (void) setLogLevel: (TX_Enum_Type_LogLevel level

Set log output level

Parameters
levelreference LOGLEVEL

◆ setUserId:()

+ (void) setUserId: (NSString *)  userId

Set userId for data reporting.

◆ sharedInstance()

+ (instancetype) sharedInstance

◆ updateNetworkTime()

+ (NSInteger) updateNetworkTime

Start NTP time service

Returns
0: start successfully; < 0: start failed

Property Documentation

◆ delegate

- (id<TXLiveBaseDelegate>) delegate
readwritenonatomicweak

All logs are called back to the SDK user through this delegate, and the SDK user decides how to handle the log.

Enumeration Type Documentation

◆ TX_Enum_Type_LogLevel

enum TX_Enum_Type_LogLevel : NSInteger
Enumerator
LOGLEVEL_VERBOSE 

Output logs of all levels.

LOGLEVEL_DEBUG 

Output logs of DEBUG, INFO, WARNING, ERROR and FATAL level.

LOGLEVEL_INFO 

Output logs of INFO, WARNING, ERROR and FATAL levels.

LOGLEVEL_WARN 

Only output logs of WARNING, ERROR and FATAL levels.

LOGLEVEL_ERROR 

Only output logs of ERROR and FATAL level.

LOGLEVEL_FATAL 

Only output logs of FATAL level.

LOGLEVEL_NULL 

Do not output any sdk logs.