Emx::MediaAdecStreamSync类 参考

音频流解码接口,均为同步阻塞操作

#include "MediaAdec.hpp"

静态 Public 成员函数

static ErrCodeE PushFrame (int32_t chn, MediaAdec::Frame &frame, int32_t timeoutMs=1000)
 发送音频帧到媒体服务进行解码播放,这里发送的音频帧的编码格式需要与MediaClientAenc中配置的解码格式一致 更多...
 
static ErrCodeE PushRawPcm (int32_t chn, MediaAdec::Frame &frame, int32_t timeoutMs=1000)
 发送Pcm音频帧到媒体服务直接播放 更多...
 
static ErrCodeE PlayFile (int32_t chn, const char *path, int32_t timeoutMs=1000)
 添加音频文件路径至媒体服务的播放列表中,添加后此函数就会返回,列表为空时会立刻播放 更多...
 
static ErrCodeE PlayFileWithVolume (int32_t chn, const char *path, int32_t volume, int32_t timeoutMs=1000)
 添加音频文件路径至媒体服务的播放列表中,添加后此函数就会返回,列表为空时会立刻播放 更多...
 
static ErrCodeE PlayCtrlQuit (int32_t chn, bool fullInterrupt=true, int32_t timeoutMs=1000)
 终止播放并清空媒体服务播放列表 更多...
 

成员函数说明

◆ PushFrame()

static ErrCodeE Emx::MediaAdecStreamSync::PushFrame ( int32_t  chn,
MediaAdec::Frame frame,
int32_t  timeoutMs = 1000 
)
static
参数
chn[in] 目的通道号
frame[in] 与音频帧信息
timeoutMs[in] 超时时间,默认1s
返回
ErrCode

◆ PushRawPcm()

static ErrCodeE Emx::MediaAdecStreamSync::PushRawPcm ( int32_t  chn,
MediaAdec::Frame frame,
int32_t  timeoutMs = 1000 
)
static
参数
chn[in] 目的通道号
frame[in] 音频帧信息
timeoutMs[in] 超时时间,默认1s
返回
ErrCode

◆ PlayFile()

static ErrCodeE Emx::MediaAdecStreamSync::PlayFile ( int32_t  chn,
const char *  path,
int32_t  timeoutMs = 1000 
)
static
参数
chn[in] 目的通道号
path[in] 音频文件路径
timeoutMs[in] 超时时间,默认1s
返回
ErrCode

◆ PlayFileWithVolume()

static ErrCodeE Emx::MediaAdecStreamSync::PlayFileWithVolume ( int32_t  chn,
const char *  path,
int32_t  volume,
int32_t  timeoutMs = 1000 
)
static
参数
chn[in] 目的通道号
path[in] 音频文件路径
volume[in] 希望临时以此音量播放文件
timeoutMs[in] 超时时间,默认1s
返回
ErrCode

◆ PlayCtrlQuit()

static ErrCodeE Emx::MediaAdecStreamSync::PlayCtrlQuit ( int32_t  chn,
bool  fullInterrupt = true,
int32_t  timeoutMs = 1000 
)
static
参数
chn[in] 目的通道号
fullInterrupt[in] 是否完全中断 默认true
timeoutMs[in] 超时时间,默认1s
返回
ErrCode