sdp

package
v0.0.0-...-0f30df4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockSDP = []byte(`v=0
o=- 2251938235 2251938235 IN IP4 0.0.0.0
s=Media Server
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=packetization-supported:DH
a=rtppayload-supported:DH
a=range:npt=now-
m=video 0 RTP/AVP 96
a=control:trackID=0
a=framerate:25.000000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=64002A;sprop-parameter-sets=Z2QAKqwsaoHgCJ+WbgICAgQA,aO48sAA=
a=recvonly
m=audio 0 RTP/AVP 97
a=control:trackID=1
a=rtpmap:97 MPEG4-GENERIC/16000
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408
a=recvonly
m=audio 0 RTP/AVP 97
a=control:trackID=2
a=rtpmap:97 MPEG4-GENERIC/16000
a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408
a=recvonly
`)

Functions

func ParseLine

func ParseLine(line []byte) (byte, []byte, error)

Types

type Control

type Control struct {
	// contains filtered or unexported fields
}

type M

type M struct {
	Media    string
	Port     int
	PortsNum int
	Proto    string
	Fmt      string
}

type Media

type Media struct {
	Item map[byte][][]byte
}

func (*Media) Gen

func (m *Media) Gen() []byte

func (*Media) GetControl

func (m *Media) GetControl() ([]*Control, error)

func (*Media) GetM

func (m *Media) GetM() (*M, error)

func (*Media) GetRtpmaps

func (m *Media) GetRtpmaps() ([]*Rtpmap, error)

func (*Media) SetItem

func (m *Media) SetItem(key byte, value []byte) error

type Rtpmap

type Rtpmap struct {
	PayloadType   int
	EncodingName  string
	ClockRate     int
	EncodingParam int
}

type SDP

type SDP interface {
	Parse([]byte) error
	Gen() []byte
}

type SDPImpl

type SDPImpl struct {
	S  *Session
	Ms []*Media
}

func (*SDPImpl) Gen

func (s *SDPImpl) Gen() []byte

func (*SDPImpl) Parse

func (s *SDPImpl) Parse(data []byte) error

type SDPItem

type SDPItem interface {
	SetItem(byte, []byte) error
	Gen() []byte
}

type Session

type Session struct {
	Item map[byte][][]byte
}

func (*Session) Gen

func (s *Session) Gen() []byte

func (*Session) SetItem

func (s *Session) SetItem(key byte, value []byte) error

Jump to

Keyboard shortcuts

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