mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
CallStats: display encryption properly
This commit is contained in:
parent
68d21e6cbd
commit
14b2c92346
3 changed files with 19 additions and 5 deletions
|
|
@ -68,6 +68,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
+ (NSString *)mediaEncryptionToString:(LinphoneMediaEncryption)enc {
|
||||
switch (enc) {
|
||||
case LinphoneMediaEncryptionDTLS:
|
||||
return @"DTLS";
|
||||
case LinphoneMediaEncryptionSRTP:
|
||||
return @"SRTP";
|
||||
case LinphoneMediaEncryptionZRTP:
|
||||
return @"ZRTP";
|
||||
case LinphoneMediaEncryptionNone:
|
||||
break;
|
||||
}
|
||||
return NSLocalizedString(@"None", nil);
|
||||
}
|
||||
|
||||
- (NSString *)updateStatsForCall:(LinphoneCall *)call stream:(LinphoneStreamType)stream {
|
||||
NSMutableString *result = [[NSMutableString alloc] init];
|
||||
const PayloadType *payload = NULL;
|
||||
|
|
@ -161,7 +175,7 @@
|
|||
LinphoneMediaEncryption enc = linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
|
||||
if (enc != LinphoneMediaEncryptionNone) {
|
||||
[stats appendString:[NSString
|
||||
stringWithFormat:@"Call encrypted using %s", linphone_media_encryption_to_string(enc)]];
|
||||
stringWithFormat:@"Call encrypted using %@", [self.class mediaEncryptionToString:enc]]];
|
||||
}
|
||||
|
||||
[stats appendString:[self updateStatsForCall:call stream:LinphoneStreamTypeAudio]];
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@
|
|||
<rect key="frame" x="0.0" y="42" width="375" height="625"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" alpha="0.69999999999999973" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" id="ZYY-EM-M2s" userLabel="statsLabel">
|
||||
<label opaque="NO" userInteractionEnabled="NO" alpha="0.69999999999999973" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" id="ZYY-EM-M2s" userLabel="statsLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="300" height="625"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<string key="text">Audio: upr
|
||||
Video: down</string>
|
||||
|
|
|
|||
|
|
@ -575,9 +575,9 @@
|
|||
statusBarFrame.origin.y = origin - statusBarFrame.size.height;
|
||||
}
|
||||
|
||||
// 2. side menu - fixed size, always starting below status bar (hack: gexcept in fullscreen)
|
||||
// 2. side menu - fixed size, always starting below status bar (hack: except in fullscreen)
|
||||
CGRect sideMenuFrame = viewFrame;
|
||||
sideMenuFrame.origin.y = origin + (fullscreen ? statusBarFrame.size.height : 0);
|
||||
sideMenuFrame.origin.y = origin + (currentViewDescription.fullscreen ? 0 : statusBarFrame.size.height);
|
||||
sideMenuFrame.size.height -= sideMenuFrame.origin.y;
|
||||
if (!currentViewDescription.sideMenuEnabled) {
|
||||
// really hide; -width won't be enough since some animations may use this...
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue