}
-void endoffile_cb(void *ud, unsigned int ev,void * arg){
+void endoffile_cb(void *ud, MSFilter *f, unsigned int ev,void * arg){
Call*call=(Call*)ud;
call->eof=1;
}
}
#endif
+#ifdef VIDEO_ENABLED
+static void video_stream_event_cb(void *user_pointer, const MSFilter *f, const unsigned int event_id, const void *args){
+ ms_warning("In linphonecall.c: video_stream_event_cb");
+ switch (event_id) {
+ case MS_VIDEO_DECODER_DECODING_ERRORS:
+ ms_warning("CAse is MS_VIDEO_DECODER_DECODING_ERRORS");
+ linphone_call_send_vfu_request((LinphoneCall*) user_pointer);
+ break;
+ default:
+ ms_warning("Unhandled event %i", event_id);
+ break;
+ }
+}
+#endif
+
void linphone_call_init_media_streams(LinphoneCall *call){
LinphoneCore *lc=call->core;
SalMediaDescription *md=call->localdesc;
call->videostream=video_stream_new(md->streams[1].port,linphone_core_ipv6_enabled(lc));
if( lc->video_conf.displaytype != NULL)
video_stream_set_display_filter_name(call->videostream,lc->video_conf.displaytype);
+ video_stream_set_event_callback(call->videostream,video_stream_event_cb, call);
#ifdef TEST_EXT_RENDERER
video_stream_set_render_callback(call->videostream,rendercb,NULL);
#endif
**/
void linphone_call_send_vfu_request(LinphoneCall *call)
{
- sal_call_send_vfu_request(call->op);
+ if (LinphoneCallStreamsRunning == linphone_call_get_state(call))
+ sal_call_send_vfu_request(call->op);
}
#endif
* - handles timers and timeout
* - performs registration to proxies
* - authentication retries
- * The application MUST call this function from periodically, in its main loop.
- * Be careful that this function must be call from the same thread as
- * other liblinphone methods. In not the case make sure all liblinphone calls are
+ * The application MUST call this function periodically, in its main loop.
+ * Be careful that this function must be called from the same thread as
+ * other liblinphone methods. If it is not the case make sure all liblinphone calls are
* serialized with a mutex.
**/
void linphone_core_iterate(LinphoneCore *lc){
return lc->sound_conf.local_ring;
}
-static void notify_end_of_ring(void *ud ,unsigned int event, void * arg){
+static void notify_end_of_ring(void *ud, MSFilter *f, unsigned int event, void *arg){
LinphoneCore *lc=(LinphoneCore*)ud;
lc->preview_finished=1;
}
return p->user_data;
}
-static void lsd_player_on_eop(void * userdata, unsigned int id, void *arg){
+static void lsd_player_on_eop(void * userdata, MSFilter *f, unsigned int id, void *arg){
LsdPlayer *p=(LsdPlayer *)userdata;
if (p->eop_cb!=NULL)
p->eop_cb(p);
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";
+ "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
+ "<media_control>"
+ " <vc_primitive>"
+ " <to_encoder>"
+ " <picture_fast_update></picture_fast_update>"
+ " </to_encoder>"
+ " </vc_primitive>"
+ "</media_control>";
char clen[10];
snprintf(clen,sizeof(clen),"%lu",(unsigned long)strlen(info_body));
osip_message_set_content_length(msg,clen);
eXosip_call_send_request(h->did,msg);
+ ms_message("Sending VFU request !");
}
eXosip_unlock();
}
-Subproject commit e3fe3eb2896b03a41b82e0b864f4e56b0666a2e7
+Subproject commit 9499aa102ece0ce8d065dfd89fa182a4151df5c5
-Subproject commit 37c60a638fd108404ca437e2bbef78f227178450
+Subproject commit c8b487f32fe225f8b1961754db9140eb282a0d28