diff options
author | dknn <yoann.blein@free.fr> | 2012-06-03 13:11:35 (GMT) |
---|---|---|
committer | dknn <yoann.blein@free.fr> | 2012-09-22 08:53:12 (GMT) |
commit | 931b52184bf37f298f9c967883a3b71c912f834b (patch) | |
tree | df2b6d80fb76d3ccbe1c721d3e574d0f2491c90a /Swiften/Serializer/PayloadSerializers | |
parent | 174d01d9812694d201f6f3939fc7b8bf4650cfa2 (diff) | |
download | swift-contrib-931b52184bf37f298f9c967883a3b71c912f834b.zip swift-contrib-931b52184bf37f298f9c967883a3b71c912f834b.tar.bz2 |
Add parsing add related tests for RTP description
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers')
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/JingleRTPDescriptionSerializer.cpp | 2 | ||||
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/JingleRTPDescriptionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JingleRTPDescriptionSerializer.cpp index 475142b..c0dfba1 100644 --- a/Swiften/Serializer/PayloadSerializers/JingleRTPDescriptionSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/JingleRTPDescriptionSerializer.cpp @@ -24,7 +24,7 @@ JingleRTPDescriptionSerializer::JingleRTPDescriptionSerializer() { std::string JingleRTPDescriptionSerializer::serializePayload(boost::shared_ptr<JingleRTPDescription> payload) const { XMLElement description("description", "urn:xmpp:jingle:apps:rtp:1"); - description.setAttribute("media", mediaTypeToString(payload->getMediaType())); + description.setAttribute("media", mediaTypeToString(payload->getMedia())); if (payload->getSSRC()) { description.setAttribute("ssrc", boost::lexical_cast<std::string>(payload->getSSRC())); } diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp index bce9259..a89c91c 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp @@ -623,11 +623,11 @@ class JingleSerializersTest : public CppUnit::TestFixture { "<content creator=\"initiator\" name=\"webcam\">" "<description media=\"video\" xmlns=\"urn:xmpp:jingle:apps:rtp:1\">" "<payload-type clockrate=\"90000\" id=\"98\" name=\"theora\">" + "<parameter name=\"configuration\" value=\"somebase16string\"/>" + "<parameter name=\"delivery-method\" value=\"inline\"/>" "<parameter name=\"height\" value=\"600\"/>" - //"<parameter name=\"width\" value=\"800\"/>" - //"<parameter name=\"delivery-method\" value=\"inline\"/>" - //"<parameter name=\"configuration\" value=\"somebase16string\"/>" "<parameter name=\"sampling\" value=\"YCbCr-4:2:2\"/>" + "<parameter name=\"width\" value=\"800\"/>" "</payload-type>" "<bandwidth type=\"AS\">128</bandwidth>" "</description>" @@ -642,8 +642,11 @@ class JingleSerializersTest : public CppUnit::TestFixture { JingleRTPDescription::ref desc = boost::make_shared<JingleRTPDescription>(JingleRTPDescription::Video); RTPPayloadType payloadType(98, "theora", 90000); + payloadType.addParameter("configuration", "somebase16string"); + payloadType.addParameter("delivery-method", "inline"); payloadType.addParameter("height", "600"); payloadType.addParameter("sampling", "YCbCr-4:2:2"); + payloadType.addParameter("width", "800"); desc->addPayloadType(payloadType); desc->setBandwidth("AS", "128"); |