server: decode and encode RTP/RTCP packets

This commit is contained in:
aler9
2021-12-21 23:26:58 +01:00
committed by Alessandro Ros
parent b7df36d4ad
commit 3a2f9adbd5
12 changed files with 197 additions and 129 deletions

View File

@@ -130,7 +130,7 @@ func (sh *serverHandler) OnPacketRTP(ctx *gortsplib.ServerHandlerOnPacketRTPCtx)
// if we are the publisher, route the RTP packet to readers
if ctx.Session == sh.publisher {
sh.stream.WritePacketRTP(ctx.TrackID, ctx.Payload)
sh.stream.WritePacketRTP(ctx.TrackID, ctx.Packet)
}
}
@@ -141,7 +141,7 @@ func (sh *serverHandler) OnPacketRTCP(ctx *gortsplib.ServerHandlerOnPacketRTCPCt
// if we are the publisher, route the RTCP packet to readers
if ctx.Session == sh.publisher {
sh.stream.WritePacketRTCP(ctx.TrackID, ctx.Payload)
sh.stream.WritePacketRTCP(ctx.TrackID, ctx.Packet)
}
}