From f247f395d2c6383629c67200b359d869a4bbbba9 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 11 Jan 2013 16:03:01 +0100 Subject: [PATCH] Add message to tell to compile from sources to enable H.264 and mpeg4. --- Classes/LinphoneManager.m | 2 +- Classes/SettingsViewController.m | 36 +++++++++++++++--- Resources/en.lproj/Localizable.strings | Bin 18562 -> 18812 bytes Resources/fr.lproj/Localizable.strings | Bin 19158 -> 19412 bytes linphone.ldb/Contents.plist | 29 +++++++++++++- .../Localizable/1/Localizable.strings | Bin 18562 -> 18812 bytes 6 files changed, 58 insertions(+), 9 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 409fa0da3..da4810c84 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -875,7 +875,7 @@ static LinphoneCoreVTable linphonec_vtable = { linphone_core_enable_video(theLinphoneCore, FALSE, FALSE); } - // Disable H26 + // Disable H264 { PayloadType *pt=linphone_core_find_payload_type(theLinphoneCore,"h264",90000,-1); if (pt) { diff --git a/Classes/SettingsViewController.m b/Classes/SettingsViewController.m index c190d1e7d..f8b7ecdbf 100644 --- a/Classes/SettingsViewController.m +++ b/Classes/SettingsViewController.m @@ -27,6 +27,7 @@ #import "IASKSpecifierValuesViewController.h" #import "IASKPSTextFieldSpecifierViewCell.h" +#import "IASKPSTitleValueSpecifierViewCell.h" #import "IASKSpecifier.h" #import "IASKTextField.h" #include "lpconfig.h" @@ -256,8 +257,12 @@ UITextField *field = ((IASKPSTextFieldSpecifierViewCell*)cell).textField; [field setTextColor:LINPHONE_MAIN_COLOR]; } - - cell.detailTextLabel.textColor = LINPHONE_MAIN_COLOR; + + if([cell isKindOfClass:[IASKPSTitleValueSpecifierViewCell class]]) { + cell.detailTextLabel.textColor = [UIColor grayColor]; + } else { + cell.detailTextLabel.textColor = LINPHONE_MAIN_COLOR; + } // Background View UACellBackgroundView *selectedBackgroundView = [[[UACellBackgroundView alloc] initWithFrame:CGRectZero] autorelease]; @@ -535,6 +540,18 @@ static UICompositeViewDescription *compositeDescription = nil; #pragma mark - ++ (IASKSpecifier*)disableCodecSpecifier:(IASKSpecifier *)specifier { + NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary:[specifier specifierDict]]; + NSMutableString *type = [NSMutableString stringWithString:[dict objectForKey:@"Type"]]; + [type setString:@"PSTitleValueSpecifier"]; + [dict setObject:type forKey:@"Type"]; + NSMutableArray *values = [NSMutableArray arrayWithObject:[NSNumber numberWithInt:0]]; + [dict setObject:values forKey:@"Values"]; + NSMutableArray *titles = [NSMutableArray arrayWithObject:NSLocalizedString(@"Disabled, build from sources to enable", nil)]; + [dict setObject:titles forKey:@"Titles"]; + return [[[IASKSpecifier alloc] initWithSpecifier:dict] autorelease]; +} + + (IASKSpecifier*)filterSpecifier:(IASKSpecifier *)specifier { #ifndef HAVE_SSL if ([[specifier key] isEqualToString:@"transport_preference"]) { @@ -559,6 +576,17 @@ static UICompositeViewDescription *compositeDescription = nil; return [[[IASKSpecifier alloc] initWithSpecifier:dict] autorelease]; } #endif //HAVE_SSL + + // Disable H264 + if ([[specifier key] isEqualToString:@"h264_preference"]) { + return [SettingsViewController disableCodecSpecifier:specifier]; + } + + // Disable MPEG4 + if ([[specifier key] isEqualToString:@"mp4v-es_preference"]) { + return [SettingsViewController disableCodecSpecifier:specifier]; + } + return specifier; } @@ -587,10 +615,6 @@ static UICompositeViewDescription *compositeDescription = nil; [hiddenKeys addObject:@"wifi_only_preference"]; - // Disable H264 and MPEG4 - [hiddenKeys addObject:@"h264_preference"]; - [hiddenKeys addObject:@"mp4v-es_preference"]; - [hiddenKeys addObject:@"quit_button"]; // Hide for the moment [hiddenKeys addObject:@"about_button"]; // Hide for the moment diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 784e448609bd1dba7d86e2cba65e3b86cadd2149..dac8513d682fdbad3595988dd0209d7e04288860 100644 GIT binary patch delta 152 zcmZpg$oOXx;|3XV+eC&Wh8%`eh7<-J1_dCylpzzyPXV&i7>XG38FGQFVjx`#;lnHGiBh07C change date - 2012-12-06T16:35:25Z + 2013-01-11T15:09:49Z changed values class @@ -12185,7 +12185,7 @@ flags 0 hash - 5d8dda6d0a22dfa9f07da63202a55cbb + 5b7da78da9a514075624ab4a96e0447b name Localizable.strings @@ -13044,6 +13044,31 @@ La cause était: %2$@ snapshots + + change date + 2001-01-01T00:00:00Z + changed values + + class + BLStringKeyObject + comment + No comment provided by engineer. + errors + + flags + 0 + key + Disabled, build from sources to enable + localizations + + en + Disabled, build from sources to enable + fr + Compiler depuis les sources pour activer + + snapshots + + change date 2001-01-01T00:00:00Z diff --git a/linphone.ldb/Resources/Resources/Localizable/1/Localizable.strings b/linphone.ldb/Resources/Resources/Localizable/1/Localizable.strings index 784e448609bd1dba7d86e2cba65e3b86cadd2149..dac8513d682fdbad3595988dd0209d7e04288860 100644 GIT binary patch delta 152 zcmZpg$oOXx;|3XV+eC&Wh8%`eh7<-J1_dCylpzzyPXV&i7>XG38FGQFVjx`#