mirror of
https://github.com/pion/webrtc.git
synced 2025-09-26 19:21:12 +08:00
Revert "Read/Write RTP/RTCP packets with context"
This change caused a ~24% performance decrease
Relates to pion/webrtc#1564
This reverts commit 47a7a64898
.
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
package webrtc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
import "github.com/pion/rtp"
|
||||
|
||||
// TrackLocalWriter is the Writer for outbound RTP Packets
|
||||
type TrackLocalWriter interface {
|
||||
// WriteRTP encrypts a RTP packet and writes to the connection
|
||||
WriteRTP(ctx context.Context, header *rtp.Header, payload []byte) (int, error)
|
||||
WriteRTP(header *rtp.Header, payload []byte) (int, error)
|
||||
|
||||
// Write encrypts and writes a full RTP packet
|
||||
Write(ctx context.Context, b []byte) (int, error)
|
||||
Write(b []byte) (int, error)
|
||||
}
|
||||
|
||||
// TrackLocalContext is the Context passed when a TrackLocal has been Binded/Unbinded from a PeerConnection, and used
|
||||
|
Reference in New Issue
Block a user