Emx::MediaServerAdecChn类 参考abstract

#include "MediaServerAdec.hpp"

类 Emx::MediaServerAdecChn 继承关系图:
Emx::MediaServerAdecChn 的协作图:

Public 成员函数

 MediaServerAdecChn (int32_t chn)
 
 ~MediaServerAdecChn () override=default
 
ErrCodeE LoadParam () override
 
ErrCodeE SaveParam () override
 
void * GetParam () override
 
void * GetNewParam () override
 
void * GetRunningParam () override
 
int GetParamSize () override
 
ErrCodeE GetParamDefaultData (std::string &data) override
 
bool ParamValid () override
 
ErrCodeE OnRecvReqChn (uint32_t method, const char *data, int32_t size, std::string &out) override
 
ErrCodeE SetVolumeTemp (int32_t volume) override
 
ErrCodeE OnServerCreate () override
 
void OnServerDestroy () override
 
- Public 成员函数 继承自 Emx::MediaInfAdec
virtual ErrCodeE SetVolume (int32_t volume)=0
 设置音量 更多...
 
virtual PlayStatusE GetPlayStatus ()=0
 获取媒体音频播放状态 更多...
 
- Public 成员函数 继承自 Emx::MediaServerModuleChnBase
 MediaServerModuleChnBase (MediaModE mod, int32_t chn)
 
virtual ~MediaServerModuleChnBase ()=default
 
virtual ErrCodeE OnCreate ()=0
 创建模块通道 更多...
 
virtual void OnDestroy ()=0
 销毁模块通道 更多...
 
virtual ErrCodeE OnParamChanged ()=0
 参数改变 更多...
 
virtual ErrCodeE GetParamRange (Json::Value &range)
 
virtual void NewParamInCome (const char *data, int size)
 
virtual void GetRunningParamData (std::string &data)
 
virtual void GetParamData (std::string &data)
 
virtual bool ParamChanged ()
 
virtual void UpdateParam ()
 
virtual void UpdateRunningParam ()
 
virtual void ReleaseNewParam ()
 
virtual ErrCodeE OnRecvReqChnSpec (uint32_t method, const char *data, int32_t size, std::string &out)
 
int32_t GetChn ()
 

Protected 成员函数

virtual void SendToAo (const int16_t *pcm, int32_t pktNum)=0
 发送PCM数据到音频输出 更多...
 
virtual void ClearAoBuffer ()
 清空Ao的缓存buffer 更多...
 
virtual void PadSilentPcm ()
 填充静音数据 更多...
 
void OnGetMsg (uint32_t topic, const char *data, int32_t size)
 
void RunPlayWork ()
 
void PlayFile (void *arg)
 
void PlayFileDone (ErrCodeE e, void *arg)
 
void SpkEna (bool ena)
 
void SendToChipAo (const int16_t *pcm, int32_t pktNum)
 发送PCM数据到芯片音频输出 更多...
 

Protected 属性

Param m_param
 
Param m_paramNew
 
Param m_paramRunning
 
uint32_t m_silentTimeMs = 500
 推送静音数据时间 ms 更多...
 
uint32_t m_delayPlayMs = 0
 打开功放后延时播放音频时间 ms 更多...
 
- Protected 属性 继承自 Emx::MediaServerModuleChnBase
MediaServerModuleBasem_module
 
int32_t m_chn
 

额外继承的成员函数

- Public 类型 继承自 Emx::MediaInfAdec
enum  PlayStatusE : uint32_t { Unknown = 0 , Playing , Finish }
 播放状态 更多...
 

构造及析构函数说明

◆ MediaServerAdecChn()

Emx::MediaServerAdecChn::MediaServerAdecChn ( int32_t  chn)
inlineexplicit

◆ ~MediaServerAdecChn()

Emx::MediaServerAdecChn::~MediaServerAdecChn ( )
overridedefault

成员函数说明

◆ LoadParam()

ErrCodeE Emx::MediaServerAdecChn::LoadParam ( )
overridevirtual

◆ SaveParam()

ErrCodeE Emx::MediaServerAdecChn::SaveParam ( )
overridevirtual

◆ GetParam()

void* Emx::MediaServerAdecChn::GetParam ( )
inlineoverridevirtual

◆ GetNewParam()

void* Emx::MediaServerAdecChn::GetNewParam ( )
inlineoverridevirtual

◆ GetRunningParam()

void* Emx::MediaServerAdecChn::GetRunningParam ( )
inlineoverridevirtual

◆ GetParamSize()

int Emx::MediaServerAdecChn::GetParamSize ( )
inlineoverridevirtual

◆ GetParamDefaultData()

ErrCodeE Emx::MediaServerAdecChn::GetParamDefaultData ( std::string &  data)
overridevirtual

◆ ParamValid()

bool Emx::MediaServerAdecChn::ParamValid ( )
overridevirtual

◆ OnRecvReqChn()

ErrCodeE Emx::MediaServerAdecChn::OnRecvReqChn ( uint32_t  method,
const char *  data,
int32_t  size,
std::string &  out 
)
overridevirtual

◆ SetVolumeTemp()

ErrCodeE Emx::MediaServerAdecChn::SetVolumeTemp ( int32_t  volume)
inlineoverridevirtual

实现了 Emx::MediaInfAdec.

◆ OnServerCreate()

ErrCodeE Emx::MediaServerAdecChn::OnServerCreate ( )
overridevirtual

◆ OnServerDestroy()

void Emx::MediaServerAdecChn::OnServerDestroy ( )
overridevirtual

◆ SendToAo()

virtual void Emx::MediaServerAdecChn::SendToAo ( const int16_t *  pcm,
int32_t  pktNum 
)
protectedpure virtual
参数
pcm[in] 16bit pcm原始数据指针
pktNum[in] pcm采样数,注意不是数据字节数

◆ ClearAoBuffer()

virtual void Emx::MediaServerAdecChn::ClearAoBuffer ( )
inlineprotectedvirtual

◆ PadSilentPcm()

virtual void Emx::MediaServerAdecChn::PadSilentPcm ( )
protectedvirtual

◆ OnGetMsg()

void Emx::MediaServerAdecChn::OnGetMsg ( uint32_t  topic,
const char *  data,
int32_t  size 
)
protected

◆ RunPlayWork()

void Emx::MediaServerAdecChn::RunPlayWork ( )
protected

◆ PlayFile()

void Emx::MediaServerAdecChn::PlayFile ( void *  arg)
protected

◆ PlayFileDone()

void Emx::MediaServerAdecChn::PlayFileDone ( ErrCodeE  e,
void *  arg 
)
protected

◆ SpkEna()

void Emx::MediaServerAdecChn::SpkEna ( bool  ena)
protected

◆ SendToChipAo()

void Emx::MediaServerAdecChn::SendToChipAo ( const int16_t *  pcm,
int32_t  pktNum 
)
protected
参数
pcm[in] 16bit pcm原始数据指针
pktNum[in] pcm采样数,注意不是数据字节数

类成员变量说明

◆ m_param

Param Emx::MediaServerAdecChn::m_param
protected

被这些函数引用 GetParam().

◆ m_paramNew

Param Emx::MediaServerAdecChn::m_paramNew
protected

被这些函数引用 GetNewParam().

◆ m_paramRunning

Param Emx::MediaServerAdecChn::m_paramRunning
protected

被这些函数引用 GetRunningParam().

◆ m_silentTimeMs

uint32_t Emx::MediaServerAdecChn::m_silentTimeMs = 500
protected

◆ m_delayPlayMs

uint32_t Emx::MediaServerAdecChn::m_delayPlayMs = 0
protected