mirror of
https://github.com/aler9/gortsplib
synced 2025-10-20 21:59:36 +08:00
in comments, use specification titles instead of URLs (#830)
This commit is contained in:
@@ -154,7 +154,7 @@ In RTSP, media streams are transmitted by using RTP packets, which are encoded i
|
||||
|[RFC4567, Key Management Extensions for Session Description Protocol (SDP) and Real Time Streaming Protocol (RTSP)](https://datatracker.ietf.org/doc/html/rfc4567)|secure variants|
|
||||
|[RFC3830, MIKEY: Multimedia Internet KEYing](https://datatracker.ietf.org/doc/html/rfc3830)|secure variants|
|
||||
|[RTP Payload Format For AV1 (v1.0)](https://aomediacodec.github.io/av1-rtp-spec/)|payload formats / AV1|
|
||||
|[RTP Payload Format for VP9 Video](https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16)|payload formats / VP9|
|
||||
|[RFC9628, RTP Payload Format for VP9 Video](https://datatracker.ietf.org/doc/html/rfc9628)|payload formats / VP9|
|
||||
|[RFC7741, RTP Payload Format for VP8 Video](https://datatracker.ietf.org/doc/html/rfc7741)|payload formats / VP8|
|
||||
|[RFC7798, RTP Payload Format for High Efficiency Video Coding (HEVC)](https://datatracker.ietf.org/doc/html/rfc7798)|payload formats / H265|
|
||||
|[RFC6184, RTP Payload Format for H.264 Video](https://datatracker.ietf.org/doc/html/rfc6184)|payload formats / H264|
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
// AC3 is the RTP format for the AC-3 codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc4184
|
||||
// Specification: RFC4184
|
||||
type AC3 struct {
|
||||
PayloadTyp uint8
|
||||
SampleRate int
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// AV1 is the RTP format for the AV1 codec.
|
||||
// Specification: https://aomediacodec.github.io/av1-rtp-spec/
|
||||
// Specification: RTP Payload Format For AV1 (v1.0)
|
||||
type AV1 struct {
|
||||
PayloadTyp uint8
|
||||
LevelIdx *int
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
// G711 is the RTP format for the G711 codec, encoded with mu-law or A-law.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3551
|
||||
// Specification: RFC3551
|
||||
type G711 struct {
|
||||
PayloadTyp uint8
|
||||
MULaw bool
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// G722 is the RTP format for the G722 codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3551
|
||||
// Specification: RFC3551
|
||||
type G722 struct {
|
||||
// in Go, empty structs share the same pointer,
|
||||
// therefore they cannot be used as map keys
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// G726 is the RTP format for the G726 codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3551
|
||||
// Specification: RFC3551
|
||||
type G726 struct {
|
||||
PayloadTyp uint8
|
||||
BitRate int
|
||||
|
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
// H264 is the RTP format for the H264 codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6184
|
||||
// Specification: RFC6184
|
||||
type H264 struct {
|
||||
PayloadTyp uint8
|
||||
SPS []byte
|
||||
|
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
// H265 is the RTP format for the H265 codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc7798
|
||||
// Specification: RFC7798
|
||||
type H265 struct {
|
||||
PayloadTyp uint8
|
||||
VPS []byte
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// KLV is the RTP format for KLV data.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6597
|
||||
// Specification: RFC6597
|
||||
type KLV struct {
|
||||
PayloadTyp uint8
|
||||
}
|
||||
|
@@ -11,8 +11,8 @@ import (
|
||||
)
|
||||
|
||||
// LPCM is the RTP format for the LPCM codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3190
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3551
|
||||
// Specification: RFC3190
|
||||
// Specification: RFC3551
|
||||
type LPCM struct {
|
||||
PayloadTyp uint8
|
||||
BitDepth int
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// MJPEG is the RTP format for the Motion-JPEG codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2435
|
||||
// Specification: RFC2435
|
||||
type MJPEG struct {
|
||||
// in Go, empty structs share the same pointer,
|
||||
// therefore they cannot be used as map keys
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// MPEG1Audio is the RTP format for a MPEG-1/2 Audio codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
// Specification: RFC2250
|
||||
type MPEG1Audio struct {
|
||||
// in Go, empty structs share the same pointer,
|
||||
// therefore they cannot be used as map keys
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// MPEG1Video is the RTP format for a MPEG-1/2 Video codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
// Specification: RFC2250
|
||||
type MPEG1Video struct {
|
||||
// in Go, empty structs share the same pointer,
|
||||
// therefore they cannot be used as map keys
|
||||
|
@@ -13,8 +13,8 @@ import (
|
||||
)
|
||||
|
||||
// MPEG4Audio is the 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
|
||||
// Specification: RFC3640
|
||||
// Specification: RFC6416, section 7.3
|
||||
type MPEG4Audio struct {
|
||||
// payload type of packets.
|
||||
PayloadTyp uint8
|
||||
|
@@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
// MPEG4Video is the RTP format for a MPEG-4 Video codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.1
|
||||
// Specification: RFC6416, section 7.1
|
||||
type MPEG4Video struct {
|
||||
PayloadTyp uint8
|
||||
ProfileLevelID int
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
// MPEGTS is the RTP format for MPEG-TS.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
// Specification: RFC2250
|
||||
type MPEGTS struct {
|
||||
// in Go, empty structs share the same pointer,
|
||||
// therefore they cannot be used as map keys
|
||||
|
@@ -11,8 +11,8 @@ import (
|
||||
)
|
||||
|
||||
// Opus is the RTP format for the Opus codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc7587
|
||||
// Specification: https://webrtc-review.googlesource.com/c/src/+/129768
|
||||
// Specification: RFC7587
|
||||
// Specification: Multiopus in libwebrtc
|
||||
type Opus struct {
|
||||
PayloadTyp uint8
|
||||
ChannelCount int
|
||||
|
@@ -29,7 +29,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a AC-3 decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc4184
|
||||
// Specification: RFC4184
|
||||
type Decoder struct {
|
||||
firstPacketReceived bool
|
||||
fragments [][]byte
|
||||
|
@@ -31,7 +31,7 @@ func packetCount(avail, le int) int {
|
||||
}
|
||||
|
||||
// Encoder is a AC-3 encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc4184
|
||||
// Specification: RFC4184
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -36,7 +36,7 @@ func tuSize(tu [][]byte) int {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/AV1 decoder.
|
||||
// Specification: https://aomediacodec.github.io/av1-rtp-spec/
|
||||
// Specification: RTP Payload Format For AV1 (v1.0)
|
||||
type Decoder struct {
|
||||
firstPacketReceived bool
|
||||
fragments [][]byte
|
||||
|
@@ -22,7 +22,7 @@ func randUint32() (uint32, error) {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/AV1 encoder.
|
||||
// Specification: https://aomediacodec.github.io/av1-rtp-spec/
|
||||
// Specification: RTP Payload Format For AV1 (v1.0)
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -47,7 +47,7 @@ func auSize(au [][]byte) int {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/H264 decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6184
|
||||
// Specification: RFC6184
|
||||
type Decoder struct {
|
||||
// indicates the packetization mode.
|
||||
PacketizationMode int
|
||||
|
@@ -48,7 +48,7 @@ func packetCount(avail, le int) int {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/H264 encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6184
|
||||
// Specification: RFC6184
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -37,7 +37,7 @@ func auSize(au [][]byte) int {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/H265 decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc7798
|
||||
// Specification: RFC7798
|
||||
type Decoder struct {
|
||||
// indicates that NALUs have an additional field that specifies the decoding order.
|
||||
MaxDONDiff int
|
||||
|
@@ -30,7 +30,7 @@ func packetCount(avail, le int) int {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/H265 encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc7798
|
||||
// Specification: RFC7798
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -18,7 +18,7 @@ var ErrNonStartingPacketAndNoPrevious = errors.New(
|
||||
"received a non-starting fragment without any previous starting fragment")
|
||||
|
||||
// Decoder is a RTP/KLV decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6597
|
||||
// Specification: RFC6597
|
||||
type Decoder struct {
|
||||
// buffer for accumulating KLV unit data across multiple packets
|
||||
buffer []byte
|
||||
|
@@ -21,7 +21,7 @@ func randUint32() (uint32, error) {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/KLV encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6597
|
||||
// Specification: RFC6597
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
// Decoder is a RTP/LPCM decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3190
|
||||
// Specification: RFC3190
|
||||
type Decoder struct {
|
||||
BitDepth int
|
||||
ChannelCount int
|
||||
|
@@ -22,7 +22,7 @@ func randUint32() (uint32, error) {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/LPCM encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3190
|
||||
// Specification: RFC3190
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -160,7 +160,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/M-JPEG decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2435
|
||||
// Specification: RFC2435
|
||||
type Decoder struct {
|
||||
firstPacketReceived bool
|
||||
fragments [][]byte
|
||||
|
@@ -25,7 +25,7 @@ func randUint32() (uint32, error) {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/M-JPEG encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2435
|
||||
// Specification: RFC2435
|
||||
type Encoder struct {
|
||||
// SSRC of packets (optional).
|
||||
// It defaults to a random value.
|
||||
|
@@ -28,7 +28,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/MPEG-1/2 Audio decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
// Specification: RFC2250
|
||||
type Decoder struct {
|
||||
firstPacketReceived bool
|
||||
fragments [][]byte
|
||||
|
@@ -38,7 +38,7 @@ func packetCount(avail, le int) int {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/MPEG-1/2 Audio encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
// Specification: RFC2250
|
||||
type Encoder struct {
|
||||
// SSRC of packets (optional).
|
||||
// It defaults to a random value.
|
||||
|
@@ -31,7 +31,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/MPEG-1/2 Video decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
// Specification: RFC2250
|
||||
type Decoder struct {
|
||||
fragments [][]byte
|
||||
fragmentsSize int
|
||||
|
@@ -38,7 +38,7 @@ func packetCount(avail, le int) int {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/MPEG-1/2 Video encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc2250
|
||||
// Specification: RFC2250
|
||||
type Encoder struct {
|
||||
// SSRC of packets (optional).
|
||||
// It defaults to a random value.
|
||||
|
@@ -19,8 +19,8 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/MPEG-4 Audio decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3640
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.3
|
||||
// Specification: RFC3640
|
||||
// Specification: RFC6416, section 7.3
|
||||
type Decoder struct {
|
||||
// use RFC6416 (LATM) instead of RFC3640 (generic).
|
||||
LATM bool
|
||||
|
@@ -21,8 +21,8 @@ func randUint32() (uint32, error) {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/MPEG-4 audio encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc3640
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.3
|
||||
// Specification: RFC3640
|
||||
// Specification: RFC6416, section 7.3
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
@@ -79,7 +79,7 @@ func (e *Encoder) Init() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Encode encodes AUs into RTP packets.
|
||||
// Encode encodes AUs (non-LATM) or AudioMuxElements (LATM) into RTP packets.
|
||||
func (e *Encoder) Encode(aus [][]byte) ([]*rtp.Packet, error) {
|
||||
if !e.LATM {
|
||||
return e.encodeGeneric(aus)
|
||||
|
@@ -22,7 +22,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/MPEG-4 Video decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6416
|
||||
// Specification: RFC6416
|
||||
type Decoder struct {
|
||||
fragments [][]byte
|
||||
fragmentsSize int
|
||||
|
@@ -29,7 +29,7 @@ func packetCount(avail, le int) int {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/MPEG-4 Video encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc6416
|
||||
// Specification: RFC6416
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/pion/rtp"
|
||||
)
|
||||
|
||||
// Decoder is a RTP/simple audio decoder.
|
||||
// Decoder is a RTP decoder for audio codecs that fit in a single packet.
|
||||
type Decoder struct{}
|
||||
|
||||
// Init initializes the decoder.
|
||||
|
@@ -21,7 +21,7 @@ func randUint32() (uint32, error) {
|
||||
return uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3]), nil
|
||||
}
|
||||
|
||||
// Encoder is a RTP/simple audio encoder.
|
||||
// Encoder is a RTP encoder for audio codecs that fit in a single packet.
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -29,7 +29,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/VP8 decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc7741
|
||||
// Specification: RFC7741
|
||||
type Decoder struct {
|
||||
firstPacketReceived bool
|
||||
fragmentsSize int
|
||||
|
@@ -23,7 +23,7 @@ func randUint32() (uint32, error) {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/VP8 encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc7741
|
||||
// Specification: RFC7741
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -29,7 +29,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
|
||||
}
|
||||
|
||||
// Decoder is a RTP/VP9 decoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16
|
||||
// Specification: RFC9628
|
||||
type Decoder struct {
|
||||
firstPacketReceived bool
|
||||
fragmentsSize int
|
||||
|
@@ -23,7 +23,7 @@ func randUint32() (uint32, error) {
|
||||
}
|
||||
|
||||
// Encoder is a RTP/VP9 encoder.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16
|
||||
// Specification: RFC9628
|
||||
type Encoder struct {
|
||||
// payload type of packets.
|
||||
PayloadType uint8
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// Speex is the RTP format for the Speex codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc5574
|
||||
// Specification: RFC5574
|
||||
type Speex struct {
|
||||
PayloadTyp uint8
|
||||
SampleRate int
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// Vorbis is the RTP format for the Vorbis codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc5215
|
||||
// Specification: RFC5215
|
||||
type Vorbis struct {
|
||||
PayloadTyp uint8
|
||||
SampleRate int
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// VP8 is the RTP format for the VP8 codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/rfc7741
|
||||
// Specification: RFC7741
|
||||
type VP8 struct {
|
||||
PayloadTyp uint8
|
||||
MaxFR *int
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// VP9 is the RTP format for the VP9 codec.
|
||||
// Specification: https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16
|
||||
// Specification: RFC9628
|
||||
type VP9 struct {
|
||||
PayloadTyp uint8
|
||||
MaxFR *int
|
||||
|
Reference in New Issue
Block a user