rtp

package
v1.0.35 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AudioCodecType_PCMU    byte = 0
	AudioCodecType_PCMA         = 1
	AudioCodecType_AAC_ELD      = 2
	AudioCodecType_Opus         = 3
	AudioCodecType_MSBC         = 4
	AudioCodecType_AMR          = 5
	AudioCodecType_ARM_WB       = 6

	AudioCodecBitrateVariable byte = 0
	AudioCodecBitrateConstant byte = 1

	AudioCodecSampleRate8Khz  byte = 0
	AudioCodecSampleRate16Khz byte = 1
	AudioCodecSampleRate24Khz byte = 2
)
View Source
const (
	CryptoSuite_AES_CM_128_HMAC_SHA1_80 byte = 0
	CryptoSuite_AES_256_CM_HMAC_SHA1_80      = 1
	CryptoSuiteNone                          = 2
)
View Source
const (
	SessionStatusSuccess byte = 0
	SessionStatusBusy    byte = 1
	SessionStatusError   byte = 2
)
View Source
const (
	IPAddrVersionv4 byte = 0
	IPAddrVersionv6 byte = 1
)
View Source
const (
	SessionControlCommandTypeEnd         byte = 0
	SessionControlCommandTypeStart            = 1
	SessionControlCommandTypeSuspend          = 2
	SessionControlCommandTypeResume           = 3
	SessionControlCommandTypeReconfigure      = 4
)
View Source
const (
	StreamingStatusAvailable   byte = 0
	StreamingStatusBusy        byte = 1
	StreamingStatusUnavailable byte = 2
)
View Source
const (
	VideoCodecType_H264 byte = 0

	VideoCodecProfileConstrainedBaseline byte = 0
	VideoCodecProfileMain                     = 1
	VideoCodecProfileHigh                     = 2

	VideoCodecLevel3_1 byte = 0
	VideoCodecLevel3_2 byte = 1
	VideoCodecLevel4   byte = 2

	VideoCodecPacketizationModeNonInterleaved byte = 0

	VideoCodecCvoNotSuppported byte = 0
	VideoCodecCvoSuppported         = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr struct {
	IPVersion    byte   `tlv8:"1"`
	IPAddr       string `tlv8:"2"`
	VideoRtpPort uint16 `tlv8:"3"`
	AudioRtpPort uint16 `tlv8:"4"`
}

type AudioCodecConfiguration

type AudioCodecConfiguration struct {
	Type       byte                 `tlv8:"1"` // docu says 2 bytes?
	Parameters AudioCodecParameters `tlv8:"2"`
}

func NewAacEldAudioCodecConfiguration

func NewAacEldAudioCodecConfiguration() AudioCodecConfiguration

func NewOpusAudioCodecConfiguration

func NewOpusAudioCodecConfiguration() AudioCodecConfiguration

type AudioCodecParameters

type AudioCodecParameters struct {
	Channels   byte `tlv8:"1"` // Default 1
	Bitrate    byte `tlv8:"2"`
	Samplerate byte `tlv8:"3"`
}

type AudioParameters

type AudioParameters struct {
	CodecType    byte                 `tlv8:"1"`
	CodecParams  AudioCodecParameters `tlv8:"2"`
	RTP          RTPParams            `tlv8:"3"`
	ComfortNoise bool                 `tlv8:"4"`
}

type AudioStreamConfiguration

type AudioStreamConfiguration struct {
	Codecs       []AudioCodecConfiguration `tlv8:"1"`
	ComfortNoise bool                      `tlv8:"2"`
}

func DefaultAudioStreamConfiguration

func DefaultAudioStreamConfiguration() AudioStreamConfiguration

type Configuration

type Configuration struct {
	Suites []SupportedCryptoSuite `tlv8:"-"`
}

func NewConfiguration

func NewConfiguration(suite byte) Configuration

type CryptoSuite

type CryptoSuite struct {
	Type       byte   `tlv8:"1"`
	MasterKey  []byte `tlv8:"2"` // 16 (AES_CM_128) or 32 (AES_256_CM)
	MasterSalt []byte `tlv8:"3"` // 14 byte
}

func (*CryptoSuite) SrtpKey

func (c *CryptoSuite) SrtpKey() string

type CryptoSuiteType

type CryptoSuiteType struct {
	Type byte `tlv8:"1"`
}

type RTPParams

type RTPParams struct {
	PayloadType             uint8   `tlv8:"1"`
	Ssrc                    uint32  `tlv8:"2"`
	Bitrate                 uint16  `tlv8:"3"`
	Interval                float32 `tlv8:"4"`          // MinimumRTCP interval
	ComfortNoisePayloadType uint8   `tlv8:"5,optional"` // only for audio
	MTU                     uint16  `tlv8:"6,optional"` // only for video
}

type SessionControlCommand

type SessionControlCommand struct {
	Identifier []byte `tlv8:"1"` // docu says 16 bytes but overall size of SessionControlCommand is also 16 bytes?
	Type       byte   `tlv8:"2"`
}

type SetupEndpoints

type SetupEndpoints struct {
	SessionId      []byte      `tlv8:"1"`
	ControllerAddr Addr        `tlv8:"3"`
	Video          CryptoSuite `tlv8:"4"`
	Audio          CryptoSuite `tlv8:"5"`
}

func (*SetupEndpoints) String

func (s *SetupEndpoints) String() string

type SetupEndpointsResponse

type SetupEndpointsResponse struct {
	SessionId     []byte      `tlv8:"1"`
	Status        byte        `tlv8:"2"`
	AccessoryAddr Addr        `tlv8:"3"` // AccessoryAddr.IPVersion must be the same as in SetupEndpoints.ControllerAddr.IPVersion
	Video         CryptoSuite `tlv8:"4"`
	Audio         CryptoSuite `tlv8:"5"`
	SsrcVideo     int32       `tlv8:"6"`
	SsrcAudio     int32       `tlv8:"7"`
}

type StreamConfiguration

type StreamConfiguration struct {
	Command SessionControlCommand `tlv8:"1"`
	Video   VideoParameters       `tlv8:"2"`
	Audio   AudioParameters       `tlv8:"3"`
}

type StreamingStatus

type StreamingStatus struct {
	Status byte `tlv8:"1"`
}

type SupportedCryptoSuite

type SupportedCryptoSuite struct {
	Type byte `tlv8:"2"`
}

type VideoCodecAttributes

type VideoCodecAttributes struct {
	Width     uint16 `tlv8:"1"`
	Height    uint16 `tlv8:"2"`
	Framerate byte   `tlv8:"3"`
}

type VideoCodecConfiguration

type VideoCodecConfiguration struct {
	Type       byte                   `tlv8:"1"`
	Parameters VideoCodecParameters   `tlv8:"2"`
	Attributes []VideoCodecAttributes `tlv8:"3"`
}

func NewH264VideoCodecConfiguration

func NewH264VideoCodecConfiguration() VideoCodecConfiguration

type VideoCodecLevel

type VideoCodecLevel struct {
	Level byte `tlv8:"2"`
}

type VideoCodecPacketization

type VideoCodecPacketization struct {
	Mode byte `tlv8:"3"`
}

type VideoCodecParameters

type VideoCodecParameters struct {
	Profiles       []VideoCodecProfile       `tlv8:"-"`
	Levels         []VideoCodecLevel         `tlv8:"-"`
	Packetizations []VideoCodecPacketization `tlv8:"-"`
}

type VideoCodecProfile

type VideoCodecProfile struct {
	Id byte `tlv8:"1"`
}

type VideoParameters

type VideoParameters struct {
	CodecType   byte                 `tlv8:"1"`
	CodecParams VideoCodecParameters `tlv8:"2"`
	Attributes  VideoCodecAttributes `tlv8:"3"`
	RTP         RTPParams            `tlv8:"4"`
}

type VideoStreamConfiguration

type VideoStreamConfiguration struct {
	Codecs []VideoCodecConfiguration `tlv8:"1"`
}

func DefaultVideoStreamConfiguration

func DefaultVideoStreamConfiguration() VideoStreamConfiguration

Jump to

Keyboard shortcuts

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