codecs

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2025 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PayloadTypeOpus = 111
)

Variables

View Source
var ErrUnsupportedMimeType = errors.Errorf("unsupported mime type")

Functions

func TypeFromMimeType

func TypeFromMimeType(mimeType string) webrtc.RTPCodecType

Types

type HeaderExtension

type HeaderExtension struct {
	Parameter         webrtc.RTPHeaderExtensionParameter
	AllowedDirections []webrtc.RTPTransceiverDirection
}

type InterceptorParams

type InterceptorParams struct {
	PayloadType         webrtc.PayloadType
	RTCPFeedback        []interceptor.RTCPFeedback
	RTPHeaderExtensions []interceptor.RTPHeaderExtension
}

type MatchType

type MatchType int
const (
	MatchNone    MatchType = 0
	MatchPartial MatchType = 1
	MatchExact   MatchType = 2
)

type Props

type Props struct {
	CodecParameters  []webrtc.RTPCodecParameters
	HeaderExtensions []HeaderExtension
}

type Registry

type Registry struct {
	Audio Props
	Video Props
}

func NewRegistryDefault

func NewRegistryDefault() *Registry

func (*Registry) FuzzySearch

func (r *Registry) FuzzySearch(
	needle transport.Codec,
) (webrtc.RTPCodecParameters, MatchType)

Do a fuzzy find for a codec in the list of codecs. Used to look up a codec in an existing list to find a match Returns CodecMatchExact, CodecMatchPartial, or CodecMatchNone.

func (*Registry) InterceptorParamsForCodec

func (r *Registry) InterceptorParamsForCodec(codec transport.Codec) (InterceptorParams, error)

func (*Registry) RTPHeaderExtensionsForMimeType

func (r *Registry) RTPHeaderExtensionsForMimeType(mimeType string) []HeaderExtension

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL