Skip to content

Commit

Permalink
RTX attribute constants should be public
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancable committed Oct 8, 2023
1 parent aa3d286 commit 9c4ad26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const (
sdesRepairRTPStreamIDURI = "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"

// Attributes returned when Read() returns an RTX packet from a separate RTX stream (distinct SSRC)

Check failure on line 35 in constants.go

View workflow job for this annotation

GitHub Actions / lint / Go

exported: comment on exported const AttributeRtxPayloadType should be of the form "AttributeRtxPayloadType ..." (revive)
attributeRtxPayloadType = "rtx_payload_type"
attributeRtxSsrc = "rtx_ssrc"
attributeRtxSequenceNumber = "rtx_sequence_number"
AttributeRtxPayloadType = "rtx_payload_type"
AttributeRtxSsrc = "rtx_ssrc"

Check failure on line 37 in constants.go

View workflow job for this annotation

GitHub Actions / lint / Go

exported: exported const AttributeRtxSsrc should have comment (or a comment on this block) or be unexported (revive)
AttributeRtxSequenceNumber = "rtx_sequence_number"
)

func defaultSrtpProtectionProfiles() []dtls.SRTPProtectionProfile {
Expand Down
6 changes: 3 additions & 3 deletions rtpreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ func (r *RTPReceiver) receiveForRtx(ssrc SSRC, rsid string, streamInfo *intercep
continue
}

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

Check warning on line 468 in rtpreceiver.go

View check run for this annotation

Codecov / codecov/patch

rtpreceiver.go#L466-L468

Added lines #L466 - L468 were not covered by tests

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

0 comments on commit 9c4ad26

Please sign in to comment.