Frank Shearar SIP 组件

发布于 2024-12-17 00:31:19 字数 717 浏览 1 评论 0原文

我正在查看 Frank Shearar 的演示程序,但无法构建该演示程序。我修复了所有对“丢失文件”的引用,我试图修复的最后一个错误与类中接口的差异以及它们现在的使用方式有关...

Self.CalleeMedia := TIdSDPMultimediaSession.Create(Self.Profile);

vs

Self.CalleeMedia := TIdSDPMultimediaSession.Create(Self.Profile, ???, ???);

我知道接口现在看起来像... .

constructor TIdSDPMultimediaSession.Create(Profile: TIdRTPProfile; 
  Factory: TIdSdpMediaStreamFactory; ExecutionContext: TIdTimerQueue);

我可以添加...

x := TIdSdpMediaStreamFactory.Create;
y := TIdTimerQueue.Create;

并传递这些吗?或者在这两种情况下都为零。在构建演示程序时,我在其他一些地方也遇到了类似的错误。我是否只需要创建所需的其他对象?如果不是,还需要采取哪些额外步骤?任何帮助我开始的帮助都会很棒。

谢谢,

I am looking at the demo program by Frank Shearar and cannot build the demo program. I fixed up all the references to "missing files" and the last errors that I am trying to fix are related to differences in the interface in classes and how they are used now...

Self.CalleeMedia := TIdSDPMultimediaSession.Create(Self.Profile);

vs

Self.CalleeMedia := TIdSDPMultimediaSession.Create(Self.Profile, ???, ???);

I know the interface now looks like....

constructor TIdSDPMultimediaSession.Create(Profile: TIdRTPProfile; 
  Factory: TIdSdpMediaStreamFactory; ExecutionContext: TIdTimerQueue);

and I could just add...

x := TIdSdpMediaStreamFactory.Create;
y := TIdTimerQueue.Create;

and pass these in? Or pas nil in both cases. There are a few other places where I get similar errors when building the demo program. Do I just need to create other objects that are required? If not, what additional steps are needed? Any assistance to get me started would be great.

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

婴鹅 2024-12-24 00:31:19

我怀疑我只是忘记更新演示以符合 SDP API 的接口!

在实例化 TIdSDPMultimediaSession 之前创建 TIdSdpMediaStreamFactoryTIdTimerQueue

特别是,看看测试用例是如何设置的,在 test\TestIdSdp.pas 中:

procedure TestTIdSDPMultimediaSession.SetUp;
begin
  inherited SetUp;

  Self.Factory     := TMockMediaStreamFactory.Create;
  Self.Profile     := TIdAudioVisualProfile.Create;
  Self.Timer       := TIdThreadedTimerQueue.Create(false);
  Self.MS          := TIdSDPMultimediaSession.Create(Self.Profile, Self.Factory, Self.Timer);
  Self.PortBlocker := TIdMockRTPPeer.Create;

  // We only instantiate Server so that we know that GStack points to an
  // instantiated stack.
  Self.Server := TIdUdpServer.Create(nil);
end;

I suspect I simply forgot to update the demo in line with the SDP API's interface!

Create the TIdSdpMediaStreamFactory and TIdTimerQueue before instantiating the TIdSDPMultimediaSession.

In particular, take a look at how the test case is set up, in test\TestIdSdp.pas:

procedure TestTIdSDPMultimediaSession.SetUp;
begin
  inherited SetUp;

  Self.Factory     := TMockMediaStreamFactory.Create;
  Self.Profile     := TIdAudioVisualProfile.Create;
  Self.Timer       := TIdThreadedTimerQueue.Create(false);
  Self.MS          := TIdSDPMultimediaSession.Create(Self.Profile, Self.Factory, Self.Timer);
  Self.PortBlocker := TIdMockRTPPeer.Create;

  // We only instantiate Server so that we know that GStack points to an
  // instantiated stack.
  Self.Server := TIdUdpServer.Create(nil);
end;
酒绊 2024-12-24 00:31:19

演示项目无法编译。他有很多测试*文件的链接。测试项目中还宣布了所有工厂的信息。

Demo project can not be compiled. He has a lot of links to test* files. Also all the factory's was declared at the test project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文