bool_t linphone_call_is_in_conference(const LinphoneCall *call) {
return call->params.in_conference;
}
+
+
+/**
+ * Perform a zoom of the video displayed during a call.
+ * @param zoom_factor a floating point number describing the zoom factor. A value 1.0 corresponds to no zoom applied.
+ * @param cx a floating point number pointing the horizontal center of the zoom to be applied. This value should be between 0.0 and 1.0.
+ * @param cy a floating point number pointing the vertical center of the zoom to be applied. This value should be between 0.0 and 1.0.
+ *
+ * cx and cy are updated in return in case their coordinates were to excentrated for the requested zoom factor. The zoom ensures that all the screen is fullfilled with the video.
+**/
+void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy) {
+ VideoStream* vstream = call->videostream;
+ if (vstream) {
+ float zoom[3];
+
+ if (zoom_factor < 1)
+ zoom_factor = 1;
+ float halfsize = 0.5 * 1.0 / zoom_factor;
+
+ if ((*cx - halfsize) < 0)
+ *cx = 0 + halfsize;
+ if ((*cx + halfsize) > 1)
+ *cx = 1 - halfsize;
+ if ((*cy - halfsize) < 0)
+ *cy = 0 + halfsize;
+ if ((*cy + halfsize) > 1)
+ *cy = 1 - halfsize;
+
+ zoom[0] = zoom_factor;
+ zoom[1] = *cx;
+ zoom[2] = *cy;
+ ms_filter_call_method(vstream->output, MS_VIDEO_DISPLAY_ZOOM, &zoom);
+ }else ms_warning("Could not apply zoom: video output wasn't activated.");
+}
+
params->in_conference=FALSE;
}
-void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy) {
- VideoStream* vstream = call->videostream;
- if (vstream) {
- float zoom[3];
-
- if (zoom_factor < 1)
- zoom_factor = 1;
- float halfsize = 0.5 * 1.0 / zoom_factor;
-
- if ((*cx - halfsize) < 0)
- *cx = 0 + halfsize;
- if ((*cx + halfsize) > 1)
- *cx = 1 - halfsize;
- if ((*cy - halfsize) < 0)
- *cy = 0 + halfsize;
- if ((*cy + halfsize) > 1)
- *cy = 1 - halfsize;
-
- zoom[0] = zoom_factor;
- zoom[1] = *cx;
- zoom[2] = *cy;
- ms_filter_call_method(vstream->output, MS_VIDEO_DISPLAY_ZOOM, &zoom);
- }else ms_warning("Could not apply zoom: video output wasn't activated.");
-}
+
void linphone_core_set_device_identifier(LinphoneCore *lc,const char* device_id) {
if (lc->device_id) ms_free(lc->device_id);
void linphone_call_set_user_pointer(LinphoneCall *call, void *user_pointer);
void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, LinphoneCallCbFunc cb, void* user_data);
LinphoneCallState linphone_call_get_transfer_state(LinphoneCall *call);
+void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
/**
* Return TRUE if this call is currently part of a conference
*@param call #LinphoneCall
*/
LinphoneTunnel *linphone_core_get_tunnel(LinphoneCore *lc);
-void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
-
void linphone_core_set_sip_dscp(LinphoneCore *lc, int dscp);
int linphone_core_get_sip_dscp(const LinphoneCore *lc);