sdp

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ARTPMapEncodingNameH265 = "H265"
	ARTPMapEncodingNameH264 = "H264"
	ARTPMapEncodingNameAAC  = "MPEG4-GENERIC"
)

Variables

View Source
var ErrSDP = errors.New("lal.sdp: fxxk")

Functions

func ParseASC

func ParseASC(a *AFmtPBase) ([]byte, error)

func ParseSPSPPS

func ParseSPSPPS(a *AFmtPBase) (sps, pps []byte, err error)

解析AVC/H264的sps,pps 例子见单元测试

func ParseVPSSPSPPS added in v0.15.0

func ParseVPSSPSPPS(a *AFmtPBase) (vps, sps, pps []byte, err error)

Types

type AControl added in v0.17.0

type AControl struct {
	Value string
}

func ParseAControl added in v0.17.0

func ParseAControl(s string) (ret AControl, err error)

type AFmtPBase

type AFmtPBase struct {
	Format     int               // same as PayloadType
	Parameters map[string]string // name -> value
}

func ParseAFmtPBase

func ParseAFmtPBase(s string) (ret AFmtPBase, err error)

例子见单元测试

type ARTPMap

type ARTPMap struct {
	PayloadType        int
	EncodingName       string
	ClockRate          int
	EncodingParameters string
}

func ParseARTPMap

func ParseARTPMap(s string) (ret ARTPMap, err error)

例子见单元测试

type LogicContext added in v0.17.0

type LogicContext struct {
	AudioClockRate int
	VideoClockRate int

	ASC []byte
	VPS []byte
	SPS []byte
	PPS []byte
	// contains filtered or unexported fields
}

func ParseSDP2LogicContext added in v0.17.0

func ParseSDP2LogicContext(b []byte) (LogicContext, error)

func (*LogicContext) GetAudioPayloadTypeBase added in v0.19.0

func (lc *LogicContext) GetAudioPayloadTypeBase() base.AVPacketPT

func (*LogicContext) GetVideoPayloadTypeBase added in v0.19.0

func (lc *LogicContext) GetVideoPayloadTypeBase() base.AVPacketPT

func (*LogicContext) HasAudioAControl added in v0.19.0

func (lc *LogicContext) HasAudioAControl() bool

func (*LogicContext) HasVideoAControl added in v0.19.0

func (lc *LogicContext) HasVideoAControl() bool

func (*LogicContext) IsAudioPayloadTypeOrigin added in v0.19.0

func (lc *LogicContext) IsAudioPayloadTypeOrigin(t int) bool

func (*LogicContext) IsAudioURI added in v0.19.0

func (lc *LogicContext) IsAudioURI(uri string) bool

func (*LogicContext) IsAudioUnpackable added in v0.19.0

func (lc *LogicContext) IsAudioUnpackable() bool

func (*LogicContext) IsPayloadTypeOrigin added in v0.19.0

func (lc *LogicContext) IsPayloadTypeOrigin(t int) bool

func (*LogicContext) IsVideoPayloadTypeOrigin added in v0.19.0

func (lc *LogicContext) IsVideoPayloadTypeOrigin(t int) bool

func (*LogicContext) IsVideoURI added in v0.19.0

func (lc *LogicContext) IsVideoURI(uri string) bool

func (*LogicContext) IsVideoUnpackable added in v0.19.0

func (lc *LogicContext) IsVideoUnpackable() bool

func (*LogicContext) MakeAudioSetupURI added in v0.19.0

func (lc *LogicContext) MakeAudioSetupURI(uri string) string

func (*LogicContext) MakeVideoSetupURI added in v0.19.0

func (lc *LogicContext) MakeVideoSetupURI(uri string) string

type M added in v0.18.0

type M struct {
	Media string
}

func ParseM added in v0.18.0

func ParseM(s string) (ret M, err error)

type MediaDesc added in v0.18.0

type MediaDesc struct {
	M         M
	ARTPMap   ARTPMap
	AFmtPBase *AFmtPBase
	AControl  AControl
}

type RawContext added in v0.17.0

type RawContext struct {
	MediaDescList []MediaDesc
}

func ParseSDP2RawContext added in v0.17.0

func ParseSDP2RawContext(b []byte) (RawContext, error)

例子见单元测试

Jump to

Keyboard shortcuts

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