Commit ce8e8047 authored by Sandrine Avakian's avatar Sandrine Avakian

Update test bv16.

parent b6330070
......@@ -65,6 +65,13 @@ static int enc_set_ptime(MSFilter *f, void* arg){
return 0;
}
static int enc_get_ptime(MSFilter *f, void * arg){
EncState *s=(EncState*)f->data;
*((int *)arg) = d->ptime;
return 0;
}
static int enc_add_fmtp(MSFilter *f, void *arg){
EncState *s=(EncState*)f->data;
const char *fmtp=(const char *)arg;
......@@ -177,6 +184,7 @@ static MSFilterMethod enc_methods[]={
{MS_FILTER_GET_SAMPLE_RATE ,enc_get_sample_rate },
{MS_FILTER_GET_NCHANNELS ,get_channels},
{MS_AUDIO_ENCODER_SET_PTIME, enc_set_ptime},
{ MS_AUDIO_ENCODER_GET_PTIME, enc_get_ptime },
{ 0 , NULL }
};
......
......@@ -75,8 +75,8 @@ static int tester_after_all(void) {
#define HELLO_16K_1S_FILE "sounds/hello16000-1s.wav"
#define RECORDED_16K_1S_FILE "recorded_hello16000-1s.wav"
#define RECORDED_16K_1S_BV16_FILE "recorded_hello16000-1sbv16.wav"
#define RECORDED_16K_1S_BV16_NO_PLC_FILE "withoutplc_recorded_hello16000-1sbv16.wav"
//#define RECORDED_16K_1S_FILE "recorded_hello16000-1sbv16.wav"
#define RECORDED_16K_1S_NO_PLC_FILE "withoutplc_recorded_hello16000-1sbv16.wav"
typedef struct _stream_manager_t {
MSFormatType type;
......@@ -435,8 +435,8 @@ static void loss_rate_estimation_bv16(void){
ortp_ev_queue_destroy(ctx.q);
}
/*file without plc must be approx 15% smaller in size than with plc */
size_with_plc= fsize(bc_tester_file(RECORDED_16K_1S_BV16_FILE));
size_no_plc = fsize(bc_tester_file(RECORDED_16K_1S_BV16_NO_PLC_FILE));
size_with_plc= fsize(bc_tester_file(RECORDED_16K_1S_FILE));
size_no_plc = fsize(bc_tester_file(RECORDED_16K_1S_NO_PLC_FILE));
int result = (size_with_plc*loss_rate/100 + size_no_plc) ;
BC_ASSERT_TRUE(result >= size_with_plc);
......
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