Rewrite stream info API
This commit is contained in:
@@ -3,6 +3,7 @@ package srtp
|
||||
import (
|
||||
"encoding/binary"
|
||||
"net"
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
// Server using same UDP port for SRTP and for SRTCP as the iPhone does
|
||||
@@ -55,6 +56,8 @@ func (s *Server) Serve(conn net.PacketConn) error {
|
||||
}
|
||||
}
|
||||
|
||||
atomic.AddUint32(&session.Recv, uint32(n))
|
||||
|
||||
if err = session.HandleRTP(buf[:n]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ type Session struct {
|
||||
|
||||
Write func(b []byte) (int, error)
|
||||
Track *streamer.Track
|
||||
Recv uint32
|
||||
|
||||
lastSequence uint32
|
||||
lastTimestamp uint32
|
||||
|
||||
Reference in New Issue
Block a user