Documentation ¶
Overview ¶
Package format contains format definitions.
Index ¶
- type Format
- type G711
- type G722
- type Generic
- type H264
- func (t *H264) ClockRate() int
- func (t *H264) CreateDecoder() *rtph264.Decoder
- func (t *H264) CreateEncoder() *rtph264.Encoder
- func (t *H264) Marshal() (string, string)
- func (t *H264) PTSEqualsDTS(pkt *rtp.Packet) bool
- func (t *H264) PayloadType() uint8
- func (t *H264) SafePPS() []byte
- func (t *H264) SafeSPS() []byte
- func (t *H264) SafeSetPPS(v []byte)
- func (t *H264) SafeSetSPS(v []byte)
- func (t *H264) String() string
- type H265
- func (t *H265) ClockRate() int
- func (t *H265) CreateDecoder() *rtph265.Decoder
- func (t *H265) CreateEncoder() *rtph265.Encoder
- func (t *H265) Marshal() (string, string)
- func (t *H265) PTSEqualsDTS(*rtp.Packet) bool
- func (t *H265) PayloadType() uint8
- func (t *H265) SafePPS() []byte
- func (t *H265) SafeSPS() []byte
- func (t *H265) SafeSetPPS(v []byte)
- func (t *H265) SafeSetSPS(v []byte)
- func (t *H265) SafeSetVPS(v []byte)
- func (t *H265) SafeVPS() []byte
- func (t *H265) String() string
- type LPCM
- type MJPEG
- type MPEG2Audio
- type MPEG2Video
- type MPEG4Audio
- func (t *MPEG4Audio) ClockRate() int
- func (t *MPEG4Audio) CreateDecoder() *rtpmpeg4audio.Decoder
- func (t *MPEG4Audio) CreateEncoder() *rtpmpeg4audio.Encoder
- func (t *MPEG4Audio) Marshal() (string, string)
- func (t *MPEG4Audio) PTSEqualsDTS(*rtp.Packet) bool
- func (t *MPEG4Audio) PayloadType() uint8
- func (t *MPEG4Audio) String() string
- type Opus
- type VP8
- type VP9
- type Vorbis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format interface { // String returns a description of the format. String() string // ClockRate returns the clock rate. ClockRate() int // PayloadType returns the payload type. PayloadType() uint8 // Marshal encodes the format in SDP format. Marshal() (string, string) // PTSEqualsDTS checks whether PTS is equal to DTS in the RTP packet. PTSEqualsDTS(*rtp.Packet) bool // contains filtered or unexported methods }
Format is a RTSP format.
type G711 ¶
type G711 struct { // whether to use mu-law. Otherwise, A-law is used. MULaw bool }
G711 is a G711 format, encoded with mu-law or A-law.
func (*G711) CreateDecoder ¶
func (t *G711) CreateDecoder() *rtpsimpleaudio.Decoder
CreateDecoder creates a decoder able to decode the content of the format.
func (*G711) CreateEncoder ¶
func (t *G711) CreateEncoder() *rtpsimpleaudio.Encoder
CreateEncoder creates an encoder able to encode the content of the format.
func (*G711) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type G722 ¶
type G722 struct{}
G722 is a G722 format.
func (*G722) CreateDecoder ¶
func (t *G722) CreateDecoder() *rtpsimpleaudio.Decoder
CreateDecoder creates a decoder able to decode the content of the format.
func (*G722) CreateEncoder ¶
func (t *G722) CreateEncoder() *rtpsimpleaudio.Encoder
CreateEncoder creates an encoder able to encode the content of the format.
func (*G722) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type Generic ¶
type Generic struct { PayloadTyp uint8 RTPMap string FMTP string // clock rate of the format. Filled automatically. ClockRat int }
Generic is a generic format.
func (*Generic) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type H264 ¶
type H264 struct { PayloadTyp uint8 SPS []byte PPS []byte PacketizationMode int // contains filtered or unexported fields }
H264 is a H264 format.
func (*H264) CreateDecoder ¶
CreateDecoder creates a decoder able to decode the content of the format.
func (*H264) CreateEncoder ¶
CreateEncoder creates an encoder able to encode the content of the format.
func (*H264) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type H265 ¶
type H265 struct { PayloadTyp uint8 VPS []byte SPS []byte PPS []byte MaxDONDiff int // contains filtered or unexported fields }
H265 is a H265 format.
func (*H265) CreateDecoder ¶
CreateDecoder creates a decoder able to decode the content of the format.
func (*H265) CreateEncoder ¶
CreateEncoder creates an encoder able to encode the content of the format.
func (*H265) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type LPCM ¶
LPCM is an uncompressed, Linear PCM format.
func (*LPCM) CreateDecoder ¶
CreateDecoder creates a decoder able to decode the content of the format.
func (*LPCM) CreateEncoder ¶
CreateEncoder creates an encoder able to encode the content of the format.
func (*LPCM) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type MJPEG ¶
type MJPEG struct{}
MJPEG is a Motion-JPEG format.
func (*MJPEG) CreateDecoder ¶
CreateDecoder creates a decoder able to decode the content of the format.
func (*MJPEG) CreateEncoder ¶
CreateEncoder creates an encoder able to encode the content of the format.
func (*MJPEG) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type MPEG2Audio ¶
type MPEG2Audio struct{}
MPEG2Audio is a MPEG-1 or MPEG-2 audio format.
func (*MPEG2Audio) Marshal ¶
func (t *MPEG2Audio) Marshal() (string, string)
Marshal implements Format.
func (*MPEG2Audio) PTSEqualsDTS ¶
func (t *MPEG2Audio) PTSEqualsDTS(*rtp.Packet) bool
PTSEqualsDTS implements Format.
func (*MPEG2Audio) PayloadType ¶
func (t *MPEG2Audio) PayloadType() uint8
PayloadType implements Format.
type MPEG2Video ¶
type MPEG2Video struct{}
MPEG2Video is a MPEG-1 or MPEG-2 video format.
func (*MPEG2Video) Marshal ¶
func (t *MPEG2Video) Marshal() (string, string)
Marshal implements Format.
func (*MPEG2Video) PTSEqualsDTS ¶
func (t *MPEG2Video) PTSEqualsDTS(*rtp.Packet) bool
PTSEqualsDTS implements Format.
func (*MPEG2Video) PayloadType ¶
func (t *MPEG2Video) PayloadType() uint8
PayloadType implements Format.
type MPEG4Audio ¶
type MPEG4Audio struct { PayloadTyp uint8 Config *mpeg4audio.Config SizeLength int IndexLength int IndexDeltaLength int }
MPEG4Audio is a MPEG-4 audio format.
func (*MPEG4Audio) CreateDecoder ¶
func (t *MPEG4Audio) CreateDecoder() *rtpmpeg4audio.Decoder
CreateDecoder creates a decoder able to decode the content of the format.
func (*MPEG4Audio) CreateEncoder ¶
func (t *MPEG4Audio) CreateEncoder() *rtpmpeg4audio.Encoder
CreateEncoder creates an encoder able to encode the content of the format.
func (*MPEG4Audio) Marshal ¶
func (t *MPEG4Audio) Marshal() (string, string)
Marshal implements Format.
func (*MPEG4Audio) PTSEqualsDTS ¶
func (t *MPEG4Audio) PTSEqualsDTS(*rtp.Packet) bool
PTSEqualsDTS implements Format.
func (*MPEG4Audio) PayloadType ¶
func (t *MPEG4Audio) PayloadType() uint8
PayloadType implements Format.
type Opus ¶
Opus is a Opus format.
func (*Opus) CreateDecoder ¶
func (t *Opus) CreateDecoder() *rtpsimpleaudio.Decoder
CreateDecoder creates a decoder able to decode the content of the format.
func (*Opus) CreateEncoder ¶
func (t *Opus) CreateEncoder() *rtpsimpleaudio.Encoder
CreateEncoder creates an encoder able to encode the content of the format.
func (*Opus) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type VP8 ¶
VP8 is a VP8 format.
func (*VP8) CreateDecoder ¶
CreateDecoder creates a decoder able to decode the content of the format.
func (*VP8) CreateEncoder ¶
CreateEncoder creates an encoder able to encode the content of the format.
func (*VP8) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type VP9 ¶
VP9 is a VP9 format.
func (*VP9) CreateDecoder ¶
CreateDecoder creates a decoder able to decode the content of the format.
func (*VP9) CreateEncoder ¶
CreateEncoder creates an encoder able to encode the content of the format.
func (*VP9) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.
type Vorbis ¶
Vorbis is a Vorbis format.
func (*Vorbis) PTSEqualsDTS ¶
PTSEqualsDTS implements Format.