]> sjero.net Git - linphone/commitdiff
add low bandwidth call param
authorJehan Monnier <jehan.monnier@linphone.org>
Tue, 2 Oct 2012 14:51:31 +0000 (16:51 +0200)
committerJehan Monnier <jehan.monnier@linphone.org>
Tue, 2 Oct 2012 14:51:45 +0000 (16:51 +0200)
coreapi/linphonecall.c
coreapi/linphonecore.h
coreapi/misc.c
coreapi/private.h

index a3709669756b9843a59c285711920132c6ae19fc..95bc621063a5bc616492d02257e6233190526b9d 100644 (file)
@@ -854,6 +854,9 @@ const PayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallP
        return cp->video_codec;
 }
 
+bool_t linphone_call_params_low_bandwidth_enabled(const LinphoneCallParams *cp) {
+       return cp->low_bandwidth;
+}
 /**
  * Returns whether video is enabled.
 **/
index 5196d93dc17fa31631468c6ed10326e729fa5ae0..0209a37745f230ebf5eb17bc192dc902f5081df9 100644 (file)
@@ -204,7 +204,14 @@ bool_t linphone_call_params_early_media_sending_enabled(const LinphoneCallParams
 bool_t linphone_call_params_local_conference_mode(const LinphoneCallParams *cp);
 void linphone_call_params_set_audio_bandwidth_limit(LinphoneCallParams *cp, int bw);
 void linphone_call_params_destroy(LinphoneCallParams *cp);
-
+/**
+ * @ingroup call_control
+ * Use to know if this call has been configured in low bandwidth mode.
+ * This mode can be automatically discovered thanks to a stun server when activate_edge_workarounds=1 in section [net] of configuration file
+ * <br> When enabled, this param may transform a call request with video in audio only mode.
+ * @return TRUE if low bandwidth has been configured/detected
+ */
+bool_t linphone_call_params_low_bandwidth_enabled(const LinphoneCallParams *cp);
 /**
  * Enum describing failure reasons.
  * @ingroup initializing
index 6f7aff6985983aff0f4ee241d03a58b9c7476b91..e85005f28aa398bcf0200783f9a88cf12953eb46 100644 (file)
@@ -586,7 +586,7 @@ void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, Linphone
                        params->up_bw=params->down_bw=edge_bw;
                        params->up_ptime=params->down_ptime=edge_ptime;
                        params->has_video=FALSE;
-                       
+                       params->low_bandwidth=TRUE;
                }/*else use default settings */
        }
 }
index ea21a967a19b819ff3dcd3b652c125c769b38385..0cefb1476f81daac9dddb130c7cd91b80a37bac6 100644 (file)
@@ -79,7 +79,7 @@ struct _LinphoneCallParams{
        bool_t real_early_media; /*send real media even during early media (for outgoing calls)*/
        bool_t in_conference; /*in conference mode */
        bool_t pad;
-       
+       bool_t low_bandwidth;
 };
     
 typedef struct _CallCallbackObj