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:
Sean DuBois
2020-12-02 19:36:51 -08:00
parent 3da29b7c0c
commit 9715626a0c
39 changed files with 205 additions and 329 deletions

View File

@@ -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