]> sjero.net Git - linphone/commitdiff
Merge branch 'master' of git.savannah.nongnu.org:/srv/git/linphone
authorJehan Monnier <jehan.monnier@linphone.org>
Mon, 24 Jan 2011 09:42:48 +0000 (10:42 +0100)
committerJehan Monnier <jehan.monnier@linphone.org>
Mon, 24 Jan 2011 09:42:48 +0000 (10:42 +0100)
Conflicts:
coreapi/linphonecall.c
mediastreamer2

console/sipomatic.c
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/lsd.c
coreapi/sal_eXosip2.c

index 9e053b24bbe07f859994b4408f7ac56149dea416..e0d3f67e7c6aa8dea158dde04862c71f1db1c93e 100644 (file)
@@ -66,7 +66,7 @@ void sipomatic_process_event(Sipomatic *obj,eXosip_event_t *ev)
 }
 
 
-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;
 }
index 7254e94ac47b3575720eee1a22be3f2380929be7..cea826a25aacfdb285ce3f6e9418d5125679cb5b 100644 (file)
@@ -572,6 +572,20 @@ static void rendercb(void *data, const MSPicture *local, const MSPicture *remote
 }
 #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;
@@ -607,6 +621,7 @@ void linphone_call_init_media_streams(LinphoneCall *call){
                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
@@ -974,7 +989,8 @@ void linphone_call_stop_media_streams(LinphoneCall *call){
 **/
 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
 
index 9e0c56b1d7e33badb86ee41f642750f370a8a0d2..f150ca344502e7b6c67e18c868ee403272212956 100644 (file)
@@ -954,8 +954,8 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
        linphone_core_assign_payload_type(&payload_type_h263_1998,98,"CIF=1;QCIF=1");
        linphone_core_assign_payload_type(&payload_type_mp4v,99,"profile-level-id=3");
        linphone_core_assign_payload_type(&payload_type_x_snow,100,NULL);
-       linphone_core_assign_payload_type(&payload_type_h264,102,NULL);
-       linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1");
+       linphone_core_assign_payload_type(&payload_type_h264,102,"profile-level-id=428014");
+       linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1;profile-level-id=428014");
 #endif
 
        ms_init();
@@ -1616,9 +1616,9 @@ static void linphone_core_do_plugin_tasks(LinphoneCore *lc){
  * - 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){
@@ -2849,7 +2849,7 @@ const char *linphone_core_get_ring(const 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;
 }
index 3772c89116fa1a33c8d07bd39fd787191b54ca86..1ad7c7db452f21e25ad22d2a381e622cfec61a1a 100644 (file)
@@ -156,7 +156,7 @@ void *lsd_player_get_user_pointer(const LsdPlayer *p){
        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);
index 356b7dca269298ef4eb922d5b90a40af05911b97..4203cb85e900990dc139309991277a7430f33275 100644 (file)
@@ -1241,14 +1241,14 @@ static bool_t call_failure(Sal *sal, eXosip_event_t *ev){
 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];
 
@@ -1260,6 +1260,7 @@ void sal_call_send_vfu_request(SalOp *h){
                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();
 }