mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
add OnDecodeError callback to both client and server
This allows to detect decode errors of RTP and RTCP packets
This commit is contained in:
@@ -227,3 +227,15 @@ type ServerHandlerOnPacketRTCP interface {
|
||||
// called when receiving a RTCP packet.
|
||||
OnPacketRTCP(*ServerHandlerOnPacketRTCPCtx)
|
||||
}
|
||||
|
||||
// ServerHandlerOnDecodeErrorCtx is the context of OnDecodeError.
|
||||
type ServerHandlerOnDecodeErrorCtx struct {
|
||||
Session *ServerSession
|
||||
Error error
|
||||
}
|
||||
|
||||
// ServerHandlerOnDecodeError can be implemented by a ServerHandler.
|
||||
type ServerHandlerOnDecodeError interface {
|
||||
// called when there's a non-fatal decoding error of RTP or RTCP packets.
|
||||
OnDecodeError(*ServerHandlerOnDecodeErrorCtx)
|
||||
}
|
||||
|
Reference in New Issue
Block a user