TEST_F(AudioRtpReceiverTest, VolumesSetBeforeStartingAreRespected) { // Set the volume before setting the media channel. It should still be used // as the initial volume.
receiver_->OnSetVolume(kVolume);
// The previosly set initial volume should be propagated to the provided // media_channel_ as soon as GetSetupForMediaChannel is called.
EXPECT_CALL(receive_channel_, SetOutputVolume(kSsrc, kVolume));
auto setup_task = receiver_->GetSetupForMediaChannel(kSsrc);
worker_thread_->BlockingCall([&]() { std::move(setup_task)(); });
}
// Tests that OnChanged notifications are processed correctly on the worker // thread when a media channel pointer is passed to the receiver via the // constructor.
TEST(AudioRtpReceiver, OnChangedNotificationsAfterConstruction) {
test::RunLoop loop;
// When the track is marked as disabled, an async notification is queued // for the worker thread. This notification should trigger the volume // of the media channel to be set to kVolumeMuted. // Set the expectation first for the call, before changing the track state.
EXPECT_CALL(receive_channel, SetDefaultOutputVolume(kVolumeMuted)).Times(1);
// Mark the track as disabled.
receiver->track()->set_enabled(false);
// Flush the worker thread.
worker_thread->BlockingCall([] {});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.