format

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package format contains RTP format definitions, decoders and encoders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AC3

type AC3 struct {
	PayloadTyp   uint8
	SampleRate   int
	ChannelCount int
}

AC3 is a RTP format for the AC-3 codec. Specification: https://datatracker.ietf.org/doc/html/rfc4184

func (*AC3) ClockRate

func (f *AC3) ClockRate() int

ClockRate implements Format.

func (*AC3) Codec

func (f *AC3) Codec() string

Codec implements Format.

func (*AC3) CreateDecoder

func (f *AC3) CreateDecoder() (*rtpac3.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*AC3) CreateEncoder

func (f *AC3) CreateEncoder() (*rtpac3.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*AC3) FMTP

func (f *AC3) FMTP() map[string]string

FMTP implements Format.

func (*AC3) PTSEqualsDTS

func (f *AC3) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*AC3) PayloadType

func (f *AC3) PayloadType() uint8

PayloadType implements Format.

func (*AC3) RTPMap

func (f *AC3) RTPMap() string

RTPMap implements Format.

type AV1

type AV1 struct {
	PayloadTyp uint8
	LevelIdx   *int
	Profile    *int
	Tier       *int
}

AV1 is a RTP format for the AV1 codec. Specification: https://aomediacodec.github.io/av1-rtp-spec/

func (*AV1) ClockRate

func (f *AV1) ClockRate() int

ClockRate implements Format.

func (*AV1) Codec

func (f *AV1) Codec() string

Codec implements Format.

func (*AV1) CreateDecoder

func (f *AV1) CreateDecoder() (*rtpav1.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*AV1) CreateEncoder

func (f *AV1) CreateEncoder() (*rtpav1.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*AV1) FMTP

func (f *AV1) FMTP() map[string]string

FMTP implements Format.

func (*AV1) PTSEqualsDTS

func (f *AV1) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*AV1) PayloadType

func (f *AV1) PayloadType() uint8

PayloadType implements Format.

func (*AV1) RTPMap

func (f *AV1) RTPMap() string

RTPMap implements Format.

type Format

type Format interface {

	// Codec returns the codec name.
	Codec() string

	// ClockRate returns the clock rate.
	ClockRate() int

	// PayloadType returns the payload type.
	PayloadType() uint8

	// RTPMap returns the rtpmap attribute.
	RTPMap() string

	// FMTP returns the fmtp attribute.
	FMTP() map[string]string

	// PTSEqualsDTS checks whether PTS is equal to DTS in RTP packets.
	PTSEqualsDTS(*rtp.Packet) bool
	// contains filtered or unexported methods
}

Format is a media format. It defines the payload type of RTP packets and how to encode/decode them.

func Unmarshal

func Unmarshal(mediaType string, payloadType uint8, rtpMap string, fmtp map[string]string) (Format, error)

Unmarshal decodes a format from a media description.

type G711

type G711 struct {
	// whether to use mu-law. Otherwise, A-law is used.
	MULaw bool
}

G711 is a RTP format for the G711 codec, encoded with mu-law or A-law. Specification: https://datatracker.ietf.org/doc/html/rfc3551

func (*G711) ClockRate

func (f *G711) ClockRate() int

ClockRate implements Format.

func (*G711) Codec

func (f *G711) Codec() string

Codec implements Format.

func (*G711) CreateDecoder

func (f *G711) CreateDecoder() (*rtpsimpleaudio.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*G711) CreateEncoder

func (f *G711) CreateEncoder() (*rtpsimpleaudio.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*G711) FMTP

func (f *G711) FMTP() map[string]string

FMTP implements Format.

func (*G711) PTSEqualsDTS

func (f *G711) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*G711) PayloadType

func (f *G711) PayloadType() uint8

PayloadType implements Format.

func (*G711) RTPMap

func (f *G711) RTPMap() string

RTPMap implements Format.

type G722

type G722 struct{}

G722 is a RTP format for the G722 codec. Specification: https://datatracker.ietf.org/doc/html/rfc3551

func (*G722) ClockRate

func (f *G722) ClockRate() int

ClockRate implements Format.

func (*G722) Codec

