15 #ifndef _CpPhoneMediaInterface_h_ 16 #define _CpPhoneMediaInterface_h_ 22 #include <os/OsStatus.h> 23 #include <os/OsDefs.h> 25 #include <sdp/SdpCodecList.h> 37 class MpCallFlowGraph;
39 class OsDatagramSocket;
41 class CircularBufferPtr;
55 uint32_t samplesPerFrame = 0,
56 uint32_t samplesPerSec = 0,
57 const char* publicAddress = NULL,
58 const char* localAddress = NULL,
60 SdpCodec* sdpCodecArray[] = NULL,
61 const char* pLocale =
"",
62 int expeditedIpTos = QOS_LAYER3_LOW_DELAY_IP_TOS,
63 const char* szStunServer = NULL,
64 int iStunPort = PORT_NONE,
65 int iStunKeepAlivePeriodSecs = 28,
66 const char* szTurnServer = NULL,
67 int iTurnPort = PORT_NONE,
68 const char* szTurnUsername = NULL,
69 const char* szTurnPassword = NULL,
70 int iTurnKeepAlivePeriodSecs = 28,
71 UtlBoolean bEnableICE = FALSE,
72 OsMsgDispatcher* pDispatcher = NULL
88 const char* szLocalAddress,
90 void* videoWindowHandle = NULL,
91 void*
const pSecurityAttributes = NULL,
92 const RtpTransportOptions rtpTransportOptions=RTP_TRANSPORT_UDP);
96 const UtlString &methodName=
"");
99 UtlString& rtpHostAddress,
104 SdpCodecList& supportedCodecs,
105 SdpSrtpParameters& srtpParams,
108 int& videoFramerate);
112 UtlString rtpHostAddresses[],
114 int rtcpAudioPorts[],
116 int rtcpVideoPorts[],
117 RTP_TRANSPORT transportTypes[],
118 int& nActualAddresses,
119 SdpCodecList& supportedCodecs,
120 SdpSrtpParameters& srtpParameters,
123 int& videoFramerate);
125 virtual OsMsgDispatcher*
129 const UtlString& resourceName);
132 const char* rtpHostAddress,
140 SdpCodec* sendCodec[]);
144 SdpCodec* sendCodec[]);
151 virtual OsStatus
startTone(
int toneId, UtlBoolean local, UtlBoolean remote);
160 virtual OsStatus
startChannelTone(
int connectionId,
int toneId, UtlBoolean local, UtlBoolean remote);
163 virtual OsStatus
playAudio(
const char* url,
167 UtlBoolean mixWithMic =
false,
168 int downScaling = 100,
169 UtlBoolean autoStopOnFinish = TRUE);
173 unsigned long bufSize,
179 OsProtectedEvent* event = NULL,
180 UtlBoolean mixWithMic =
false,
181 int downScaling = 100,
182 UtlBoolean autoStopOnFinish = TRUE);
198 UtlBoolean mixWithMic =
false,
199 int downScaling = 100,
200 UtlBoolean autoStopOnFinish = TRUE);
214 int maxRecordTime = -1,
215 int maxSilence = -1) ;
220 CircularBufferPtr & buffer,
222 unsigned long recordingBufferNotificationWatermark);
226 virtual OsStatus
createPlayer(MpStreamPlayer** ppPlayer,
227 const char* szStream,
229 OsMsgQ *pMsgQ = NULL,
230 const char* szTarget = NULL) ;
234 OsMsgQ *pMsgQ = NULL,
235 const char* szTarget = NULL);
238 OsMsgQ *pMsgQ = NULL,
239 const char* szTarget = NULL);
249 virtual OsStatus
setMicGain(
float gain) {
return OS_NOT_YET_IMPLEMENTED;} ;
252 virtual OsStatus
recordMic(
int ms, int16_t* pAudioBuf,
int bufferSize);
257 const char* fileName);
260 virtual void setContactType(
int connectionId, SIPX_CONTACT_TYPE eType, SIPX_CONTACT_ID contactId);
272 UtlString& videoCodec);
284 const char* candidateIp,
289 const char* candidateIp,
294 const char* candidateIp,
299 const char* candidateIp,
344 const UtlString& propertyValue);
348 UtlString& propertyValue);
352 const UtlString& propertyName,
353 const UtlString& propertyValue);
357 const UtlString& propertyName,
358 UtlString& propertyValue);
367 UtlString& audioCodec,
368 UtlString& videoCodec,
369 int* audiopPayloadType,
370 int* videoPayloadType,
373 virtual UtlString
getType() {
return "CpPhoneMediaInterface"; };
417 UtlString rtpHostAddresses[],
419 int rtcpAudioPorts[],
421 int rtcpVideoPorts[],
422 int& nActualAddresses);
426 UtlString rtpHostAddresses[],
428 int rtcpAudioPorts[],
430 int rtcpVideoPorts[],
431 int& nActualAddresses);
435 UtlString rtpHostAddresses[],
437 int rtcpAudioPorts[],
439 int rtcpVideoPorts[],
440 int& nActualAddresses);
447 SIPX_CONTACT_TYPE contactType,
448 OsDatagramSocket* &rtpSocket,
449 OsDatagramSocket* &rtcpSocket);
498 #endif // _CpPhoneMediaInterface_h_
Dispatcher to translate MediaLib notifications into abstracted MediaAdapterLib notifications.
Definition: MaNotfTranslatorDispatcher.h:40