codecs

package
v1.0.2-0...-0a9ac6a Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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