mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
* #6541: at hangup, RTP ends when the call is deleted
This commit is contained in:
@ -45,7 +45,7 @@ SIPCall::SIPCall (const CallID& id, Call::CallType type, pj_caching_pool *cachin
|
||||
, _did (0)
|
||||
, _tid (0)
|
||||
, _audiortp (new sfl::AudioRtpFactory(this))
|
||||
, videortp_ (new sfl_video::VideoRtpSession())
|
||||
, videortp_ (new sfl_video::VideoRtpSession)
|
||||
, _xferSub (NULL)
|
||||
, _invSession (NULL)
|
||||
, _local_sdp (NULL)
|
||||
@ -66,8 +66,6 @@ SIPCall::~SIPCall()
|
||||
|
||||
delete _audiortp;
|
||||
_audiortp = NULL;
|
||||
delete videortp_;
|
||||
videortp_ = NULL;
|
||||
|
||||
delete _local_sdp;
|
||||
_local_sdp = NULL;
|
||||
|
@ -33,6 +33,7 @@
|
||||
#define __SIPCALL_H__
|
||||
|
||||
#include "call.h"
|
||||
#include <tr1/memory>
|
||||
|
||||
class Sdp;
|
||||
class pjsip_evsub;
|
||||
@ -121,7 +122,7 @@ class SIPCall : public Call
|
||||
* Returns a pointer to the VideoRtp object
|
||||
*/
|
||||
sfl_video::VideoRtpSession * getVideoRtp () {
|
||||
return videortp_;
|
||||
return videortp_.get();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -172,7 +173,7 @@ class SIPCall : public Call
|
||||
/**
|
||||
* Video Rtp Session factory
|
||||
*/
|
||||
sfl_video::VideoRtpSession * videortp_;
|
||||
std::tr1::shared_ptr<sfl_video::VideoRtpSession> videortp_;
|
||||
|
||||
/**
|
||||
* Event subscription structure
|
||||
|
@ -4424,42 +4424,11 @@ void onCallTransfered (pjsip_inv_session *inv, pjsip_rx_data *rdata)
|
||||
}
|
||||
|
||||
Manager::instance().hangupCall(currentCall->getCallId());
|
||||
|
||||
// SIPCall* sipCall = dynamic_cast<SIPCall *>(newCall);
|
||||
|
||||
// SIPVoIPLink *link = dynamic_cast<SIPVoIPLink *> (Manager::instance().getAccountLink (accId));
|
||||
// if(link == NULL) {
|
||||
// _debug("UserAgent: Error could not retreive voip link from call");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (link) {
|
||||
// newCall = dynamic_cast<SIPCall *> (link->getCall (newCallId));
|
||||
//
|
||||
// if (!newCall) {
|
||||
// _debug ("UserAgent: can not find the call from sipvoiplink!");
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (sub) {
|
||||
// /* Put the server subscription in inv_data.
|
||||
// * Subsequent state changed in pjsua_inv_on_state_changed() will be
|
||||
// * reported back to the server subscription.
|
||||
// */
|
||||
// currentCall->setXferSub (sub);
|
||||
//
|
||||
// /* Put the invite_data in the subscription. */
|
||||
// pjsip_evsub_set_mod_data (sub, _mod_ua.id, currentCall);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
void transfer_client_cb (pjsip_evsub *sub, pjsip_event *event)
|
||||
{
|
||||
|
||||
|
||||
PJ_UNUSED_ARG (event);
|
||||
|
||||
/*
|
||||
|
@ -68,6 +68,8 @@ VideoRtpSession::VideoRtpSession(const std::map<std::string, std::string> &txArg
|
||||
|
||||
void VideoRtpSession::updateSDP(const Sdp *sdp)
|
||||
{
|
||||
assert(receiveThread_.get() == 0);
|
||||
|
||||
std::string desc = sdp->getActiveVideoDescription();
|
||||
// if port has changed
|
||||
if (desc != rxArgs_["receiving_sdp"])
|
||||
@ -81,8 +83,10 @@ void VideoRtpSession::updateSDP(const Sdp *sdp)
|
||||
void VideoRtpSession::updateDestination(const std::string &destination,
|
||||
unsigned int port)
|
||||
{
|
||||
std::stringstream tmp;
|
||||
assert(sendThread_.get() == 0);
|
||||
assert(not destination.empty());
|
||||
|
||||
std::stringstream tmp;
|
||||
tmp << "rtp://" << destination << ":" << port;
|
||||
// if destination has changed
|
||||
if (tmp.str() != txArgs_["destination"])
|
||||
|
Reference in New Issue
Block a user