func (f *G722) Codec() string

Codec implements Format.

func (*G722) CreateDecoder

func (f *G722) CreateDecoder() (*rtpsimpleaudio.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*G722) CreateEncoder

func (f *G722) CreateEncoder() (*rtpsimpleaudio.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*G722) FMTP

func (f *G722) FMTP() map[string]string

FMTP implements Format.

func (*G722) PTSEqualsDTS

func (f *G722) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*G722) PayloadType

func (f *G722) PayloadType() uint8

PayloadType implements Format.

func (*G722) RTPMap

func (f *G722) RTPMap() string

RTPMap implements Format.

type G726

type G726 struct {
	PayloadTyp uint8
	BitRate    int
	BigEndian  bool
}

G726 is a RTP format for the G726 codec. Specification: https://datatracker.ietf.org/doc/html/rfc3551

func (*G726) ClockRate

func (f *G726) ClockRate() int

ClockRate implements Format.

func (*G726) Codec

func (f *G726) Codec() string

Codec implements Format.

func (*G726) FMTP

func (f *G726) FMTP() map[string]string

FMTP implements Format.

func (*G726) PTSEqualsDTS

func (f *G726) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*G726) PayloadType

func (f *G726) PayloadType() uint8

PayloadType implements Format.

func (*G726) RTPMap

func (f *G726) RTPMap() string

RTPMap implements Format.

type Generic

type Generic struct {
	PayloadTyp uint8
	RTPMa      string
	FMT        map[string]string

	// clock rate of the format. Filled when calling Init().
	ClockRat int
}

Generic is a generic RTP format.

func (*Generic) ClockRate

func (f *Generic) ClockRate() int

ClockRate implements Format.

func (*Generic) Codec

func (f *Generic) Codec() string

Codec implements Format.

func (*Generic) FMTP

func (f *Generic) FMTP() map[string]string

FMTP implements Format.

func (*Generic) Init

func (f *Generic) Init() error

Init computes the clock rate of the format. It is mandatory to call it.

func (*Generic) PTSEqualsDTS

func (f *Generic) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*Generic) PayloadType

func (f *Generic) PayloadType() uint8

PayloadType implements Format.

func (*Generic) RTPMap

func (f *Generic) RTPMap() string

RTPMap implements Format.

type H264

type H264 struct {
	PayloadTyp        uint8
	SPS               []byte
	PPS               []byte
	PacketizationMode int
	// contains filtered or unexported fields
}

H264 is a RTP format for the H264 codec. Specification: https://datatracker.ietf.org/doc/html/rfc6184

func (*H264) ClockRate

func (f *H264) ClockRate() int

ClockRate implements Format.

func (*H264) Codec

func (f *H264) Codec() string

Codec implements Format.

func (*H264) CreateDecoder

func (f *H264) CreateDecoder() (*rtph264.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*H264) CreateEncoder

func (f *H264) CreateEncoder() (*rtph264.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*H264) FMTP

func (f *H264) FMTP() map[string]string

FMTP implements Format.

func (*H264) PTSEqualsDTS

func (f *H264) PTSEqualsDTS(pkt *rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*H264) PayloadType

func (f *H264) PayloadType() uint8

PayloadType implements Format.

func (*H264) RTPMap

func (f *H264) RTPMap() string

RTPMap implements Format.

func (*H264) SafeParams

func (f *H264) SafeParams() ([]byte, []byte)

SafeParams returns the codec parameters.

func (*H264) SafeSetParams

func (f *H264) SafeSetParams(sps []byte, pps []byte)

SafeSetParams sets the codec parameters.

type H265

type H265 struct {
	PayloadTyp uint8
	VPS        []byte
	SPS        []byte
	PPS        []byte
	MaxDONDiff int
	// contains filtered or unexported fields
}

H265 is a RTP format for the H265 codec. Specification: https://datatracker.ietf.org/doc/html/rfc7798

func (*H265) ClockRate

func (f *H265) ClockRate() int

ClockRate implements Format.

func (*H265) Codec

func (f *H265) Codec() string

Codec implements Format.

func (*H265) CreateDecoder

func (f *H265) CreateDecoder() (*rtph265.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*H265) CreateEncoder

func (f *H265) CreateEncoder() (*rtph265.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*H265) FMTP

func (f *H265) FMTP() map[string]string

FMTP implements Format.

func (*H265) PTSEqualsDTS

func (f *H265) PTSEqualsDTS(pkt *rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*H265) PayloadType

func (f *H265) PayloadType() uint8

PayloadType implements Format.

func (*H265) RTPMap

func (f *H265) RTPMap() string

RTPMap implements Format.

func (*H265) SafeParams

func (f *H265) SafeParams() ([]byte, []byte, []byte)

SafeParams returns the codec parameters.

func (*H265) SafeSetParams

func (f *H265) SafeSetParams(vps []byte, sps []byte, pps []byte)

SafeSetParams sets the codec parameters.

type LPCM

type LPCM struct {
	PayloadTyp   uint8
	BitDepth     int
	SampleRate   int
	ChannelCount int
}

LPCM is a RTP format for the uncompressed, Linear PCM codec. Specification: https://datatracker.ietf.org/doc/html/rfc3190

func (*LPCM) ClockRate

func (f *LPCM) ClockRate() int

ClockRate implements Format.

func (*LPCM) Codec

func (f *LPCM) Codec() string

Codec implements Format.

func (*LPCM) CreateDecoder

func (f *LPCM) CreateDecoder() (*rtplpcm.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*LPCM) CreateEncoder

func (f *LPCM) CreateEncoder() (*rtplpcm.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*LPCM) FMTP

func (f *LPCM) FMTP() map[string]string

FMTP implements Format.

func (*LPCM) PTSEqualsDTS

func (f *LPCM) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*LPCM) PayloadType

func (f *LPCM) PayloadType() uint8

PayloadType implements Format.

func (*LPCM) RTPMap

func (f *LPCM) RTPMap() string

RTPMap implements Format.

type MJPEG

type MJPEG struct{}

MJPEG is a RTP format for the Motion-JPEG codec. Specification: https://datatracker.ietf.org/doc/html/rfc2435

func (*MJPEG) ClockRate

func (f *MJPEG) ClockRate() int

ClockRate implements Format.

func (*MJPEG) Codec

func (f *MJPEG) Codec() string

Codec implements Format.

func (*MJPEG) CreateDecoder

func (f *MJPEG) CreateDecoder() (*rtpmjpeg.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*MJPEG) CreateEncoder

func (f *MJPEG) CreateEncoder() (*rtpmjpeg.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*MJPEG) FMTP

func (f *MJPEG) FMTP() map[string]string

FMTP implements Format.

func (*MJPEG) PTSEqualsDTS

func (f *MJPEG) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*MJPEG) PayloadType

func (f *MJPEG) PayloadType() uint8

PayloadType implements Format.

func (*MJPEG) RTPMap

func (f *MJPEG) RTPMap() string

RTPMap implements Format.

type MPEG1Audio

type MPEG1Audio struct{}

MPEG1Audio is a RTP format for a MPEG-1/2 Audio codec. Specification: https://datatracker.ietf.org/doc/html/rfc2250

func (*MPEG1Audio) ClockRate

func (f *MPEG1Audio) ClockRate() int

ClockRate implements Format.

func (*MPEG1Audio) Codec

func (f *MPEG1Audio) Codec() string

Codec implements Format.

func (*MPEG1Audio) CreateDecoder

func (f *MPEG1Audio) CreateDecoder() (*rtpmpeg1audio.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*MPEG1Audio) CreateEncoder

func (f *MPEG1Audio) CreateEncoder() (*rtpmpeg1audio.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*MPEG1Audio) FMTP

func (f *MPEG1Audio) FMTP() map[string]string

FMTP implements Format.

func (*MPEG1Audio) PTSEqualsDTS

func (f *MPEG1Audio) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*MPEG1Audio) PayloadType

func (f *MPEG1Audio) PayloadType() uint8

PayloadType implements Format.

func (*MPEG1Audio) RTPMap

func (f *MPEG1Audio) RTPMap() string

RTPMap implements Format.

type MPEG1Video

type MPEG1Video struct{}

MPEG1Video is a RTP format for a MPEG-1/2 Video codec. Specification: https://datatracker.ietf.org/doc/html/rfc2250

func (*MPEG1Video) ClockRate

func (f *MPEG1Video) ClockRate() int

ClockRate implements Format.

func (*MPEG1Video) Codec

func (f *MPEG1Video) Codec() string

Codec implements Format.

func (*MPEG1Video) CreateDecoder

func (f *MPEG1Video) CreateDecoder() (*rtpmpeg1video.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*MPEG1Video) CreateEncoder

func (f *MPEG1Video) CreateEncoder() (*rtpmpeg1video.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*MPEG1Video) FMTP

func (f *MPEG1Video) FMTP() map[string]string

FMTP implements Format.

func (*MPEG1Video) PTSEqualsDTS

func (f *MPEG1Video) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*MPEG1Video) PayloadType

func (f *MPEG1Video) PayloadType() uint8

PayloadType implements Format.

func (*MPEG1Video) RTPMap

func (f *MPEG1Video) RTPMap() string

RTPMap implements Format.

type MPEG4Audio

type MPEG4Audio struct {
	// payload type of packets.
	PayloadTyp uint8

	// use RFC6416 (LATM) instead of RFC3640 (generic).
	LATM bool

	// profile level ID.
	ProfileLevelID int

	// generic only
	Config           *mpeg4audio.Config
	SizeLength       int
	IndexLength      int
	IndexDeltaLength int

	// LATM only
	Bitrate         *int
	CPresent        bool
	StreamMuxConfig *mpeg4audio.StreamMuxConfig
	SBREnabled      *bool
}

MPEG4Audio is a RTP format for a MPEG-4 Audio codec. Specification: https://datatracker.ietf.org/doc/html/rfc3640 Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.3

func (*MPEG4Audio) ClockRate

func (f *MPEG4Audio) ClockRate() int

ClockRate implements Format.

func (*MPEG4Audio) Codec

func (f *MPEG4Audio) Codec() string

Codec implements Format.

func (*MPEG4Audio) CreateDecoder

func (f *MPEG4Audio) CreateDecoder() (*rtpmpeg4audio.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*MPEG4Audio) CreateEncoder

func (f *MPEG4Audio) CreateEncoder() (*rtpmpeg4audio.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*MPEG4Audio) FMTP

func (f *MPEG4Audio) FMTP() map[string]string

FMTP implements Format.

func (*MPEG4Audio) GetConfig

func (f *MPEG4Audio) GetConfig() *mpeg4audio.Config

GetConfig returns the MPEG-4 Audio configuration.

func (*MPEG4Audio) PTSEqualsDTS

func (f *MPEG4Audio) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*MPEG4Audio) PayloadType

func (f *MPEG4Audio) PayloadType() uint8

PayloadType implements Format.

func (*MPEG4Audio) RTPMap

func (f *MPEG4Audio) RTPMap() string

RTPMap implements Format.

type MPEG4Video

type MPEG4Video struct {
	PayloadTyp     uint8
	ProfileLevelID int
	Config         []byte
	// contains filtered or unexported fields
}

MPEG4Video is a RTP format for a MPEG-4 Video codec. Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.1

func (*MPEG4Video) ClockRate

func (f *MPEG4Video) ClockRate() int

ClockRate implements Format.

func (*MPEG4Video) Codec

func (f *MPEG4Video) Codec() string

Codec implements Format.

func (*MPEG4Video) CreateDecoder

func (f *MPEG4Video) CreateDecoder() (*rtpmpeg4video.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*MPEG4Video) CreateEncoder

func (f *MPEG4Video) CreateEncoder() (*rtpmpeg4video.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*MPEG4Video) FMTP

func (f *MPEG4Video) FMTP() map[string]string

FMTP implements Format.

func (*MPEG4Video) PTSEqualsDTS

func (f *MPEG4Video) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*MPEG4Video) PayloadType

func (f *MPEG4Video) PayloadType() uint8

PayloadType implements Format.

func (*MPEG4Video) RTPMap

func (f *MPEG4Video) RTPMap() string

