how to change a Audio Codec Priority based on bandwidth of High, medium and Low?
I want to change the priority of audio Codecs based on bandwidth like high,low medium. we are using priority of codecs based on selection of bandwidth.
I have an array of audio codec which i want to display in table.
For this I am comparing my codecs got from to System Codecs which is Supported By linphone.
for (int i = (int)codecsList.count-1; i >=0; i--) {
NSString *strCodec = codecsList[i];
//Compare mime type from API codec to system codec
bctbx_list_t *codec = bctbx_list_find_custom(dataArray, (bctbx_compare_func)comp_mime_type, [strCodec UTF8String]);
After comparing this codes, I want an array of codes which is matched and I want to set array in linphone_core_set_audio_codecs() So when i get a Codes from linphone_core_set_audio_codecs(), i will get a list of matched Codecs.so Can you please tell me how to get a array of new matched Array of priotirised Array.
if (codec != nil) {
PayloadType *pt = (PayloadType *)codec->data;
NSString *strMimeType = [NSString stringWithFormat:@"%s", pt->mime_type];
if ([strMimeType isEqualToString:strCodec]) {
linphone_core_enable_payload_type(LC, pt, true);
//Remove short lisdet codec from dataArray before append data in dataArray
dataArray = bctbx_list_remove(dataArray, pt);
dataArray = bctbx_list_prepend(dataArray, pt);
}
}
linphone_core_set_audio_codecs(LC, dataArray);
}