CallStats: stats should take the full available height

This commit is contained in:
Gautier Pelloux-Prayer 2016-02-10 15:16:43 +01:00
parent 0781e98ea6
commit 5d11f24f6c
4 changed files with 32 additions and 22 deletions

View file

@ -109,14 +109,29 @@
[result appendString:@"\n"];
if (stats != NULL) {
[result appendString:[NSString stringWithFormat:@"Upload bandwidth: %1.1f kbits/s", stats->upload_bandwidth]];
[result appendString:@"\n"];
[result
appendString:[NSString stringWithFormat:@"Download bandwidth: %1.1f kbits/s", stats->download_bandwidth]];
[result appendString:@"\n"];
[result appendString:[NSString stringWithFormat:@"Upload bandwidth: %1.1f kbits/s", stats->upload_bandwidth]];
[result appendString:@"\n"];
[result appendString:[NSString stringWithFormat:@"ICE state: %@", [self.class iceToString:stats->ice_state]]];
[result appendString:@"\n"];
// RTP stats section (packet loss count, etc)
rtp_stats_t rtp_stats = linphone_call_stats_get_rtp_stats(stats);
[result
appendString:[NSString stringWithFormat:
@"RTP packets: %llu total, %lld cum loss, %llu discarded, %llu OOT, %llu bad",
rtp_stats.packet_recv, rtp_stats.cum_packet_loss, rtp_stats.discarded,
rtp_stats.outoftime, rtp_stats.bad]];
[result appendString:@"\n"];
[result appendString:[NSString stringWithFormat:@"Sender loss rate: %.2f%%",
linphone_call_stats_get_sender_loss_rate(stats)]];
[result appendString:@"\n"];
[result appendString:[NSString stringWithFormat:@"Receiver loss rate: %.2f%%",
linphone_call_stats_get_receiver_loss_rate(stats)]];
[result appendString:@"\n"];
if (stream == LinphoneStreamTypeVideo) {
MSVideoSize sentSize = linphone_call_params_get_sent_video_size(params);
MSVideoSize recvSize = linphone_call_params_get_received_video_size(params);

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14F1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CallSideMenuView">
@ -47,9 +47,4 @@ Video: down</string>
</connections>
</tapGestureRecognizer>
</objects>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<development version="6000" identifier="xcode"/>
@ -38,11 +38,6 @@
<outletCollection property="gestureRecognizers" destination="40" appends="YES" id="41"/>
</connections>
</view>
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="14" userLabel="statusBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view autoresizesSubviews="NO" tag="3" contentMode="scaleToFill" id="16" userLabel="tabBar">
<rect key="frame" x="0.0" y="601" width="375" height="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
@ -52,6 +47,11 @@
<rect key="frame" x="-375" y="42" width="375" height="625"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
</view>
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="14" userLabel="statusBar">
<rect key="frame" x="0.0" y="0.0" width="375" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</subviews>
<nil key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
@ -71,11 +71,6 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="22" userLabel="statusBar">
<rect key="frame" x="0.0" y="0.0" width="667" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view autoresizesSubviews="NO" tag="3" contentMode="scaleToFill" id="21" userLabel="tabBar">
<rect key="frame" x="0.0" y="42" width="90" height="333"/>
<autoresizingMask key="autoresizingMask" heightSizable="YES" flexibleMaxY="YES"/>
@ -85,6 +80,11 @@
<rect key="frame" x="0.0" y="42" width="667" height="333"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
</view>
<view autoresizesSubviews="NO" tag="2" contentMode="scaleToFill" id="22" userLabel="statusBar">
<rect key="frame" x="0.0" y="0.0" width="667" height="42"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>

View file

@ -575,9 +575,9 @@
statusBarFrame.origin.y = origin - statusBarFrame.size.height;
}
// 2. side menu - fixed size, always starting below status bar
// 2. side menu - fixed size, always starting below status bar (hack: except in fullscreen)
CGRect sideMenuFrame = viewFrame;
sideMenuFrame.origin.y = origin + statusBarFrame.size.height;
sideMenuFrame.origin.y = origin + (fullscreen ? statusBarFrame.size.height : 0);
sideMenuFrame.size.height -= sideMenuFrame.origin.y;
if (!currentViewDescription.sideMenuEnabled) {
// really hide; -width won't be enough since some animations may use this...