RTPMap implements Format.

func (*MPEG4Video) SafeParams

func (f *MPEG4Video) SafeParams() []byte

SafeParams returns the codec parameters.

func (*MPEG4Video) SafeSetParams

func (f *MPEG4Video) SafeSetParams(config []byte)

SafeSetParams sets the codec parameters.

type MPEGTS

type MPEGTS struct{}

MPEGTS is a RTP format for MPEG-TS. Specification: https://datatracker.ietf.org/doc/html/rfc2250

func (*MPEGTS) ClockRate

func (f *MPEGTS) ClockRate() int

ClockRate implements Format.

func (*MPEGTS) Codec

func (f *MPEGTS) Codec() string

Codec implements Format.

func (*MPEGTS) FMTP

func (f *MPEGTS) FMTP() map[string]string

FMTP implements Format.

func (*MPEGTS) PTSEqualsDTS

func (f *MPEGTS) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*MPEGTS) PayloadType

func (f *MPEGTS) PayloadType() uint8

PayloadType implements Format.

func (*MPEGTS) RTPMap

func (f *MPEGTS) RTPMap() string

RTPMap implements Format.

type Opus

type Opus struct {
	PayloadTyp uint8
	IsStereo   bool
}

Opus is a RTP format for the Opus codec. Specification: https://datatracker.ietf.org/doc/html/rfc7587

func (*Opus) ClockRate

func (f *Opus) ClockRate() int

ClockRate implements Format.

func (*Opus) Codec

func (f *Opus) Codec() string

Codec implements Format.

func (*Opus) CreateDecoder

func (f *Opus) CreateDecoder() (*rtpsimpleaudio.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*Opus) CreateEncoder

func (f *Opus) CreateEncoder() (*rtpsimpleaudio.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*Opus) FMTP

func (f *Opus) FMTP() map[string]string

FMTP implements Format.

func (*Opus) PTSEqualsDTS

func (f *Opus) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*Opus) PayloadType

func (f *Opus) PayloadType() uint8

PayloadType implements Format.

func (*Opus) RTPMap

func (f *Opus) RTPMap() string

RTPMap implements Format.

type Speex

type Speex struct {
	PayloadTyp uint8
	SampleRate int
	VBR        *bool
}

Speex is a RTP format for the Speex codec. Specification: https://datatracker.ietf.org/doc/html/rfc5574

func (*Speex) ClockRate

func (f *Speex) ClockRate() int

ClockRate implements Format.

func (*Speex) Codec

func (f *Speex) Codec() string

Codec implements Format.

func (*Speex) FMTP

func (f *Speex) FMTP() map[string]string

FMTP implements Format.

func (*Speex) PTSEqualsDTS

func (f *Speex) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*Speex) PayloadType

func (f *Speex) PayloadType() uint8

PayloadType implements Format.

func (*Speex) RTPMap

func (f *Speex) RTPMap() string

RTPMap implements Format.

type VP8

type VP8 struct {
	PayloadTyp uint8
	MaxFR      *int
	MaxFS      *int
}

VP8 is a RTP format for the VP8 codec. Specification: https://datatracker.ietf.org/doc/html/rfc7741

func (*VP8) ClockRate

func (f *VP8) ClockRate() int

ClockRate implements Format.

func (*VP8) Codec

func (f *VP8) Codec() string

Codec implements Format.

func (*VP8) CreateDecoder

func (f *VP8) CreateDecoder() (*rtpvp8.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*VP8) CreateEncoder

func (f *VP8) CreateEncoder() (*rtpvp8.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*VP8) FMTP

func (f *VP8) FMTP() map[string]string

FMTP implements Format.

func (*VP8) PTSEqualsDTS

func (f *VP8) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*VP8) PayloadType

func (f *VP8) PayloadType() uint8

PayloadType implements Format.

func (*VP8) RTPMap

func (f *VP8) RTPMap() string

RTPMap implements Format.

type VP9

type VP9 struct {
	PayloadTyp uint8
	MaxFR      *int
	MaxFS      *int
	ProfileID  *int
}

VP9 is a RTP format for the VP9 codec. Specification: https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16

