Commit 66355f56 authored by Simon Morlat's avatar Simon Morlat

fix many compilation warnings

parent 3073a0ed
......@@ -480,7 +480,7 @@ static int ice_process_stun_message(RtpSession *session, struct IceCheckList *ch
struct CandidatePair *remote_candidates = NULL;
StunMessage msg;
bool_t res;
int highest_priority_success=-1;
//int highest_priority_success=-1;
OrtpEventData *evt_data = ortp_event_get_data(evt);
mblk_t *mp = evt_data->packet;
struct sockaddr_in *udp_remote;
......@@ -552,7 +552,7 @@ static int ice_process_stun_message(RtpSession *session, struct IceCheckList *ch
if (cand_pair->connectivity_check == ICE_SUCCEEDED)
{
highest_priority_success=pos;
//highest_priority_success=pos;
break;
}
}
......
......@@ -752,6 +752,7 @@ void ms_get_cur_time(MSTimeSpec *ret){
ret->tv_nsec=ts.tv_nsec;
#endif
}
struct _MSConcealerContext {
uint64_t sample_time;
int plc_count;
......@@ -760,17 +761,21 @@ void ms_concealer_context_init(MSConcealerContext* obj){
obj->sample_time=0;
obj->plc_count=0;
}
void ms_concealer_context_update_sampling_time(MSConcealerContext* obj,unsigned int delta) {
obj->sample_time+=delta;
}
bool_t ms_concealer_context_is_concealement_required(MSConcealerContext* obj,uint64_t current_time) {
if (obj->sample_time < current_time) {
obj->plc_count++;
return TRUE;
} else {
if (obj->plc_count) {
ms_warning("Did packet loss concealment for ",obj->plc_count*20);
ms_warning("Did packet loss concealment for %i ms",obj->plc_count*20);
/* FIXME: will continue to output this warning continuously...*/
}
}
return FALSE;
}
......@@ -283,7 +283,7 @@ static double powerspectrum_stat_beyond8K(struct Channel *chan){
#endif
yp = yp * fftmul;
yp = MIN(yp * 3000.0, 1.0);
yp = (1 - yp) * (100 - 1.0f);
yp = (1 - yp) * (100 - 1.0f);
mystat = yp + mystat;
}
......@@ -416,8 +416,7 @@ static void conf_sum(MSFilter *f, ConfState *s){
#ifndef DISABLE_SPEEX
if (chan->speex_pp!=NULL && s->enable_vad==TRUE && i==0)
{
int vad;
vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
ms_filter_notify(f, MS_CONF_SPEEX_PREPROCESS_MIC, (void*)chan->speex_pp);
if (s->enable_halfduplex>0)
......@@ -447,15 +446,13 @@ static void conf_sum(MSFilter *f, ConfState *s){
}
else if (chan->speex_pp!=NULL && s->enable_vad==TRUE)
{
int vad;
if (s->enable_halfduplex>0)
{
vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
}
else
{
vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
//speex_preprocess_estimate_update(chan->speex_pp, (short*)chan->input);
}
}
......
......@@ -34,8 +34,7 @@ static void join_process(MSFilter *f){
if (f->inputs[1]!=NULL)
{
while((im=ms_queue_get(f->inputs[1]))!=NULL){
int payload;
payload=mblk_set_payload_type(im, 123);
mblk_set_payload_type(im, 123);
ms_queue_put(f->outputs[0],im);
}
}
......
......@@ -214,6 +214,9 @@ int ms_discover_mtu(const char *host){
char *buf=ms_malloc0(datasize);
send_returned = send(sock,buf,datasize,0);
if (send_returned==-1){
/*ignore*/
}
ms_free(buf);
usleep(500000);/*wait for an icmp message come back */
err=getsockopt(sock,IPPROTO_IP,IP_MTU,&new_mtu,&optlen);
......
......@@ -185,17 +185,17 @@ static mblk_t * skip_rfc2190_header(mblk_t *inm){
static mblk_t * skip_rfc2429_header(mblk_t *inm){
if (msgdsize(inm) >= 2){
uint32_t *p = (uint32_t*)inm->b_rptr;
/*uint32_t *p = (uint32_t*)inm->b_rptr;*/
uint8_t *ph=inm->b_rptr;
int PLEN;
int gob_num;
/*int gob_num;*/
bool_t P;
P=rfc2429_get_P(ph);
PLEN=rfc2429_get_PLEN(ph);
/*printf("receiving new packet; P=%i; V=%i; PLEN=%i; PEBIT=%i\n",P,rfc2429_get_V(ph),PLEN,rfc2429_get_PEBIT(ph));
*/
gob_num = (ntohl(*p) >> 10) & 0x1f;
/*gob_num = (ntohl(*p) >> 10) & 0x1f;*/
/*ms_message("gob %i, size %i", gob_num, msgdsize(inm));
ms_message("ms_AVdecoder_process: received %08x %08x", ntohl(p[0]), ntohl(p[1]));*/
......
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