合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
Constructor Name |
|---|
SinkNode(const char *mime, bool isProcThreadCreated, bool isAsync) 构造函数。 |
Qualifier and Type |
Function Name and Description |
|---|---|
int64_t |
GetCurrentPosition() const 获取当前的播放位置。 |
SetVolume(double) 设置播放音量。 |
|
double |
GetVolume() const 获取当前播放的音量。 |
SetMute(bool) 设置是否静音。 |
|
bool |
GetMute() const 查询当前是否静音。 |
SetAudioStreamType(int) 设置音频流类型。 |
|
| 获取同步时钟。 |
|
| 设置同步时钟。 |
Constructor |
|---|
SinkNode(const char *mime, bool isProcThreadCreated, bool isAsync) 构造函数。 |
Parameters
Name |
Description |
|---|---|
mime |
指定节点的mime类型。 |
isProcThreadCreated |
是否需要创建处理buffer的线程,当SinkNode没有比较耗时的操作时,设置为false。
|
isAsync |
指定节点工作在同步还是异步状态。
|
Function |
|---|
virtual int64_t GetCurrentPosition() const 查询当前的播放进度,用时间戳表示。 |
Returns
Type |
Description |
|---|---|
int64_t |
时间戳。 |
Function |
|---|
virtual RetCode SetVolume(double) 设置音量。 |
Parameters
Name |
Description |
|---|---|
double |
待设置的音量,取值范围[0, 1]。 |
Returns
Type |
Description |
|---|---|
错误码。 |
Function |
|---|
virtual double GetVolume() const 获取当前的播放音量。 |
Returns
Type |
Description |
|---|---|
double |
音量。 |
Function |
|---|
virtual RetCode SetMute(bool) 设置是否静音。 |
Parameters
Name |
Description |
|---|---|
bool |
|
Returns
Type |
Description |
|---|---|
错误码。 |
Function |
|---|
virtual bool GetMute() const 获取当前是否静音。 |
Returns
Type |
Description |
|---|---|
bool |
|
Function |
|---|
virtual RetCode SetAudioStreamType(int type) 设置音频流类型。 |
Parameters
Name |
Description |
|---|---|
type |
待设置的音频流类型。详见StreamType |
Returns
Type |
Description |
|---|---|
错误码。 |
Function |
|---|
ClockCoreSP ProvideClock() 从该节点获取同步时钟。 |
Returns
Type |
Description |
|---|---|
返回ClockCore的智能指针。 |
Function |
|---|
RetCode SetClock(ClockCoreSP clock) 设置同步时钟给该节点。 |
Parameters
Name |
Description |
|---|---|
clock |
待设置的同步时钟。 |
Returns
Type |
Description |
|---|---|
错误码。 |