func (*VP9) ClockRate

func (f *VP9) ClockRate() int

ClockRate implements Format.

func (*VP9) Codec

func (f *VP9) Codec() string

Codec implements Format.

func (*VP9) CreateDecoder

func (f *VP9) CreateDecoder() (*rtpvp9.Decoder, error)

CreateDecoder creates a decoder able to decode the content of the format.

func (*VP9) CreateEncoder

func (f *VP9) CreateEncoder() (*rtpvp9.Encoder, error)

CreateEncoder creates an encoder able to encode the content of the format.

func (*VP9) FMTP

func (f *VP9) FMTP() map[string]string

FMTP implements Format.

func (*VP9) PTSEqualsDTS

func (f *VP9) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*VP9) PayloadType

func (f *VP9) PayloadType() uint8

PayloadType implements Format.

func (*VP9) RTPMap

func (f *VP9) RTPMap() string

RTPMap implements Format.

type Vorbis

type Vorbis struct {
	PayloadTyp    uint8
	SampleRate    int
	ChannelCount  int
	Configuration []byte
}

Vorbis is a RTP format for the Vorbis codec. Specification: https://datatracker.ietf.org/doc/html/rfc5215

func (*Vorbis) ClockRate

func (f *Vorbis) ClockRate() int

ClockRate implements Format.

func (*Vorbis) Codec

func (f *Vorbis) Codec() string

Codec implements Format.

func (*Vorbis) FMTP

func (f *Vorbis) FMTP() map[string]string

FMTP implements Format.

func (*Vorbis) PTSEqualsDTS

func (f *Vorbis) PTSEqualsDTS(*rtp.Packet) bool

PTSEqualsDTS implements Format.

func (*Vorbis) PayloadType

func (f *Vorbis) PayloadType() uint8

PayloadType implements Format.

func (*Vorbis) RTPMap

func (f *Vorbis) RTPMap() string

RTPMap implements Format.

Directories

Path Synopsis
Package rtpac3 contains a RTP/AC-3 decoder and encoder.
Package rtpac3 contains a RTP/AC-3 decoder and encoder.
Package rtpav1 contains a RTP/AV1 decoder and encoder.
Package rtpav1 contains a RTP/AV1 decoder and encoder.
Package rtph264 contains a RTP/H264 decoder and encoder.
Package rtph264 contains a RTP/H264 decoder and encoder.
Package rtph265 contains a RTP/H265 decoder and encoder.
Package rtph265 contains a RTP/H265 decoder and encoder.
Package rtplpcm contains a RTP/LPCM decoder and encoder.
Package rtplpcm contains a RTP/LPCM decoder and encoder.
Package rtpmjpeg contains a RTP/M-JPEG decoder and encoder.
Package rtpmjpeg contains a RTP/M-JPEG decoder and encoder.
Package rtpmpeg1audio contains a RTP/MPEG-1/2 Audio decoder and encoder.
Package rtpmpeg1audio contains a RTP/MPEG-1/2 Audio decoder and encoder.
Package rtpmpeg1video contains a RTP/MPEG-1/2 Video decoder and encoder.
Package rtpmpeg1video contains a RTP/MPEG-1/2 Video decoder and encoder.
Package rtpmpeg4audio contains a RTP/MPEG-4 Audio decoder and encoder.
Package rtpmpeg4audio contains a RTP/MPEG-4 Audio decoder and encoder.
Package rtpmpeg4video contains a RTP/MPEG-4 Video decoder and encoder.
Package rtpmpeg4video contains a RTP/MPEG-4 Video decoder and encoder.
Package rtpsimpleaudio contains a RTP decoder and encoder for audio codecs that fit in a single packet.
Package rtpsimpleaudio contains a RTP decoder and encoder for audio codecs that fit in a single packet.
Package rtpvp8 contains a RTP/VP8 decoder and encoder.
Package rtpvp8 contains a RTP/VP8 decoder and encoder.
Package rtpvp9 contains a RTP/VP9 decoder and encoder.
Package rtpvp9 contains a RTP/VP9 decoder and encoder.

Jump to

Keyboard shortcuts

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