Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Delphi Frank Shearr SIP组件_Delphi_Sip - Fatal编程技术网

Delphi Frank Shearr SIP组件

Delphi Frank Shearr SIP组件,delphi,sip,Delphi,Sip,我正在看Frank Shearr的演示程序,无法构建演示程序。我修复了所有对“丢失文件”的引用,我试图修复的最后一个错误与类中接口的差异以及它们现在的使用方式有关 Self.CalleeMedia := TIdSDPMultimediaSession.Create(Self.Profile); vs 我知道界面现在看起来像 constructor TIdSDPMultimediaSession.Create(Profile: TIdRTPProfile; Factory: TIdSdpM

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

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

我知道界面现在看起来像

constructor TIdSDPMultimediaSession.Create(Profile: TIdRTPProfile; 
  Factory: TIdSdpMediaStreamFactory; ExecutionContext: TIdTimerQueue);
我可以加上

x := TIdSdpMediaStreamFactory.Create;
y := TIdTimerQueue.Create;
把这些传进来?或在这两种情况下均为零。在构建演示程序时,我在其他一些地方也会遇到类似的错误。我是否只需要创建所需的其他对象?如果没有,还需要什么额外的步骤?任何能让我开始的帮助都会很好


谢谢,

我想我只是忘了根据SDPAPI的接口更新演示

在实例化
tidsdpmultimediassession
之前,创建
TIdSdpMediaStreamFactory
TIdTimerQueue

特别是,在
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;

无法编译演示项目。他有很多指向test*文件的链接。此外,所有的工厂都在测试项目中声明。

您使用的是哪个版本的Delphi?演示应该可以直接用于Delphi 6、7和BDS 2006中的任何一个。特别是,我使用Indy 9编写了堆栈,它非常古老。无论如何,非常感谢您提供有关错误/问题的详细信息!供将来参考:当然可以。我在回答中提到了需要做什么以及为什么。这些测试文件是DUnit使用的测试用例,如项目自述中所述。我不知道你在最后一句话中的意思。我试着编译CallDemo项目而不是SIP!我认为只有Sip项目使用DUnit进行测试?CallDemo项目已经腐烂了:我在上一次做的大量更改中没有更新它的代码。我需要很长时间才能有机会更正(或删除)CallDemo。正确的调用都在测试套件的SIP.dpr项目中。测试套件应该告诉您关于如何使用各种类的一切。这是一个遗憾。CallDemo从产品开始就更轻、更小。但无论如何,谢谢你的好产品…同意!我再也没有Delphi的副本(甚至没有Windows机器),所以我需要一段时间才能更新CallDemo。如果您愿意,请务必在GitHub存储库上向我发送拉取请求!
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;