mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
conference: only create video mixer if needed
This avoids video mixer/camera access for calls with no video Refs #45998 Change-Id: I5d1a6776a861bbd883863e02c6a02e682def4b0e
This commit is contained in:
@ -51,7 +51,7 @@ Conference::Conference()
|
|||||||
, confState_(ACTIVE_ATTACHED)
|
, confState_(ACTIVE_ATTACHED)
|
||||||
, participants_()
|
, participants_()
|
||||||
#ifdef SFL_VIDEO
|
#ifdef SFL_VIDEO
|
||||||
, videoMixer_(new sfl_video::VideoMixer(id_))
|
, videoMixer_(nullptr)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
Recordable::initRecFilename(id_);
|
Recordable::initRecFilename(id_);
|
||||||
@ -184,6 +184,8 @@ std::string Conference::getConfID() const {
|
|||||||
#ifdef SFL_VIDEO
|
#ifdef SFL_VIDEO
|
||||||
std::shared_ptr<sfl_video::VideoMixer> Conference::getVideoMixer()
|
std::shared_ptr<sfl_video::VideoMixer> Conference::getVideoMixer()
|
||||||
{
|
{
|
||||||
|
if (!videoMixer_)
|
||||||
|
videoMixer_.reset(new sfl_video::VideoMixer(id_));
|
||||||
return videoMixer_;
|
return videoMixer_;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -246,7 +246,8 @@ void VideoRtpSession::setupConferenceVideoPipeline()
|
|||||||
void VideoRtpSession::getMixerFromConference(Conference &conf)
|
void VideoRtpSession::getMixerFromConference(Conference &conf)
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(mutex_);
|
std::lock_guard<std::mutex> lock(mutex_);
|
||||||
videoMixerSP_ = std::move(conf.getVideoMixer());
|
if (sending_ or receiving_)
|
||||||
|
videoMixerSP_ = std::move(conf.getVideoMixer());
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoRtpSession::enterConference(Conference *conf)
|
void VideoRtpSession::enterConference(Conference *conf)
|
||||||
|
Reference in New Issue
Block a user