Struct Info |
|---|
struct SinkNode Sink节点类,继承NodeBase,处于Pipeline尾部且对数据进行Sink的节点,有与之相连的上游节点,但不存在下游节点。 父类NodeBase中的接口在此处不再赘述。 |
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) 设置音频流类型。 |
|
| 获取同步时钟。 |
|
| 设置同步时钟。 |
Parameters
Name |
Description |
|---|---|
mime |
指定节点的mime类型。 |
isProcThreadCreated |
是否需要创建处理buffer的线程,当SinkNode没有比较耗时的操作时,设置为false。
|
isAsync |
指定节点工作在同步还是异步状态。
|
Returns
Type |
Description |
|---|---|
int64_t |
时间戳。 |
Parameters
Name |
Description |
|---|---|
double |
待设置的音量,取值范围[0, 1]。 |
Returns
Type |
Description |
|---|---|
错误码。 |
Returns
Type |
Description |
|---|---|
double |
音量。 |
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的智能指针。 |
Parameters
Name |
Description |
|---|---|
clock |
待设置的同步时钟。 |
Returns
Type |
Description |
|---|---|
错误码。 |