Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Jingle source parameters with the correct namespace #961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/kotlin/org/jitsi/jicofo/conference/source/Source.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package org.jitsi.jicofo.conference.source
import org.jitsi.utils.MediaType
import org.jitsi.utils.OrderedJsonObject
import org.jitsi.xmpp.extensions.colibri.SourcePacketExtension
import org.jitsi.xmpp.extensions.jingle.ParameterPacketExtension
import org.jitsi.xmpp.extensions.jingle.SourceParameterPacketExtension
import org.jitsi.xmpp.extensions.jitsimeet.SSRCInfoPacketExtension
import org.jxmpp.jid.Jid

Expand All @@ -41,7 +41,7 @@ data class Source(
sourcePacketExtension.ssrc,
mediaType,
sourcePacketExtension.name,
sourcePacketExtension.getChildExtensionsOfType(ParameterPacketExtension::class.java)
sourcePacketExtension.getChildExtensionsOfType(SourceParameterPacketExtension::class.java)
.filter { it.name == "msid" }.map { it.value }.firstOrNull(),
if (sourcePacketExtension.videoType == null) null else VideoType.parseString(sourcePacketExtension.videoType)
)
Expand All @@ -60,7 +60,7 @@ data class Source(
}

if (encodeMsid && msid != null) {
addChildExtension(ParameterPacketExtension("msid", msid))
addChildExtension(SourceParameterPacketExtension("msid", msid))
}

[email protected]?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import org.jitsi.utils.MediaType
import org.jitsi.xmpp.extensions.colibri.SourcePacketExtension
import org.jitsi.xmpp.extensions.jingle.ParameterPacketExtension
import org.jitsi.xmpp.extensions.jingle.SourceParameterPacketExtension
import org.jitsi.xmpp.extensions.jitsimeet.SSRCInfoPacketExtension
import org.jxmpp.jid.impl.JidCreate

Expand All @@ -33,7 +33,7 @@ class SourceTest : ShouldSpec() {
ssrc = 1
name = "name-1"
videoType = "camera"
addChildExtension(ParameterPacketExtension("msid", "msid"))
addChildExtension(SourceParameterPacketExtension("msid", "msid"))
}

Source(MediaType.VIDEO, packetExtension) shouldBe
Expand All @@ -50,7 +50,7 @@ class SourceTest : ShouldSpec() {
extension.ssrc shouldBe 1
extension.name shouldBe nameValue
extension.videoType shouldBe videoType.toString()
val parameters = extension.getChildExtensionsOfType(ParameterPacketExtension::class.java)
val parameters = extension.getChildExtensionsOfType(SourceParameterPacketExtension::class.java)
parameters.filter { it.name == "msid" && it.value == msidValue }.size shouldBe 1

val ssrcInfo = extension.getFirstChildOfType(SSRCInfoPacketExtension::class.java)
Expand Down
6 changes: 3 additions & 3 deletions src/test/kotlin/org/jitsi/jicofo/mock/MockColibri2Server.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import org.jitsi.xmpp.extensions.colibri2.Sources
import org.jitsi.xmpp.extensions.colibri2.Transport
import org.jitsi.xmpp.extensions.jingle.DtlsFingerprintPacketExtension
import org.jitsi.xmpp.extensions.jingle.IceUdpTransportPacketExtension
import org.jitsi.xmpp.extensions.jingle.ParameterPacketExtension
import org.jitsi.xmpp.extensions.jingle.SourceParameterPacketExtension
import org.jitsi.xmpp.util.createError
import org.jivesoftware.smack.packet.IQ
import org.jivesoftware.smack.packet.StanzaError
Expand Down Expand Up @@ -195,7 +195,7 @@ private fun buildFeedbackSources(localAudioSsrc: Long, localVideoSsrc: Long): So
ssrc = localAudioSsrc
name = "jvb-a0"
addParameter(
ParameterPacketExtension().apply {
SourceParameterPacketExtension().apply {
name = "msid"
value = "mixedmslabel mixedlabelaudio0"
}
Expand All @@ -213,7 +213,7 @@ private fun buildFeedbackSources(localAudioSsrc: Long, localVideoSsrc: Long): So
ssrc = localVideoSsrc
name = "jvb-v0"
addParameter(
ParameterPacketExtension().apply {
SourceParameterPacketExtension().apply {
name = "msid"
value = "mixedmslabel mixedlabelvideo0"
}
Expand Down