|
@@ -227,11 +227,15 @@ void PeerConnection::outgoingMedia(message_ptr message) {
|
|
if (!hasMedia())
|
|
if (!hasMedia())
|
|
throw std::runtime_error("PeerConnection has no media support");
|
|
throw std::runtime_error("PeerConnection has no media support");
|
|
|
|
|
|
|
|
+#if RTC_ENABLE_MEDIA
|
|
auto transport = std::atomic_load(&mDtlsTransport);
|
|
auto transport = std::atomic_load(&mDtlsTransport);
|
|
if (!transport)
|
|
if (!transport)
|
|
throw std::runtime_error("PeerConnection is not open");
|
|
throw std::runtime_error("PeerConnection is not open");
|
|
|
|
|
|
std::dynamic_pointer_cast<DtlsSrtpTransport>(transport)->send(message);
|
|
std::dynamic_pointer_cast<DtlsSrtpTransport>(transport)->send(message);
|
|
|
|
+#else
|
|
|
|
+ PLOG_WARNING << "Ignoring sent media (not compiled with SRTP support)";
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
|
|
|
|
shared_ptr<IceTransport> PeerConnection::initIceTransport(Description::Role role) {
|
|
shared_ptr<IceTransport> PeerConnection::initIceTransport(Description::Role role) {
|
|
@@ -331,7 +335,7 @@ shared_ptr<DtlsTransport> PeerConnection::initDtlsTransport() {
|
|
lower, mCertificate, verifierCallback,
|
|
lower, mCertificate, verifierCallback,
|
|
std::bind(&PeerConnection::forwardMedia, this, _1), stateChangeCallback);
|
|
std::bind(&PeerConnection::forwardMedia, this, _1), stateChangeCallback);
|
|
#else
|
|
#else
|
|
- PLOG_WARN << "Ignoring media support (not compiled with SRTP support)";
|
|
|
|
|
|
+ PLOG_WARNING << "Ignoring media support (not compiled with SRTP support)";
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|