summaryrefslogtreecommitdiff
path: root/test/test_raw.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-01-06 08:07:56 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2014-01-06 08:07:56 +0100
commit0f900a2b4d7707dddeddadd62ac5a109aed93e7e (patch)
treec7b125951de8d4e6ee045449d03b3772e84f8bac /test/test_raw.cc
parent06cd551da9405a220b170ffaf77d6554cbace69d (diff)
Fix round robin frame selector. Add l16 and jpeg profiles. Add timestamp to lrtp_enqueue_frame.
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;