[asterisk-scf-commits] asterisk-scf/integration/media_operations_core.git branch "jitterbuffer" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Dec 21 17:29:42 CST 2011
branch "jitterbuffer" has been updated
via 1fd905f0ffe656413ee37571c8001434f55af225 (commit)
from d688cccf61498546f2419261e4578fe2967ab3e5 (commit)
Summary of changes:
test/TestMediaOperations.cpp | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 1fd905f0ffe656413ee37571c8001434f55af225
Author: Ken Hunt <ken.hunt at digium.com>
Date: Wed Dec 21 17:30:06 2011 -0600
Rounded out the partially implemented test.
diff --git a/test/TestMediaOperations.cpp b/test/TestMediaOperations.cpp
index 6cb66b7..e5ce4f6 100644
--- a/test/TestMediaOperations.cpp
+++ b/test/TestMediaOperations.cpp
@@ -1079,7 +1079,8 @@ BOOST_FIXTURE_TEST_CASE(dejitterSlin16, PerTestFixture)
ShortSeqPayloadPtr payload = ShortSeqPayloadPtr::dynamicCast(audioFrame->payload);
// For testing, we're shoving the sequence number into the first sample of the payload.
- // Sneaky.
+ // Why do we do this? The actual AudioFrame of our is reconstituded when pulling from the
+ // NetEq jitterbuffer, so the number on it wouldn't tell us anything about correctness.
payload->payload[0] = (short)audioFrame->seqno;
++i;
}
@@ -1097,9 +1098,22 @@ BOOST_FIXTURE_TEST_CASE(dejitterSlin16, PerTestFixture)
IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(5));
- FrameSeq framesWritten = Testbed.slin16NoJitterSink->getFrames();
+ FrameSeq framesDejittered = Testbed.slin16NoJitterSink->getFrames();
- BOOST_CHECK(framesWritten.size() == numFramesToDejitter);
+ BOOST_CHECK(framesDejittered.size() == numFramesToDejitter);
+
+ int frameNumber(1);
+ for (FrameSeq::iterator iter = framesDejittered.begin();
+ iter != framesDejittered.end(); ++iter)
+ {
+ AudioFramePtr audioFrame = AudioFramePtr::dynamicCast(*iter);
+ ShortSeqPayloadPtr payload = ShortSeqPayloadPtr::dynamicCast(audioFrame->payload);
+
+ // This test stored the sequence number in the 1st byte of the payload.
+ int sequenceNumber = payload->payload[0];
+ BOOST_CHECK(sequenceNumber == frameNumber);
+ ++frameNumber;
+ }
slin16NoJitterTranslator->destroy();
}
-----------------------------------------------------------------------
--
asterisk-scf/integration/media_operations_core.git
More information about the asterisk-scf-commits
mailing list