diff --git a/daemon/src/media/video/video_receive_thread.cpp b/daemon/src/media/video/video_receive_thread.cpp index 9b4e01f06ac05dc88ed778a8351bf1539d5028ab..10bb00bb4d54c93e12c83a13c09eca927278ac08 100644 --- a/daemon/src/media/video/video_receive_thread.cpp +++ b/daemon/src/media/video/video_receive_thread.cpp @@ -104,8 +104,6 @@ bool VideoReceiveThread::setup() videoDecoder_->setIOContext(&sdpContext_); } - //videoDecoder_->setOptions(args_); - EXIT_IF_FAIL(!videoDecoder_->openInput(args_), "Could not open input \"%s\"", args_.input.c_str()); diff --git a/daemon/src/sip/sdp.cpp b/daemon/src/sip/sdp.cpp index 6cb0624721f825ebe698176190cc2bdc08029f1b..1ca46c8e22aa37c1e8abe892825778c1013b3f25 100644 --- a/daemon/src/sip/sdp.cpp +++ b/daemon/src/sip/sdp.cpp @@ -88,33 +88,6 @@ Sdp::~Sdp() #endif } -static bool -hasPayload(const std::vector<std::shared_ptr<AccountAudioCodecInfo>>& codecs, - int pt) -{ - return std::any_of(std::begin(codecs), std::end(codecs), - [pt](const std::shared_ptr<AccountAudioCodecInfo>& c) - { return c and c->systemCodecInfo.payloadType == (unsigned)pt; }); -} - -static bool -hasCodec(const std::vector<std::string> &codecs, const std::string &codec) -{ - return std::find(codecs.begin(), codecs.end(), codec) != codecs.end(); -} - -static std::string -rtpmapToString(pjmedia_sdp_rtpmap *rtpmap) -{ - std::ostringstream os; - const std::string enc(rtpmap->enc_name.ptr, rtpmap->enc_name.slen); - const std::string param(rtpmap->param.ptr, rtpmap->param.slen); - os << enc << "/" << rtpmap->clock_rate; - if (not param.empty()) - os << "/" << param; - return os.str(); -} - std::shared_ptr<AccountCodecInfo> Sdp::findCodecBySpec(const std::string &codec, const unsigned clockrate) const { @@ -654,10 +627,8 @@ Sdp::getMediaSlots(const pjmedia_sdp_session* session, bool remote) const break; } - if (not remote) { + if (not remote) descr.receiving_sdp = getFilteredSdp(session, i, descr.payload_type); - RING_WARN("Filtered SDP for local media #%u :\n%s", i, descr.receiving_sdp.c_str()); - } // get crypto info std::vector<std::string> crypto; @@ -684,19 +655,6 @@ Sdp::getMediaSlots() const return s; } -namespace -{ - vector<string> split(const string &s, char delim) - { - vector<string> elems; - stringstream ss(s); - string item; - while(getline(ss, item, delim)) - elems.push_back(item); - return elems; - } -} // end anonymous namespace - void Sdp::addZrtpAttribute(pjmedia_sdp_media* media, std::string hash) { /* Format: ":version value" */ diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp index 28cf078797a1550f18a468b9e40a773fc4543b55..2e10cf5696e45830f019800760b9225bf16ee941 100644 --- a/daemon/src/sip/sipaccount.cpp +++ b/daemon/src/sip/sipaccount.cpp @@ -243,17 +243,6 @@ SIPAccount::newOutgoingCall(const std::string& toUrl) /* fallback on local address */ if (not addrSdp) addrSdp = localAddress; - // Initialize the session using ULAW as default codec in case of early media - // The session should be ready to receive media once the first INVITE is sent, before - // the session initialization is completed - auto ac = std::static_pointer_cast<SystemAudioCodecInfo> - (getSystemCodecContainer()->searchCodecByName("PCMA", MEDIA_AUDIO)); - if (!ac) - throw VoipLinkException("Could not instantiate codec for early media"); - - std::vector<std::shared_ptr<SystemAudioCodecInfo>> audioCodecs; - audioCodecs.push_back(ac); - // Building the local SDP offer auto& sdp = call->getSDP();