rtcsdp

package
v0.0.0-...-e0b6167 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	Type        string // host/srflx/prflx/relay
	NetworkType string // udp/tcp/udp4/udp6/tcp4/tcp6
	Address     string // 192.168.66.6
	Port        int    //

	Priority uint32

	RelAddr string
	RelPort int
}

type Media

type Media struct {
	Type         MediaType
	Direction    MediaDirection
	SSRC         uint32
	ReceiverSSRC uint32
	OverTCP      bool

	MID                       string // mid
	StreamId                  string
	TrackId                   string
	CName, StreamLabel, Label string

	RTCPMux   bool
	RTCPRsize bool

	Candidates []*Candidate

	// Formats contained into the media.
	Formats []format.Format
}

func (Media) Marshal

func (m Media) Marshal() *sdp.MediaDescription

func (*Media) Unmarshal

func (m *Media) Unmarshal(md *sdp.MediaDescription) error

type MediaDirection

type MediaDirection string
const (
	DirectionSendRecv MediaDirection = "sendrecv"
	DirectionSendOnly MediaDirection = "sendonly"
	DirectionRecvOnly MediaDirection = "recvonly"
)

type MediaType

type MediaType string
const (
	MediaTypeVideo       MediaType = "video"
	MediaTypeAudio       MediaType = "audio"
	MediaTypeApplication MediaType = "application"
)

type Session

type Session struct {
	URI    *url.URL
	Title  string
	Timing Timing

	Medias []*Media
	// contains filtered or unexported fields
}

func Unmarshal

func Unmarshal(data []byte) (*Session, error)

func (Session) Marshal

func (d Session) Marshal() *sdp.SessionDescription

func (*Session) Unmarshal

func (d *Session) Unmarshal(ssd *sdp.SessionDescription) error

type Timing

type Timing struct {
	StartTime uint64
	StopTime  uint64
}

Jump to

Keyboard shortcuts

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