diff --git a/src/api/avmodel.h b/src/api/avmodel.h index 6ee37aff654693ea0eba32da7c9f32ffeddbcbcd..65cf1023e2f23b14b7ec863c0aecd78b4141dfb2 100644 --- a/src/api/avmodel.h +++ b/src/api/avmodel.h @@ -318,9 +318,13 @@ Q_SIGNALS: */ void frameUpdated(const QString& id); /** - * Emitted when a device is plugged or unplugged + * Emitted when a video device is plugged or unplugged */ void deviceEvent(); + /** + * Emitted when an audio device is plugged or unplugged + */ + void audioDeviceEvent(); /** * Audio volume level * @param id Ringbuffer id diff --git a/src/avmodel.cpp b/src/avmodel.cpp index eff1e74ada401c47e227b78dad94a5551338b386..43cb55bdcbe8cc6efb98b6faf7ce38a5815d3e4e 100644 --- a/src/avmodel.cpp +++ b/src/avmodel.cpp @@ -114,9 +114,13 @@ public Q_SLOTS: */ void slotFrameUpdated(const QString& id); /** - * Detect when a device is plugged or unplugged + * Detect when a video device is plugged or unplugged */ void slotDeviceEvent(); + /** + * Detect when an audio device is plugged or unplugged + */ + void slotAudioDeviceEvent(); /** * Audio volume level * @param id Ringbuffer id @@ -643,6 +647,10 @@ AVModelPimpl::AVModelPimpl(AVModel& linked, const CallbacksHandler& callbacksHan SIZE_RENDERER = renderers_.size(); #endif connect(&callbacksHandler, &CallbacksHandler::deviceEvent, this, &AVModelPimpl::slotDeviceEvent); + connect(&callbacksHandler, + &CallbacksHandler::audioDeviceEvent, + this, + &AVModelPimpl::slotAudioDeviceEvent); connect(&callbacksHandler, &CallbacksHandler::audioMeter, this, &AVModelPimpl::slotAudioMeter); connect(&callbacksHandler, &CallbacksHandler::recordPlaybackStopped, @@ -859,6 +867,12 @@ AVModelPimpl::slotDeviceEvent() emit linked_.deviceEvent(); } +void +AVModelPimpl::slotAudioDeviceEvent() +{ + emit linked_.audioDeviceEvent(); +} + void AVModelPimpl::slotAudioMeter(const QString& id, float level) { diff --git a/src/callbackshandler.cpp b/src/callbackshandler.cpp index a3306facffceb771d4bd829a7bf0f5d27b777794..54777d5b20420259e12707b66fb84ae436f4a257 100644 --- a/src/callbackshandler.cpp +++ b/src/callbackshandler.cpp @@ -233,14 +233,17 @@ CallbacksHandler::CallbacksHandler(const Lrc& parent) this, &CallbacksHandler::slotDeviceEvent, Qt::QueuedConnection); + connect(&ConfigurationManager::instance(), + &ConfigurationManagerInterface::audioDeviceEvent, + this, + &CallbacksHandler::slotAudioDeviceEvent, + Qt::QueuedConnection); connect(&ConfigurationManager::instance(), &ConfigurationManagerInterface::audioMeter, this, &CallbacksHandler::slotAudioMeterReceived, Qt::QueuedConnection); - - } CallbacksHandler::~CallbacksHandler() {} @@ -249,11 +252,10 @@ void CallbacksHandler::subscribeToDebugReceived() { connect(&ConfigurationManager::instance(), - &ConfigurationManagerInterface::messageSend, - this, - &CallbacksHandler::slotDebugMessageReceived, - Qt::QueuedConnection); - + &ConfigurationManagerInterface::messageSend, + this, + &CallbacksHandler::slotDebugMessageReceived, + Qt::QueuedConnection); } void @@ -566,6 +568,12 @@ CallbacksHandler::slotDeviceEvent() emit deviceEvent(); } +void +CallbacksHandler::slotAudioDeviceEvent() +{ + emit audioDeviceEvent(); +} + void CallbacksHandler::slotAudioMeterReceived(const QString& id, float level) { @@ -573,7 +581,9 @@ CallbacksHandler::slotAudioMeterReceived(const QString& id, float level) } void -CallbacksHandler::slotRemoteRecordingChanged(const QString& callId, const QString& peerNumber, bool state) +CallbacksHandler::slotRemoteRecordingChanged(const QString& callId, + const QString& peerNumber, + bool state) { emit remoteRecordingChanged(callId, peerNumber, state); } diff --git a/src/callbackshandler.h b/src/callbackshandler.h index 1c8c478b6381c96e87a42037293f08cfdce04fac..90de27d2ac21f8e08e7c252d7fdbd57e919e6ea4 100644 --- a/src/callbackshandler.h +++ b/src/callbackshandler.h @@ -273,10 +273,15 @@ Q_SIGNALS: void stoppedDecoding(const QString& id, const QString& shmPath); /** - * Emitted when a device is plugged or unplugged + * Emitted when a video device is plugged or unplugged */ void deviceEvent(); + /** + * Emitted when an audio level is plugged or unplugged + */ + void audioDeviceEvent(); + /** * Emitted when an audio level is received * @param id of the ringbuffer level @@ -522,10 +527,15 @@ private Q_SLOTS: void slotStoppedDecoding(const QString& id, const QString& shmPath); /** - * Detect when a device is plugged or unplugged + * Detect when a video device is plugged or unplugged */ void slotDeviceEvent(); + /** + * Detect when an audio device is plugged or unplugged + */ + void slotAudioDeviceEvent(); + /** * Called when an audio meter level is received * @param id of the ringbuffer level