Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create custom-video-source.md #3091

Merged
merged 11 commits into from
Sep 14, 2023
Merged

Create custom-video-source.md #3091

merged 11 commits into from
Sep 14, 2023

Conversation

jinyuagora
Copy link
Collaborator

No description provided.

m_trackConnections[trackIndex].channelId = m_strChannel.c_str();
m_trackConnections[trackIndex].localUid = uid;
m_trackEventHandlers[trackIndex].SetId(trackIndex + 1);
m_trackEventHandlers[trackIndex].SetMsgReceiver(m_hWnd);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

95~100行是不是没必要出现在文档里。去掉这块代码,应该也不影响核心 API 调用的展示。

Copy link
Collaborator Author

@jinyuagora jinyuagora May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个其实是许纯震在review的时候提建议加上,因为下文 joinChannelEx 传参的时候有用到,有这几行代码会更清晰些

int ret = m_rtcEngine->joinChannelEx(APP_TOKEN, m_trackConnections[trackIndex], mediaOptions, &m_trackEventHandlers[trackIndex]);


参考下图调用时序,在你的 app 中实现自定义视频采集:

![](https://web-cdn.agora.io/docs-files/1684381970999)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个图里有一点纠结的地方。多频道的 API 调用方式有两种:

  • 仅调用 joinChannelEx 加入多个频道。
  • 调用 joinChannel 加入主频道,再调用 joinChannelEx 加入多个频道。

但是在这个时序图里,仅展示第一种方式。而纠结的地方在于,GitHub 示例项目的代码逻辑用的是第二种。在 Multixxxx.cpp 文件里,第 94 行是加入主频道,第 164 行是加入多频道。

所以建议在“加入多频道”这条箭头上写“joinChannelEx“,箭头下写”或 joinChannel 与 joinChannelEx 结合使用“.

@jinyuagora jinyuagora merged commit 5654b53 into master Sep 14, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants