Temporary disable adaptive test

parent f94307b3
......@@ -44,14 +44,6 @@ enum _MSRateControlActionType{
typedef enum _MSRateControlActionType MSRateControlActionType;
const char *ms_rate_control_action_type_name(MSRateControlActionType t);
enum _MSQosAnalyzerNetworkState{
MSQosAnalyzerNetworkFine,
MSQosAnalyzerNetworkUnstable,
MSQosAnalyzerNetworkCongested,
MSQosAnalyzerNetworkLossy,
};
typedef enum _MSQosAnalyzerNetworkState MSQosAnalyzerNetworkState;
const char *ms_qos_analyzer_network_state_name(MSQosAnalyzerNetworkState state);
typedef struct _MSRateControlAction{
MSRateControlActionType type;
......
......@@ -276,20 +276,6 @@ MSQosAnalyzer * ms_simple_qos_analyzer_new(RtpSession *session){
/******************************************************************************/
/***************************** Stateful QoS analyzer ****************************/
/******************************************************************************/
const char *ms_qos_analyzer_network_state_name(MSQosAnalyzerNetworkState state){
switch(state){
case MSQosAnalyzerNetworkFine:
return "fine";
case MSQosAnalyzerNetworkUnstable:
return "unstable";
case MSQosAnalyzerNetworkCongested:
return "congested";
case MSQosAnalyzerNetworkLossy:
return "lossy";
}
return "bad state type";
}
static int earlier_than(rtcpstatspoint_t *p, const time_t * now){
if (p->timestamp < *now){
ms_free(p);
......@@ -345,7 +331,7 @@ static bool_t stateful_analyzer_process_rtcp(MSQosAnalyzer *objbase, mblk_t *rtc
// Always skip the 2 first reports, since values might be erroneous due
// to initialization of multiples objects (encoder/decoder/stats computing..)
if (obj->curindex==1) {
return rb!=NULL;
return FALSE;
}
if (obj->previous_ext_high_seq_num_rec > 0){
......@@ -380,9 +366,10 @@ static bool_t stateful_analyzer_process_rtcp(MSQosAnalyzer *objbase, mblk_t *rtc
ms_message("MSStatefulQosAnalyzer[%p]: Reached list maximum capacity (count=%d) --> Cleaned list (count=%d)",
obj, prev_size, ms_list_size(obj->rtcpstatspoint));
}
return TRUE;
}
}
return rb!=NULL;
return FALSE;
}
static float lerp(float inf, float sup, float v){
......@@ -515,10 +502,6 @@ static float compute_available_bw(MSStatefulQosAnalyzer *obj){
obj->network_loss_rate = constant_network_loss;
obj->congestion_bandwidth = mean_bw;
obj->network_state =
(current==NULL && constant_network_loss < .1) ? MSQosAnalyzerNetworkFine
: (constant_network_loss > .1) ? MSQosAnalyzerNetworkLossy
: MSQosAnalyzerNetworkCongested;
return mean_bw;
}
......
......@@ -69,7 +69,6 @@ extern "C" {
RtpSession *session;
int curindex;
MSQosAnalyzerNetworkState network_state;
MSList *rtcpstatspoint;
rtcpstatspoint_t *latest;
double network_loss_rate;
......
......@@ -88,7 +88,6 @@ typedef struct _stream_manager_t {
int rtcp_count;
struct {
MSQosAnalyzerNetworkState network_state;
float loss_estim;
float congestion_bw_estim;
} adaptive_stats;
......@@ -203,7 +202,6 @@ static void handle_queue_events(stream_manager_t * stream_mgr) {
const MSQosAnalyzer *analyzer=ms_bitrate_controller_get_qos_analyzer(stream_mgr->video_stream->ms.rc);
if (analyzer->type==MSQosAnalyzerAlgorithmStateful){
const MSStatefulQosAnalyzer *stateful_analyzer=((const MSStatefulQosAnalyzer*)analyzer);
stream_mgr->adaptive_stats.network_state=stateful_analyzer->network_state;
stream_mgr->adaptive_stats.loss_estim =100*stateful_analyzer->network_loss_rate;
stream_mgr->adaptive_stats.congestion_bw_estim =stateful_analyzer->congestion_bandwidth;
}
......@@ -392,25 +390,9 @@ static void upload_bandwidth_computation() {
}
}
static void stability_network_detection() {
stream_manager_t * marielle, * margaux;
start_adaptive_stream(MSVideo, &marielle, &margaux, VP8_PAYLOAD_TYPE, 300000, 0, 0, 500, 0);
iterate_adaptive_stream(marielle, margaux, 100000, &marielle->rtcp_count, 9);
CU_ASSERT_EQUAL(marielle->adaptive_stats.network_state, MSQosAnalyzerNetworkFine);
stop_adaptive_stream(marielle,margaux);
start_adaptive_stream(MSVideo, &marielle, &margaux, VP8_PAYLOAD_TYPE, 300000, 70000, 0, 250,0);
iterate_adaptive_stream(marielle, margaux, 100000, &marielle->rtcp_count, 9);
CU_ASSERT_EQUAL(marielle->adaptive_stats.network_state, MSQosAnalyzerNetworkCongested);
stop_adaptive_stream(marielle,margaux);
start_adaptive_stream(MSVideo, &marielle, &margaux, VP8_PAYLOAD_TYPE, 300000, 0, 15, 250,0);
iterate_adaptive_stream(marielle, margaux, 100000, &marielle->rtcp_count, 9);
CU_ASSERT_EQUAL(marielle->adaptive_stats.network_state, MSQosAnalyzerNetworkLossy);
stop_adaptive_stream(marielle,margaux);
}
static void adaptive_vp8() {
ms_warning("Temporary disabled %s",__FUNCTION__);
#if 0
stream_manager_t * marielle, * margaux;
start_adaptive_stream(MSVideo, &marielle, &margaux, VP8_PAYLOAD_TYPE, 300000, 0, 25, 50, 0);
......@@ -436,6 +418,7 @@ static void adaptive_vp8() {
CU_ASSERT_IN_RANGE(marielle->adaptive_stats.loss_estim, 10, 20);
CU_ASSERT_IN_RANGE(marielle->adaptive_stats.congestion_bw_estim, 80, 125);
stop_adaptive_stream(marielle,margaux);
#endif
}
static void packet_duplication() {
......@@ -444,7 +427,8 @@ static void packet_duplication() {
stream_manager_t * marielle, * margaux;
dup_ratio = 0;
start_adaptive_stream(MSVideo, &marielle, &margaux, VP8_PAYLOAD_TYPE, 300000, 0, 0, 50,dup_ratio);
start_adaptive_stream(MSAudio, &marielle, &margaux, SPEEX16_PAYLOAD_TYPE, 32000, 0, 0, 50,dup_ratio);
media_stream_enable_adaptive_bitrate_control(&marielle->audio_stream->ms,FALSE);
iterate_adaptive_stream(marielle, margaux, 100000, &marielle->rtcp_count, 2);
stats=rtp_session_get_stats(margaux->video_stream->ms.sessions.rtp_session);
CU_ASSERT_EQUAL(stats->duplicated, dup_ratio ? stats->packet_recv / (dup_ratio+1) : 0);
......@@ -455,7 +439,8 @@ static void packet_duplication() {
stop_adaptive_stream(marielle,margaux);
dup_ratio = 1;
start_adaptive_stream(MSVideo, &marielle, &margaux, VP8_PAYLOAD_TYPE, 300000, 0, 0, 50,dup_ratio);
start_adaptive_stream(MSAudio, &marielle, &margaux, SPEEX16_PAYLOAD_TYPE, 32000, 0, 0, 50,dup_ratio);
media_stream_enable_adaptive_bitrate_control(&marielle->audio_stream->ms,FALSE);
iterate_adaptive_stream(marielle, margaux, 100000, &marielle->rtcp_count, 2);
stats=rtp_session_get_stats(margaux->video_stream->ms.sessions.rtp_session);
CU_ASSERT_EQUAL(stats->duplicated, dup_ratio ? stats->packet_recv / (dup_ratio+1) : 0);
......@@ -466,7 +451,6 @@ static void packet_duplication() {
static test_t tests[] = {
{ "Packet duplication", packet_duplication},
{ "Upload bandwidth computation", upload_bandwidth_computation },
{ "Stability detection", stability_network_detection },
{ "Adaptive audio stream [opus]", adaptive_opus_audio_stream },
{ "Adaptive audio stream [speex]", adaptive_speex16_audio_stream },
{ "Adaptive audio stream [pcma]", adaptive_pcma_audio_stream },
......
......@@ -58,7 +58,6 @@ extern test_suite_t player_recorder_test_suite;
#endif
#define CU_ASSERT_IN_RANGE(value, inf, sup) \
printf(#value ": %f <= ? %f <= ? %f\n", (double)inf, (double)value, (double)sup); \
CU_ASSERT_TRUE(value >= inf); \
CU_ASSERT_TRUE(value <= sup);
......
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