Skip to content

Commit d82b0d0

Browse files
adriancablecnderrauber
authored andcommitted
RTX attribute constants should be public
1 parent 219c6a3 commit d82b0d0

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

constants.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ const (
3939

4040
sdesRepairRTPStreamIDURI = "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"
4141

42-
// Attributes returned when Read() returns an RTX packet from a separate RTX stream (distinct SSRC)
43-
attributeRtxPayloadType = "rtx_payload_type"
44-
attributeRtxSsrc = "rtx_ssrc"
45-
attributeRtxSequenceNumber = "rtx_sequence_number"
42+
// AttributeRtxPayloadType is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream payload type
43+
AttributeRtxPayloadType = "rtx_payload_type"
44+
// AttributeRtxSsrc is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream SSRC
45+
AttributeRtxSsrc = "rtx_ssrc"
46+
// AttributeRtxSequenceNumber is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream sequence number
47+
AttributeRtxSequenceNumber = "rtx_sequence_number"
4648
)
4749

4850
func defaultSrtpProtectionProfiles() []dtls.SRTPProtectionProfile {

rtpreceiver.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ func (r *RTPReceiver) receiveForRtx(ssrc SSRC, rsid string, streamInfo *intercep
454454
continue
455455
}
456456

457-
attributes.Set(attributeRtxPayloadType, b[1]&0x7F)
458-
attributes.Set(attributeRtxSequenceNumber, binary.BigEndian.Uint16(b[2:4]))
459-
attributes.Set(attributeRtxSsrc, binary.BigEndian.Uint32(b[8:12]))
457+
attributes.Set(AttributeRtxPayloadType, b[1]&0x7F)
458+
attributes.Set(AttributeRtxSequenceNumber, binary.BigEndian.Uint16(b[2:4]))
459+
attributes.Set(AttributeRtxSsrc, binary.BigEndian.Uint32(b[8:12]))
460460

461461
b[1] = (b[1] & 0x80) | uint8(track.track.PayloadType())
462462
b[2] = b[headerLength]

0 commit comments

Comments
 (0)