mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
client: turn ReadFrames into OnPacketRTP, OnPacketRTCP
This commit is contained in:
@@ -129,7 +129,7 @@ func (sh *serverHandler) OnPacketRTP(ctx *gortsplib.ServerHandlerOnPacketRTPCtx)
|
||||
sh.mutex.Lock()
|
||||
defer sh.mutex.Unlock()
|
||||
|
||||
// if we are the publisher, route packet to readers
|
||||
// if we are the publisher, route the RTP packet to readers
|
||||
if ctx.Session == sh.publisher {
|
||||
sh.stream.WritePacketRTP(ctx.TrackID, ctx.Payload)
|
||||
}
|
||||
@@ -140,7 +140,7 @@ func (sh *serverHandler) OnPacketRTCP(ctx *gortsplib.ServerHandlerOnPacketRTPCtx
|
||||
sh.mutex.Lock()
|
||||
defer sh.mutex.Unlock()
|
||||
|
||||
// if we are the publisher, route packet to readers
|
||||
// if we are the publisher, route the RTCP packet to readers
|
||||
if ctx.Session == sh.publisher {
|
||||
sh.stream.WritePacketRTCP(ctx.TrackID, ctx.Payload)
|
||||
}
|
||||
|
Reference in New Issue
Block a user