Commit 71bce450 authored by Ghislain MARY's avatar Ghislain MARY

Fix some errors in the tester on Windows Phone 8.

parent bcb80cd1
......@@ -49,7 +49,7 @@
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<AdditionalIncludeDirectories>$(ProjectDir);$(GeneratedFilesDir);$(IntDir);$(ProjectDir)..\..\..\include;$(ProjectDir)..\..\..\src;$(ProjectDir)..\..\..\src\voip;$(ProjectDir)..\..\..\tester;$(ProjectDir)..\..\..\..\ortp\include;$(ProjectDir)..\..\..\..\..\cunit\build\wp8\cunit\$(Platform)\$(Configuration);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;HAVE_CU_GET_SUITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;HAVE_CU_GET_SUITE;VIDEO_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
......@@ -104,6 +104,7 @@
<ClCompile Include="..\..\..\tester\mediastreamer2_sound_card_tester.c" />
<ClCompile Include="..\..\..\tester\mediastreamer2_tester.c" />
<ClCompile Include="..\..\..\tester\mediastreamer2_tester_private.c" />
<ClCompile Include="..\..\..\tester\mediastreamer2_video_stream_tester.c" />
<ClCompile Include="mediastreamer2-tester-native.cpp">
<CompileAsWinRT>true</CompileAsWinRT>
</ClCompile>
......
......@@ -120,6 +120,10 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Sounds\bird_44100_stereo.wav" />
<Content Include="Assets\Sounds\hello16000-1s.wav" />
<Content Include="Assets\Sounds\hello16000.wav" />
<Content Include="Assets\Sounds\hello8000-1s.wav" />
<Content Include="Assets\Sounds\hello8000.wav" />
<Content Include="Assets\Sounds\owl_44100_mono.wav" />
<Content Include="Assets\Sounds\arpeggio_8000_mono.wav" />
<Content Include="Assets\Sounds\chimes_48000_stereo.wav" />
......
......@@ -13,6 +13,7 @@ MSFilterDesc * ms_base_filter_descs[]={
&ms_void_source_desc,
&ms_void_sink_desc,
&ms_itc_source_desc,
&ms_itc_sink_desc,
NULL
};
......@@ -14,10 +14,13 @@ extern MSFilterDesc ms_speex_enc_desc;
extern MSFilterDesc ms_gsm_dec_desc;
extern MSFilterDesc ms_gsm_enc_desc;
extern MSFilterDesc ms_speex_ec_desc;
extern MSFilterDesc ms_opus_dec_desc;
extern MSFilterDesc ms_opus_enc_desc;
extern MSFilterDesc ms_conf_desc;
#ifndef NO_RESAMPLE
extern MSFilterDesc ms_resample_desc;
#endif
extern MSFilterDesc ms_channel_adapter_desc;
extern MSFilterDesc ms_volume_desc;
extern MSFilterDesc ms_equalizer_desc;
extern MSFilterDesc ms_audio_mixer_desc;
......@@ -69,10 +72,13 @@ MSFilterDesc * ms_voip_filter_descs[]={
&ms_gsm_dec_desc,
&ms_gsm_enc_desc,
&ms_speex_ec_desc,
&ms_opus_dec_desc,
&ms_opus_enc_desc,
&ms_conf_desc,
#ifndef NORESAMPLE
&ms_resample_desc,
#endif
&ms_channel_adapter_desc,
&ms_volume_desc,
&ms_equalizer_desc,
&ms_audio_mixer_desc,
......
This diff is collapsed.
......@@ -183,63 +183,83 @@ static void uninit_video_streams(video_stream_tester_t *marielle, video_stream_t
static void basic_video_stream(void) {
video_stream_tester_t marielle;
video_stream_tester_t margaux;
bool_t supported = ms_filter_codec_supported("vp8");
init_video_streams(&marielle, &margaux, FALSE, FALSE, NULL);
if (supported) {
init_video_streams(&marielle, &margaux, FALSE, FALSE, NULL);
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_SR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_SR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
video_stream_get_local_rtp_stats(marielle.vs, &marielle.stats.rtp);
video_stream_get_local_rtp_stats(margaux.vs, &margaux.stats.rtp);
video_stream_get_local_rtp_stats(marielle.vs, &marielle.stats.rtp);
video_stream_get_local_rtp_stats(margaux.vs, &margaux.stats.rtp);
uninit_video_streams(&marielle, &margaux);
uninit_video_streams(&marielle, &margaux);
} else {
ms_error("VP8 codec is not supported!");
}
}
static void basic_one_way_video_stream(void) {
video_stream_tester_t marielle;
video_stream_tester_t margaux;
bool_t supported = ms_filter_codec_supported("vp8");
init_video_streams(&marielle, &margaux, FALSE, TRUE, NULL);
if (supported) {
init_video_streams(&marielle, &margaux, FALSE, TRUE, NULL);
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_RR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_RR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
video_stream_get_local_rtp_stats(marielle.vs, &marielle.stats.rtp);
video_stream_get_local_rtp_stats(margaux.vs, &margaux.stats.rtp);
video_stream_get_local_rtp_stats(marielle.vs, &marielle.stats.rtp);
video_stream_get_local_rtp_stats(margaux.vs, &margaux.stats.rtp);
uninit_video_streams(&marielle, &margaux);
uninit_video_streams(&marielle, &margaux);
} else {
ms_error("VP8 codec is not supported!");
}
}
static void avpf_video_stream(void) {
video_stream_tester_t marielle;
video_stream_tester_t margaux;
OrtpNetworkSimulatorParams params = { 0 };
bool_t supported = ms_filter_codec_supported("vp8");
params.enabled = TRUE;
params.loss_rate = 5.;
init_video_streams(&marielle, &margaux, TRUE, FALSE, &params);
if (supported) {
params.enabled = TRUE;
params.loss_rate = 5.;
init_video_streams(&marielle, &margaux, TRUE, FALSE, &params);
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_SR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
CU_ASSERT_TRUE(marielle.stats.number_of_PLI >= 0);
CU_ASSERT_TRUE(marielle.stats.number_of_SLI > 0);
CU_ASSERT_TRUE(marielle.stats.number_of_RPSI > 0);
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_SR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
CU_ASSERT_TRUE(marielle.stats.number_of_PLI >= 0);
CU_ASSERT_TRUE(marielle.stats.number_of_SLI > 0);
CU_ASSERT_TRUE(marielle.stats.number_of_RPSI > 0);
uninit_video_streams(&marielle, &margaux);
uninit_video_streams(&marielle, &margaux);
} else {
ms_error("VP8 codec is not supported!");
}
}
static void avpf_high_loss_video_stream(void) {
video_stream_tester_t marielle;
video_stream_tester_t margaux;
OrtpNetworkSimulatorParams params = { 0 };
bool_t supported = ms_filter_codec_supported("vp8");
params.enabled = TRUE;
params.loss_rate = 25.;
init_video_streams(&marielle, &margaux, TRUE, FALSE, &params);
if (supported) {
params.enabled = TRUE;
params.loss_rate = 25.;
init_video_streams(&marielle, &margaux, TRUE, FALSE, &params);
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_SR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
CU_ASSERT_TRUE(marielle.stats.number_of_PLI >= 0);
CU_ASSERT_TRUE(marielle.stats.number_of_SLI > 0);
CU_ASSERT_TRUE(marielle.stats.number_of_RPSI >= 0);
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle.vs->ms, &margaux.vs->ms, &marielle.stats.number_of_SR, 2, 15000, event_queue_cb, &marielle.stats, event_queue_cb, &margaux.stats));
CU_ASSERT_TRUE(marielle.stats.number_of_PLI >= 0);
CU_ASSERT_TRUE(marielle.stats.number_of_SLI > 0);
CU_ASSERT_TRUE(marielle.stats.number_of_RPSI >= 0);
uninit_video_streams(&marielle, &margaux);
uninit_video_streams(&marielle, &margaux);
} else {
ms_error("VP8 codec is not supported!");
}
}
......
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