Exemplo n.º 1
0
OsStatus MpdPtAVT::initDecode(MpConnection* pConnection)
{
   int res = 0;
   debugCtr = 0;

   if (NULL != mpJBState) {
      return OS_SUCCESS;  // we already did this, no need to do it again.
   }

   //Get JB pointer
   mpJBState = pConnection->getJBinst(TRUE);

   if (NULL != mpJBState) {
      int payloadType = getPayloadType();

      res = JB_initCodepoint(mpJBState,
         (char*) ("audio/telephone-event"), 8000, payloadType);

      OsSysLog::add(FAC_MP, PRI_DEBUG, "%sMpdAVT: registered with JB (pt=%d), res=%d\n",
         ((0==res) ? "" : " ***** "), payloadType, res);
   } else {
      OsSysLog::add(FAC_MP, PRI_DEBUG, "MpdAVT: NOT registering with JB\n");
   }

   return (0 == res) ? OS_SUCCESS : OS_UNSPECIFIED;
}
Exemplo n.º 2
0
OsStatus MpdSipxPcma::initDecode(MpConnection* pConnection)
{
   //Get JB pointer
   pJBState = pConnection->getJBinst();

   // Set the payload number for JB
   JB_initCodepoint(pJBState, "PCMA", 8000, getPayloadType());

   return OS_SUCCESS;
}