15 #ifndef _CpMediaInterface_h_ 16 #define _CpMediaInterface_h_ 21 #include <os/OsStatus.h> 22 #include <os/OsDefs.h> 23 #include <os/OsProtectEvent.h> 24 #include <os/OsMsgQ.h> 25 #include <os/OsDatagramSocket.h> 26 #include <net/SdpBody.h> 27 #include <os/IStunSocket.h> 77 class MpStreamPlaylistPlayer;
79 class MpStreamQueuePlayer;
81 class OsMsgDispatcher;
82 class CircularBufferPtr;
140 const char* szLocalAddress,
142 void* videoWindowHandle = NULL,
143 void*
const pSecurityAttributes = NULL,
144 const RtpTransportOptions rtpTransportOptions=RTP_TRANSPORT_UDP) = 0 ;
176 const UtlString &methodName =
"") = 0;
194 virtual OsMsgDispatcher*
213 const UtlString& resourceName = NULL) = 0;
235 virtual OsStatus
setSrtpParams(SdpSrtpParameters& srtpParameters);
246 int mediaTypeStreamIndex,
247 UtlString& receiveAddress,
261 const char* rtpHostAddress,
265 int rtcpVideoPort) = 0 ;
283 const char* rtpHostAddress,
299 const char* candidateIp,
300 int candidatePort) = 0 ;
321 const char* candidateIp,
322 int candidatePort) = 0 ;
331 const char* candidateIp,
332 int candidatePort) = 0 ;
341 const char* candidateIp,
342 int candidatePort) = 0 ;
347 virtual OsStatus
copyPayloadIds(
int connectionId,
int numCodecs, SdpCodec* remoteCodecs[]) = 0;
357 SdpCodec* sendCodec[]) = 0 ;
372 SdpCodec* sendCodec[]) = 0;
388 virtual OsStatus
stopRtpSend(
int connectionId) = 0 ;
427 UtlBoolean remote) = 0 ;
484 UtlBoolean remote) = 0 ;
494 UtlBoolean appendToFile = FALSE,
497 int silenceLength = -1,
498 UtlBoolean setupMultiChannelMixesAutomatically = TRUE) = 0;
539 int maxRecordTime = -1,
540 int maxSilence = -1) = 0 ;
546 CircularBufferPtr & buffer,
548 unsigned long recordingBufferNotificationWatermark) = 0;
553 virtual OsStatus
playAudio(
const char* url,
557 UtlBoolean mixWithMic =
false,
558 int downScaling = 100,
559 UtlBoolean autoStopAfterFinish = TRUE) = 0 ;
585 UtlBoolean mixWithMic =
false,
586 int downScaling = 100,
587 UtlBoolean autoStopOnFinish = TRUE) = 0 ;
591 unsigned long bufSize,
597 OsProtectedEvent* event = NULL,
598 UtlBoolean mixWithMic =
false,
599 int downScaling = 100,
600 UtlBoolean autoStopOnFinish = TRUE) = 0 ;
649 virtual OsStatus
defocus() = 0 ;
658 virtual OsStatus
createPlayer(MpStreamPlayer** ppPlayer,
660 const char* szStream,
662 OsMsgQ *pMsgQ = NULL,
663 const char* szTarget = NULL) = 0;
682 OsMsgQ *pMsgQ = NULL,
683 const char* szTarget = NULL) = 0;
702 OsMsgQ *pMsgQ = NULL,
703 const char* szTarget = NULL) = 0;
727 const char* fileName) = 0 ;
738 virtual OsStatus
recordMic(
int ms, int16_t* pAudioBuf,
773 virtual void setContactType(
int connectionId, SIPX_CONTACT_TYPE eType, SIPX_CONTACT_ID contactId) = 0 ;
780 virtual OsStatus
limitCodecs(
int connectionId,
const SdpCodecList& includeOnlyCodecList) = 0;
792 UtlString& videoCodec) = 0;
810 UtlString& report) = 0 ;
814 const RtpTcpRoles role) = 0;
834 UtlString& rtpHostAddress,
839 SdpCodecList& supportedCodecs,
840 SdpSrtpParameters& srtpParams,
843 int& videoFramerate) = 0;
850 UtlString rtpHostAddresses[],
852 int rtcpAudioPorts[],
854 int rtcpVideoPorts[],
855 RTP_TRANSPORT transportTypes[],
856 int& nActualAddresses,
857 SdpCodecList& supportedCodecs,
858 SdpSrtpParameters& srtpParameters,
861 int& videoFramerate) = 0 ;
877 virtual OsMsgQ*
getMsgQ() = 0 ;
884 UtlString& audioCodec,
885 UtlString& videoCodec,
886 int* audiopPayloadType,
887 int* videoPayloadType,
888 bool& isEncrypted) = 0;
893 int& iOutputEnergyLevel)
894 {
return OS_NOT_SUPPORTED ;} ;
897 int& iInputEnergyLevel,
898 int& iOutputEnergyLevel,
900 unsigned int* pContributorSRCIds,
901 int* pContributorEngeryLevels)
902 {
return OS_NOT_SUPPORTED ;} ;
905 unsigned int& uiSendingSSRC,
906 unsigned int& uiReceivingSSRC)
907 {
return OS_NOT_SUPPORTED ;} ;
911 return OS_NOT_SUPPORTED;
916 return OS_NOT_SUPPORTED;
935 const UtlString& propertyValue) = 0;
939 UtlString& propertyValue) = 0;
943 const UtlString& propertyName,
944 const UtlString& propertyValue) = 0;
948 const UtlString& propertyName,
949 UtlString& propertyValue) = 0;
952 virtual UtlString
getType() = 0;
1016 #endif // _CpMediaInterface_h_