mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
parent
9f98c732ec
commit
5b4ec8415d
@ -257,17 +257,19 @@ void RtspPlayer::sendSetup(unsigned int track_idx) {
|
|||||||
switch (_rtp_type) {
|
switch (_rtp_type) {
|
||||||
case Rtsp::RTP_TCP: {
|
case Rtsp::RTP_TCP: {
|
||||||
sendRtspRequest(
|
sendRtspRequest(
|
||||||
"SETUP", control_url, { "Transport", StrPrinter << "RTP/AVP/TCP;unicast;interleaved=" << track->_type * 2 << "-" << track->_type * 2 + 1 });
|
"SETUP", control_url,
|
||||||
|
{ "Transport", StrPrinter << "RTP/AVP/TCP;unicast;interleaved=" << track->_type * 2 << "-" << track->_type * 2 + 1 << ";mode=play" });
|
||||||
} break;
|
} break;
|
||||||
case Rtsp::RTP_MULTICAST: {
|
case Rtsp::RTP_MULTICAST: {
|
||||||
sendRtspRequest("SETUP", control_url, { "Transport", "RTP/AVP;multicast" });
|
sendRtspRequest("SETUP", control_url, { "Transport", "RTP/AVP;multicast;mode=play" });
|
||||||
} break;
|
} break;
|
||||||
case Rtsp::RTP_UDP: {
|
case Rtsp::RTP_UDP: {
|
||||||
createUdpSockIfNecessary(track_idx);
|
createUdpSockIfNecessary(track_idx);
|
||||||
sendRtspRequest(
|
sendRtspRequest(
|
||||||
"SETUP", control_url,
|
"SETUP", control_url,
|
||||||
{ "Transport",
|
{ "Transport",
|
||||||
StrPrinter << "RTP/AVP;unicast;client_port=" << _rtp_sock[track_idx]->get_local_port() << "-" << _rtcp_sock[track_idx]->get_local_port() });
|
StrPrinter << "RTP/AVP;unicast;client_port=" << _rtp_sock[track_idx]->get_local_port() << "-" << _rtcp_sock[track_idx]->get_local_port()
|
||||||
|
<< ";mode=play" });
|
||||||
} break;
|
} break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user