diff options
Diffstat (limited to 'test/test_amrwb.cc')
| -rw-r--r-- | test/test_amrwb.cc | 18 | 
1 files changed, 10 insertions, 8 deletions
| 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<std::string> 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]; | 
