智能客服
你问我答,随时在线为你解决问题
Qualifier and Type |
Function Name and Description |
|---|---|
static std::shared_ptr<Clock> |
Create(uint32_t flag) 创建一个Clock的对象。 |
Resume() 恢复时钟同步。 |
|
Pause() 暂停时钟同步。 |
|
Flush() 重置时钟同步。 |
|
| 提供同步时钟,用于当前SinkNode和其他SinkNode之间的时间同步。 |
|
SetClock(const ClockCoreSP &clock) 设置同步时钟,用于当前SinkNode和其他SinkNode之间的时间同步。 |
|
void |
SetAnchorTime(int64_t mediaUs, int64_t realUs, int64_t anchorMaxTime = -1) 设置锚时间。 |
void |
UpdateMaxAnchorTime(int64_t anchorMaxTime) 更新当前锚时间所对应的最大平滑时钟。 |
int64_t |
GetMediaLateUs(int64_t mediaTimeUs) 根据当前媒体流时间返回对应帧的延迟时间。 |
GetCurrentPosition(int64_t &mediaTimeUs) 获取当前节点的媒体时间。 |
Function |
|---|
static shared_ptr<Clock> Create(uint32_t flag) 创建一个Clock对象,用于SinkNode间的时钟同步。 |
Parameters
Name |
Description |
|---|---|
flag |
用于区别该SinkNode是提供时钟,还是接受外部的同步时钟。 |
Returns
Type |
Description |
|---|---|
std::shared_ptr<Clock> |
返回一个Clock的智能指针。 |
Function |
|---|
RetCode SetClock(const ClockCoreSP &clock) 创建一个ClockCore对象给当前SinkNode,用于SinkNode间的时钟同步。 |
Parameters
Name |
Description |
|---|---|
clock |
设置同步时钟。 |
Returns
Type |
Description |
|---|---|
返回错误码。 |
Function |
|---|
void SetAnchorTime(int64_t mediaUs, int64_t realUs, int64_t anchorMaxTime = -1) 设置锚时间。 |
Parameters
Name |
Description |
|---|---|
mediaUs |
当前媒体流的媒体时间,单位:微秒。 |
realUs |
当前媒体流对应的系统时间,单位:微秒。 |
anchorMaxTime |
当前锚时间的最大平滑时间,单位:微秒。 -1表示不设置最大平滑时间。 |
Function |
|---|
void UpdateMaxAnchorTime(int64_t anchorMaxTime) 更新当前锚时间所对应的最大平滑时钟。 |
Parameters
Name |
Description |
|---|---|
anchorMaxTime |
设置当前锚时间所对应的最大平滑时间。 |
Function |
|---|
int64_t GetMediaLateUs(int64_t mediaTimeUs) 根据当前媒体流时间返回对应帧的延迟时间。 |
Parameters
Name |
Description |
|---|---|
mediaTimeUs |
当前流的媒体时间。 |
Returns
Type |
Description |
|---|---|
int64_t |
当前媒体流时间对应的延迟时间。 |