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_android

Data Structures

class  TXLiveBase
 

Detailed Description

Tencent Cloud Basic Function Class.


Data Structure Documentation

◆ com::tencent::rtmp::TXLiveBase

class com::tencent::rtmp::TXLiveBase

Public Member Functions

void setLicence (Context context, String url, String key)
 
String getLicenceInfo (Context context)
 

Static Public Member Functions

static TXLiveBase getInstance ()
 
static void setListener (TXLiveBaseListener liveBaseListener)
 
static int setGlobalEnv (String envConfig)
 
static void setLogLevel (int logLevel)
 
static void setConsoleEnabled (boolean enabled)
 
static void setAppVersion (String verNum)
 
static void setLibraryPath (String path)
 
static boolean isLibraryPathValid (String path)
 
static void setExternalDecoderFactory (TXLiteAVExternalDecoderFactoryInterface decoderFactory)
 
static String getSDKVersionStr ()
 
static void setPituLicencePath (String path)
 
static String getPituSDKVersion ()
 
static void setAppID (String appID)
 
static void setUserId (String userId)
 
static int updateNetworkTime ()
 
static long getNetworkTimestamp ()
 
static boolean setExtID (String extKey, String extValue)
 
static void onUpdateNetworkTime (int errCode, String errMsg)
 

Member Function Documentation

◆ getInstance()

static TXLiveBase getInstance ( )
inlinestatic

◆ getLicenceInfo()

String getLicenceInfo ( Context  context)
inline

get license information

Parameters
contextapp context
Returns
license information

◆ getNetworkTimestamp()

static long getNetworkTimestamp ( )
inlinestatic

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()

static String getPituSDKVersion ( )
inlinestatic

Get the enterprise version of the P-map SDK version, the non-enterprise version is empty String ""

◆ getSDKVersionStr()

static String getSDKVersionStr ( )
inlinestatic

Get SDK version information.

Returns
SDK version information.

◆ isLibraryPathValid()

static boolean isLibraryPathValid ( String  path)
inlinestatic

Check the validity of LibraryPath.

Parameters
pathThe absolute path of the directory where the So file is located.
Returns

◆ onUpdateNetworkTime()

static void onUpdateNetworkTime ( int  errCode,
String  errMsg 
)
inlinestatic

◆ setAppID()

static void setAppID ( String  appID)
inlinestatic

Set appID

Parameters
appID

◆ setAppVersion()

static void setAppVersion ( String  verNum)
inlinestatic

◆ setConsoleEnabled()

static void setConsoleEnabled ( boolean  enabled)
inlinestatic

setConsoleEnabled Enable or disable console log printing

Parameters
enabledSpecifies whether to enable

◆ setExternalDecoderFactory()

static void setExternalDecoderFactory ( TXLiteAVExternalDecoderFactoryInterface  decoderFactory)
inlinestatic

Example of setting up an external H265 soft solver factory

◆ setExtID()

static boolean setExtID ( String  extKey,
String  extValue 
)
inlinestatic

set extension fields

Parameters
extKey
extValue
Returns
return false setting failed

◆ setGlobalEnv()

static int setGlobalEnv ( String  envConfig)
inlinestatic

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
envConfigThe environment that needs to be connected, the default access environment of the SDK is: the default official environment.
Returns
0: success; other: error
Attention
Customers whose target market is mainland China, please do not call this interface. 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.

◆ setLibraryPath()

static void setLibraryPath ( String  path)
inlinestatic

Set the library load path of the sdk.

Parameters
pathThe absolute path of the directory where so is located.

◆ setLicence()

void setLicence ( Context  context,
String  url,
String  key 
)
inline

set licence

Parameters
context
urlurl of licence
keylicence key

◆ setListener()

static void setListener ( TXLiveBaseListener  liveBaseListener)
inlinestatic

set listener, Can receive Log callback and Licence loading callback

Parameters
liveBaseListener

◆ setLogLevel()

static void setLogLevel ( int  logLevel)
inlinestatic

Set the SDK to store logs within the logLevel level from {@linkplain com.tencent.rtmp.TXLiveConstants::LOG_LEVEL_NULL NULL level} to the file.

Parameters
logLevelThe level limit of the log of the saved file. Value reference {@linkplain com.tencent.rtmp.TXLiveConstants::LOG_LEVEL_NULL log output level}

◆ setPituLicencePath()

static void setPituLicencePath ( String  path)
inlinestatic

Set the file path of the Enterprise Edition Motion Effect Licence

Parameters
pathBeginning with '/' indicates an absolute path, others indicate a relative path relative to the assets directory

◆ setUserId()

static void setUserId ( String  userId)
inlinestatic

set userId

Parameters
userIdThe user or device id maintained by the service side itself, used to locate the relevant SDK usage data of the user or device in linkage with the SDK

◆ updateNetworkTime()

static int updateNetworkTime ( )
inlinestatic

Start NTP time service

Returns
0: start successfully; < 0: start failed