mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix bug with speex codecs never disabled
add ilbc
This commit is contained in:
parent
e2ffaafc70
commit
10e57bd34a
4 changed files with 50 additions and 28 deletions
|
|
@ -120,7 +120,7 @@
|
|||
// Set up the cell...
|
||||
LinphoneAddress* partyToDisplay;
|
||||
const MSList * logs = linphone_core_get_call_logs(myLinphoneCore);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, ms_list_size(logs)-indexPath.row-1) ;
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
|
||||
|
||||
NSString *path;
|
||||
if (callLogs->dir == LinphoneCallIncoming) {
|
||||
|
|
@ -160,7 +160,7 @@
|
|||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
|
||||
const MSList * logs = linphone_core_get_call_logs(myLinphoneCore);
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, ms_list_size(logs)-indexPath.row-1) ;
|
||||
LinphoneCallLog* callLogs = ms_list_nth_data(logs, indexPath.row) ;
|
||||
LinphoneAddress* partyToCall;
|
||||
if (callLogs->dir == LinphoneCallIncoming) {
|
||||
partyToCall=callLogs->from;
|
||||
|
|
|
|||
|
|
@ -187,6 +187,8 @@ LinphoneCoreVTable linphonec_vtable = {
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
extern void libmsilbc_init();
|
||||
|
||||
/*************
|
||||
*lib linphone init method
|
||||
*/
|
||||
|
|
@ -226,6 +228,7 @@ LinphoneCoreVTable linphonec_vtable = {
|
|||
|
||||
//register audio queue sound card
|
||||
ms_au_register_card();
|
||||
libmsilbc_init();
|
||||
|
||||
/*
|
||||
* Initialize linphone core
|
||||
|
|
@ -319,8 +322,14 @@ LinphoneCoreVTable linphonec_vtable = {
|
|||
PayloadType *pt;
|
||||
//get codecs from linphonerc
|
||||
const MSList *audioCodecs=linphone_core_get_audio_codecs(myLinphoneCore);
|
||||
const MSList *elem;
|
||||
//disable all codecs
|
||||
for (elem=audioCodecs;elem!=NULL;elem=elem->next){
|
||||
pt=(PayloadType*)elem->data;
|
||||
linphone_core_enable_payload_type(myLinphoneCore,pt,FALSE);
|
||||
}
|
||||
|
||||
//read from setting bundle
|
||||
//read codecs from setting bundle and enable them one by one
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"speex_32k_preference"]) {
|
||||
if(pt = [self findPayload:@"speex"withRate:32000 from:audioCodecs]) {
|
||||
linphone_core_enable_payload_type(myLinphoneCore,pt, TRUE);
|
||||
|
|
@ -351,6 +360,11 @@ LinphoneCoreVTable linphonec_vtable = {
|
|||
linphone_core_enable_payload_type(myLinphoneCore,pt, TRUE);
|
||||
}
|
||||
}
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"ilbc_preference"]) {
|
||||
if(pt = [self findPayload:@"iLBC"withRate:8000 from:audioCodecs]) {
|
||||
linphone_core_enable_payload_type(myLinphoneCore,pt, TRUE);
|
||||
}
|
||||
}
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"pcmu_preference"]) {
|
||||
if(pt = [self findPayload:@"PCMU"withRate:8000 from:audioCodecs]) {
|
||||
linphone_core_enable_payload_type(myLinphoneCore,pt, TRUE);
|
||||
|
|
|
|||
|
|
@ -91,17 +91,6 @@
|
|||
<string>Codecs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>TrueValue</key>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 8Khz</string>
|
||||
<key>Key</key>
|
||||
<string>speex_8k_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
|
|
@ -112,17 +101,6 @@
|
|||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>TrueValue</key>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>Speex 8Khz</string>
|
||||
<key>Key</key>
|
||||
<string>speex_8k_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
|
|
@ -142,6 +120,16 @@
|
|||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>ILBC</string>
|
||||
<key>Key</key>
|
||||
<string>ilbc_preference</string>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
220FAD3810765B400068D98F /* libspeex.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD2F10765B400068D98F /* libspeex.a */; };
|
||||
220FAD3910765B400068D98F /* libspeexdsp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 220FAD3010765B400068D98F /* libspeexdsp.a */; };
|
||||
220FAE4B10767A6A0068D98F /* PhoneMainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 220FAE4A10767A6A0068D98F /* PhoneMainView.xib */; };
|
||||
223148E41178A08200637D6A /* libilbc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 223148E31178A08200637D6A /* libilbc.a */; };
|
||||
223148E61178A09900637D6A /* libmsilbc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 223148E51178A09900637D6A /* libmsilbc.a */; };
|
||||
2237D4091084D7A9001383EE /* oldphone-mono.wav in Resources */ = {isa = PBXBuildFile; fileRef = 2237D4081084D7A9001383EE /* oldphone-mono.wav */; };
|
||||
2242D91610D66BF300E9963F /* in_call.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91410D66BF300E9963F /* in_call.png */; };
|
||||
2242D91710D66BF300E9963F /* out_call.png in Resources */ = {isa = PBXBuildFile; fileRef = 2242D91510D66BF300E9963F /* out_call.png */; };
|
||||
|
|
@ -180,6 +182,8 @@
|
|||
220FAD2F10765B400068D98F /* libspeex.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libspeex.a; path = "../liblinphone-sdk/apple-darwin/lib/libspeex.a"; sourceTree = SOURCE_ROOT; };
|
||||
220FAD3010765B400068D98F /* libspeexdsp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libspeexdsp.a; path = "../liblinphone-sdk/apple-darwin/lib/libspeexdsp.a"; sourceTree = SOURCE_ROOT; };
|
||||
220FAE4A10767A6A0068D98F /* PhoneMainView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhoneMainView.xib; sourceTree = "<group>"; };
|
||||
223148E31178A08200637D6A /* libilbc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libilbc.a; path = "../liblinphone-sdk/apple-darwin/lib/libilbc.a"; sourceTree = SOURCE_ROOT; };
|
||||
223148E51178A09900637D6A /* libmsilbc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsilbc.a; path = "../liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsilbc.a"; sourceTree = SOURCE_ROOT; };
|
||||
2237D4081084D7A9001383EE /* oldphone-mono.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = "oldphone-mono.wav"; path = "../liblinphone-sdk/apple-darwin/share/sounds/linphone/rings/oldphone-mono.wav"; sourceTree = "<group>"; };
|
||||
2242D91410D66BF300E9963F /* in_call.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = in_call.png; path = Resources/in_call.png; sourceTree = "<group>"; };
|
||||
2242D91510D66BF300E9963F /* out_call.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = out_call.png; path = Resources/out_call.png; sourceTree = "<group>"; };
|
||||
|
|
@ -250,6 +254,8 @@
|
|||
22B5EFA310CE50BD00777D97 /* AddressBookUI.framework in Frameworks */,
|
||||
22B5F03510CE6B2F00777D97 /* AddressBook.framework in Frameworks */,
|
||||
2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */,
|
||||
223148E41178A08200637D6A /* libilbc.a in Frameworks */,
|
||||
223148E61178A09900637D6A /* libmsilbc.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -479,6 +485,8 @@
|
|||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
223148E51178A09900637D6A /* libmsilbc.a */,
|
||||
223148E31178A08200637D6A /* libilbc.a */,
|
||||
2273785D10A3703300526073 /* libmsiounit.a */,
|
||||
220FAD2810765B400068D98F /* libeXosip2.a */,
|
||||
220FAD2910765B400068D98F /* libgsm.a */,
|
||||
|
|
@ -649,7 +657,11 @@
|
|||
GCC_PREFIX_HEADER = linphone_Prefix.pch;
|
||||
HEADER_SEARCH_PATHS = "../liblinphone-sdk/apple-darwin/include/**";
|
||||
INFOPLIST_FILE = "linphone-Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = "../liblinphone-sdk/apple-darwin/lib/**";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"../liblinphone-sdk/apple-darwin/lib/**",
|
||||
"\"$(SRCROOT)/../liblinphone-sdk/apple-darwin/lib\"",
|
||||
"\"$(SRCROOT)/../liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"",
|
||||
);
|
||||
PRODUCT_NAME = linphone;
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
SDKROOT = iphoneos3.0;
|
||||
|
|
@ -666,7 +678,11 @@
|
|||
GCC_PREFIX_HEADER = linphone_Prefix.pch;
|
||||
HEADER_SEARCH_PATHS = "../liblinphone-sdk/apple-darwin/include/**";
|
||||
INFOPLIST_FILE = "linphone-Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = "../liblinphone-sdk/apple-darwin/lib/**";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"../liblinphone-sdk/apple-darwin/lib/**",
|
||||
"\"$(SRCROOT)/../liblinphone-sdk/apple-darwin/lib\"",
|
||||
"\"$(SRCROOT)/../liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"",
|
||||
);
|
||||
PRODUCT_NAME = linphone;
|
||||
};
|
||||
name = Release;
|
||||
|
|
@ -701,7 +717,11 @@
|
|||
GCC_PREFIX_HEADER = linphone_Prefix.pch;
|
||||
HEADER_SEARCH_PATHS = "../liblinphone-sdk/apple-darwin/include/**";
|
||||
INFOPLIST_FILE = "linphone-Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = "../liblinphone-sdk/apple-darwin/lib/**";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"../liblinphone-sdk/apple-darwin/lib/**",
|
||||
"\"$(SRCROOT)/../liblinphone-sdk/apple-darwin/lib\"",
|
||||
"\"$(SRCROOT)/../liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins\"",
|
||||
);
|
||||
PRODUCT_NAME = linphone;
|
||||
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
|
||||
SDKROOT = iphoneos3.0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue