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
tester/mediastreamer2_tester
src/gitversion.h
help/doc/
tester/recorded_hello8000-1s.wav
tester/recorded_hello16000-1s.wav
......@@ -499,7 +499,7 @@ void ms_base_init(){
#if !defined(_WIN32_WCE)
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{
ortp_set_log_level_mask(ORTP_FATAL);
}
......
......@@ -188,41 +188,37 @@ static void basic_audio_stream() {
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
, MARGAUX_IP
, MARGAUX_RTP_PORT
, MARGAUX_IP
, MARGAUX_RTCP_PORT
, MARIELLE_IP
, MARIELLE_RTP_PORT
, MARIELLE_IP
, MARIELLE_RTCP_PORT
, 0
, 50
, HELLO_8K_1S_FILE
, NULL
, RECORDED_8K_1S_FILE
, NULL
, NULL
, 0),0);
ms_filter_add_notify_callback(marielle->soundread, notify_cb, &marielle_stats,TRUE);
CU_ASSERT_EQUAL(audio_stream_start_full(margaux
CU_ASSERT_EQUAL(audio_stream_start_full(marielle
, profile
, MARIELLE_IP
, MARIELLE_RTP_PORT
, MARIELLE_IP
, MARIELLE_RTCP_PORT
, MARGAUX_IP
, MARGAUX_RTP_PORT
, MARGAUX_IP
, MARGAUX_RTCP_PORT
, 0
, 50
, HELLO_8K_1S_FILE
, NULL
, RECORDED_8K_1S_FILE
, NULL
, NULL
, 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));
/* 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(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