Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-libclient
Commits
ec0c0388
Commit
ec0c0388
authored
Oct 30, 2019
by
Ming Rui Zhang
Committed by
Andreas Traczyk
Nov 01, 2019
Browse files
avmodel: add recorder playback stopped signal
Change-Id: I3151c8312f246dac0638422522c321671cf700fc
parent
6791e0bc
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/api/avmodel.h
View file @
ec0c0388
...
...
@@ -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_
;
...
...
src/avmodel.cpp
View file @
ec0c0388
...
...
@@ -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
);
};
...
...
@@ -664,7 +669,9 @@ AVModelPimpl::AVModelPimpl(AVModel& linked, const CallbacksHandler& callbacksHan
connect
(
&
callbacksHandler
,
&
CallbacksHandler
::
callStateChanged
,
this
,
&
AVModelPimpl
::
slotCallStateChanged
);
connect
(
&*
renderers_
[
video
::
PREVIEW_RENDERER_ID
],
&
api
::
video
::
Renderer
::
frameUpdated
,
this
,
&
AVModelPimpl
::
slotFrameUpdated
);
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"
...
...
src/callbackshandler.cpp
View file @
ec0c0388
...
...
@@ -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
,
...
...
src/callbackshandler.h
View file @
ec0c0388
...
...
@@ -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
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment