use of org.jivesoftware.smackx.jingleold.packet.JingleContentDescription.JinglePayloadType in project Smack by igniterealtime.
the class JingleContentDescriptionProvider method parsePayload.
/**
* Parse a iq/jingle/description/payload-type element.
*
* @param parser the input to parse
* @return a payload type element
*/
protected JinglePayloadType parsePayload(final XmlPullParser parser) {
int ptId = 0;
String ptName;
int ptChannels = 0;
try {
ptId = Integer.parseInt(parser.getAttributeValue("", "id"));
} catch (Exception e) {
}
ptName = parser.getAttributeValue("", "name");
try {
ptChannels = Integer.parseInt(parser.getAttributeValue("", "channels"));
} catch (Exception e) {
}
return new JinglePayloadType(new PayloadType(ptId, ptName, ptChannels));
}
Aggregations