Commit 2043ec6a authored by Simon Morlat's avatar Simon Morlat
Browse files

remove GPL statements from source code. Use SDES tool same as user agent.

Fix call parameters when video is disabled.
parent 898a4ce9
......@@ -1231,8 +1231,6 @@ static void setup_ring_player(LinphoneCore *lc, LinphoneCall *call){
ms_filter_call_method(call->audiostream->soundread,MS_FILE_PLAYER_LOOP,&pause_time);
}
#define LINPHONE_RTCP_SDES_TOOL "Linphone-" LINPHONE_VERSION
static bool_t linphone_call_sound_resources_available(LinphoneCall *call){
LinphoneCore *lc=call->core;
LinphoneCall *current=linphone_core_get_current_call(lc);
......@@ -1251,6 +1249,8 @@ static int find_crypto_index_from_tag(const SalSrtpCryptoAlgo crypto[],unsigned
static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cname, bool_t muted, bool_t send_ringbacktone, bool_t use_arc){
LinphoneCore *lc=call->core;
int used_pt=-1;
char rtcp_tool[128]={0};
snprintf(rtcp_tool,sizeof(rtcp_tool)-1,"%s-%s",linphone_core_get_user_agent_name(),linphone_core_get_user_agent_version());
/* look for savp stream first */
const SalStreamDescription *stream=sal_media_description_find_stream(call->resultdesc,
SalProtoRtpSavp,SalAudio);
......@@ -1336,7 +1336,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
if (send_ringbacktone){
setup_ring_player(lc,call);
}
audio_stream_set_rtcp_information(call->audiostream, cname, LINPHONE_RTCP_SDES_TOOL);
audio_stream_set_rtcp_information(call->audiostream, cname, rtcp_tool);
/* valid local tags are > 0 */
if (stream->proto == SalProtoRtpSavp) {
......@@ -1373,6 +1373,9 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
/* look for savp stream first */
const SalStreamDescription *vstream=sal_media_description_find_stream(call->resultdesc,
SalProtoRtpSavp,SalVideo);
char rtcp_tool[128]={0};
snprintf(rtcp_tool,sizeof(rtcp_tool)-1,"%s-%s",linphone_core_get_user_agent_name(),linphone_core_get_user_agent_version());
/* no savp audio stream, use avp */
if (!vstream)
vstream=sal_media_description_find_stream(call->resultdesc,
......@@ -1436,7 +1439,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
call->video_profile, rtp_addr, vstream->rtp_port,
rtcp_addr, linphone_core_rtcp_enabled(lc) ? (vstream->rtcp_port) : 0,
used_pt, linphone_core_get_video_jittcomp(lc), cam);
video_stream_set_rtcp_information(call->videostream, cname,LINPHONE_RTCP_SDES_TOOL);
video_stream_set_rtcp_information(call->videostream, cname,rtcp_tool);
}
if (vstream->proto == SalProtoRtpSavp) {
......
......@@ -1596,6 +1596,14 @@ void linphone_core_set_user_agent(const char *name, const char *ver){
strncpy(_ua_version,ver,sizeof(_ua_version));
}
const char *linphone_core_get_user_agent_name(void){
return _ua_name;
}
const char *linphone_core_get_user_agent_version(void){
return _ua_version;
}
static void transport_error(LinphoneCore *lc, const char* transport, int port){
char *msg=ortp_strdup_printf("Could not start %s transport on port %i, maybe this port is already used.",transport,port);
ms_warning("%s",msg);
......@@ -2662,6 +2670,10 @@ int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const
}else
call->params=*params;
if (call->params.has_video && !linphone_core_video_enabled(lc)){
ms_warning("linphone_core_accept_call_update(): requested video but video support is globally disabled. Refusing video.");
call->params.has_video=FALSE;
}
if (call->current_params.in_conference) {
ms_warning("Video isn't supported in conference");
call->params.has_video = FALSE;
......
......@@ -899,6 +899,8 @@ void linphone_core_disable_logs(void);
/*sets the user-agent string in sip messages, must be set before linphone_core_new() or linphone_core_init() */
void linphone_core_set_user_agent(const char *ua_name, const char *version);
const char *linphone_core_get_version(void);
const char *linphone_core_get_user_agent_name(void);
const char *linphone_core_get_user_agent_version(void);
LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
const char *config_path, const char *factory_config, void* userdata);
......@@ -1421,6 +1423,8 @@ int linphone_core_get_audio_dscp(const LinphoneCore *lc);
void linphone_core_set_video_dscp(LinphoneCore *lc, int dscp);
int linphone_core_get_video_dscp(const LinphoneCore *lc);
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment