summaryrefslogtreecommitdiff
path: root/test/test_raw.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_raw.cc')
-rw-r--r--test/test_raw.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/test_raw.cc b/test/test_raw.cc
index d3910d3..e219ffa 100644
--- a/test/test_raw.cc
+++ b/test/test_raw.cc
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set et sw=2 ts=2: */
/***************************************************************************
- * test_init.cc
+ * test_raw.cc
*
* Mon Sep 2 14:02:16 CEST 2013
* Copyright 2013 Bent Bisballe Nyeng
@@ -57,22 +57,22 @@ public:
{ // Encode
struct lrtp_t *lrtp = lrtp_init(KEY, SSRC);
- struct lrtp_profile_t *profile =
- lrtp_create_profile(lrtp, PROFILE_RAW, csrc,
- OPTION_RAW_PKG_SIZE, pkg_size,
- OPTION_END);
-
+ int x = lrtp_create_profile(lrtp, PROFILE_RAW, csrc,
+ OPTION_RAW_PKG_SIZE, pkg_size,
+ OPTION_END);
+ CPPUNIT_ASSERT_EQUAL(0, x);
+
char num = 0;
char packet[16*1024];
- size_t size = sizeof(packet);
+ //size_t size = sizeof(packet);
for(unsigned int ts = 0; ts < 8; ts++) {
- for(int i = 0; i < sizeof(frame); i++) frame[i] = num++;
+ for(size_t i = 0; i < sizeof(frame); i++) frame[i] = num++;
int ret = 0;
- ret = lrtp_enqueue_frame(profile, frame, sizeof(frame));
+ ret = lrtp_enqueue_frame(lrtp, csrc, frame, sizeof(frame), ts);
while( (ret = lrtp_pack(lrtp, packet, sizeof(packet))) != 0) {
std::string p;
p.append(packet, ret);
@@ -89,15 +89,15 @@ public:
{ // Decode
struct lrtp_t *lrtp = lrtp_init(KEY, SSRC);
- struct lrtp_profile_t *profile =
- lrtp_create_profile(lrtp, PROFILE_RAW, csrc,
- OPTION_RAW_PKG_SIZE, pkg_size,
- OPTION_END);
-
+ int x = lrtp_create_profile(lrtp, PROFILE_RAW, csrc,
+ OPTION_RAW_PKG_SIZE, pkg_size,
+ OPTION_END);
+ CPPUNIT_ASSERT_EQUAL(0, x);
+
char frame[16*1024];
size_t framesize = sizeof(frame);
- int cnt = 0;
+ //int cnt = 0;
char num = 0;