Commit f71aad55 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Declare variables at the beginning of code blocks to fix compilation errors.

parent d474f9dd
...@@ -2838,10 +2838,13 @@ int linphone_core_start_update_call(LinphoneCore *lc, LinphoneCall *call){ ...@@ -2838,10 +2838,13 @@ int linphone_core_start_update_call(LinphoneCore *lc, LinphoneCall *call){
**/ **/
int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
int err=0; int err=0;
#ifdef VIDEO_ENABLED
bool_t has_video = FALSE;
#endif
if (params!=NULL){ if (params!=NULL){
linphone_call_set_state(call,LinphoneCallUpdating,"Updating call"); linphone_call_set_state(call,LinphoneCallUpdating,"Updating call");
#ifdef VIDEO_ENABLED #ifdef VIDEO_ENABLED
bool_t has_video = call->params.has_video; has_video = call->params.has_video;
// Video removing // Video removing
if((call->videostream != NULL) && !params->has_video) { if((call->videostream != NULL) && !params->has_video) {
...@@ -4677,9 +4680,9 @@ unsigned long linphone_core_get_native_preview_window_id(const LinphoneCore *lc) ...@@ -4677,9 +4680,9 @@ unsigned long linphone_core_get_native_preview_window_id(const LinphoneCore *lc)
* If not set the core will create its own window. * If not set the core will create its own window.
**/ **/
void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long id){ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long id){
lc->preview_window_id=id;
#ifdef VIDEO_ENABLED #ifdef VIDEO_ENABLED
LinphoneCall *call=linphone_core_get_current_call(lc); LinphoneCall *call=linphone_core_get_current_call(lc);
lc->preview_window_id=id;
if (call!=NULL && call->videostream){ if (call!=NULL && call->videostream){
video_stream_set_native_preview_window_id(call->videostream,id); video_stream_set_native_preview_window_id(call->videostream,id);
}else if (lc->previewstream){ }else if (lc->previewstream){
...@@ -4693,8 +4696,8 @@ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long ...@@ -4693,8 +4696,8 @@ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long
**/ **/
void linphone_core_show_video(LinphoneCore *lc, bool_t show){ void linphone_core_show_video(LinphoneCore *lc, bool_t show){
#ifdef VIDEO_ENABLED #ifdef VIDEO_ENABLED
ms_error("linphone_core_show_video %d", show);
LinphoneCall *call=linphone_core_get_current_call(lc); LinphoneCall *call=linphone_core_get_current_call(lc);
ms_error("linphone_core_show_video %d", show);
if (call!=NULL && call->videostream){ if (call!=NULL && call->videostream){
video_stream_show_video(call->videostream,show); video_stream_show_video(call->videostream,show);
} }
...@@ -4730,10 +4733,12 @@ void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation) { ...@@ -4730,10 +4733,12 @@ void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation) {
ms_message("%s : rotation=%d\n", __FUNCTION__, rotation); ms_message("%s : rotation=%d\n", __FUNCTION__, rotation);
lc->device_rotation = rotation; lc->device_rotation = rotation;
#ifdef VIDEO_ENABLED #ifdef VIDEO_ENABLED
{
LinphoneCall *call=linphone_core_get_current_call(lc); LinphoneCall *call=linphone_core_get_current_call(lc);
if (call!=NULL && call->videostream){ if (call!=NULL && call->videostream){
video_stream_set_device_rotation(call->videostream,rotation); video_stream_set_device_rotation(call->videostream,rotation);
} }
}
#endif #endif
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment