improving adaptive algorithm by detecting pure lossy network (work in progress)

parent 8967571d
...@@ -109,7 +109,7 @@ static void apply_max_bitrate(SpeexEncState *s){ ...@@ -109,7 +109,7 @@ static void apply_max_bitrate(SpeexEncState *s){
}else{ }else{
/*convert from codec bitrate to network bitrate */ /*convert from codec bitrate to network bitrate */
s->ip_bitrate=( (s->bitrate/(pps*8))+20+12+8)*8*pps; s->ip_bitrate=( (s->bitrate/(pps*8))+20+12+8)*8*pps;
ms_message("Using bitrate %i for speex encoder, ip bitrate is %i",s->bitrate,s->ip_bitrate); ms_message("Using bitrate %i for speex encoder, ip bitrate is %i",s->bitrate,s->ip_bitrate);
} }
} }
...@@ -317,7 +317,7 @@ static int enc_set_ptime(MSFilter *f, void *arg){ ...@@ -317,7 +317,7 @@ static int enc_set_ptime(MSFilter *f, void *arg){
s->ptime=*(int*)arg; s->ptime=*(int*)arg;
/*if the ptime is not a mulptiple of 20, go to the next multiple*/ /*if the ptime is not a mulptiple of 20, go to the next multiple*/
if (s->ptime%20) if (s->ptime%20)
s->ptime = s->ptime - s->ptime%20 + 20; s->ptime = s->ptime - s->ptime%20 + 20;
ms_message("MSSpeexEnc: got ptime=%i",s->ptime); ms_message("MSSpeexEnc: got ptime=%i",s->ptime);
return 0; return 0;
} }
...@@ -379,7 +379,7 @@ static int enc_add_fmtp(MSFilter *f, void *arg){ ...@@ -379,7 +379,7 @@ static int enc_add_fmtp(MSFilter *f, void *arg){
int val=atoi(buf); int val=atoi(buf);
enc_set_ptime(f,&val); enc_set_ptime(f,&val);
} }
return 0; return 0;
} }
...@@ -565,17 +565,17 @@ static void dec_process(MSFilter *f){ ...@@ -565,17 +565,17 @@ static void dec_process(MSFilter *f){
SpeexBits bits; SpeexBits bits;
int bytes=s->frsz*2; int bytes=s->frsz*2;
bool_t bits_initd=FALSE; bool_t bits_initd=FALSE;
while((im=ms_queue_get(f->inputs[0]))!=NULL){ while((im=ms_queue_get(f->inputs[0]))!=NULL){
int rem_bits=(im->b_wptr-im->b_rptr)*8; int rem_bits=(im->b_wptr-im->b_rptr)*8;
if (!bits_initd) { if (!bits_initd) {
speex_bits_init(&bits); speex_bits_init(&bits);
bits_initd=TRUE; bits_initd=TRUE;
}else speex_bits_reset(&bits); }else speex_bits_reset(&bits);
speex_bits_read_from(&bits,(char*)im->b_rptr,im->b_wptr-im->b_rptr); speex_bits_read_from(&bits,(char*)im->b_rptr,im->b_wptr-im->b_rptr);
/* support for multiple frame in one RTP packet */ /* support for multiple frame in one RTP packet */
do{ do{
om=allocb(bytes,0); om=allocb(bytes,0);
...@@ -588,10 +588,10 @@ static void dec_process(MSFilter *f){ ...@@ -588,10 +588,10 @@ static void dec_process(MSFilter *f){
if (s->sample_time==0) s->sample_time=f->ticker->time; if (s->sample_time==0) s->sample_time=f->ticker->time;
s->sample_time+=20; s->sample_time+=20;
if (s->plc_count>0){ if (s->plc_count>0){
ms_warning("Did speex packet loss concealment during %i ms",s->plc_count*20); // ms_warning("Did speex packet loss concealment during %i ms",s->plc_count*20);
s->plc_count=0; s->plc_count=0;
} }
}else { }else {
if (err==-1) if (err==-1)
ms_warning("speex end of stream"); ms_warning("speex end of stream");
...@@ -610,7 +610,7 @@ static void dec_process(MSFilter *f){ ...@@ -610,7 +610,7 @@ static void dec_process(MSFilter *f){
om->b_wptr+=bytes; om->b_wptr+=bytes;
mblk_set_plc_flag(om, 1); mblk_set_plc_flag(om, 1);
ms_queue_put(f->outputs[0],om); ms_queue_put(f->outputs[0],om);
s->sample_time+=20; s->sample_time+=20;
s->plc_count++; s->plc_count++;
if (s->plc_count>=plc_max){ if (s->plc_count>=plc_max){
......
...@@ -22,10 +22,46 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -22,10 +22,46 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/bitratecontrol.h" #include "mediastreamer2/bitratecontrol.h"
#include <math.h>
/**
* Compute the linear interpolation y = m * x + b for a given set of points.
* m is the line slope, b the y-intercept value and x_inter the x-intrecept value
* Returns 1 if x intersection could not be calculated, 0 otherwise
**/
// static int linear_regression(int n, const double x[], const double y[], double* m, double* b, double* x_inter)
// {
// int i;
// double x_sum = 0.;
// double y_sum = 0.;
// double x_square_sum = 0.;
// double x_y_sum = 0.;
// for (i = 0; i < n; i++) {
// x_sum += x[i];
// y_sum += y[i];
// x_y_sum += x[i] * y[i];
// x_square_sum += (x[i]) * (x[i]);
// }
// x_sum /= n;
// y_sum /= n;
// *m = (x_y_sum - x_sum * y_sum * n) /
// (x_square_sum - x_sum * x_sum * n);
// *b = (y_sum - *m * x_sum);
// if (fabs(*m) > 0.000001f) {
// *x_inter = - *b / *m;
// return 0;
// }
// return 1;
// }
/** /**
* Analyses a received RTCP packet. * Analyses a received RTCP packet.
* Returns TRUE is relevant information has been found in the rtcp message, FALSE otherwise. * Returns TRUE is relevant information has been found in the rtcp message, FALSE otherwise.
**/ **/
bool_t ms_qos_analyser_process_rtcp(MSQosAnalyser *obj,mblk_t *msg){ bool_t ms_qos_analyser_process_rtcp(MSQosAnalyser *obj,mblk_t *msg){
if (obj->desc->process_rtcp){ if (obj->desc->process_rtcp){
return obj->desc->process_rtcp(obj,msg); return obj->desc->process_rtcp(obj,msg);
...@@ -74,6 +110,7 @@ typedef struct rtpstats{ ...@@ -74,6 +110,7 @@ typedef struct rtpstats{
float lost_percentage; /*percentage of lost packet since last report*/ float lost_percentage; /*percentage of lost packet since last report*/
float int_jitter; /*interrarrival jitter */ float int_jitter; /*interrarrival jitter */
float rt_prop; /*round trip propagation*/ float rt_prop; /*round trip propagation*/
float send_bw; /*bandwidth consummation*/
}rtpstats_t; }rtpstats_t;
...@@ -100,13 +137,15 @@ typedef struct _MSSimpleQosAnalyser{ ...@@ -100,13 +137,15 @@ typedef struct _MSSimpleQosAnalyser{
int curindex; int curindex;
bool_t rt_prop_doubled; bool_t rt_prop_doubled;
bool_t pad[3]; bool_t pad[3];
double points[150][2];
}MSSimpleQosAnalyser; }MSSimpleQosAnalyser;
static bool_t rt_prop_doubled(rtpstats_t *cur,rtpstats_t *prev){ static bool_t rt_prop_doubled(rtpstats_t *cur,rtpstats_t *prev){
//ms_message("AudioBitrateController: cur=%f, prev=%f",cur->rt_prop,prev->rt_prop); //ms_message("AudioBitrateController: cur=%f, prev=%f",cur->rt_prop,prev->rt_prop);
if (cur->rt_prop>=significant_delay && prev->rt_prop>0){ if (cur->rt_prop>=significant_delay && prev->rt_prop>0){
if (cur->rt_prop>=(prev->rt_prop*2.0)){ if (cur->rt_prop>=(prev->rt_prop*2.0)){
/*propagation doubled since last report */ /*propagation doubled since last report */
return TRUE; return TRUE;
...@@ -137,28 +176,105 @@ static bool_t simple_analyser_process_rtcp(MSQosAnalyser *objbase, mblk_t *rtcp) ...@@ -137,28 +176,105 @@ static bool_t simple_analyser_process_rtcp(MSQosAnalyser *objbase, mblk_t *rtcp)
rb=rtcp_RR_get_report_block(rtcp,0); rb=rtcp_RR_get_report_block(rtcp,0);
} }
if (rb && report_block_get_ssrc(rb)==rtp_session_get_send_ssrc(obj->session)){ if (rb && report_block_get_ssrc(rb)==rtp_session_get_send_ssrc(obj->session)){
obj->curindex++; obj->curindex++;
cur=&obj->stats[obj->curindex % STATS_HISTORY]; cur=&obj->stats[obj->curindex % STATS_HISTORY];
if (obj->clockrate==0){ if (obj->clockrate==0){
PayloadType *pt=rtp_profile_get_payload(rtp_session_get_send_profile(obj->session),rtp_session_get_send_payload_type(obj->session)); PayloadType *pt=rtp_profile_get_payload(rtp_session_get_send_profile(obj->session),rtp_session_get_send_payload_type(obj->session));
if (pt!=NULL) obj->clockrate=pt->clock_rate; if (pt!=NULL) obj->clockrate=pt->clock_rate;
else return FALSE; else return FALSE;
} }
cur->high_seq_recv=report_block_get_high_ext_seq(rb); cur->high_seq_recv=report_block_get_high_ext_seq(rb);
cur->lost_percentage=100.0*(float)report_block_get_fraction_lost(rb)/256.0; cur->lost_percentage=100.0*(float)report_block_get_fraction_lost(rb)/256.0;
cur->int_jitter=1000.0*(float)report_block_get_interarrival_jitter(rb)/(float)obj->clockrate; cur->int_jitter=1000.0*(float)report_block_get_interarrival_jitter(rb)/(float)obj->clockrate;
cur->rt_prop=rtp_session_get_round_trip_propagation(obj->session); cur->rt_prop=rtp_session_get_round_trip_propagation(obj->session);
ms_message("MSQosAnalyser: lost_percentage=%f, int_jitter=%f ms, rt_prop=%f sec",cur->lost_percentage,cur->int_jitter,cur->rt_prop); obj->points[obj->curindex-1][0]=rtp_session_get_send_bandwidth(obj->session)/1000.0;
obj->points[obj->curindex-1][1]=(float)report_block_get_fraction_lost(rb)/256.0;
ms_message("MSQosAnalyser: lost_percentage=%f, int_jitter=%f ms, rt_prop=%f sec, send_bw=%f",cur->lost_percentage,cur->int_jitter,cur->rt_prop,obj->points[obj->curindex][0]);
if (obj->curindex>2) printf("one more %d: %f %f\n", obj->curindex-1, obj->points[obj->curindex-1][0], obj->points[obj->curindex-1][1]);
} }
return rb!=NULL; return rb!=NULL;
} }
static void compute_available_bw(MSSimpleQosAnalyser *obj){
int i;
double x_sum = 0.;
double y_sum = 0.;
double x_square_sum = 0.;
double x_y_sum = 0.;
int last = obj->curindex - 1;
int f = last > 15 ? last - 13 : 2; //always skip the 2 first ones
int n = (last - f + 1);
if (n <= 1) {
printf("Estimated BW is %f kbit/s\n", obj->points[0][0] * obj->points[0][1]);
return;
}
int count = n;//(last - f) * (last - f + 1) / 2;
double mean_bw = 0.;
double avg_dist = 0.;
int x_min_ind = f;
int x_max_ind = f;
for (i = f; i <= last; i++) {
double x = obj->points[i][0];
double y = obj->points[i][1];
if (x < obj->points[x_min_ind][0]) x_min_ind = i;
if (x > obj->points[x_max_ind][0]) x_max_ind = i;
double mul = 1;// (i - f + 1);
// printf("\tadding (%f;%f) of weight %f\n", x, y, mul);
x_sum += x * mul;
y_sum += y * mul;
x_y_sum += x * y * mul * mul;
x_square_sum += x * x * mul * mul;
mean_bw += x * (1 - y);
}
x_sum /= count;
y_sum /= count;
mean_bw /= count;
printf("\tEstimated BW by avg is %f kbits/s\n", mean_bw);
printf("sum=%f xmin=%d xmax=%d\n", x_sum, x_min_ind, x_max_ind);
double diff = (obj->points[x_max_ind][0] - obj->points[x_min_ind][0]) / x_sum;
double m = (x_y_sum - x_sum * y_sum * count) /
(x_square_sum - x_sum * x_sum * count);
double b = (y_sum - m * x_sum);
for (i = f; i <= last; i++) {
double x = obj->points[i][0];
double y = obj->points[i][1];
avg_dist += fabs(m * x + b - y);
}
avg_dist /= count;
bool_t lossy_network = avg_dist > .1;
// to compute estimated BW, we need a minimum sample size
if (diff > 0.05) {
printf("\tfor line is %f kbit/s\n", -b / m);
printf("\t\ty=%f x + %f\n", m, b);
lossy_network |= m < .03f;
} else {
printf("\tunsufficient difference between BW min and BW max: %f\n", diff);
}
printf("\tavg_dist=%f\n", avg_dist);
printf("\t\tI think it is a %s network\n", lossy_network ? "LOSSY/UNSTABLE" : "stable");
}
static void simple_analyser_suggest_action(MSQosAnalyser *objbase, MSRateControlAction *action){ static void simple_analyser_suggest_action(MSQosAnalyser *objbase, MSRateControlAction *action){
MSSimpleQosAnalyser *obj=(MSSimpleQosAnalyser*)objbase; MSSimpleQosAnalyser *obj=(MSSimpleQosAnalyser*)objbase;
rtpstats_t *cur=&obj->stats[obj->curindex % STATS_HISTORY]; rtpstats_t *cur=&obj->stats[obj->curindex % STATS_HISTORY];
compute_available_bw(obj);
/*big losses and big jitter */ /*big losses and big jitter */
if (cur->lost_percentage>=unacceptable_loss_rate){ if (cur->lost_percentage>=unacceptable_loss_rate){
action->type=MSRateControlActionDecreaseBitrate; action->type=MSRateControlActionDecreaseBitrate;
......
...@@ -139,7 +139,7 @@ void ms_quality_indicator_update_local(MSQualityIndicator *qi){ ...@@ -139,7 +139,7 @@ void ms_quality_indicator_update_local(MSQualityIndicator *qi){
recvcnt=stats->packet_recv-qi->last_packet_count; recvcnt=stats->packet_recv-qi->last_packet_count;
if (recvcnt==0){ if (recvcnt==0){
ms_message("ms_quality_indicator_update_local(): no packet received since last call"); // ms_message("ms_quality_indicator_update_local(): no packet received since last call");
return;/* no information usable*/ return;/* no information usable*/
}else if (recvcnt<0){ }else if (recvcnt<0){
qi->last_packet_count=stats->packet_recv; qi->last_packet_count=stats->packet_recv;
...@@ -149,24 +149,24 @@ void ms_quality_indicator_update_local(MSQualityIndicator *qi){ ...@@ -149,24 +149,24 @@ void ms_quality_indicator_update_local(MSQualityIndicator *qi){
}else if (qi->last_packet_count==0){ }else if (qi->last_packet_count==0){
qi->last_ext_seq=ext_seq; qi->last_ext_seq=ext_seq;
} }
lost=(ext_seq-qi->last_ext_seq) - (recvcnt); lost=(ext_seq-qi->last_ext_seq) - (recvcnt);
qi->last_ext_seq=ext_seq; qi->last_ext_seq=ext_seq;
qi->last_packet_count=stats->packet_recv; qi->last_packet_count=stats->packet_recv;
late=stats->outoftime-qi->last_late; late=stats->outoftime-qi->last_late;
qi->last_late=stats->outoftime; qi->last_late=stats->outoftime;
if (lost<0) lost=0; /* will be the case at least the first time, because we don't know the initial sequence number*/ if (lost<0) lost=0; /* will be the case at least the first time, because we don't know the initial sequence number*/
if (late<0) late=0; if (late<0) late=0;
loss_rate=(float)lost/(float)recvcnt; loss_rate=(float)lost/(float)recvcnt;
qi->cur_loss_rate=loss_rate*100.0; qi->cur_loss_rate=loss_rate*100.0;
late_rate=(float)late/(float)recvcnt; late_rate=(float)late/(float)recvcnt;
qi->cur_late_rate=late_rate*100.0; qi->cur_late_rate=late_rate*100.0;
qi->local_rating=compute_rating(loss_rate,0,late_rate,rtp_session_get_round_trip_propagation(qi->session)); qi->local_rating=compute_rating(loss_rate,0,late_rate,rtp_session_get_round_trip_propagation(qi->session));
qi->local_lq_rating=compute_lq_rating(loss_rate,0,late_rate); qi->local_lq_rating=compute_lq_rating(loss_rate,0,late_rate);
update_global_rating(qi); update_global_rating(qi);
......
...@@ -236,20 +236,20 @@ static void basic_audio_stream() { ...@@ -236,20 +236,20 @@ static void basic_audio_stream() {
#define EDGE_BW 10000 #define EDGE_BW 10000
#define THIRDGENERATION_BW 200000 #define THIRDGENERATION_BW 200000
static float adaptive_audio_stream(int codec_payload, int initial_bitrate,int target_bw, int max_recv_rtcp_packet) { static float adaptive_audio_stream(int codec_payload, int initial_bitrate,int target_bw, float loss_rate, int max_recv_rtcp_packet) {
stream_manager_t * marielle = stream_manager_new(); stream_manager_t * marielle = stream_manager_new();
stream_manager_t * margaux = stream_manager_new(); stream_manager_t * margaux = stream_manager_new();
int pause_time=0; int pause_time=0;
OrtpNetworkSimulatorParams params={0}; OrtpNetworkSimulatorParams params={0};
params.enabled=TRUE; params.enabled=TRUE;
params.loss_rate=0; params.loss_rate=loss_rate;
params.max_bandwidth=target_bw; params.max_bandwidth=target_bw;
params.max_buffer_size=initial_bitrate; params.max_buffer_size=initial_bitrate;
float bw_usage_ratio; float bw_usage_ratio;
// this variable should not be changed, since algorithm results rely on this value // this variable should not be changed, since algorithm results rely on this value
// (the bigger it is, the more accurate is bandwidth estimation) // (the bigger it is, the more accurate is bandwidth estimation)
int rtcp_interval = RTCP_DEFAULT_REPORT_INTERVAL; int rtcp_interval = 1000;
float marielle_send_bw; float marielle_send_bw;
media_stream_enable_adaptive_bitrate_control(&marielle->stream->ms,TRUE); media_stream_enable_adaptive_bitrate_control(&marielle->stream->ms,TRUE);
...@@ -285,15 +285,15 @@ static void adaptive_opus_audio_stream() { ...@@ -285,15 +285,15 @@ static void adaptive_opus_audio_stream() {
float bw_usage; float bw_usage;
// on EDGEBW, both should be overconsumming // on EDGEBW, both should be overconsumming
bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 8000, EDGE_BW, 14); bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 8000, EDGE_BW, 0, 14);
CU_ASSERT_IN_RANGE(bw_usage, 2.f, 3.f); // bad! since this codec cant change its ptime and it is the lower bitrate, no improvement can occur CU_ASSERT_IN_RANGE(bw_usage, 2.f, 3.f); // bad! since this codec cant change its ptime and it is the lower bitrate, no improvement can occur
bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 48000, EDGE_BW, 11); bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 48000, EDGE_BW, 0, 11);
CU_ASSERT_IN_RANGE(bw_usage, 1.f, 1.2f); // bad! CU_ASSERT_IN_RANGE(bw_usage, 1.f, 1.2f); // bad!
// on 3G BW, both should be at max // on 3G BW, both should be at max
bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 8000, THIRDGENERATION_BW, 5); bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 8000, THIRDGENERATION_BW, 0, 5);
CU_ASSERT_IN_RANGE(bw_usage, .1f, .15f); CU_ASSERT_IN_RANGE(bw_usage, .1f, .15f);
bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 48000, THIRDGENERATION_BW, 5); bw_usage = adaptive_audio_stream(OPUS_PAYLOAD_TYPE, 48000, THIRDGENERATION_BW, 0, 5);
CU_ASSERT_IN_RANGE(bw_usage, .2f, .3f); CU_ASSERT_IN_RANGE(bw_usage, .2f, .3f);
} }
} }
...@@ -303,31 +303,43 @@ static void adaptive_speek16_audio_stream() { ...@@ -303,31 +303,43 @@ static void adaptive_speek16_audio_stream() {
if( supported ) { if( supported ) {
// at 16KHz -> 20 kb/s // at 16KHz -> 20 kb/s
// at 32KHz -> 30 kb/s // at 32KHz -> 30 kb/s
float bw_usage;
bw_usage = adaptive_audio_stream(SPEEX16_PAYLOAD_TYPE, 32000, EDGE_BW, 12); adaptive_audio_stream(SPEEX16_PAYLOAD_TYPE, 32000, EDGE_BW / 2., 0, 120);
CU_ASSERT_IN_RANGE(bw_usage, .9f, 1.f);
bw_usage = adaptive_audio_stream(SPEEX16_PAYLOAD_TYPE, 16000, EDGE_BW, 8);
CU_ASSERT_IN_RANGE(bw_usage, .9f, 1.f);
bw_usage = adaptive_audio_stream(SPEEX16_PAYLOAD_TYPE, 32000, THIRDGENERATION_BW, 5);
CU_ASSERT_IN_RANGE(bw_usage, .1f, .2f);
} }
} }
static void adaptative_pcma_audio_stream() { static void adaptive_pcma_audio_stream() {
bool_t supported = ms_filter_codec_supported("pcma"); bool_t supported = ms_filter_codec_supported("pcma");
if( supported ) { if( supported ) {
// at 8KHz -> 80 kb/s // at 8KHz -> 80 kb/s
float bw_usage; float bw_usage;
// yet non-adaptative codecs cannot respect low throughput limitations // yet non-adaptative codecs cannot respect low throughput limitations
bw_usage = adaptive_audio_stream(PCMA8_PAYLOAD_TYPE, 8000, EDGE_BW, 10); bw_usage = adaptive_audio_stream(PCMA8_PAYLOAD_TYPE, 8000, EDGE_BW, 0, 10);
CU_ASSERT_IN_RANGE(bw_usage,6.f, 8.f); // this is bad! CU_ASSERT_IN_RANGE(bw_usage,6.f, 8.f); // this is bad!
bw_usage = adaptive_audio_stream(PCMA8_PAYLOAD_TYPE, 8000, THIRDGENERATION_BW, 5); bw_usage = adaptive_audio_stream(PCMA8_PAYLOAD_TYPE, 8000, THIRDGENERATION_BW, 0, 5);
CU_ASSERT_IN_RANGE(bw_usage, .3f, .5f); CU_ASSERT_IN_RANGE(bw_usage, .3f, .5f);
} }
} }
static void lossy_network_speex_audio_stream() {
bool_t supported = ms_filter_codec_supported("speex");
if( supported ) {
// at 16KHz -> 20 kb/s
// at 32KHz -> 30 kb/s
float bw_usage;
int loss_rate = getenv("GPP_LOSS") ? atoi(getenv("GPP_LOSS")) : 0;
int max_bw = getenv("GPP_MAXBW") ? atoi(getenv("GPP_MAXBW")) * 1000: 0;
printf("\nloss_rate=%d(GPP_LOSS) max_bw=%d(GPP_MAXBW)\n", loss_rate, max_bw);
bw_usage = adaptive_audio_stream(SPEEX16_PAYLOAD_TYPE, 32000, max_bw, loss_rate, 120);
CU_ASSERT_IN_RANGE(bw_usage, .9f, 1.f);
// bw_usage = adaptive_audio_stream(SPEEX16_PAYLOAD_TYPE, 16000, EDGE_BW, 8);
// CU_ASSERT_IN_RANGE(bw_usage, .9f, 1.f);
// bw_usage = adaptive_audio_stream(SPEEX16_PAYLOAD_TYPE, 32000, THIRDGENERATION_BW, 5);
// CU_ASSERT_IN_RANGE(bw_usage, .1f, .2f);
}
}
#if 0 #if 0
static void audio_stream_dtmf(int codec_payload, int initial_bitrate,int target_bw, int max_recv_rtcp_packet) { static void audio_stream_dtmf(int codec_payload, int initial_bitrate,int target_bw, int max_recv_rtcp_packet) {
stream_manager_t * marielle = stream_manager_new(); stream_manager_t * marielle = stream_manager_new();
...@@ -373,7 +385,8 @@ static test_t tests[] = { ...@@ -373,7 +385,8 @@ static test_t tests[] = {
{ "Basic audio stream", basic_audio_stream }, { "Basic audio stream", basic_audio_stream },
{ "Adaptive audio stream [opus]", adaptive_opus_audio_stream }, { "Adaptive audio stream [opus]", adaptive_opus_audio_stream },
{ "Adaptive audio stream [speex]", adaptive_speek16_audio_stream }, { "Adaptive audio stream [speex]", adaptive_speek16_audio_stream },
{ "Adaptive audio stream [pcma]", adaptative_pcma_audio_stream } { "Adaptive audio stream [pcma]", adaptive_pcma_audio_stream },
{ "Lossy network [speex]", lossy_network_speex_audio_stream },
}; };
test_suite_t audio_stream_test_suite = { test_suite_t audio_stream_test_suite = {
......
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