in comments, use specification titles instead of URLs (#830)

This commit is contained in:
Alessandro Ros
2025-07-15 21:30:01 +02:00
committed by GitHub
parent e59e35b386
commit f3a865f815
49 changed files with 55 additions and 55 deletions

View File

@@ -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| |[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| |[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 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| |[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| |[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| |[RFC6184, RTP Payload Format for H.264 Video](https://datatracker.ietf.org/doc/html/rfc6184)|payload formats / H264|

View File

@@ -11,7 +11,7 @@ import (
) )
// AC3 is the RTP format for the AC-3 codec. // AC3 is the RTP format for the AC-3 codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc4184 // Specification: RFC4184
type AC3 struct { type AC3 struct {
PayloadTyp uint8 PayloadTyp uint8
SampleRate int SampleRate int

View File

@@ -10,7 +10,7 @@ import (
) )
// AV1 is the RTP format for the AV1 codec. // 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 { type AV1 struct {
PayloadTyp uint8 PayloadTyp uint8
LevelIdx *int LevelIdx *int

View File

@@ -11,7 +11,7 @@ import (
) )
// G711 is the RTP format for the G711 codec, encoded with mu-law or A-law. // 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 { type G711 struct {
PayloadTyp uint8 PayloadTyp uint8
MULaw bool MULaw bool

View File

@@ -7,7 +7,7 @@ import (
) )
// G722 is the RTP format for the G722 codec. // G722 is the RTP format for the G722 codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc3551 // Specification: RFC3551
type G722 struct { type G722 struct {
// in Go, empty structs share the same pointer, // in Go, empty structs share the same pointer,
// therefore they cannot be used as map keys // therefore they cannot be used as map keys

View File

@@ -8,7 +8,7 @@ import (
) )
// G726 is the RTP format for the G726 codec. // G726 is the RTP format for the G726 codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc3551 // Specification: RFC3551
type G726 struct { type G726 struct {
PayloadTyp uint8 PayloadTyp uint8
BitRate int BitRate int

View File

@@ -16,7 +16,7 @@ import (
) )
// H264 is the RTP format for the H264 codec. // H264 is the RTP format for the H264 codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc6184 // Specification: RFC6184
type H264 struct { type H264 struct {
PayloadTyp uint8 PayloadTyp uint8
SPS []byte SPS []byte

View File

@@ -14,7 +14,7 @@ import (
) )
// H265 is the RTP format for the H265 codec. // H265 is the RTP format for the H265 codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc7798 // Specification: RFC7798
type H265 struct { type H265 struct {
PayloadTyp uint8 PayloadTyp uint8
VPS []byte VPS []byte

View File

@@ -7,7 +7,7 @@ import (
) )
// KLV is the RTP format for KLV data. // KLV is the RTP format for KLV data.
// Specification: https://datatracker.ietf.org/doc/html/rfc6597 // Specification: RFC6597
type KLV struct { type KLV struct {
PayloadTyp uint8 PayloadTyp uint8
} }

View File

@@ -11,8 +11,8 @@ import (
) )
// LPCM is the RTP format for the LPCM codec. // LPCM is the RTP format for the LPCM codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc3190 // Specification: RFC3190
// Specification: https://datatracker.ietf.org/doc/html/rfc3551 // Specification: RFC3551
type LPCM struct { type LPCM struct {
PayloadTyp uint8 PayloadTyp uint8
BitDepth int BitDepth int

View File

@@ -7,7 +7,7 @@ import (
) )
// MJPEG is the RTP format for the Motion-JPEG codec. // MJPEG is the RTP format for the Motion-JPEG codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc2435 // Specification: RFC2435
type MJPEG struct { type MJPEG struct {
// in Go, empty structs share the same pointer, // in Go, empty structs share the same pointer,
// therefore they cannot be used as map keys // therefore they cannot be used as map keys

View File

@@ -7,7 +7,7 @@ import (
) )
// MPEG1Audio is the RTP format for a MPEG-1/2 Audio codec. // 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 { type MPEG1Audio struct {
// in Go, empty structs share the same pointer, // in Go, empty structs share the same pointer,
// therefore they cannot be used as map keys // therefore they cannot be used as map keys

View File

@@ -7,7 +7,7 @@ import (
) )
// MPEG1Video is the RTP format for a MPEG-1/2 Video codec. // 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 { type MPEG1Video struct {
// in Go, empty structs share the same pointer, // in Go, empty structs share the same pointer,
// therefore they cannot be used as map keys // therefore they cannot be used as map keys

View File

@@ -13,8 +13,8 @@ import (
) )
// MPEG4Audio is the RTP format for a MPEG-4 Audio codec. // MPEG4Audio is the RTP format for a MPEG-4 Audio codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc3640 // Specification: RFC3640
// Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.3 // Specification: RFC6416, section 7.3
type MPEG4Audio struct { type MPEG4Audio struct {
// payload type of packets. // payload type of packets.
PayloadTyp uint8 PayloadTyp uint8

View File

@@ -14,7 +14,7 @@ import (
) )
// MPEG4Video is the RTP format for a MPEG-4 Video codec. // 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 { type MPEG4Video struct {
PayloadTyp uint8 PayloadTyp uint8
ProfileLevelID int ProfileLevelID int

View File

@@ -5,7 +5,7 @@ import (
) )
// MPEGTS is the RTP format for MPEG-TS. // MPEGTS is the RTP format for MPEG-TS.
// Specification: https://datatracker.ietf.org/doc/html/rfc2250 // Specification: RFC2250
type MPEGTS struct { type MPEGTS struct {
// in Go, empty structs share the same pointer, // in Go, empty structs share the same pointer,
// therefore they cannot be used as map keys // therefore they cannot be used as map keys

View File

@@ -11,8 +11,8 @@ import (
) )
// Opus is the RTP format for the Opus codec. // Opus is the RTP format for the Opus codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc7587 // Specification: RFC7587
// Specification: https://webrtc-review.googlesource.com/c/src/+/129768 // Specification: Multiopus in libwebrtc
type Opus struct { type Opus struct {
PayloadTyp uint8 PayloadTyp uint8
ChannelCount int ChannelCount int

View File

@@ -29,7 +29,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a AC-3 decoder. // Decoder is a AC-3 decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc4184 // Specification: RFC4184
type Decoder struct { type Decoder struct {
firstPacketReceived bool firstPacketReceived bool
fragments [][]byte fragments [][]byte

View File

@@ -31,7 +31,7 @@ func packetCount(avail, le int) int {
} }
// Encoder is a AC-3 encoder. // Encoder is a AC-3 encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc4184 // Specification: RFC4184
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -36,7 +36,7 @@ func tuSize(tu [][]byte) int {
} }
// Decoder is a RTP/AV1 decoder. // 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 { type Decoder struct {
firstPacketReceived bool firstPacketReceived bool
fragments [][]byte fragments [][]byte

View File

@@ -22,7 +22,7 @@ func randUint32() (uint32, error) {
} }
// Encoder is a RTP/AV1 encoder. // 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 { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -47,7 +47,7 @@ func auSize(au [][]byte) int {
} }
// Decoder is a RTP/H264 decoder. // Decoder is a RTP/H264 decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc6184 // Specification: RFC6184
type Decoder struct { type Decoder struct {
// indicates the packetization mode. // indicates the packetization mode.
PacketizationMode int PacketizationMode int

View File

@@ -48,7 +48,7 @@ func packetCount(avail, le int) int {
} }
// Encoder is a RTP/H264 encoder. // Encoder is a RTP/H264 encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc6184 // Specification: RFC6184
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -37,7 +37,7 @@ func auSize(au [][]byte) int {
} }
// Decoder is a RTP/H265 decoder. // Decoder is a RTP/H265 decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc7798 // Specification: RFC7798
type Decoder struct { type Decoder struct {
// indicates that NALUs have an additional field that specifies the decoding order. // indicates that NALUs have an additional field that specifies the decoding order.
MaxDONDiff int MaxDONDiff int

View File

@@ -30,7 +30,7 @@ func packetCount(avail, le int) int {
} }
// Encoder is a RTP/H265 encoder. // Encoder is a RTP/H265 encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc7798 // Specification: RFC7798
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -18,7 +18,7 @@ var ErrNonStartingPacketAndNoPrevious = errors.New(
"received a non-starting fragment without any previous starting fragment") "received a non-starting fragment without any previous starting fragment")
// Decoder is a RTP/KLV decoder. // Decoder is a RTP/KLV decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc6597 // Specification: RFC6597
type Decoder struct { type Decoder struct {
// buffer for accumulating KLV unit data across multiple packets // buffer for accumulating KLV unit data across multiple packets
buffer []byte buffer []byte

View File

@@ -21,7 +21,7 @@ func randUint32() (uint32, error) {
} }
// Encoder is a RTP/KLV encoder. // Encoder is a RTP/KLV encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc6597 // Specification: RFC6597
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -7,7 +7,7 @@ import (
) )
// Decoder is a RTP/LPCM decoder. // Decoder is a RTP/LPCM decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc3190 // Specification: RFC3190
type Decoder struct { type Decoder struct {
BitDepth int BitDepth int
ChannelCount int ChannelCount int

View File

@@ -22,7 +22,7 @@ func randUint32() (uint32, error) {
} }
// Encoder is a RTP/LPCM encoder. // Encoder is a RTP/LPCM encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc3190 // Specification: RFC3190
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -160,7 +160,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a RTP/M-JPEG decoder. // Decoder is a RTP/M-JPEG decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc2435 // Specification: RFC2435
type Decoder struct { type Decoder struct {
firstPacketReceived bool firstPacketReceived bool
fragments [][]byte fragments [][]byte

View File

@@ -25,7 +25,7 @@ func randUint32() (uint32, error) {
} }
// Encoder is a RTP/M-JPEG encoder. // Encoder is a RTP/M-JPEG encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc2435 // Specification: RFC2435
type Encoder struct { type Encoder struct {
// SSRC of packets (optional). // SSRC of packets (optional).
// It defaults to a random value. // It defaults to a random value.

View File

@@ -28,7 +28,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a RTP/MPEG-1/2 Audio decoder. // Decoder is a RTP/MPEG-1/2 Audio decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc2250 // Specification: RFC2250
type Decoder struct { type Decoder struct {
firstPacketReceived bool firstPacketReceived bool
fragments [][]byte fragments [][]byte

View File

@@ -38,7 +38,7 @@ func packetCount(avail, le int) int {
} }
// Encoder is a RTP/MPEG-1/2 Audio encoder. // Encoder is a RTP/MPEG-1/2 Audio encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc2250 // Specification: RFC2250
type Encoder struct { type Encoder struct {
// SSRC of packets (optional). // SSRC of packets (optional).
// It defaults to a random value. // It defaults to a random value.

View File

@@ -31,7 +31,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a RTP/MPEG-1/2 Video decoder. // Decoder is a RTP/MPEG-1/2 Video decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc2250 // Specification: RFC2250
type Decoder struct { type Decoder struct {
fragments [][]byte fragments [][]byte
fragmentsSize int fragmentsSize int

View File

@@ -38,7 +38,7 @@ func packetCount(avail, le int) int {
} }
// Encoder is a RTP/MPEG-1/2 Video encoder. // Encoder is a RTP/MPEG-1/2 Video encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc2250 // Specification: RFC2250
type Encoder struct { type Encoder struct {
// SSRC of packets (optional). // SSRC of packets (optional).
// It defaults to a random value. // It defaults to a random value.

View File

@@ -19,8 +19,8 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a RTP/MPEG-4 Audio decoder. // Decoder is a RTP/MPEG-4 Audio decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc3640 // Specification: RFC3640
// Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.3 // Specification: RFC6416, section 7.3
type Decoder struct { type Decoder struct {
// use RFC6416 (LATM) instead of RFC3640 (generic). // use RFC6416 (LATM) instead of RFC3640 (generic).
LATM bool LATM bool

View File

@@ -21,8 +21,8 @@ func randUint32() (uint32, error) {
} }
// Encoder is a RTP/MPEG-4 audio encoder. // Encoder is a RTP/MPEG-4 audio encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc3640 // Specification: RFC3640
// Specification: https://datatracker.ietf.org/doc/html/rfc6416#section-7.3 // Specification: RFC6416, section 7.3
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8
@@ -79,7 +79,7 @@ func (e *Encoder) Init() error {
return nil 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) { func (e *Encoder) Encode(aus [][]byte) ([]*rtp.Packet, error) {
if !e.LATM { if !e.LATM {
return e.encodeGeneric(aus) return e.encodeGeneric(aus)

View File

@@ -22,7 +22,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a RTP/MPEG-4 Video decoder. // Decoder is a RTP/MPEG-4 Video decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc6416 // Specification: RFC6416
type Decoder struct { type Decoder struct {
fragments [][]byte fragments [][]byte
fragmentsSize int fragmentsSize int

View File

@@ -29,7 +29,7 @@ func packetCount(avail, le int) int {
} }
// Encoder is a RTP/MPEG-4 Video encoder. // Encoder is a RTP/MPEG-4 Video encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc6416 // Specification: RFC6416
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -4,7 +4,7 @@ import (
"github.com/pion/rtp" "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{} type Decoder struct{}
// Init initializes the decoder. // Init initializes the decoder.

View File

@@ -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 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 { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -29,7 +29,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a RTP/VP8 decoder. // Decoder is a RTP/VP8 decoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc7741 // Specification: RFC7741
type Decoder struct { type Decoder struct {
firstPacketReceived bool firstPacketReceived bool
fragmentsSize int fragmentsSize int

View File

@@ -23,7 +23,7 @@ func randUint32() (uint32, error) {
} }
// Encoder is a RTP/VP8 encoder. // Encoder is a RTP/VP8 encoder.
// Specification: https://datatracker.ietf.org/doc/html/rfc7741 // Specification: RFC7741
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -29,7 +29,7 @@ func joinFragments(fragments [][]byte, size int) []byte {
} }
// Decoder is a RTP/VP9 decoder. // Decoder is a RTP/VP9 decoder.
// Specification: https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16 // Specification: RFC9628
type Decoder struct { type Decoder struct {
firstPacketReceived bool firstPacketReceived bool
fragmentsSize int fragmentsSize int

View File

@@ -23,7 +23,7 @@ func randUint32() (uint32, error) {
} }
// Encoder is a RTP/VP9 encoder. // Encoder is a RTP/VP9 encoder.
// Specification: https://datatracker.ietf.org/doc/html/draft-ietf-payload-vp9-16 // Specification: RFC9628
type Encoder struct { type Encoder struct {
// payload type of packets. // payload type of packets.
PayloadType uint8 PayloadType uint8

View File

@@ -8,7 +8,7 @@ import (
) )
// Speex is the RTP format for the Speex codec. // Speex is the RTP format for the Speex codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc5574 // Specification: RFC5574
type Speex struct { type Speex struct {
PayloadTyp uint8 PayloadTyp uint8
SampleRate int SampleRate int

View File

@@ -10,7 +10,7 @@ import (
) )
// Vorbis is the RTP format for the Vorbis codec. // Vorbis is the RTP format for the Vorbis codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc5215 // Specification: RFC5215
type Vorbis struct { type Vorbis struct {
PayloadTyp uint8 PayloadTyp uint8
SampleRate int SampleRate int

View File

@@ -10,7 +10,7 @@ import (
) )
// VP8 is the RTP format for the VP8 codec. // VP8 is the RTP format for the VP8 codec.
// Specification: https://datatracker.ietf.org/doc/html/rfc7741 // Specification: RFC7741
type VP8 struct { type VP8 struct {
PayloadTyp uint8 PayloadTyp uint8
MaxFR *int MaxFR *int

View File

@@ -10,7 +10,7 @@ import (
) )
// VP9 is the RTP format for the VP9 codec. // 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 { type VP9 struct {
PayloadTyp uint8 PayloadTyp uint8
MaxFR *int MaxFR *int