server: re-export ServerSession.WritePacketRTP() (#90)

This commit is contained in:
aler9
2021-12-12 23:06:44 +01:00
parent bee47726fa
commit 6f374e3965
2 changed files with 4 additions and 3 deletions

View File

@@ -999,7 +999,7 @@ func (ss *ServerSession) handleRequest(sc *ServerConn, req *base.Request) (*base
ss.s.udpRTCPListener.addClient(ss.author.ip(), track.udpRTCPPort, ss, trackID, true)
// open the firewall by sending packets to the counterpart
ss.writePacketRTP(trackID,
ss.WritePacketRTP(trackID,
[]byte{0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
ss.WritePacketRTCP(trackID,
[]byte{0x80, 0xc9, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00})
@@ -1200,7 +1200,8 @@ func (ss *ServerSession) runWriter() {
}
}
func (ss *ServerSession) writePacketRTP(trackID int, payload []byte) {
// WritePacketRTP writes a RTP packet to the session.
func (ss *ServerSession) WritePacketRTP(trackID int, payload []byte) {
if _, ok := ss.setuppedTracks[trackID]; !ok {
return
}

View File

@@ -318,7 +318,7 @@ func (st *ServerStream) WritePacketRTP(trackID int, payload []byte) {
// send unicast
for r := range st.readersUnicast {
r.writePacketRTP(trackID, payload)
r.WritePacketRTP(trackID, payload)
}
// send multicast