C++ 如何告诉live555 rtspclient使用特定连接发送setupCommand?
我正在使用live555 testRTSPClient应用程序()连接摄像头C++ 如何告诉live555 rtspclient使用特定连接发送setupCommand?,c++,live555,C++,Live555,我正在使用live555 testRTSPClient应用程序()连接摄像头 /testRTSPClientrtsp://.... 但是它没有任何视频流。问题似乎是相机在其SDP中告诉我们它有两个连接 ... s=/videoinput_1:0/h264_1/media.stm c=IN IP4 0.0.0.0 m=video 11800 RTP/AVP 96 c=IN IP4 239.0.3.180/1 ... testRTSPClient选择最后一个多播。在Setup命令中,testRTS
/testRTSPClientrtsp://....
但是它没有任何视频流。问题似乎是相机在其SDP中告诉我们它有两个连接
...
s=/videoinput_1:0/h264_1/media.stm
c=IN IP4 0.0.0.0
m=video 11800 RTP/AVP 96
c=IN IP4 239.0.3.180/1
...
testRTSPClient选择最后一个多播。在Setup命令中,testRTSPClient告诉以下内容
...
User-Agent: ./testRTSPClient (LIVE555 Streaming Media v2017.06.04)
Transport: RTP/AVP;multicast;port=11800-11801
...
当连接到另一个摄像头时,该SDP仅包含一个连接(c=IN IP4 0.0.0.0
),则一切正常
1) 因此,第一个问题是,是否可以强制testRTSPClient选择UDP单播?来自摄像机和Wireshark的ffplay流显示ffplay使用UDP单播而不是多播设置传输
2)第二,我使用了自己的C++实例,类似于TESTTSPSPORKER。在子会话设置中,我使用
RTSPClient::sendSetupCommand
函数
rtspClient->sendSetupCommand(*subsession, continueAfterSetup, False, False, False);
但是我的程序仍然像testRTSPClient一样使用多播进行设置。参数forcemulticastonspecified
在这里似乎没有任何区别。目前,我看到唯一的选择是从SDP中删除第二个多播连接子字符串
void continueAfterDescribe(RTSPClient* rtspClient, int resultCode, char* resultString)
{
...
char* const sdpDescription = resultString;
env << "Got a SDP description:\n" << sdpDescription << "\n";
// Hypothetical new code
if (user determined transport == UDP unicast)
removeSecondConnection(sdpDescription);
// Create a media session object from this SDP description:
MediaSession::createNew(env, sdpDescription);
...
void continueafterdescription(RTSPClient*RTSPClient,int-resultCode,char*resultString)
{
...
char*const sdpddescription=resultString;
环境