21#define RESIPROCATE_SUBSYSTEM FlowManagerSubsystem::FLOWMANAGER
25 asio::ssl::context& sslContext,
34 const char* natTraversalServerHostname,
35 unsigned short natTraversalServerPort,
36 const char* stunUsername,
37 const char* stunPassword,
39 std::shared_ptr<RTCPEventLoggingHandler> rtcpEventLoggingHandler,
40 std::shared_ptr<FlowContext> context,
41 bool validateTlsServerHostname) :
43 mDtlsFactory(dtlsFactory),
45 mSRTPSessionInCreated(false),
46 mSRTPSessionOutCreated(false),
47 mNatTraversalMode(natTraversalMode),
48 mNatTraversalServerHostname(natTraversalServerHostname),
49 mNatTraversalServerPort(natTraversalServerPort),
50 mStunUsername(stunUsername),
51 mStunPassword(stunPassword),
52 mForceCOMedia(forceCOMedia),
53 mValidateTlsServerHostname(validateTlsServerHostname),
54 mMediaStreamHandler(mediaStreamHandler)
61 mRtpFlow =
new Flow(ioService,
72 mRtcpFlow =
new Flow(ioService,
80 rtcpEventLoggingHandler,
93 mRtpFlow =
new Flow(ioService,
134 if(keyLen != SRTP_MASTER_KEY_LEN)
136 ErrLog(<<
"Unable to create outbound SRTP session, invalid keyLen=" << keyLen);
140 srtp_err_status_t status;
147 InfoLog(<<
"Outbound SRTP session settings unchanged.");
152 InfoLog(<<
"Re-creating outbound SRTP session with new settings.");
175 ErrLog(<<
"Unable to create outbound SRTP session, invalid crypto suite=" << cryptoSuite);
188 ErrLog(<<
"Unable to create srtp out session, error code=" << status);
199 if(keyLen != SRTP_MASTER_KEY_LEN)
201 ErrLog(<<
"Unable to create inbound SRTP session, invalid keyLen=" << keyLen);
205 srtp_err_status_t status;
212 InfoLog(<<
"Inbound SRTP session settings unchanged.");
217 InfoLog(<<
"Re-creating inbound SRTP session with new settings.");
240 ErrLog(<<
"Unable to create inbound SRTP session, invalid crypto suite=" << cryptoSuite);
253 ErrLog(<<
"Unable to create srtp in session, error code=" << status);
265 srtp_err_status_t status = srtp_err_status_no_ctx;
284 srtp_err_status_t status = srtp_err_status_no_ctx;
300MediaStream::onFlowReady(
unsigned int componentId)
309 if(mRtpFlow && mRtcpFlow)
316 else if(mRtpFlow && mRtpFlow->
isReady())
324MediaStream::onFlowError(
unsigned int componentId,
unsigned int errorCode)
#define crypto_policy_set_aes_cm_128_hmac_sha1_32
#define crypto_policy_set_aes_cm_128_hmac_sha1_80
uint64_t getReservationToken()
StunTuple getSessionTuple()
void activateFlow(uint8_t allocationProps=StunMessage::PropsNone)
static const uint8_t PropsPortEven
static const uint8_t PropsPortPair
TransportType getTransportType() const
This class is used during media sessions that use Dtls-Srtp for a media transport.
dcm! – add UnusedChecking(_enum) below;
std::unique_lock< Mutex > Lock
A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destructio...