![]() |
AliyunPlayer
v5.2.0
Aliyun Player API Reference Manual for Windows Platforms
|
Public Member Functions | |
virtual void | addExtSubtitle (const char *URL)=0 |
添加外挂字幕。 More... | |
virtual void | destroy ()=0 |
销毁播放器 More... | |
virtual void | enableHardwareDecoder (bool bEnabled)=0 |
是否开启硬件解码 More... | |
virtual int64_t | getBufferedPosition ()=0 |
获取已经缓存的位置 More... | |
virtual const char * | getCacheFilePath (const char *URL)=0 |
根据url获取缓存的文件名。 More... | |
virtual const char * | getCacheFilePath (const char *vid, const char *format, const char *definition, int previewTime)=0 |
根据vid获取缓存的文件名。如果有自定义的规则。 More... | |
virtual AVPConfig * | getConfig ()=0 |
获取播放器设置 More... | |
virtual int64_t | getCurrentPosition ()=0 |
获取当前播放位置 More... | |
virtual AVPTrackInfo | getCurrentTrack (AVPTrackType type)=0 |
获取当前播放track More... | |
virtual int64_t | getDuration ()=0 |
获取视频的长度 More... | |
virtual int | getHeight ()=0 |
获取视频的高度 More... | |
virtual IAVPListener * | getListener ()=0 |
获取监听 More... | |
virtual int64_t | getMasterClockPts ()=0 |
获取主时钟pts More... | |
virtual AVPMediaInfo | getMediaInfo ()=0 |
获取媒体信息,包括track信息 More... | |
virtual AVPMirrorMode | getMirrorMode ()=0 |
获取渲染镜像模式 More... | |
virtual float | getRate ()=0 |
获取播放速率 More... | |
virtual AVPRotateMode | getRotateMode ()=0 |
获取渲染旋转模式 More... | |
virtual int | getRotation ()=0 |
获取视频的旋转角度,从metadata中获取出来 More... | |
virtual AVPScalingMode | getScalingMode ()=0 |
获取渲染填充模式 More... | |
virtual void | getThumbnail (int64_t positionMs)=0 |
获取指定位置的缩略图 More... | |
virtual void * | getView ()=0 |
获取播放器的视图view More... | |
virtual float | getVolume ()=0 |
获取播放器的音量(非系统音量) More... | |
virtual int | getWidth ()=0 |
获取视频的宽度 More... | |
virtual bool | isAutoPlay ()=0 |
获取是否自动播放 More... | |
virtual bool | isEnabledHardwareDecoder ()=0 |
获取是否开启硬件解码 More... | |
virtual bool | isLoop ()=0 |
获取是否循环播放 More... | |
virtual bool | isMuted ()=0 |
获取是否静音 More... | |
virtual void | pause ()=0 |
暂停播放 More... | |
virtual void | prepare ()=0 |
播放准备,异步 More... | |
virtual void | redraw ()=0 |
刷新view,例如view size变化时。 More... | |
virtual void | reset ()=0 |
重置播放 More... | |
virtual void | seekToTime (int64_t time, AVPSeekMode seekMode)=0 |
跳转到指定的播放位置 More... | |
virtual void | selectExtSubtitle (int trackIndex, bool enable)=0 |
选择外挂字幕 More... | |
virtual void | selectTrack (int trackIndex)=0 |
根据trackIndex,切换清晰度 More... | |
virtual void | setAudioRenderingCallback (AudioRenderingCallback func, void *userData)=0 |
设置音频渲染回调。需要在prepare()之前设置 More... | |
virtual void | setAutoPlay (bool bAutoPlay)=0 |
设置是否自动播放 More... | |
virtual bool | setCacheConfig (AVPCacheConfig *cacheConfig)=0 |
设置缓存配置 More... | |
virtual void | setConfig (AVPConfig *config)=0 |
播放器设置 More... | |
virtual void | setListener (IAVPListener *listener)=0 |
设置监听 More... | |
virtual void | setLoop (bool bLoop)=0 |
设置是否循环播放 More... | |
virtual void | setMirrorMode (AVPMirrorMode mirrorMode)=0 |
渲染镜像模式 More... | |
virtual void | setMute (bool muted)=0 |
设置是否静音 More... | |
virtual void | setRate (float rate)=0 |
播放速率,0.5-2.0之间,1为正常播放 More... | |
virtual void | setRotateMode (AVPRotateMode rotateMode)=0 |
渲染旋转模式 More... | |
virtual void | setScalingMode (AVPScalingMode scalingMode)=0 |
渲染填充模式 More... | |
virtual void | setSource (const AVPUrlSource &source)=0 |
使用url方式来播放视频 More... | |
virtual void | setSource (const AVPVidAuthSource &source)=0 |
使用vid+playauth方式播放。可参考:https://help.aliyun.com/document_detail/57294.html More... | |
virtual void | setSource (const AVPVidMpsSource &source)=0 |
用vid和MPS信息来播放视频。可参考:https://help.aliyun.com/document_detail/53522.html More... | |
virtual void | setSource (const AVPVidStsSource &source)=0 |
用vid和sts来播放视频,sts可参考:https://help.aliyun.com/document_detail/28756.html More... | |
virtual void | setTraceID (const char *traceID)=0 |
用于跟踪debug信息 More... | |
virtual void | setVideoRenderingCallback (VideoRenderingCallback func, void *userData)=0 |
设置视频渲染回调。需要在prepare()之前设置 More... | |
virtual void | setView (void *view)=0 |
设置播放器的视图playerView view: windows下为HWND More... | |
virtual void | setVolume (float volume)=0 |
设置播放器的音量(非系统音量),范围0.0~2.0,当音量大于1.0时,可能出现噪音,不推荐使用。 More... | |
virtual void | snapshot ()=0 |
截图, 数据在onSnapshotImageBuffer回调中返回 More... | |
virtual void | start ()=0 |
开始播放 More... | |
virtual void | stop ()=0 |
停止播放 More... | |
virtual | ~AliPlayer ()=default |
Static Public Member Functions | |
static void | alivcFree (void *buffer) |
释放内部分配的内存 More... | |
static AliPlayer * | CreatePlayer () |
static void | enableLog (AVPLogLevel level) |
设置log输出级别 More... | |
static const char * | getSDKVersion () |
获取SDK版本号信息 More... | |
static void | setLogCallback (ApsaraPlayerLogCallback func, void *arg) |
设置日志打印回调,异步 More... | |
|
virtualdefault |
|
pure virtual |
添加外挂字幕。
URL | 字幕地址 |
|
static |
释放内部分配的内存
|
static |
|
pure virtual |
销毁播放器
|
pure virtual |
是否开启硬件解码
|
static |
设置log输出级别
|
pure virtual |
获取已经缓存的位置
|
pure virtual |
根据url获取缓存的文件名。
如果没有实现delegate,将会采用默认逻辑生成文件名。
URL | URL |
|
pure virtual |
根据vid获取缓存的文件名。如果有自定义的规则。
vid | 视频id |
format | 视频格式 |
definition | 视频清晰度 |
previewTime | 试看时长, 0则忽略该参数 |
|
pure virtual |
获取当前播放位置
|
pure virtual |
|
pure virtual |
获取视频的长度
|
pure virtual |
获取视频的高度
|
pure virtual |
获取监听
|
pure virtual |
获取主时钟pts
|
pure virtual |
获取媒体信息,包括track信息
|
pure virtual |
获取渲染镜像模式
|
pure virtual |
获取播放速率
|
pure virtual |
获取渲染旋转模式
|
pure virtual |
获取视频的旋转角度,从metadata中获取出来
|
pure virtual |
获取渲染填充模式
|
static |
获取SDK版本号信息
|
pure virtual |
获取指定位置的缩略图
positionMs | 代表在哪个指定位置的缩略图 |
|
pure virtual |
获取播放器的视图view
Query player view
|
pure virtual |
获取播放器的音量(非系统音量)
|
pure virtual |
获取视频的宽度
|
pure virtual |
获取是否自动播放
|
pure virtual |
获取是否开启硬件解码
|
pure virtual |
获取是否循环播放
|
pure virtual |
获取是否静音
|
pure virtual |
暂停播放
|
pure virtual |
播放准备,异步
|
pure virtual |
刷新view,例如view size变化时。
|
pure virtual |
重置播放
|
pure virtual |
|
pure virtual |
选择外挂字幕
trackIndex | 字幕索引 |
enable | true:选择,false:关闭 |
|
pure virtual |
根据trackIndex,切换清晰度
trackIndex | 选择清晰度的index,SELECT_AVPTRACK_TYPE_VIDEO_AUTO代表自适应码率 |
|
pure virtual |
设置音频渲染回调。需要在prepare()之前设置
|
pure virtual |
设置是否自动播放
|
pure virtual |
|
pure virtual |
|
pure virtual |
设置监听
|
static |
设置日志打印回调,异步
|
pure virtual |
设置是否循环播放
|
pure virtual |
渲染镜像模式
|
pure virtual |
设置是否静音
|
pure virtual |
播放速率,0.5-2.0之间,1为正常播放
|
pure virtual |
渲染旋转模式
|
pure virtual |
渲染填充模式
|
pure virtual |
|
pure virtual |
使用vid+playauth方式播放。可参考:https://help.aliyun.com/document_detail/57294.html
source | AVPVidAuthSource的输入类型 |
|
pure virtual |
用vid和MPS信息来播放视频。可参考:https://help.aliyun.com/document_detail/53522.html
source | AVPVidMpsSource的输入类型 |
|
pure virtual |
用vid和sts来播放视频,sts可参考:https://help.aliyun.com/document_detail/28756.html
source | AVPVidStsSource的输入类型 |
|
pure virtual |
用于跟踪debug信息
traceID | 指定和其他客户端连接可跟踪的id |
|
pure virtual |
设置视频渲染回调。需要在prepare()之前设置
|
pure virtual |
设置播放器的视图playerView view: windows下为HWND
|
pure virtual |
设置播放器的音量(非系统音量),范围0.0~2.0,当音量大于1.0时,可能出现噪音,不推荐使用。
|
pure virtual |
截图, 数据在onSnapshotImageBuffer回调中返回
|
pure virtual |
开始播放
|
pure virtual |
停止播放