Call: use linphone_core_sound_resources_locked instead of linphone_call_media_in_progress

This commit is contained in:
Gautier Pelloux-Prayer 2016-02-25 14:46:47 +01:00
parent 88fbda8b98
commit 87d54bae22
4 changed files with 5 additions and 5 deletions

View file

@ -256,8 +256,8 @@ static void hideSpinner(LinphoneCall *call, void *user_data) {
[_videoButton update];
[_hangupButton update];
_optionsButton.enabled = (!call || !linphone_call_media_in_progress(call));
_optionsTransferButton.enabled = call && !linphone_call_media_in_progress(call);
_optionsButton.enabled = (!call || !linphone_core_sound_resources_locked(LC));
_optionsTransferButton.enabled = call && !linphone_core_sound_resources_locked(LC);
// enable conference button if 2 calls are presents and at least one is not in the conference
int confSize = linphone_core_get_conference_size(LC) - (linphone_core_is_in_conference(LC) ? 1 : 0);
_optionsConferenceButton.enabled =

View file

@ -152,7 +152,7 @@
if (c != nil) {
LinphoneCallState state = linphone_call_get_state(c);
ret = (state == LinphoneCallPaused || state == LinphoneCallPausing);
self.enabled = !linphone_call_media_in_progress(c) &&
self.enabled = !linphone_core_sound_resources_locked(LC) &&
(state == LinphoneCallPaused || state == LinphoneCallPausing ||
state == LinphoneCallStreamsRunning);
} else {

View file

@ -77,7 +77,7 @@ INIT_WITH_COMMON_CF {
bool video_enabled = false;
LinphoneCall *currentCall = linphone_core_get_current_call(LC);
if (linphone_core_video_supported(LC)) {
if (linphone_core_video_display_enabled(LC) && currentCall && !linphone_call_media_in_progress(currentCall) &&
if (linphone_core_video_display_enabled(LC) && currentCall && !linphone_core_sound_resources_locked(LC) &&
linphone_call_get_state(currentCall) == LinphoneCallStreamsRunning) {
video_enabled = TRUE;
}

@ -1 +1 @@
Subproject commit f734477ce43e19e492b4650965b4c286fc19523e
Subproject commit 07d92908ca10bb934cb12ff153c8e79c501e3826