sdp

package
v0.19.14 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 7 Imported by: 0

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

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

Types

type AControl

type AControl struct {
	Value string
}

func ParseAControl

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

type LogicContext struct {
	AudioClockRate int
	VideoClockRate int

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

func ParseSDP2LogicContext

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

func (*LogicContext) GetAudioPayloadTypeBase

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

func (*LogicContext) GetVideoPayloadTypeBase

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

func (*LogicContext) HasAudioAControl

func (lc *LogicContext) HasAudioAControl() bool

func (*LogicContext) HasVideoAControl

func (lc *LogicContext) HasVideoAControl() bool

func (*LogicContext) IsAudioPayloadTypeOrigin

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

func (*LogicContext) IsAudioURI

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

func (*LogicContext) IsAudioUnpackable

func (lc *LogicContext) IsAudioUnpackable() bool

func (*LogicContext) IsPayloadTypeOrigin

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

func (*LogicContext) IsVideoPayloadTypeOrigin

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

func (*LogicContext) IsVideoURI

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

func (*LogicContext) IsVideoUnpackable

func (lc *LogicContext) IsVideoUnpackable() bool

func (*LogicContext) MakeAudioSetupURI

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

func (*LogicContext) MakeVideoSetupURI

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

type M

type M struct {
	Media string
}

func ParseM

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

type MediaDesc

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

type RawContext

type RawContext struct {
	MediaDescList []MediaDesc
}

func ParseSDP2RawContext

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

例子见单元测试

Jump to

Keyboard shortcuts

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