Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
6ebc8033
Commit
6ebc8033
authored
Jun 26, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(CallModel): supports FPS stats
parent
2c978d43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
12 deletions
+31
-12
en.ts
assets/languages/en.ts
+8
-0
fr.ts
assets/languages/fr.ts
+8
-0
CallModel.cpp
src/components/call/CallModel.cpp
+15
-12
No files found.
assets/languages/en.ts
View file @
6ebc8033
...
...
@@ -323,6 +323,14 @@
<
source
>
callErrorNotAcceptable
<
/source
>
<
translation
>
Remote
party
cannot
accept
the
call
.
<
/translation
>
<
/message
>
<
message
>
<
source
>
callStatsReceivedFramerate
<
/source
>
<
translation
>
Received
framerate
<
/translation
>
<
/message
>
<
message
>
<
source
>
callStatsSentFramerate
<
/source
>
<
translation
>
Sent
framerate
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CallSipAddress
<
/name
>
...
...
assets/languages/fr.ts
View file @
6ebc8033
...
...
@@ -323,6 +323,14 @@
<
source
>
callErrorNotAcceptable
<
/source
>
<
translation
>
Le
correspondant
ne
peut
accepter
votre
appel
.
<
/translation
>
<
/message
>
<
message
>
<
source
>
callStatsReceivedFramerate
<
/source
>
<
translation
>
FPS
re
ç
ues
<
/translation
>
<
/message
>
<
message
>
<
source
>
callStatsSentFramerate
<
/source
>
<
translation
>
FPS
envoy
é
es
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CallSipAddress
<
/name
>
...
...
src/components/call/CallModel.cpp
View file @
6ebc8033
...
...
@@ -566,7 +566,6 @@ inline QVariantMap createStat (const QString &key, const QString &value) {
}
void
CallModel
::
updateStats
(
const
shared_ptr
<
const
linphone
::
CallStats
>
&
callStats
,
QVariantList
&
statsList
)
{
QString
family
;
shared_ptr
<
const
linphone
::
CallParams
>
params
=
mCall
->
getCurrentParams
();
shared_ptr
<
const
linphone
::
PayloadType
>
payloadType
;
...
...
@@ -581,6 +580,7 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt
return
;
}
QString
family
;
switch
(
callStats
->
getIpFamilyOfRemote
())
{
case
linphone
:
:
AddressFamilyInet
:
family
=
QStringLiteral
(
"IPv4"
);
...
...
@@ -596,37 +596,40 @@ void CallModel::updateStats (const shared_ptr<const linphone::CallStats> &callSt
statsList
.
clear
();
statsList
<<
::
createStat
(
tr
(
"callStatsCodec"
),
payloadType
?
QString
(
"%1 / %2kHz"
).
arg
(
Utils
::
coreStringToAppString
(
payloadType
->
getMimeType
())).
arg
(
payloadType
->
getClockRate
()
/
1000
)
?
QString
Literal
(
"%1 / %2kHz"
).
arg
(
Utils
::
coreStringToAppString
(
payloadType
->
getMimeType
())).
arg
(
payloadType
->
getClockRate
()
/
1000
)
:
""
);
statsList
<<
::
createStat
(
tr
(
"callStatsUploadBandwidth"
),
QString
(
"%1 kbits/s"
).
arg
(
int
(
callStats
->
getUploadBandwidth
())));
statsList
<<
::
createStat
(
tr
(
"callStatsDownloadBandwidth"
),
QString
(
"%1 kbits/s"
).
arg
(
int
(
callStats
->
getDownloadBandwidth
())));
statsList
<<
::
createStat
(
tr
(
"callStatsUploadBandwidth"
),
QString
Literal
(
"%1 kbits/s"
).
arg
(
int
(
callStats
->
getUploadBandwidth
())));
statsList
<<
::
createStat
(
tr
(
"callStatsDownloadBandwidth"
),
QString
Literal
(
"%1 kbits/s"
).
arg
(
int
(
callStats
->
getDownloadBandwidth
())));
statsList
<<
::
createStat
(
tr
(
"callStatsIceState"
),
iceStateToString
(
callStats
->
getIceState
()));
statsList
<<
::
createStat
(
tr
(
"callStatsIpFamily"
),
family
);
statsList
<<
::
createStat
(
tr
(
"callStatsSenderLossRate"
),
QString
(
"%1 %"
).
arg
(
callStats
->
getSenderLossRate
()));
statsList
<<
::
createStat
(
tr
(
"callStatsReceiverLossRate"
),
QString
(
"%1 %"
).
arg
(
callStats
->
getReceiverLossRate
()));
statsList
<<
::
createStat
(
tr
(
"callStatsSenderLossRate"
),
QString
Literal
(
"%1 %"
).
arg
(
callStats
->
getSenderLossRate
()));
statsList
<<
::
createStat
(
tr
(
"callStatsReceiverLossRate"
),
QString
Literal
(
"%1 %"
).
arg
(
callStats
->
getReceiverLossRate
()));
switch
(
callStats
->
getType
())
{
case
linphone
:
:
StreamTypeAudio
:
statsList
<<
::
createStat
(
tr
(
"callStatsJitterBuffer"
),
QString
(
"%1 ms"
).
arg
(
callStats
->
getJitterBufferSizeMs
()));
statsList
<<
::
createStat
(
tr
(
"callStatsJitterBuffer"
),
QString
Literal
(
"%1 ms"
).
arg
(
callStats
->
getJitterBufferSizeMs
()));
break
;
case
linphone
:
:
StreamTypeVideo
:
{
QString
sentVideoDefinitionName
=
::
Utils
::
coreStringToAppString
(
params
->
getSentVideoDefinition
()
->
getName
());
QString
sentVideoDefinition
=
QString
(
"%1x%2"
)
const
QString
sentVideoDefinitionName
=
::
Utils
::
coreStringToAppString
(
params
->
getSentVideoDefinition
()
->
getName
());
const
QString
sentVideoDefinition
=
QStringLiteral
(
"%1x%2"
)
.
arg
(
params
->
getSentVideoDefinition
()
->
getWidth
())
.
arg
(
params
->
getSentVideoDefinition
()
->
getHeight
());
statsList
<<
::
createStat
(
tr
(
"callStatsSentVideoDefinition"
),
sentVideoDefinition
==
sentVideoDefinitionName
?
sentVideoDefinition
:
QString
(
"%1 (%2)"
).
arg
(
sentVideoDefinition
).
arg
(
sentVideoDefinitionName
));
:
QString
Literal
(
"%1 (%2)"
).
arg
(
sentVideoDefinition
).
arg
(
sentVideoDefinitionName
));
QString
receivedVideoDefinitionName
=
::
Utils
::
coreStringToAppString
(
params
->
getReceivedVideoDefinition
()
->
getName
());
QString
receivedVideoDefinition
=
QString
(
"%1x%2"
)
const
QString
receivedVideoDefinitionName
=
::
Utils
::
coreStringToAppString
(
params
->
getReceivedVideoDefinition
()
->
getName
());
const
QString
receivedVideoDefinition
=
QString
(
"%1x%2"
)
.
arg
(
params
->
getReceivedVideoDefinition
()
->
getWidth
())
.
arg
(
params
->
getReceivedVideoDefinition
()
->
getHeight
());
statsList
<<
::
createStat
(
tr
(
"callStatsReceivedVideoDefinition"
),
receivedVideoDefinition
==
receivedVideoDefinitionName
?
receivedVideoDefinition
:
QString
(
"%1 (%2)"
).
arg
(
receivedVideoDefinition
).
arg
(
receivedVideoDefinitionName
));
statsList
<<
::
createStat
(
tr
(
"callStatsReceivedFramerate"
),
QStringLiteral
(
"%1 FPS"
).
arg
(
params
->
getReceivedFramerate
()));
statsList
<<
::
createStat
(
tr
(
"callStatsSentFramerate"
),
QStringLiteral
(
"%1 FPS"
).
arg
(
params
->
getSentFramerate
()));
}
break
;
default:
...
...
Write
Preview
Markdown
is supported
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