Commit b2e6833f authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

fix basic audio test: receiver should be intialized before sender to avoid...

fix basic audio test: receiver should be intialized before sender to avoid flushing the first received packet
parent e4183f3d
...@@ -41,3 +41,5 @@ tools/tones ...@@ -41,3 +41,5 @@ tools/tones
tester/mediastreamer2_tester tester/mediastreamer2_tester
src/gitversion.h src/gitversion.h
help/doc/ help/doc/
tester/recorded_hello8000-1s.wav
tester/recorded_hello16000-1s.wav
...@@ -499,7 +499,7 @@ void ms_base_init(){ ...@@ -499,7 +499,7 @@ void ms_base_init(){
#if !defined(_WIN32_WCE) #if !defined(_WIN32_WCE)
if (getenv("MEDIASTREAMER_DEBUG")!=NULL && strcmp(getenv("MEDIASTREAMER_DEBUG"),"1")==0){ if (getenv("MEDIASTREAMER_DEBUG")!=NULL && strcmp(getenv("MEDIASTREAMER_DEBUG"),"1")==0){
ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL); ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
}else{ }else{
ortp_set_log_level_mask(ORTP_FATAL); ortp_set_log_level_mask(ORTP_FATAL);
} }
......
...@@ -188,41 +188,37 @@ static void basic_audio_stream() { ...@@ -188,41 +188,37 @@ static void basic_audio_stream() {
rtp_profile_set_payload (profile,0,&payload_type_pcmu8000); rtp_profile_set_payload (profile,0,&payload_type_pcmu8000);
CU_ASSERT_EQUAL(audio_stream_start_full(marielle CU_ASSERT_EQUAL(audio_stream_start_full(margaux
, profile , profile
, MARGAUX_IP , MARIELLE_IP
, MARGAUX_RTP_PORT , MARIELLE_RTP_PORT
, MARGAUX_IP , MARIELLE_IP
, MARGAUX_RTCP_PORT , MARIELLE_RTCP_PORT
, 0 , 0
, 50 , 50
, HELLO_8K_1S_FILE
, NULL , NULL
, RECORDED_8K_1S_FILE
, NULL , NULL
, NULL , NULL
, 0),0); , 0),0);
ms_filter_add_notify_callback(marielle->soundread, notify_cb, &marielle_stats,TRUE); CU_ASSERT_EQUAL(audio_stream_start_full(marielle
CU_ASSERT_EQUAL(audio_stream_start_full(margaux
, profile , profile
, MARIELLE_IP , MARGAUX_IP
, MARIELLE_RTP_PORT , MARGAUX_RTP_PORT
, MARIELLE_IP , MARGAUX_IP
, MARIELLE_RTCP_PORT , MARGAUX_RTCP_PORT
, 0 , 0
, 50 , 50
, HELLO_8K_1S_FILE
, NULL , NULL
, RECORDED_8K_1S_FILE
, NULL , NULL
, NULL , NULL
, 0),0); , 0),0);
ms_filter_add_notify_callback(marielle->soundread, notify_cb, &marielle_stats,TRUE);
CU_ASSERT_TRUE(wait_for_until(&marielle->ms,&margaux->ms,&marielle_stats.number_of_EndOfFile,1,12000)); CU_ASSERT_TRUE(wait_for_until(&marielle->ms,&margaux->ms,&marielle_stats.number_of_EndOfFile,1,12000));
/* Last chance to purge jitter buffer */
ms_usleep(100000);
audio_stream_iterate(margaux);
audio_stream_iterate(marielle);
audio_stream_get_local_rtp_stats(marielle,&marielle_stats.rtp); audio_stream_get_local_rtp_stats(marielle,&marielle_stats.rtp);
audio_stream_get_local_rtp_stats(margaux,&margaux_stats.rtp); audio_stream_get_local_rtp_stats(margaux,&margaux_stats.rtp);
......
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