Skip to content
Snippets Groups Projects
Commit ec0c0388 authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk
Browse files

avmodel: add recorder playback stopped signal

Change-Id: I3151c8312f246dac0638422522c321671cf700fc
parent 6791e0bc
No related branches found
No related tags found
No related merge requests found
......@@ -328,6 +328,11 @@ Q_SIGNALS:
* @param level Volume in range [0, 1]
*/
void audioMeter(const std::string& id, float level);
/**
* local recorder stopped
* @param filePath
*/
void recordPlaybackStopped(const std::string& filePath);
private:
std::unique_ptr<AVModelPimpl> pimpl_;
......
......@@ -117,6 +117,11 @@ public Q_SLOTS:
* @param level Volume in range [0, 1]
*/
void slotAudioMeter(const std::string& id, float level);
/**
* Listen from CallbacksHandler when a recorder stopped notice is incoming
* @param filePath
*/
void slotRecordPlaybackStopped(const std::string& filePath);
};
......@@ -665,6 +670,8 @@ AVModelPimpl::AVModelPimpl(AVModel& linked, const CallbacksHandler& callbacksHan
this, &AVModelPimpl::slotCallStateChanged);
connect(&*renderers_[video::PREVIEW_RENDERER_ID], &api::video::Renderer::frameUpdated,
this, &AVModelPimpl::slotFrameUpdated);
connect(&callbacksHandler, &CallbacksHandler::recordPlaybackStopped,
this, &AVModelPimpl::slotRecordPlaybackStopped);
auto startedPreview = false;
auto restartRenderers = [&](const QStringList& callList) {
......@@ -889,6 +896,12 @@ AVModelPimpl::slotAudioMeter(const std::string& id, float level)
emit linked_.audioMeter(id, level);
}
void
AVModelPimpl::slotRecordPlaybackStopped(const std::string &filePath)
{
emit linked_.recordPlaybackStopped(filePath);
}
} // namespace lrc
#include "api/moc_avmodel.cpp"
......
......@@ -145,6 +145,12 @@ CallbacksHandler::CallbacksHandler(const Lrc& parent)
&CallbacksHandler::slotIncomingMessage,
Qt::QueuedConnection);
connect(&CallManager::instance(),
&CallManagerInterface::recordPlaybackStopped,
this,
&CallbacksHandler::slotRecordPlaybackStopped,
Qt::QueuedConnection);
connect(&CallManager::instance(),
&CallManagerInterface::voiceMailNotify,
this,
......@@ -276,6 +282,12 @@ CallbacksHandler::slotVoiceMailNotify(const QString& accountId, int newCount, in
emit voiceMailNotify(accountId.toStdString(), newCount, oldCount, urgentCount);
}
void
CallbacksHandler::slotRecordPlaybackStopped(const QString& filePath)
{
emit recordPlaybackStopped(filePath.toStdString());
}
void
CallbacksHandler::slotContactAdded(const QString& accountId,
const QString& contactUri,
......
......@@ -268,6 +268,12 @@ Q_SIGNALS:
*/
void audioMeter(const std::string& id, float level);
/**
* Emitted when an local recorder is finished
* @param filePath
*/
void recordPlaybackStopped(const std::string& filePath);
/**
* Emitted when an audio level is received
* @param accountId
......@@ -509,6 +515,12 @@ private Q_SLOTS:
int oldCount,
int urgentCount);
/**
* Emit recordPlaybackStopped
* @param filePath
*/
void slotRecordPlaybackStopped(const QString& filePath);
private:
const api::Lrc& parent;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment