mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
* #12475: videortp: create videortpsession on the stack
This commit is contained in:
@ -33,13 +33,10 @@
|
||||
|
||||
#include "sipcall.h"
|
||||
#include "logger.h" // for _debug
|
||||
#include "audio/audiortp/audio_rtp_factory.h"
|
||||
#include "sdp.h"
|
||||
#include "manager.h"
|
||||
#ifdef SFL_VIDEO
|
||||
#include "dbus/video_controls.h"
|
||||
|
||||
#include "video/video_rtp_session.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
@ -52,7 +49,7 @@ SIPCall::SIPCall(const std::string& id, Call::CallType type,
|
||||
, inv(NULL)
|
||||
, audiortp_(this)
|
||||
#ifdef SFL_VIDEO
|
||||
, videortp_(new sfl_video::VideoRtpSession(Manager::instance().getDbusManager()->getVideoControls()->getSettings()))
|
||||
, videortp_(Manager::instance().getDbusManager()->getVideoControls()->getSettings())
|
||||
#endif
|
||||
, pool_(pj_pool_create(&caching_pool->factory, id.c_str(), INITIAL_SIZE, INCREMENT_SIZE, NULL))
|
||||
, local_sdp_(new Sdp(pool_))
|
||||
|
@ -37,8 +37,11 @@
|
||||
#endif
|
||||
|
||||
#include "call.h"
|
||||
#include <tr1/memory>
|
||||
#include "audio/audiortp/audio_rtp_factory.h"
|
||||
#ifdef SFL_VIDEO
|
||||
#include "video/video_rtp_session.h"
|
||||
#endif
|
||||
|
||||
#include "noncopyable.h"
|
||||
|
||||
class pjsip_evsub;
|
||||
@ -47,13 +50,6 @@ class pj_pool_t;
|
||||
class pjsip_inv_session;
|
||||
class Sdp;
|
||||
|
||||
#ifdef SFL_VIDEO
|
||||
namespace sfl_video
|
||||
{
|
||||
class VideoRtpSession;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file sipcall.h
|
||||
* @brief SIPCall are SIP implementation of a normal Call
|
||||
@ -92,8 +88,8 @@ class SIPCall : public Call {
|
||||
/**
|
||||
* Returns a pointer to the VideoRtp object
|
||||
*/
|
||||
sfl_video::VideoRtpSession * getVideoRtp () {
|
||||
return videortp_.get();
|
||||
sfl_video::VideoRtpSession &getVideoRtp () {
|
||||
return videortp_;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -123,7 +119,7 @@ class SIPCall : public Call {
|
||||
/**
|
||||
* Video Rtp Session factory
|
||||
*/
|
||||
std::tr1::shared_ptr<sfl_video::VideoRtpSession> videortp_;
|
||||
sfl_video::VideoRtpSession videortp_;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -1507,9 +1507,9 @@ void sdp_media_update_cb(pjsip_inv_session *inv, pj_status_t status)
|
||||
call->getAudioRtp().updateDestinationIpAddress();
|
||||
call->getAudioRtp().setDtmfPayloadType(sdpSession->getTelephoneEventType());
|
||||
#ifdef SFL_VIDEO
|
||||
call->getVideoRtp()->updateSDP(*call->getLocalSDP());
|
||||
call->getVideoRtp()->updateDestination(call->getLocalSDP()->getRemoteIP(), call->getLocalSDP()->getRemoteVideoPort());
|
||||
call->getVideoRtp()->start();
|
||||
call->getVideoRtp().updateSDP(*call->getLocalSDP());
|
||||
call->getVideoRtp().updateDestination(call->getLocalSDP()->getRemoteIP(), call->getLocalSDP()->getRemoteVideoPort());
|
||||
call->getVideoRtp().start();
|
||||
#endif
|
||||
|
||||
// Get the crypto attribute containing srtp's cryptographic context (keys, cipher)
|
||||
|
@ -296,7 +296,6 @@ video_renderer_render_to_texture(VideoRendererPrivate *priv)
|
||||
|
||||
while (priv->buffer_gen == priv->shm_area->buffer_gen) {
|
||||
shm_unlock(priv->shm_area);
|
||||
DEBUG("Waiting for notif");
|
||||
sem_wait(&priv->shm_area->notification);
|
||||
shm_lock(priv->shm_area);
|
||||
}
|
||||
|
Reference in New Issue
Block a user