Documentation ¶
Index ¶
- Constants
- func Between(s, sub1, sub2 string) string
- func Contains(medias []*Media, media *Media, codec *Codec) bool
- func GetKind(name string) string
- func MarshalSDP(name string, medias []*Media) ([]byte, error)
- type Codec
- type Consumer
- type Element
- type EventFunc
- type EventType
- type Info
- type Media
- type Probe
- type Producer
- type Track
- type WrapperFunc
- type WriterFunc
Constants ¶
View Source
const ( DirectionRecvonly = "recvonly" DirectionSendonly = "sendonly" DirectionSendRecv = "sendrecv" )
View Source
const ( KindVideo = "video" KindAudio = "audio" )
View Source
const ( CodecH264 = "H264" // payloadType: 96 CodecH265 = "H265" CodecVP8 = "VP8" CodecVP9 = "VP9" CodecAV1 = "AV1" CodecJPEG = "JPEG" // payloadType: 26 CodecPCMU = "PCMU" // payloadType: 0 CodecPCMA = "PCMA" // payloadType: 8 CodecAAC = "MPEG4-GENERIC" CodecOpus = "OPUS" // payloadType: 111 CodecG722 = "G722" CodecMP3 = "MPA" // payload: 14, aka MPEG-1 Layer III CodecELD = "ELD" // AAC-ELD CodecAll = "ALL" CodecAny = "ANY" )
View Source
const PayloadTypeRAW byte = 255
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Codec ¶
type Codec struct { Name string // H264, PCMU, PCMA, opus... ClockRate uint32 // 90000, 8000, 16000... Channels uint16 // 0, 1, 2 FmtpLine string PayloadType uint8 }
Codec take best from: - deepch/vdk/av.CodecData - pion/webrtc.RTPCodecCapability
func UnmarshalCodec ¶
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
Element base struct for all classes with support feedback
type Info ¶
type Info struct { Type string `json:"type,omitempty"` URL string `json:"url,omitempty"` RemoteAddr string `json:"remote_addr,omitempty"` UserAgent string `json:"user_agent,omitempty"` Medias []*Media `json:"medias,omitempty"` Tracks []*Track `json:"tracks,omitempty"` Recv uint32 `json:"recv,omitempty"` Send uint32 `json:"send,omitempty"` }
type Media ¶
type Media struct { Kind string `json:"kind,omitempty"` // video or audio Direction string `json:"direction,omitempty"` Codecs []*Codec `json:"codecs,omitempty"` MID string `json:"mid,omitempty"` // TODO: fixme? Control string `json:"control,omitempty"` // TODO: fixme? }
Media take best from: - deepch/vdk/format/rtsp/sdp.Media - pion/sdp.MediaDescription
func ParseQuery ¶ added in v1.1.0
func UnmarshalMedia ¶
func UnmarshalMedia(md *sdp.MediaDescription) *Media
func UnmarshalMedias ¶ added in v1.1.2
func UnmarshalMedias(descriptions []*sdp.MediaDescription) (medias []*Media)
func (*Media) MarshalJSON ¶
func (*Media) MatchCodec ¶
func (*Media) MatchMedia ¶
type Probe ¶ added in v1.2.0
type Probe struct {
// contains filtered or unexported fields
}
type Track ¶
func (*Track) Bind ¶
func (t *Track) Bind(w WriterFunc) *Track
func (*Track) MarshalJSON ¶
type WrapperFunc ¶
type WrapperFunc func(push WriterFunc) WriterFunc
type WriterFunc ¶
Click to show internal directories.
Click to hide internal directories.