Skip to content
Snippets Groups Projects
Commit 7eb1e737 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

videomanager: don't start audio preview in switchInput

Change-Id: I820d008b9f437e4396f076fade34f3f9d9f8d053
parent e7b3b5e4
Branches
Tags
No related merge requests found
......@@ -457,8 +457,7 @@ startCamera()
void
stopCamera()
{
if (switchInput(""))
jami::Manager::instance().getVideoManager().started = false;
jami::Manager::instance().getVideoManager().started = false;
jami::Manager::instance().getVideoManager().videoPreview.reset();
}
......@@ -467,6 +466,7 @@ startAudioDevice()
{
jami::Manager::instance().getVideoManager().audioPreview = jami::getAudioInput(
jami::RingBufferPool::DEFAULT_ID);
jami::Manager::instance().getVideoManager().audioPreview->switchInput("");
}
void
......@@ -520,20 +520,13 @@ stopLocalRecorder(const std::string& filepath)
bool
switchInput(const std::string& resource)
{
if (auto call = jami::Manager::instance().getCurrentCall()) {
if (call->hasVideo()) {
// TODO remove this part when clients are updated to use Calljami::Manager::switchInput
call->switchInput(resource);
return true;
}
}
bool ret = true;
if (auto input = jami::Manager::instance().getVideoManager().videoInput.lock())
ret = input->switchInput(resource).valid();
else
JAMI_WARN("Video input not initialized");
if (auto input = jami::getAudioInput(jami::RingBufferPool::DEFAULT_ID))
if (auto input = jami::Manager::instance().getVideoManager().audioPreview)
ret &= input->switchInput(resource).valid();
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment