make reception report public
This commit is contained in:
@@ -30,6 +30,7 @@ type Receiver struct {
|
||||
buffer *sfu.Buffer
|
||||
rtpChan chan *rtp.Packet
|
||||
once sync.Once
|
||||
bytesRead int64
|
||||
|
||||
onCloseHandler func(r *Receiver)
|
||||
}
|
||||
@@ -95,6 +96,10 @@ func (r *Receiver) WriteBufferedPacket(sn uint16, track *webrtc.Track, snOffset
|
||||
return r.buffer.WritePacket(sn, track, snOffset, tsOffset, ssrc)
|
||||
}
|
||||
|
||||
func (r *Receiver) Stats() (sfu.BufferStats, rtcp.ReceptionReport) {
|
||||
return r.buffer.Stats(), r.buffer.BuildReceptionReport()
|
||||
}
|
||||
|
||||
// rtpWorker reads RTP stream, fills buffer and channel
|
||||
func (r *Receiver) rtpWorker() {
|
||||
defer func() {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ const (
|
||||
func UnpackPeerTrack(packed string) (peerId string, trackId string) {
|
||||
parts := strings.Split(packed, trackIdSeparator)
|
||||
if len(parts) > 1 {
|
||||
return parts[0], packed[len(parts[0]):]
|
||||
return parts[0], packed[len(parts[0])+1:]
|
||||
}
|
||||
return "", packed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user