server: split WriteFrame into WritePacketRTP and WritePacketRTCP

This commit is contained in:
aler9
2021-10-30 16:15:04 +02:00
committed by Alessandro Ros
parent 472430f900
commit 2882bacdf2
10 changed files with 105 additions and 77 deletions

View File

@@ -651,7 +651,7 @@ func TestServerPublish(t *testing.T) {
onPacketRTCP: func(ctx *ServerHandlerOnPacketRTCPCtx) {
require.Equal(t, 0, ctx.TrackID)
require.Equal(t, []byte{0x05, 0x06, 0x07, 0x08}, ctx.Payload)
ctx.Session.WriteFrame(0, StreamTypeRTCP, []byte{0x09, 0x0A, 0x0B, 0x0C})
ctx.Session.WritePacketRTCP(0, []byte{0x09, 0x0A, 0x0B, 0x0C})
},
},
}