Make VP8 packet translation thread-safe. (#237)

* Make VP8 packet translation thread-safe.

Was using one packet from pool for all VP8 translation which was not thread safe.
Grab packets from the pool when needed for VP8 translation and return to pool after done.
Do not grab packet from pool if the header size between incoming and translated matches.
That also saves copying the packet payload.

* Keep Get/Put in the same function.
This commit is contained in:
Raja Subramanian
2021-12-05 10:01:35 +05:30
committed by GitHub
parent 45690bc301
commit ff390820e1
2 changed files with 84 additions and 67 deletions
+22
View File
@@ -12,6 +12,28 @@ import (
//
// Forwarder
//
const (
InvalidSpatialLayer = -1
InvalidTemporalLayer = -1
)
type SequenceNumberOrdering int
const (
SequenceNumberOrderingContiguous SequenceNumberOrdering = iota
SequenceNumberOrderingOutOfOrder
SequenceNumberOrderingGap
SequenceNumberOrderingDuplicate
)
type ForwardingStatus int
const (
ForwardingStatusOff ForwardingStatus = iota
ForwardingStatusPartial
ForwardingStatusOptimal
)
type VideoStreamingChange int
const (