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.
TXVodDownloadManager

Data Structures

class  TXVodDownloadManager
 

Detailed Description

The video download manager.


Data Structure Documentation

◆ com::tencent::rtmp::downloader::TXVodDownloadManager

class com::tencent::rtmp::downloader::TXVodDownloadManager

Public Member Functions

void setDownloadPath (String downloadPath)
 
void setHeaders (Map< String, String > headers)
 
void setListener (ITXVodDownloadListener listener)
 
TXVodDownloadMediaInfo startDownloadUrl (String url)
 
TXVodDownloadMediaInfo startDownloadUrl (String url, String userName)
 
TXVodDownloadMediaInfo startDownload (final TXVodDownloadDataSource dataSource)
 
void stopDownload (TXVodDownloadMediaInfo dinfo)
 
boolean deleteDownloadFile (String playPath)
 
boolean deleteDownloadMediaInfo (TXVodDownloadMediaInfo downloadMediaInfo)
 
List< TXVodDownloadMediaInfogetDownloadMediaInfoList ()
 
TXVodDownloadMediaInfo getDownloadMediaInfo (int appId, String fileId, int qualityId)
 
TXVodDownloadMediaInfo getDownloadMediaInfo (String url)
 

Static Public Member Functions

static TXVodDownloadManager getInstance ()
 

Static Public Attributes

static final int DOWNLOAD_SUCCESS = 0
 
static final int DOWNLOAD_AUTH_FAILED = -5001
 
static final int DOWNLOAD_NO_FILE = -5003
 
static final int DOWNLOAD_FORMAT_ERROR = -5004
 
static final int DOWNLOAD_DISCONNECT = -5005
 
static final int DOWNLOAD_HLS_KEY_ERROR = -5006
 
static final int DOWNLOAD_PATH_ERROR = -5007
 
static final int DOWNLOAD_403FORBIDDEN = -5008
 

Member Function Documentation

◆ deleteDownloadFile()

boolean deleteDownloadFile ( String  playPath)
inline

Delete the file generated by download

Parameters
playPathThe downloaded file path
Returns
false will be returned if the file is being downloaded and cannot be deleted. @Deprecated This API has been deprecated. We recommend you use this#deleteDownloadMediaInfo(TXVodDownloadMediaInfo)

◆ deleteDownloadMediaInfo()

boolean deleteDownloadMediaInfo ( TXVodDownloadMediaInfo  downloadMediaInfo)
inline

Delete the download information

Parameters
downloadMediaInfodownloadMediaInfo

◆ getDownloadMediaInfo() [1/2]

TXVodDownloadMediaInfo getDownloadMediaInfo ( int  appId,
String  fileId,
int  qualityId 
)
inline

Get the download information

Parameters
appIdThe appId of the video file
fileIdThe video file ID
qualityIdThe resolution of the stream to be downloaded.
Returns

◆ getDownloadMediaInfo() [2/2]

TXVodDownloadMediaInfo getDownloadMediaInfo ( String  url)
inline

Get the download information

Parameters
urlThe actual download URL
Returns
The download information

◆ getDownloadMediaInfoList()

List<TXVodDownloadMediaInfo> getDownloadMediaInfoList ( )
inline

Get the download list. You must set the download meta before calling this API. For more information, see the setDownloadMeta method.

Returns

◆ getInstance()

static TXVodDownloadManager getInstance ( )
inlinestatic

The video download manager

Returns
The video download manager instance

◆ setDownloadPath()

void setDownloadPath ( String  downloadPath)
inline

Set the root directory for downloaded files

Parameters
pathThe directory path. If it doesn't exist, it will be created automatically.
Warning
This parameter must be configured before download starts; otherwise, download will fail.

◆ setHeaders()

void setHeaders ( Map< String, String >  headers)
inline

Set the httpHeader

Parameters
headers

◆ setListener()

void setListener ( ITXVodDownloadListener  listener)
inline

Set the download callback method. Must be set before downloading

Parameters
listener

◆ startDownload()

TXVodDownloadMediaInfo startDownload ( final TXVodDownloadDataSource  dataSource)
inline

Download a file

Parameters
sourceThe download source
Returns
The download object will be returned if the request succeeds; otherwise, nil will be returned.

◆ startDownloadUrl() [1/2]

TXVodDownloadMediaInfo startDownloadUrl ( String  url)
inline

Download a file

Parameters
urlurl
Returns
@Deprecated This API has been deprecated. We recommend you usethis#startDownloadUrl(String, String)

◆ startDownloadUrl() [2/2]

TXVodDownloadMediaInfo startDownloadUrl ( String  url,
String  userName 
)
inline

Download a file

Parameters
urlurl
usernameusername
Returns
The download information

◆ stopDownload()

void stopDownload ( TXVodDownloadMediaInfo  dinfo)
inline

Stop download

Parameters
mediaThe object for which download stopped

Field Documentation

◆ DOWNLOAD_403FORBIDDEN

final int DOWNLOAD_403FORBIDDEN = -5008
static

◆ DOWNLOAD_AUTH_FAILED

final int DOWNLOAD_AUTH_FAILED = -5001
static

◆ DOWNLOAD_DISCONNECT

final int DOWNLOAD_DISCONNECT = -5005
static

◆ DOWNLOAD_FORMAT_ERROR

final int DOWNLOAD_FORMAT_ERROR = -5004
static

◆ DOWNLOAD_HLS_KEY_ERROR

final int DOWNLOAD_HLS_KEY_ERROR = -5006
static

◆ DOWNLOAD_NO_FILE

final int DOWNLOAD_NO_FILE = -5003
static

◆ DOWNLOAD_PATH_ERROR

final int DOWNLOAD_PATH_ERROR = -5007
static

◆ DOWNLOAD_SUCCESS

final int DOWNLOAD_SUCCESS = 0
static