conference: improve audio-only handling

1. When a audio-only participant leaves, the video mixer is updated
and all audio-only streams are now removed.
2. If a audio-only calls try to join a swarm-call, it was hanging
due to a bad number of medias. So ignore video for audio-only calls.

GitLab: #917
Change-Id: Ifdd66e2ab138c078ef9e9c1402a07a6ae6a36b00
This commit is contained in:
Sébastien Blin
2023-11-17 10:57:50 -05:00
committed by Adrien Béraud
parent cc98f1d0e8
commit 1f4cd3d548
3 changed files with 44 additions and 6 deletions

View File

@ -107,6 +107,7 @@ private:
void testPropagateRecording();
void testBrokenParticipantAudioAndVideo();
void testBrokenParticipantAudioOnly();
void testAudioOnlyLeaveLayout();
void testRemoveConferenceInOneOne();
CPPUNIT_TEST_SUITE(ConferenceTest);
@ -131,6 +132,7 @@ private:
CPPUNIT_TEST(testPropagateRecording);
CPPUNIT_TEST(testBrokenParticipantAudioAndVideo);
CPPUNIT_TEST(testBrokenParticipantAudioOnly);
CPPUNIT_TEST(testAudioOnlyLeaveLayout);
CPPUNIT_TEST(testRemoveConferenceInOneOne);
CPPUNIT_TEST_SUITE_END();
@ -1079,6 +1081,31 @@ ConferenceTest::testBrokenParticipantAudioOnly()
libjami::unregisterSignalHandlers();
}
void
ConferenceTest::testAudioOnlyLeaveLayout()
{
registerSignalHandlers();
// Start conference with four participants
startConference(true, true);
auto expectedNumberOfParticipants = 4u;
// Check participants number
CPPUNIT_ASSERT(
cv.wait_for(lk, 30s, [&] { return pInfos_.size() == expectedNumberOfParticipants; }));
// Carla Leave
Manager::instance().hangupCall(carlaId, carlaCall.callId);
// Check participants number
// It should have one less participant than in the conference start
CPPUNIT_ASSERT(
cv.wait_for(lk, 30s, [&] { return expectedNumberOfParticipants - 1 == pInfos_.size(); }));
hangupConference();
libjami::unregisterSignalHandlers();
}
void
ConferenceTest::testRemoveConferenceInOneOne()
{