Skip to content
Snippets Groups Projects
Commit e1b19d8f authored by Tristan Matthews's avatar Tristan Matthews
Browse files

conference: only create video mixer if needed

This avoids video mixer/camera access for calls with no video

Refs #45998

Change-Id: I5d1a6776a861bbd883863e02c6a02e682def4b0e
parent 2355b71e
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ Conference::Conference()
, confState_(ACTIVE_ATTACHED)
, participants_()
#ifdef SFL_VIDEO
, videoMixer_(new sfl_video::VideoMixer(id_))
, videoMixer_(nullptr)
#endif
{
Recordable::initRecFilename(id_);
......@@ -184,6 +184,8 @@ std::string Conference::getConfID() const {
#ifdef SFL_VIDEO
std::shared_ptr<sfl_video::VideoMixer> Conference::getVideoMixer()
{
if (!videoMixer_)
videoMixer_.reset(new sfl_video::VideoMixer(id_));
return videoMixer_;
}
#endif
......@@ -246,6 +246,7 @@ void VideoRtpSession::setupConferenceVideoPipeline()
void VideoRtpSession::getMixerFromConference(Conference &conf)
{
std::lock_guard<std::mutex> lock(mutex_);
if (sending_ or receiving_)
videoMixerSP_ = std::move(conf.getVideoMixer());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment