Commit d10114fe authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee Committed by Guillaume Roguez

video: support compiling without video

configure --disable-video is fixed by this patch.

Refs #66619

Change-Id: I14a0d96fd9b4d891f8a1894c19cf264b0f74804c
Signed-off-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent 89374846
......@@ -35,10 +35,7 @@
#include <memory>
#ifdef RING_VIDEO
// forward declaration from libav
class AVFrame;
#endif
namespace ring {
......
......@@ -740,11 +740,23 @@ SIPCall::startAllMedia()
for (const auto& slot : slots) {
const auto& local = slot.first;
const auto& remote = slot.second;
if (local.type != remote.type) {
RING_ERR("Inconsistent media types between local and remote for SDP media slot");
continue;
}
RtpSession* rtp = local.type == MEDIA_AUDIO
? static_cast<RtpSession*>(avformatrtp_.get())
#ifdef RING_VIDEO
: static_cast<RtpSession*>(&videortp_);
#else
: nullptr;
#endif
if (not rtp)
continue;
if (!local.codec) {
RING_ERR("No codec defined in local media slot");
continue;
......@@ -754,15 +766,10 @@ SIPCall::startAllMedia()
continue;
}
if (isSecure() && (not local.crypto || not remote.crypto)) {
RING_ERR("Can't perform secure call over insecure RTP transport");
continue;
}
RtpSession* rtp = local.type == MEDIA_AUDIO
? static_cast<RtpSession*>(avformatrtp_.get())
: static_cast<RtpSession*>(&videortp_);
auto accountAudioCodec = std::static_pointer_cast<AccountAudioCodecInfo>(local.codec);
RING_DBG("########## UPDATE MEDIA ############");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment