返回信息流用的就是它给的帮助文档里的程序,报错是
error C2660: 'StartPlayingFileTX' : function does not take 5 parameters
error C2660: 'StartPlayingFileRX' : function does not take 6 parameters
error C2660: 'StartPlayingFileRX' : function does not take 6 parameters
参数竟有问题?不知什么原因?
大家帮忙看看啊
这个是帮助文档里的程序思路
Sample Code
The following sections describes through an example how to use the Media Term component. Here are the basic steps
Initialize COM (CoInitializeEx)
Instantiate the Media Term Component and get the ICCNMediaTerm COM interface (Say the variable is CCNMediaTerm) using CoCreateInstance
Initialize the WINRTP
· Initialize();
Transmit Side
· Set the startup parameters for transmit: Use G.711 Ulaw Codec, 30ms packet size, No silence suppression. Transmit to localhost (127.0.0.1) to port 21243
o SetAudioCodecTX(4, 30, 0, 0, 1, 0);
o SetAudioDestination(“127.0.0.1”, 21243);
· Start transmission using the default audio capture device
o StartTX(-1);
· Mix the file “foo.wav” along with the transmitted stream. Play the file once.
o StartPlayingFileTX(“foo.wav”, 1, 0, 0, &sendFileCookie)
· Set the volume of the “foo.wav” file to 50%
o SetFilePlayVolume(sendFileCookie, 50)
· Change the codec from G.711 Ulaw to G.723 at 5.3kbps and turn on silence suppression
o SetAudioCodecTX(9, 30, 0, 1, 1, 0)
· Stop Transmitting (everything, including voice and files)
o StopTX()
Receive Side
· Set the startup parameters for receive: Use G.711 Ulaw Codec, 30ms packet size. Receiving from local port 8000
o SetAudioCodecRX(4, 30, 0, 0);
o SetAudioReceivePort(8000);
· Start receive side using the default audio playback device
o StartRX(-1);
· Mix the file “foo.wav” along with the received stream. Play the file continuously in a loop. Also play another file “foobar.wav” just once. Mix both files along with the received audio
o StartPlayingFileRX(“foo.wav”, 0, 0, 0, -1, &receiveFileCookie1);
o StartPlayingFileRX(“foobar.wav”, 1, 0, 0. –1, &receiveFileCookie2);
· Set the volume of the “foobar.wav” file to 25%
o SetFilePlayVolume(receiveFileCookie2, 25)
· Stop playing the “foo.wav” file that was playing in a loop
o StopPlayingFileRX(receiveFileCookie1);
· Change the codec from G.711 Ulaw to G.729 (30ms packet size), and also change the port to receive audio from 8000 to 9999
o SetAudioCodecRX(11, 30, 0, 0)
o SetAudioReceivePort(9999)
· Stop receiving (everything, including voice and files). This method releases the speaker
o StopRX()
Uninitialize the WINRTP and release all resources
Uninitialize()
Uninitialize COM if needed using CoUninitialize
这是一条镜像帖。来源:北邮人论坛 / communications / #4155同步于 2007/5/11
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Communications机器人发帖
关于rtp的协议栈winrtp的编程问题,有一个错误,大家帮忙看看啊
mild
2007/5/11镜像同步2 回复
订阅后,新回复会通过你的通知中心匿名送达。
2 条回复
【 在 mild 的大作中提到: 】
: 用的就是它给的帮助文档里的程序,报错是
: error C2660: 'StartPlayingFileTX' : function does not take 5 parameters
: error C2660: 'StartPlayingFileRX' : function does not take 6 parameters
: ...................
我编的.cpp文件
附件(2.1KB) TestWinRTP.cpp
这个思路太长了,抱歉没看完。你应该找到StartPlayingFileRX以及StartPlayingFileTX这两个函数的函数声明,看看一致不一致。帮助文档不一定对的。