{ "snapshot", lpc_cmd_snapshot, "Take a snapshot of currently received video stream",
"'snapshot <file path>': take a snapshot and records it in jpeg format into the supplied path\n"
},
+ { "vfureq", lpc_cmd_vfureq, "Request the other side to send VFU for the current call"},
#endif
{ "states", lpc_cmd_states, "Show internal states of liblinphone, registrations and calls, according to linphonecore.h definitions",
"'states global': shows global state of liblinphone \n"
if (!args) return 0;
call=linphone_core_get_current_call(lc);
if (call!=NULL){
- linphone_call_take_video_snapshot (call,args);
- linphonec_out("Taking video snaphot in file %s\n", args);
+ linphone_call_take_video_snapshot(call,args);
+ linphonec_out("Taking video snapshot in file %s\n", args);
}else linphonec_out("There is no active call.\n");
return 1;
}
+static int lpc_cmd_vfureq(LinphoneCore *lc){
+ LinphoneCall *call;
+ call=linphone_core_get_current_call(lc);
+ if (call!=NULL){
+ linphone_call_send_vfu_request(call);
+ linphonec_out("VFU request sent\n");
+ }else linphonec_out("There is no active call.\n");
+ return 1;
+}
#endif
static int lpc_cmd_identify(LinphoneCore *lc, char *args){
}
}
+/**
+ * Request remote side to send us VFU.
+**/
+void linphone_call_send_vfu_request(LinphoneCall *call)
+{
+ LinphoneCall *call=linphone_core_get_current_call(lc);
+ sal_call_send_vfu_request(call->op);
+}
int sal_call_send_dtmf(SalOp *h, char dtmf);
int sal_call_terminate(SalOp *h);
bool_t sal_call_autoanswer_asked(SalOp *op);
+void sal_call_send_vfu_request(SalOp *h);
/*Registration*/
int sal_register(SalOp *op, const char *proxy, const char *from, int expires);
return TRUE;
}
+/* Request remote side to send us VFU */
+static void sal_call_send_vfu_request(SalOp *h){
+ osip_message_t *msg=NULL;
+ char info_body[] =
+ "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n"
+ "<media_control>\n"
+ " <vc_primitive>\n"
+ " <to_encoder>\n"
+ " <picture_fast_update/>\n"
+ " </to_encoder>\n"
+ " </vc_primitive>\n"
+ "</media_control>\n";
+
+ char clen[10];
+
+ eXosip_lock();
+ eXosip_call_build_info(h->did,&msg);
+ if (msg){
+ osip_message_set_body(msg,info_body,strlen(info_body));
+ osip_message_set_content_type(msg,"application/media_control+xml");
+ snprintf(clen,sizeof(clen),"%lu",(unsigned long)strlen(info_body));
+ osip_message_set_content_length(msg,clen);
+ eXosip_call_send_request(h->did,msg);
+ }
+ eXosip_unlock();
+ return 0;
+}
static void process_media_control_xml(Sal *sal, eXosip_event_t *ev){
SalOp *op=find_op(sal,ev);