mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
server: support receiving RTCP packets from multicast clients
This commit is contained in:
@@ -788,15 +788,16 @@ func (ss *ServerSession) handleRequest(sc *ServerConn, req *base.Request) (*base
|
||||
|
||||
ss.setuppedStream.readerSetActive(ss)
|
||||
|
||||
if *ss.setuppedProtocol == base.StreamProtocolUDP &&
|
||||
*ss.setuppedDelivery == base.StreamDeliveryUnicast {
|
||||
// readers can send RTCP frames, they cannot sent RTP frames
|
||||
for trackID, track := range ss.setuppedTracks {
|
||||
sc.s.udpRTCPListener.addClient(ss.udpIP, track.udpRTCPPort, ss, trackID, false)
|
||||
if *ss.setuppedProtocol == base.StreamProtocolUDP {
|
||||
if *ss.setuppedDelivery == base.StreamDeliveryUnicast {
|
||||
for trackID, track := range ss.setuppedTracks {
|
||||
// readers can send RTCP frames
|
||||
sc.s.udpRTCPListener.addClient(ss.udpIP, track.udpRTCPPort, ss, trackID, false)
|
||||
|
||||
// open the firewall by sending packets to the counterpart
|
||||
ss.WriteFrame(trackID, StreamTypeRTCP,
|
||||
[]byte{0x80, 0xc9, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00})
|
||||
// open the firewall by sending packets to the counterpart
|
||||
ss.WriteFrame(trackID, StreamTypeRTCP,
|
||||
[]byte{0x80, 0xc9, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00})
|
||||
}
|
||||
}
|
||||
|
||||
return res, err
|
||||
|
Reference in New Issue
Block a user