Documentation ¶
Index ¶
- Constants
- func FormatNumeric(f string) (uint8, error)
- func GenerateForAudio(originIP net.IP, connectionIP net.IP, rtpPort int, mode Mode, fmts Formats) []byte
- func GetCurrentNTPTimestamp() uint64
- func NTPTimestamp(now time.Time) uint64
- func Unmarshal(data []byte, sdptr *SessionDescription) error
- type ConnectionInformation
- type Formats
- type MediaDescription
- type Mode
- type SessionDescription
Constants ¶
View Source
const ( FORMAT_TYPE_ULAW = "0" FORMAT_TYPE_ALAW = "8" FORMAT_TYPE_OPUS = "96" FORMAT_TYPE_TELEPHONE_EVENT = "101" )
Variables ¶
This section is empty.
Functions ¶
func FormatNumeric ¶
func GenerateForAudio ¶
func GenerateForAudio(originIP net.IP, connectionIP net.IP, rtpPort int, mode Mode, fmts Formats) []byte
GenerateForAudio is minimal AUDIO SDP setup
func GetCurrentNTPTimestamp ¶
func GetCurrentNTPTimestamp() uint64
func NTPTimestamp ¶
func Unmarshal ¶
func Unmarshal(data []byte, sdptr *SessionDescription) error
Unmarshal is non validate version of sdp parsing Validation of values needs to be seperate NOT OPTIMIZED
Types ¶
type ConnectionInformation ¶
type ConnectionInformation struct { NetworkType string AddressType string IP net.IP TTL int Range int }
c=<nettype> <addrtype> <connection-address> https://tools.ietf.org/html/rfc4566#section-5.7
type MediaDescription ¶
type MediaDescription struct { MediaType string Port int PortNumbers int Proto string Formats []string }
MediaDescription represents a media type. m=<media> <port>/<number of ports> <proto> <fmt> ... https://tools.ietf.org/html/rfc4566#section-5.14
func (*MediaDescription) String ¶
func (m *MediaDescription) String() string
type Mode ¶
type Mode string
const ( // https://datatracker.ietf.org/doc/html/rfc4566#section-6 ModeRecvonly Mode = "recvonly" ModeSendrecv Mode = "sendrecv" ModeSendonly Mode = "sendonly" )
type SessionDescription ¶
func (SessionDescription) ConnectionInformation ¶
func (sd SessionDescription) ConnectionInformation() (ci ConnectionInformation, err error)
func (SessionDescription) MediaDescription ¶
func (sd SessionDescription) MediaDescription(mediaType string) (MediaDescription, error)
func (SessionDescription) Value ¶
func (sd SessionDescription) Value(key string) string
func (SessionDescription) Values ¶
func (sd SessionDescription) Values(key string) []string
Click to show internal directories.
Click to hide internal directories.