| < Previous by Date | Date Index | Next by Date > |
| Thread Index | Next in Thread > |
Hi,
While processing an INVITE with offer SDP, getFormats() returns empty. When
the codec list is correct, getFormats() always return empty. I have attached
the SIP INVITE as pcap. "codec details" gets printed correctly in the code,
but getFormats() returns empty always. Am I missing something here ????
Following is my code:
----------------------------------------------------------------------------
session = offer->session();
for (std::list<SdpContents::Session::Medium>::const_iterator
MediaIt = session.media().begin();
MediaIt != session.media().end(); MediaIt++) {
// Find out whether this is a SendRecv stream or not
if (MediaIt->exists("sendrecv") && MediaIt->name() == "audio") {
for (std::list<SdpContents::Session::Codec>::const_iterator
codecsIt = MediaIt->codecs().begin();
codecsIt != MediaIt->codecs().end(); codecsIt++)
{
unsigned int pt = codecsIt->payloadType();
Data encName = codecsIt->getName();
unsigned int rate = codecsIt->getRate();
INFO(" codec details " << pt << " " << encName << " " << rate );
}
if (MediaIt->getFormats().empty())
INFO(" getFormats() returned empty " <<
MediaIt->getFormats().size());
else {
INFO(" getFormats() returned " <<
MediaIt->getFormats().size());
}
}
Thanks,
Vasanthi
Attachment:
SIP_INVITE.pcap
Description: Binary data