--- a/multimediacommscontroller/mmccrtpsourcesink/tsrc/ut_rtpsourcesink/src/UT_CMccRtpDataSource.cpp Wed Sep 15 12:38:06 2010 +0300
+++ b/multimediacommscontroller/mmccrtpsourcesink/tsrc/ut_rtpsourcesink/src/UT_CMccRtpDataSource.cpp Wed Oct 13 14:59:15 2010 +0300
@@ -36,7 +36,6 @@
#include <srtpstreamin.h>
#include "UT_CMccRtpInterface.h"
#include "mccunittestmacros.h"
-#include "mccrtpmediaclock.h"
// CONSTANTS
_LIT8(KRFC3711_TestMasterKey128bits, "E1F97A0D3E018BE0D64FA32C06DE4139");
@@ -104,8 +103,7 @@
CMccRtpKeepaliveContainer::NewL( *eventHandler,
*iRtpApi,
rtpSessionId );
-
- iRtpMediaClock = CMccRtpMediaClock::NewL();
+
}
void UT_CMccRtpDataSource::Teardown()
@@ -130,12 +128,6 @@
}
delete iEventHandler;
-
- if ( iRtpMediaClock )
- {
- delete iRtpMediaClock;
- iRtpMediaClock = NULL;
- }
}
@@ -173,7 +165,7 @@
cInfo.iBitrate = 8000;
cInfo.iPayloadType = KDefaultAmrNbPT;
TMccCodecInfoBuffer cInfoBuf( cInfo );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf ) );
}
// TEST FUNCTIONS
@@ -217,7 +209,7 @@
cInfo.iPayloadType = KDefaultAmrNbPT;
TMccCodecInfoBuffer cInfoBuf( cInfo );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf ) );
//iSource->NegotiateSourceL( *iEventHandler );
EUNIT_ASSERT_NO_LEAVE( iSource->NegotiateSourceL( *amrPfRead ) );
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePrimeL() );
@@ -383,7 +375,7 @@
cInfo.iPayloadType = KDefaultAmrNbPT;
TMccCodecInfoBuffer cInfoBuf( cInfo );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf ) );
MCC_EUNIT_ASSERT_EQUALS( iSource->SourceThreadLogon( *iEventHandler ), KErrNone );
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePrimeL() );
@@ -408,7 +400,7 @@
cInfo.iPayloadType = KDefaultAmrNbPT;
TMccCodecInfoBuffer cInfoBuf( cInfo );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf ) );
MCC_EUNIT_ASSERT_EQUALS( iSource->SourceThreadLogon( *iEventHandler ), KErrNone );
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePrimeL() );
@@ -529,7 +521,7 @@
cInfo.iPayloadType = KDefaultAmrNbPT;
TMccCodecInfoBuffer cInfoBuf( cInfo );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf ) );
MCC_EUNIT_ASSERT_EQUALS( iSource->SourceThreadLogon( *iEventHandler ), KErrNone );
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePrimeL() );
@@ -615,7 +607,7 @@
cInfo.iFourCC = TFourCC( KMccFourCCIdG711 );
cInfo.iEnableDTX = ETrue;
TMccCodecInfoBuffer cInfoBuf( cInfo );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf ) );
header.iPayloadType = KPcmuPayloadType;
@@ -647,7 +639,7 @@
TMccCodecInfo cInfo;
TMccCodecInfoBuffer cInfoBuf( cInfo );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf ) );
// Get a new Source
Teardown();
@@ -657,7 +649,7 @@
TBuf8<5> dummy;
dummy.Format( _L8( "foo42" ) );
EUNIT_ASSERT_NO_LEAVE( iSource->SetSessionParamsL( params ) );
- EUNIT_ASSERT_LEAVE( iSource->ConfigureL( dummy, iRtpMediaClock ) );
+ EUNIT_ASSERT_LEAVE( iSource->ConfigureL( dummy ) );
// Get a new Source
Teardown();
@@ -678,7 +670,7 @@
cInfo2.iAlgoUsed = EGenRedUsed;
TMccCodecInfoBuffer cInfoBuf2( cInfo2 );
- EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf2, iRtpMediaClock ) );
+ EUNIT_ASSERT_NO_LEAVE( iSource->ConfigureL( cInfoBuf2 ) );
}
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_DoCreateSrtpStreamL()
@@ -709,7 +701,7 @@
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamResumed );
// Jitter event when no event handler
- TMccRtpEventDataExtended eventData;
+ TMccRtpEventData eventData;
iSource->SendJitterEvent( eventData, KErrNone );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamResumed );
@@ -787,19 +779,6 @@
iSource->SendSecureRtpEventToClient(
iEventHandler, KMccRtpSourceUid, EMccInternalEventNone, KMccStreamPaused, 0 );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamPaused );
-
- // SendJitterEventToClient()
- iSource->SendJitterEventToClient( iEventHandler, KMccRtpSourceUid,
- EMccInternalEventNone, KMccEventNone, 0, 0, 1,2,3,4,5,6 );
- EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccEventNone );
- const TMccRtpEventDataExtended& rtpEvent =
- (*reinterpret_cast<const TMccRtpEventDataExtendedPackage*>( &iEventHandler->iLastEvent.iEventData ))();
- EUNIT_ASSERT_EQUALS( rtpEvent.iJitterEstimate, 1 );
- EUNIT_ASSERT_EQUALS( rtpEvent.iPacketsReceived, 2 );
- EUNIT_ASSERT_EQUALS( rtpEvent.iPrevTransTime, 3 );
- EUNIT_ASSERT_EQUALS( rtpEvent.iTriggeredJitterLevel, 4 );
- EUNIT_ASSERT_EQUALS( rtpEvent.iPacketLoss, 5 );
- EUNIT_ASSERT_EQUALS( rtpEvent.iTriggeredPacketLoss, 6 );
}
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_DoStandbyDecisionL()