From 0f900a2b4d7707dddeddadd62ac5a109aed93e7e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 6 Jan 2014 08:07:56 +0100 Subject: Fix round robin frame selector. Add l16 and jpeg profiles. Add timestamp to lrtp_enqueue_frame. --- test/test_amrwb.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'test/test_amrwb.cc') diff --git a/test/test_amrwb.cc b/test/test_amrwb.cc index adefda1..d6a0731 100644 --- a/test/test_amrwb.cc +++ b/test/test_amrwb.cc @@ -68,7 +68,7 @@ public: std::vector packets; unsigned int csrc = 42; - int sent = 0; + // int sent = 0; size_t num_frames = NUM_PKGS; size_t framesize = wb_frame_size[frame_type_index] * num_frames; @@ -76,24 +76,25 @@ public: { // Encode struct lrtp_t *lrtp = lrtp_init(KEY, SSRC); - struct lrtp_profile_t *profile = + int x = lrtp_create_profile(lrtp, PROFILE_AMRWB, csrc, OPTION_AMRWB_FRAME_TYPE_INDEX, frame_type_index, OPTION_END); + CPPUNIT_ASSERT_EQUAL(0, x); char packet[PKG_SIZE]; - size_t packetsize = sizeof(packet); + //size_t packetsize = sizeof(packet); char cnt = 0; + int timestamp = 0; + for(int i = 0; i < NUM_PKGS; i++) { char frame[wb_frame_size[frame_type_index] * num_frames]; - for(int i = 0; i < framesize; i++) frame[i] = cnt++; - - int timestamp = 0; + for(size_t j = 0; j < framesize; j++) frame[j] = cnt++; - int ret = lrtp_enqueue_frame(profile, frame, framesize); + int ret = lrtp_enqueue_frame(lrtp, csrc, frame, framesize, timestamp++); while( (ret = lrtp_pack(lrtp, packet, sizeof(packet))) != 0) { std::string p; p.append(packet, ret); @@ -108,10 +109,11 @@ public: { // Decode struct lrtp_t *lrtp = lrtp_init(KEY, SSRC); - struct lrtp_profile_t *profile = + int x = lrtp_create_profile(lrtp, PROFILE_AMRWB, csrc, OPTION_AMRWB_FRAME_TYPE_INDEX, frame_type_index, OPTION_END); + CPPUNIT_ASSERT_EQUAL(0, x); char frame[16*1024]; -- cgit v1.2.3