Skip to content

Commit

Permalink
Squash: rename a function for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Jan 7, 2025
1 parent 1f3a2a0 commit 74c49eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class MediaSourceDesc
}

@Synchronized
fun findRtpEncodingDesc(ssrc: Long): RtpEncodingDesc? = rtpEncodings.find { it.matches(ssrc) }
fun findRtpEncodingDesc(ssrc: Long): RtpEncodingDesc? = rtpEncodings.find { it.hasSsrc(ssrc) }

@Synchronized
fun getEncodingLayers(ssrc: Long): Array<RtpLayerDesc> {
Expand Down Expand Up @@ -194,7 +194,7 @@ class MediaSourceDesc
* Checks whether any encoding of this source has this [ssrc]
*/
@Synchronized
fun hasSsrc(ssrc: Long) = rtpEncodings.any { it.matches(ssrc) }
fun hasSsrc(ssrc: Long) = rtpEncodings.any { it.hasSsrc(ssrc) }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ constructor(
}

/**
* Gets a boolean indicating whether or not the SSRC specified in the
* arguments matches this encoding or not.
* Gets a boolean indicating whether the SSRC specified in the
* arguments is used by this encoding.
*
* @param ssrc the SSRC to match.
*/
fun matches(ssrc: Long): Boolean {
fun hasSsrc(ssrc: Long): Boolean {
return if (primarySSRC == ssrc) {
true
} else {
Expand Down

0 comments on commit 74c49eb

Please sign in to comment.