⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ref_endpoint.c

📁 h323源代码的另一部分
💻 C
字号:
/////////////////////////////////////////////////////////////////////// ref_endpoint.c//// handset/endpoint related event handling module for reference loopback//// Copyright Netergy Microelectronics  2000, 2001//////////////////////////////////////////////////////////////////////#include "NNstyle.h"#include <string.h>#include <stdlib.h>#include <stdio.h>#include "endpoint.h"#include "common.h"#include "dllist.h"/* Global variable */DLLIST *pdllCap = NULL;////////////////////////////////////////////////////////////////////// EndPointProcessRedialEvent////  Process redial event: generaqte DTMF tone and dial////////////////////////////////////////////////////////////////////ENDPOINT_EVENT EndPointProcessRedialEvent(END_POINT* pEndPoint,                                          CALL* pCall,                                          ENDPOINT_EVENT eEvent){  /* nothing to do */  return eEvent;}////////////////////////////////////////////////////////////////////// EndPointEncodeDtmf////  Start/stop encoding inband DTMF signalling for keypad input////////////////////////////////////////////////////////////////////void EndPointEncodeDtmf(END_POINT *pEndPoint,                        CALL* pCall,                        char chKey,                        BOOL bStart){  /* nothing to do */}////////////////////////////////////////////////////////////////////// EndPointDisplayCallerID////  control DFSK to send caller ID info to handset////////////////////////////////////////////////////////////////////void EndPointDisplayCallerID(END_POINT *pEndPoint,                             char *pchCallerName, char *pchCallerNumber){  if (pchCallerName) {    EndPointDisplayString(pEndPoint, pchCallerName);  }  if (pchCallerNumber) {    EndPointDisplayNumber(pEndPoint, pchCallerNumber);  }}////////////////////////////////////////////////////////////////////// EndPointUpdateHoldIndicator////  correctly represents the existence of held call by examinig call//  states////////////////////////////////////////////////////////////////////void EndPointUpdateHoldIndicator(END_POINT *pEndPoint){  /* nothing to do */}////////////////////////////////////////////////////////////////////// EndPointAddCap////  Add capability info into DLLIST////////////////////////////////////////////////////////////////////void EndPointAddCap(PROTOCOL_CAP* pCap){  PROTOCOL_CAP *pCapMS = calloc(1, sizeof(PROTOCOL_CAP));  memcpy(pCapMS, pCap, sizeof(PROTOCOL_CAP));  DLLIST_append(pdllCap, pCapMS);  printf("EndPointAddCap(): Type %d, Payload %d",         pCap->eMedia, pCap->xCmn.oPayload);  if (pCap->eMedia == PROTOCOL_MEDIA_AUDIO) {//    printf(", Encode name %s\n", pCap->xCmn.pcEncodeName);    printf(", AUDIO  \n");  } else {    printf(", T38\n");  }}////////////////////////////////////////////////////////////////////// EndPointQuerySysCap////  Retrieve capability info from DLLIST////////////////////////////////////////////////////////////////////LONG EndPointQuerySysCap(PROTOCOL_CAP *axCaps, OCTET oNumCap){  PROTOCOL_CAP *pSysCap;  int i = 0;  DLLIST_head(pdllCap);  while (oNumCap-- && (pSysCap = DLLIST_read(pdllCap))) {    memcpy(&axCaps[i], pSysCap, sizeof(PROTOCOL_CAP));    i++;    DLLIST_next(pdllCap);  }  return i;}/////////////////////////////////////////////////////////////////////  EndPointProcessRtp////   process RTP tx/rx processing///////////////////////////////////////////////////////////////////void EndPointProcessRtp(END_POINT *pEndPoint){  CALL *pCall;  pthread_mutex_lock(&(pEndPoint->mMutex));  ResetCursorCQueue(pEndPoint->cqCall);  while ((pCall = ReadCQueue(pEndPoint->cqCall))) {    if (pCall->hRtpRxInstance)      RTPInstanceTask(pCall->hRtpRxInstance);    if (pCall->hRtpTxInstance)      RTPInstanceTask(pCall->hRtpTxInstance);    NextCQueue(pEndPoint->cqCall);  }  pthread_mutex_unlock(&(pEndPoint->mMutex));}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -