Display FPS in call stats view

This commit is contained in:
Sylvain Berfini 2017-05-29 14:02:02 +02:00
parent 11b77c269b
commit beb5e235ff
4 changed files with 35 additions and 4 deletions

View file

@ -259,7 +259,6 @@
android:textColor="@color/colorB" android:textColor="@color/colorB"
android:textSize="12sp"/> android:textSize="12sp"/>
<TextView <TextView
android:id="@+id/video_resolution_received" android:id="@+id/video_resolution_received"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -270,6 +269,26 @@
android:textColor="@color/colorB" android:textColor="@color/colorB"
android:textSize="12sp"/> android:textSize="12sp"/>
<TextView
android:id="@+id/video_fps_sent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="@string/call_stats_video_fps_sent"
android:gravity="center"
android:textColor="@color/colorB"
android:textSize="12sp"/>
<TextView
android:id="@+id/video_fps_received"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="@string/call_stats_video_fps_received"
android:gravity="center"
android:textColor="@color/colorB"
android:textSize="12sp"/>
</TableLayout> </TableLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View file

@ -221,6 +221,8 @@
<string name="call_stats_ice">ICE connectivity:</string> <string name="call_stats_ice">ICE connectivity:</string>
<string name="call_stats_video_resolution_sent">Sent video resolution:</string> <string name="call_stats_video_resolution_sent">Sent video resolution:</string>
<string name="call_stats_video_resolution_received">Received video resolution:</string> <string name="call_stats_video_resolution_received">Received video resolution:</string>
<string name="call_stats_video_fps_sent">Sent video fps:</string>
<string name="call_stats_video_fps_received">Received video fps:</string>
<string name="call_stats_sender_loss_rate">Sender loss rate:</string> <string name="call_stats_sender_loss_rate">Sender loss rate:</string>
<string name="call_stats_receiver_loss_rate">Receiver loss rate:</string> <string name="call_stats_receiver_loss_rate">Receiver loss rate:</string>
<string name="call_stats_jitter_buffer">Jitter buffer:</string> <string name="call_stats_jitter_buffer">Jitter buffer:</string>

View file

@ -1585,7 +1585,8 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
, PayloadType media , View layout, TextView title, TextView codec, TextView dl , PayloadType media , View layout, TextView title, TextView codec, TextView dl
, TextView ul, TextView ice, TextView ip, TextView senderLossRate , TextView ul, TextView ice, TextView ip, TextView senderLossRate
, TextView receiverLossRate, TextView enc, TextView dec, TextView videoResolutionSent , TextView receiverLossRate, TextView enc, TextView dec, TextView videoResolutionSent
, TextView videoResolutionReceived, boolean isVideo, TextView jitterBuffer) { , TextView videoResolutionReceived, TextView videoFpsSent, TextView videoFpsReceived
, boolean isVideo, TextView jitterBuffer) {
if (stats != null) { if (stats != null) {
String mime = null; String mime = null;
@ -1621,6 +1622,12 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
formatText(videoResolutionReceived, formatText(videoResolutionReceived,
getString(R.string.call_stats_video_resolution_received), getString(R.string.call_stats_video_resolution_received),
"\u2193 " + params.getReceivedVideoSize().toDisplayableString()); "\u2193 " + params.getReceivedVideoSize().toDisplayableString());
formatText(videoFpsSent,
getString(R.string.call_stats_video_fps_sent),
"\u2191 " + params.getSentFramerate());
formatText(videoFpsReceived,
getString(R.string.call_stats_video_fps_received),
"\u2193 " + params.getReceivedFramerate());
} else { } else {
formatText(jitterBuffer, getString(R.string.call_stats_jitter_buffer), formatText(jitterBuffer, getString(R.string.call_stats_jitter_buffer),
new DecimalFormat("##.##").format(stats.getJitterBufferSize()) + " ms"); new DecimalFormat("##.##").format(stats.getJitterBufferSize()) + " ms");
@ -1652,6 +1659,8 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
final TextView iceVideo = (TextView) view.findViewById(R.id.ice_video); final TextView iceVideo = (TextView) view.findViewById(R.id.ice_video);
final TextView videoResolutionSent = (TextView) view.findViewById(R.id.video_resolution_sent); final TextView videoResolutionSent = (TextView) view.findViewById(R.id.video_resolution_sent);
final TextView videoResolutionReceived = (TextView) view.findViewById(R.id.video_resolution_received); final TextView videoResolutionReceived = (TextView) view.findViewById(R.id.video_resolution_received);
final TextView videoFpsSent = (TextView) view.findViewById(R.id.video_fps_sent);
final TextView videoFpsReceived = (TextView) view.findViewById(R.id.video_fps_received);
final TextView senderLossRateAudio = (TextView) view.findViewById(R.id.senderLossRateAudio); final TextView senderLossRateAudio = (TextView) view.findViewById(R.id.senderLossRateAudio);
final TextView receiverLossRateAudio = (TextView) view.findViewById(R.id.receiverLossRateAudio); final TextView receiverLossRateAudio = (TextView) view.findViewById(R.id.receiverLossRateAudio);
final TextView senderLossRateVideo = (TextView) view.findViewById(R.id.senderLossRateVideo); final TextView senderLossRateVideo = (TextView) view.findViewById(R.id.senderLossRateVideo);
@ -1701,7 +1710,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
displayMediaStats(params, audioStats, payloadAudio, audioLayout displayMediaStats(params, audioStats, payloadAudio, audioLayout
, titleAudio, codecAudio, dlAudio, ulAudio, iceAudio , titleAudio, codecAudio, dlAudio, ulAudio, iceAudio
, ipAudio, senderLossRateAudio, receiverLossRateAudio , ipAudio, senderLossRateAudio, receiverLossRateAudio
, encoderAudio, decoderAudio, null, null , encoderAudio, decoderAudio, null, null, null, null
, false, jitterBufferAudio); , false, jitterBufferAudio);
displayMediaStats(params, videoStats, payloadVideo, videoLayout displayMediaStats(params, videoStats, payloadVideo, videoLayout
@ -1709,6 +1718,7 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
, ipVideo, senderLossRateVideo, receiverLossRateVideo , ipVideo, senderLossRateVideo, receiverLossRateVideo
, encoderVideo, decoderVideo , encoderVideo, decoderVideo
, videoResolutionSent, videoResolutionReceived , videoResolutionSent, videoResolutionReceived
,videoFpsSent, videoFpsReceived
, true, null); , true, null);
} }
} }

@ -1 +1 @@
Subproject commit 609888e8127d77fdef45f95434d0f976af7f1828 Subproject commit 57792f40144982a181961dc98f727c09968c69c4