AliyunPlayer  v5.2.0
Aliyun Player API Reference Manual for Windows Platforms
alivc_player::AliMediaDownloader Class Referenceabstract

Public Member Functions

virtual void deleteDownloadedFile ()=0
 Delete the downloaded file. More...
 
virtual AVDConfiggetConfig ()=0
 Query download config. More...
 
virtual const char * getDownloadedFilePath ()=0
 Query the path of the downloaded file. More...
 
virtual IAVDListenergetListener ()=0
 Query callback listener. More...
 
virtual void prepareWithPlayAuth (AVPVidAuthSource *source)=0
 Use AVPVidAuthSource to prepare for playback. More...
 
virtual void prepareWithVid (AVPVidStsSource *source)=0
 Use AVPVidStsSource to prepare for playback. More...
 
virtual void selectTrack (int trackIndex)=0
 Specify the indexes of the tracks to be downloaded. More...
 
virtual void setConfig (AVDConfig *config)=0
 Modify download config. More...
 
virtual void setListener (IAVDListener *listener)=0
 Set callback listener. More...
 
virtual void setPlayUrlConvertCallback (PlayURLConvertCallback callback)=0
 Set a URL conversion callback. More...
 
virtual void setSaveDirectory (const char *dir)=0
 Set a path to save the downloaded file. More...
 
virtual void start ()=0
 Start downloading. More...
 
virtual void stop ()=0
 Pause downloading. More...
 
virtual void updateWithPlayAuth (AVPVidAuthSource *source)=0
 Update the AVPVidAuthSource information when the authentication expires. More...
 
virtual void updateWithVid (AVPVidStsSource *source)=0
 Update the AVPVidStsSource information when the authentication expires. More...
 
virtual ~AliMediaDownloader ()=default
 

Static Public Member Functions

static AliMediaDownloaderCreateMediaDownloader ()
 
static int deleteFile (const char *saveDir, const char *vid, const char *format, int index)
 Delete a downloaded file. More...
 

Constructor & Destructor Documentation

◆ ~AliMediaDownloader()

virtual alivc_player::AliMediaDownloader::~AliMediaDownloader ( )
virtualdefault

Member Function Documentation

◆ CreateMediaDownloader()

static AliMediaDownloader* alivc_player::AliMediaDownloader::CreateMediaDownloader ( )
static

◆ deleteDownloadedFile()

virtual void alivc_player::AliMediaDownloader::deleteDownloadedFile ( )
pure virtual

Delete the downloaded file.

◆ deleteFile()

static int alivc_player::AliMediaDownloader::deleteFile ( const char *  saveDir,
const char *  vid,
const char *  format,
int  index 
)
static

Delete a downloaded file.

Parameters
saveDirThe path where the file is saved.
vidVID.
formatFormat.
indexThe download index corresponds to the VID.

◆ getConfig()

virtual AVDConfig* alivc_player::AliMediaDownloader::getConfig ( )
pure virtual

Query download config.

◆ getDownloadedFilePath()

virtual const char* alivc_player::AliMediaDownloader::getDownloadedFilePath ( )
pure virtual

Query the path of the downloaded file.

◆ getListener()

virtual IAVDListener* alivc_player::AliMediaDownloader::getListener ( )
pure virtual

Query callback listener.

◆ prepareWithPlayAuth()

virtual void alivc_player::AliMediaDownloader::prepareWithPlayAuth ( AVPVidAuthSource source)
pure virtual

Use AVPVidAuthSource to prepare for playback.

Parameters
sourcevid Play the media through playAuth.

◆ prepareWithVid()

virtual void alivc_player::AliMediaDownloader::prepareWithVid ( AVPVidStsSource source)
pure virtual

Use AVPVidStsSource to prepare for playback.

Parameters
sourcevid Play the media through VidSts.

◆ selectTrack()

virtual void alivc_player::AliMediaDownloader::selectTrack ( int  trackIndex)
pure virtual

Specify the indexes of the tracks to be downloaded.

Parameters
trackIndexUse the prepare callback to retrieve all track indexes.

◆ setConfig()

virtual void alivc_player::AliMediaDownloader::setConfig ( AVDConfig config)
pure virtual

Modify download config.

◆ setListener()

virtual void alivc_player::AliMediaDownloader::setListener ( IAVDListener listener)
pure virtual

Set callback listener.

◆ setPlayUrlConvertCallback()

virtual void alivc_player::AliMediaDownloader::setPlayUrlConvertCallback ( PlayURLConvertCallback  callback)
pure virtual

Set a URL conversion callback.

URL conversion is typically used in P2P broadcasting.

Parameters
callbackThe function pointer of the callback.

◆ setSaveDirectory()

virtual void alivc_player::AliMediaDownloader::setSaveDirectory ( const char *  dir)
pure virtual

Set a path to save the downloaded file.

Parameters
dirThe specified path.

◆ start()

virtual void alivc_player::AliMediaDownloader::start ( )
pure virtual

Start downloading.

◆ stop()

virtual void alivc_player::AliMediaDownloader::stop ( )
pure virtual

Pause downloading.

◆ updateWithPlayAuth()

virtual void alivc_player::AliMediaDownloader::updateWithPlayAuth ( AVPVidAuthSource source)
pure virtual

Update the AVPVidAuthSource information when the authentication expires.

Parameters
sourcevid Authentication information.

◆ updateWithVid()

virtual void alivc_player::AliMediaDownloader::updateWithVid ( AVPVidStsSource source)
pure virtual

Update the AVPVidStsSource information when the authentication expires.

Parameters
sourcevid STS information.

The documentation for this class was generated from the following file: