forked from mirrors/linphone-iphone
Add audio codec bitrate limit setting.
This commit is contained in:
parent
f582f2e833
commit
41eb3ae955
7 changed files with 87 additions and 6 deletions
|
|
@ -184,6 +184,17 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
[self transformCodecsToKeys: linphone_core_get_audio_codecs(lc)];
|
||||
[self transformCodecsToKeys: linphone_core_get_video_codecs(lc)];
|
||||
[self setBool:linphone_core_adaptive_rate_control_enabled(lc) forKey:@"adaptive_rate_control_preference"];
|
||||
LpConfig *config = linphone_core_get_config(lc);
|
||||
[self setInteger:lp_config_get_int(config, "audio", "codec_bitrate_limit", 32) forKey:@"audio_codec_bitrate_limit_preference"];
|
||||
|
||||
PayloadType *pt;
|
||||
const MSList *elem;
|
||||
for (elem=linphone_core_get_audio_codecs(lc);elem!=NULL;elem=elem->next){
|
||||
pt=(PayloadType*)elem->data;
|
||||
if ((strcmp(pt->mime_type, "opus") == 0) || (strcmp(pt->mime_type, "mpeg4-generic") == 0)) {
|
||||
pt->normal_bitrate = [self integerForKey:@"audio_codec_bitrate_limit_preference"] * 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -487,6 +498,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
pt=(PayloadType*)elem->data;
|
||||
NSString *pref=[LinphoneManager getPreferenceForCodec:pt->mime_type withRate:pt->clock_rate];
|
||||
linphone_core_enable_payload_type(lc,pt,[self boolForKey: pref]);
|
||||
if ((strcmp(pt->mime_type, "opus") == 0) || (strcmp(pt->mime_type, "mpeg4-generic") == 0)) {
|
||||
pt->normal_bitrate = [self integerForKey:@"audio_codec_bitrate_limit_preference"] * 1000;
|
||||
}
|
||||
}
|
||||
for (elem=linphone_core_get_video_codecs(lc);elem!=NULL;elem=elem->next){
|
||||
pt=(PayloadType*)elem->data;
|
||||
|
|
@ -494,6 +508,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
linphone_core_enable_payload_type(lc,pt,[self boolForKey: pref]);
|
||||
}
|
||||
|
||||
LpConfig *config = linphone_core_get_config(lc);
|
||||
lp_config_set_int(config, "audio", "codec_bitrate_limit", [self integerForKey:@"audio_codec_bitrate_limit_preference"]);
|
||||
linphone_core_enable_adaptive_rate_control(lc, [self boolForKey:@"adaptive_rate_control_preference"]);
|
||||
|
||||
linphone_core_set_use_info_for_dtmf(lc, [self boolForKey:@"sipinfo_dtmf_preference"]);
|
||||
|
|
|
|||
|
|
@ -198,6 +198,34 @@
|
|||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<integer>32</integer>
|
||||
<key>Key</key>
|
||||
<string>audio_codec_bitrate_limit_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Codec bitrate limit</string>
|
||||
<key>Titles</key>
|
||||
<array>
|
||||
<string>10 kbits/s</string>
|
||||
<string>15 kbits/s</string>
|
||||
<string>20 kbits/s</string>
|
||||
<string>32 kbits/s</string>
|
||||
<string>64 kbits/s</string>
|
||||
<string>128 kbits/s</string>
|
||||
</array>
|
||||
<key>Type</key>
|
||||
<string>PSMultiValueSpecifier</string>
|
||||
<key>Values</key>
|
||||
<array>
|
||||
<integer>10</integer>
|
||||
<integer>15</integer>
|
||||
<integer>20</integer>
|
||||
<integer>32</integer>
|
||||
<integer>64</integer>
|
||||
<integer>128</integer>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -44,4 +44,7 @@
|
|||
"Microphone gain" = "Microphone gain";
|
||||
|
||||
/* Adaptive rate control */
|
||||
"Adaptive rate control" = "Adaptive rate control";
|
||||
"Adaptive rate control" = "Adaptive rate control";
|
||||
|
||||
/* Codec bitrate limit */
|
||||
"Codec bitrate limit" = "Codec bitrate limit";
|
||||
|
|
|
|||
|
|
@ -44,4 +44,7 @@
|
|||
"Microphone gain" = "Gain microphone";
|
||||
|
||||
/* Adaptive rate control */
|
||||
"Adaptive rate control" = "Contrôle de débit";
|
||||
"Adaptive rate control" = "Contrôle de débit";
|
||||
|
||||
/* Codec bitrate limit */
|
||||
"Codec bitrate limit" = "Limite de débit du codec";
|
||||
|
|
|
|||
|
|
@ -44,4 +44,7 @@
|
|||
"Microphone gain" = "Усиление микрофона";
|
||||
|
||||
/* Adaptive rate control */
|
||||
"Adaptive rate control" = "Adaptive rate control";
|
||||
"Adaptive rate control" = "Adaptive rate control";
|
||||
|
||||
/* Codec bitrate limit */
|
||||
"Codec bitrate limit" = "Codec bitrate limit";
|
||||
|
|
|
|||
|
|
@ -17902,7 +17902,7 @@ Raison: %2$s</string>
|
|||
</dict>
|
||||
</dict>
|
||||
<key>change date</key>
|
||||
<date>2013-06-26T10:38:34Z</date>
|
||||
<date>2013-06-28T12:59:59Z</date>
|
||||
<key>changed values</key>
|
||||
<array/>
|
||||
<key>class</key>
|
||||
|
|
@ -17912,7 +17912,7 @@ Raison: %2$s</string>
|
|||
<key>flags</key>
|
||||
<integer>0</integer>
|
||||
<key>hash</key>
|
||||
<string>3d30b341d7d52a2764e5683a2ca348c1
|
||||
<string>a03adeb7710ae8986354684bdcd69764
|
||||
</string>
|
||||
<key>name</key>
|
||||
<string>Audio.strings</string>
|
||||
|
|
@ -18304,6 +18304,31 @@ Raison: %2$s</string>
|
|||
<key>snapshots</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>change date</key>
|
||||
<date>2001-01-01T00:00:00Z</date>
|
||||
<key>changed values</key>
|
||||
<array/>
|
||||
<key>class</key>
|
||||
<string>BLStringKeyObject</string>
|
||||
<key>comment</key>
|
||||
<string>Codec bitrate limit</string>
|
||||
<key>errors</key>
|
||||
<array/>
|
||||
<key>flags</key>
|
||||
<integer>0</integer>
|
||||
<key>key</key>
|
||||
<string>Codec bitrate limit</string>
|
||||
<key>localizations</key>
|
||||
<dict>
|
||||
<key>en</key>
|
||||
<string>Codec bitrate limit</string>
|
||||
<key>fr</key>
|
||||
<string>Limite de débit du codec</string>
|
||||
</dict>
|
||||
<key>snapshots</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>old objects</key>
|
||||
<array/>
|
||||
|
|
|
|||
|
|
@ -44,4 +44,7 @@
|
|||
"Microphone gain" = "Microphone gain";
|
||||
|
||||
/* Adaptive rate control */
|
||||
"Adaptive rate control" = "Adaptive rate control";
|
||||
"Adaptive rate control" = "Adaptive rate control";
|
||||
|
||||
/* Codec bitrate limit */
|
||||
"Codec bitrate limit" = "Codec bitrate limit";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue