--- a/ipappprotocols_plat/rtprtcp_api/inc/rtpapi.h Thu Jun 24 14:43:49 2010 +0300
+++ b/ipappprotocols_plat/rtprtcp_api/inc/rtpapi.h Mon Jun 28 19:10:29 2010 +0300
@@ -334,15 +334,7 @@
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
TRequestStatus& aStatus );
-
- /**
- * Send an RTP data packet, with a given CSRC list.
- * @param aHeaderInfo - [input] TRtpSendPktParam and CSRC list.
- * @return KErrNone if successful; system wide error code otherwise
- */
- IMPORT_C TInt SendRtpPacket( const TRtpSendPktParams& aSendPktParam,
- TArray<TRtpCSRC> aCSRCList);
-
+
/**
* Send a non-RTP (control) data packet asynchronously
@@ -541,30 +533,8 @@
* @return KErrNone.
*/
IMPORT_C TInt NotInUseSetNonRTPDataObserver( );
-
-
- /**
- * Register a callback object for Send RTP data packets from an RTP
- * Session. Only one Sender callback object is allowed to be
- * registered for one Session.
- * MRTPPacketObserver::ReadyToSendRtpPacket function from aRtpObserver object is
- * called when an RTP data packet is received.
- * @param aSessionId - [input] RTP Session ID
- * @param aRtpObserver - [input] Callback object to receive RTP packets
- * @return KErrNone if successful; system wide error code otherwise
- */
- IMPORT_C TInt RegisterRtpPostProcessingObserver( TRtpId aSessionId,
- MRtpPostProcessingObserver& aRtpObserver );
-
-
- /**
- * Unregister RTP Packet observer callback object associated with an RTP
- * session.
- * @param aSessionId - [input] RTP Session ID
- * @return None
- */
- IMPORT_C void UnregisterRtpPostProcessingObserver( TRtpId aSessionId );
-
+
+
private:
/**
* C++ default constructor.
--- a/ipappprotocols_plat/rtprtcp_api/inc/rtpdef.h Thu Jun 24 14:43:49 2010 +0300
+++ b/ipappprotocols_plat/rtprtcp_api/inc/rtpdef.h Mon Jun 28 19:10:29 2010 +0300
@@ -34,7 +34,6 @@
const TUint KMaxSdesItemSize = 255;
const TUint KSocketBufSize = 4096;
const TInt KMinRtpHeaderSize = 12; // 96 bits in header, 96/8 = 12
-const TInt KMaxCsrcIdentifiers = 15;
// DATA TYPES
@@ -42,7 +41,6 @@
const TRtpId KNullId = 0xffffffff;
typedef TUint32 TRtpSSRC; //
-typedef TUint32 TRtpCSRC; //
typedef TUint8 TRtpPayloadType; // payload type of the RTP packet
typedef TUint16 TRtpSequence; // sequence number of the RTP packet
typedef TUint32 TRtpTimeStamp; // timestamp of the RTP packet
@@ -57,7 +55,6 @@
// FORWARD DECLARATIONS
class TRtpSendHeader;
class TRtpRecvHeader;
-class TRtpSendPktParams;
// CLASS DECLARATION
@@ -209,30 +206,6 @@
};
-/**
-* Header class for sending RTP Packets
-*
-* @lib RtpService.dll
-*/
-class TRtpSendPktParams
- {
-public:
-
- TRtpSendPktParams(TRtpSendHeader &aHeaderInfo);
-
- TRtpId iTranStreamId; // Transtream Id
- TRtpSendHeader &iHeaderInfo; // Standard fixed header of RTP packet to send.
- TPtrC8 iPayloadData; // Payload
- TRequestStatus *iStatus;
- TRtpSequence *iSequenceNum; // Sequence Number
- };
-
-inline TRtpSendPktParams::TRtpSendPktParams(TRtpSendHeader &aHeaderInfo) : iTranStreamId( 0 ),
- iHeaderInfo( aHeaderInfo ),
- iStatus( 0 ),
- iSequenceNum( 0 )
- {
- };
/**
* An interface to the callback functions for asynchronous event
@@ -345,23 +318,4 @@
};
-
-/**
-* callback functions for Send RTP packets.
-*
-* @lib RtpService.dll
-*/
-class MRtpPostProcessingObserver
- {
- public:
- /**
- * Callback function to receive a handle to RTP packet which is ready to send.
- * @param TRtpId aTranStreamId - Transimission stream id
- * @param TPtr8 &aPacket - RTP packet Ready to send
- * @return None
- */
- virtual void ReadyToSendRtpPacket( TRtpId aTranStreamId, TPtr8 &aPacket ) = 0;
-
- };
-
#endif // __RTPDEF_H
--- a/rtp/rtpstack/bwins/rtpserviceu.def Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/bwins/rtpserviceu.def Mon Jun 28 19:10:29 2010 +0300
@@ -44,7 +44,4 @@
?UnregisterRtpObserver@CRtpAPI@@QAEXK@Z @ 43 NONAME ; void CRtpAPI::UnregisterRtpObserver(unsigned long)
?Version@CRtpAPI@@QBE?AVTVersion@@XZ @ 44 NONAME ; class TVersion CRtpAPI::Version(void) const
?CreateSessionL@CRtpAPI@@QAEKABVTCreateSessionParams@@AAIHPBVTRtcpParams@@AAVCSRTPSession@@@Z @ 45 NONAME ; unsigned long CRtpAPI::CreateSessionL(class TCreateSessionParams const &, unsigned int &, int, class TRtcpParams const *, class CSRTPSession &)
- ?SendRtpPacket@CRtpAPI@@QAEHABVTRtpSendPktParams@@V?$TArray@K@@@Z @ 46 NONAME ; int CRtpAPI::SendRtpPacket(class TRtpSendPktParams const &, class TArray<unsigned long>)
- ?RegisterRtpPostProcessingObserver@CRtpAPI@@QAEHKAAVMRtpPostProcessingObserver@@@Z @ 47 NONAME ; int CRtpAPI::RegisterRtpPostProcessingObserver(unsigned long, class MRtpPostProcessingObserver &)
- ?UnregisterRtpPostProcessingObserver@CRtpAPI@@QAEXK@Z @ 48 NONAME ; void CRtpAPI::UnregisterRtpPostProcessingObserver(unsigned long)
--- a/rtp/rtpstack/eabi/rtpserviceu.def Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/eabi/rtpserviceu.def Mon Jun 28 19:10:29 2010 +0300
@@ -74,7 +74,3 @@
_ZTI12CRtpSendItem @ 73 NONAME ; #<TI>#
_ZTI15CRtpSessionSrtp @ 74 NONAME ; #<TI>#
_ZTV15CRtpSessionSrtp @ 75 NONAME ; #<VT>#
- _ZN7CRtpAPI13SendRtpPacketERK17TRtpSendPktParams6TArrayImE @ 76 NONAME
- _ZN7CRtpAPI33RegisterRtpPostProcessingObserverEmR26MRtpPostProcessingObserver @ 77 NONAME
- _ZN7CRtpAPI35UnregisterRtpPostProcessingObserverEm @ 78 NONAME
-
--- a/rtp/rtpstack/inc/rtpmanager.h Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/inc/rtpmanager.h Mon Jun 28 19:10:29 2010 +0300
@@ -135,31 +135,24 @@
TInt RegisterRtpObserver( TRtpId aSessionId, MRtpObserver& aObserver );
void UnregisterRtpObserver( TRtpId aSessionId );
-
- TInt RegisterRtpPostProcessingObserver( TRtpId aSessionId, MRtpPostProcessingObserver& aRtpObserver );
-
- void UnregisterRtpPostProcessingObserver( TRtpId aSessionId );
TInt SetNonRTPDataObserver( TRtpId aSessionId,
MNonRTPDataObserver* aNonRTPDataObserver );
TInt SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
- const TDesC8& aPayloadData,
- const TArray<TRtpCSRC> *aCsrcList = NULL );
+ const TDesC8& aPayloadData );
TInt SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList = NULL );
+ TRequestStatus& aStatus );
TInt SendRtpPacket( TRtpId aTranStreamId,
TRtpSequence aSequenceNum,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList = NULL );
+ TRequestStatus& aStatus );
void SendDataL( TRtpId aSessionId,
TBool aUseRTPSocket,
--- a/rtp/rtpstack/inc/rtppacketparam.h Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/inc/rtppacketparam.h Mon Jun 28 19:10:29 2010 +0300
@@ -184,7 +184,6 @@
TUint32* CSRCarray;
TUint8* payloadData;
TInt payloadDataLen;
- const TArray<TRtpCSRC> *iCsrcList;
public://Nested class
/**
--- a/rtp/rtpstack/inc/rtpsession.h Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/inc/rtpsession.h Mon Jun 28 19:10:29 2010 +0300
@@ -108,20 +108,16 @@
TInt RegisterRtpObserver( MRtpObserver& aObserver );
void UnregisterRtpObserver();
-
- TInt RegisterRtpPostProcessingObserver( MRtpPostProcessingObserver& aObserver );
- void UnregisterRtpPostProcessingObserver();
TInt SetNonRTPDataObserver( MNonRTPDataObserver* aNonRTPDataObserver );
TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo,
- const TDesC8& aPayloadData, const TArray<TRtpCSRC> *aCsrcList = NULL );
+ const TDesC8& aPayloadData );
TInt SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList = NULL );
+ TRequestStatus& aStatus );
TInt SendRtpPacket( const TRtpSendHeader& aHeaderInfo, const TDesC8& aPayloadData );
@@ -132,8 +128,7 @@
TRtpSequence aSequenceNum,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList = NULL );
+ TRequestStatus& aStatus );
void SendData( TBool aUseRTPSocket,
const TDesC8& aData,
@@ -167,8 +162,6 @@
* disabled; system wide error code otherwise
*/
TInt IsRtcpSendingSuspended( TBool& aAutoSending );
-
- void ReadyToSendRtpPacket(TRtpId aTranStreamId);
public: // from MSsrcCheckCallback
/**
@@ -461,7 +454,6 @@
MNonRTPDataObserver* iNonRTPDataObserver;
MRtpErrNotify& iErrNotify;
MRtpAsignUniqueID& iAssignUniqueID;
- MRtpPostProcessingObserver* iRtpPacketObserver;
TBool iSessionStarted;
--- a/rtp/rtpstack/inc/rtpsessionsrtp.h Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/inc/rtpsessionsrtp.h Mon Jun 28 19:10:29 2010 +0300
@@ -55,21 +55,19 @@
~CRtpSessionSrtp();
TInt SendRtpPacket( TRtpId aTranStreamId, const TRtpSendHeader& aHeaderInfo,
- const TDesC8& aPayloadData, const TArray<TRtpCSRC> *aCsrcList = NULL );
+ const TDesC8& aPayloadData );
TInt SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList = NULL);
+ TRequestStatus& aStatus );
TInt SendRtpPacket( TRtpId aTranStreamId,
TRtpSequence aSequenceNum,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList = NULL );
+ TRequestStatus& aStatus );
//TInt SendRtcpByePacket( TRtpId aTranStreamId, const TDesC8& aReason );
//TInt SendRtcpAppPacket( TRtpId aTranStreamId, const TRtcpApp& aApp );
--- a/rtp/rtpstack/inc/rtptranstream.h Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/inc/rtptranstream.h Mon Jun 28 19:10:29 2010 +0300
@@ -49,8 +49,7 @@
const TDesC8& aPayloadData,
TRtpSequence aSeqNum,
TBool aSetSeqNum,
- CRtpPacket* aPktSnd,
- const TArray<TRtpCSRC> *aCsrcList = NULL);
+ CRtpPacket* aPktSnd );
TInt BuildRtcpBYEPacket( const TDesC8& aReason,
CRtpPacket* aPktRtcpSnd );
--- a/rtp/rtpstack/src/rtpapi.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtpapi.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -389,56 +389,6 @@
{
return iManager->SendRtpPacket( aTranStreamId, aHeaderInfo, aPayloadData, aStatus );
}
-
-
-// ---------------------------------------------------------------------------
-// TInt CRtpAPI::RegisterRtpPostProcessingObserver()
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CRtpAPI::RegisterRtpPostProcessingObserver( TRtpId aSessionId,
- MRtpPostProcessingObserver& aRtpPacketObserver )
- {
- return iManager->RegisterRtpPostProcessingObserver( aSessionId, aRtpPacketObserver );
- }
-
-
-// ---------------------------------------------------------------------------
-// CRtpAPI::UnregisterRtpPostProcessingObserver()
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRtpAPI::UnregisterRtpPostProcessingObserver( TRtpId aSessionId )
- {
- iManager->UnregisterRtpPostProcessingObserver( aSessionId );
- }
-
-
-// ---------------------------------------------------------------------------
-// TInt CRtpAPI::SendRtpPacket()
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TInt CRtpAPI::SendRtpPacket(const TRtpSendPktParams& aSendPktParam , TArray<TRtpCSRC> aCSRCList)
- {
- if(!aSendPktParam.iStatus)
- {
- //SYNC Version
- return iManager->SendRtpPacket( aSendPktParam.iTranStreamId, aSendPktParam.iHeaderInfo,
- aSendPktParam.iPayloadData, &aCSRCList );
- }
- else if (!aSendPktParam.iSequenceNum) //ASYNC Versions With and Without SEQ Number
- {
- return iManager->SendRtpPacket( aSendPktParam.iTranStreamId, aSendPktParam.iHeaderInfo,
- aSendPktParam.iPayloadData, *aSendPktParam.iStatus, &aCSRCList );
- }
- else
- {
- return iManager->SendRtpPacket( aSendPktParam.iTranStreamId, *aSendPktParam.iSequenceNum, aSendPktParam.iHeaderInfo,
- aSendPktParam.iPayloadData, *aSendPktParam.iStatus, &aCSRCList );
- }
- }
-
// ---------------------------------------------------------------------------
// TInt CRtpAPI::SendData()
--- a/rtp/rtpstack/src/rtpmanager.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtpmanager.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -721,47 +721,6 @@
return result;
}
-
-// ---------------------------------------------------------------------------
-// TInt CRtpManager::RegisterRtpPostProcessingObserver()
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRtpManager::RegisterRtpPostProcessingObserver( TRtpId aSessionId, MRtpPostProcessingObserver& aRtpPacketObserver )
- {
- CRtpSession* session = GetSession( aSessionId );
- TInt result( KErrGeneral );
- if ( session )
- {
- result = session->RegisterRtpPostProcessingObserver( aRtpPacketObserver );
- }
- else
- {
- RTP_DEBUG_DETAIL( "CRtpManager::RegisterRtpPostProcessingObserver, Session not found" );
- }
- return result;
- }
-
-
-// ---------------------------------------------------------------------------
-// CRtpManager::UnregisterRtpPostProcessingObserver()
-//
-// ---------------------------------------------------------------------------
-//
-void CRtpManager::UnregisterRtpPostProcessingObserver( TRtpId aSessionId )
- {
- CRtpSession* session = GetSession( aSessionId );
-
- if ( session )
- {
- session->UnregisterRtpPostProcessingObserver();
- }
- else
- {
- RTP_DEBUG_DETAIL( "CRtpManager::UnregisterRtpPostProcessingObserver, Session not found" );
- }
- }
-
// ---------------------------------------------------------------------------
// CRtpManager::UnregisterRtpObserver()
//
@@ -814,8 +773,7 @@
//
TInt CRtpManager::SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
- const TDesC8& aPayloadData,
- const TArray<TRtpCSRC> *aCsrcList)
+ const TDesC8& aPayloadData )
{
CRtpSession* rtpSession = GetSession( aTranStreamId );
@@ -828,13 +786,13 @@
return static_cast<CRtpSessionSrtp*>
(rtpSession)->SendRtpPacket( aTranStreamId, aHeaderInfo,
- aPayloadData, aCsrcList );
+ aPayloadData );
}
else
{
return rtpSession->SendRtpPacket( aTranStreamId, aHeaderInfo,
- aPayloadData, aCsrcList );
+ aPayloadData );
}
}
else
@@ -857,8 +815,7 @@
TInt CRtpManager::SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList)
+ TRequestStatus& aStatus )
{
CRtpSession* rtpSession = GetSession( aTranStreamId );
@@ -871,13 +828,13 @@
return static_cast<CRtpSessionSrtp*>
(rtpSession)->SendRtpPacket( aTranStreamId, aHeaderInfo,
- aPayloadData, aStatus, aCsrcList );
+ aPayloadData, aStatus );
}
else
{
return rtpSession->SendRtpPacket( aTranStreamId, aHeaderInfo,
- aPayloadData, aStatus, aCsrcList );
+ aPayloadData, aStatus );
}
}
@@ -903,8 +860,7 @@
TRtpSequence aSequenceNum,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList )
+ TRequestStatus& aStatus )
{
CRtpSession* rtpSession = GetSession( aTranStreamId );
TInt result( KErrNone );
@@ -918,14 +874,14 @@
result = static_cast<CRtpSessionSrtp*>
(rtpSession)->SendRtpPacket( aTranStreamId, aSequenceNum,
aHeaderInfo, aPayloadData,
- aStatus, aCsrcList );
+ aStatus );
}
else
{
result = rtpSession->SendRtpPacket( aTranStreamId, aSequenceNum,
aHeaderInfo, aPayloadData,
- aStatus, aCsrcList );
+ aStatus );
}
}
--- a/rtp/rtpstack/src/rtppacket.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtppacket.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -123,8 +123,8 @@
* *
* 2 bit = version *
* 1 bit = padding *
- * 1 bit = extension *
- * 4 bit = CRSRC Count *
+ * 1 bit = CRSRC Count *
+ * 4 bit = extension *
****************************/
//version (2 bit)
@@ -143,17 +143,13 @@
dataP[0] |= ( 1 << 4 );
}
- // CC 4 bit)
- if( aInitParam->TRTP.numCSRC)
- {
- dataP[0] |= aInitParam->TRTP.numCSRC;
- }
+ // CC = 0 (1 bit)
/****************************
* dataP[1] = 8 bit *
* *
* 1 bit = marker *
- * 7 bits = payload type *
+ * 1 bit = payload type *
****************************/
// marker (1 bit)
@@ -186,15 +182,6 @@
//set the pointer to point to the first bit after SSRC
dataP += 4;
-
-
- //Set CSRC if Present
- for(TInt count = 0; count<aInitParam->TRTP.numCSRC; count++)
- {
- Write32( dataP, (*aInitParam->TRTP.iCsrcList)[count]);
- dataP += 4;
- }
-
if ( aInitParam->TRTP.fHeaderExtension )
{
@@ -688,7 +675,7 @@
// Originally Allocate memory for all CSRC:s
//it will have memeory resouce problem so only allocate when
// CSRC<2
- if ( aExtractParam->TRTP.numCSRC <= KCSRCListMax )
+ if ( aExtractParam->TRTP.numCSRC < KCSRCListMax )
{
if ( !aExtractParam->TRTP.CSRCarray )
{
--- a/rtp/rtpstack/src/rtppacketparam.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtppacketparam.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -115,7 +115,6 @@
CSRCarray( NULL ),
payloadData( NULL ),
payloadDataLen( 0 ),
- iCsrcList(0),
extension()
{
}
--- a/rtp/rtpstack/src/rtprecvstream.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtprecvstream.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -241,11 +241,6 @@
iHdr.iPadding = extractParam.TRTP.padding;
iHdr.iExtension = extractParam.TRTP.fHeaderExtension;
iHdr.iCsrcCount = extractParam.TRTP.numCSRC;
-
- if ( iHdr.iCsrcCount )
- {
- iHdr.iCsrcList = extractParam.TRTP.CSRCarray;
- }
iHdr.iMarker = extractParam.TRTP.marker;
iHdr.iTimestamp = streamParam.TRTP.timeStamp;
--- a/rtp/rtpstack/src/rtpsession.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtpsession.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -573,23 +573,6 @@
}
}
-
-// ---------------------------------------------------------------------------
-// TInt CRtpSession::ReadyToSendRtpPacket()
-//
-// ---------------------------------------------------------------------------
-//
-void CRtpSession::ReadyToSendRtpPacket(TRtpId aTranStreamId)
- {
- if ( iRtpPacketObserver )
- {
- RTP_DEBUG_DETAIL("Giving ReadyToSendRtpPacket() Call Back " );
- TPtr8 pktPtr(iPktSnd->Data(), iPktSnd->Size(), iPktSnd->Size());
- iRtpPacketObserver->ReadyToSendRtpPacket( aTranStreamId , pktPtr );
- }
- }
-
-
// ---------------------------------------------------------------------------
// TInt CRtpSession::SendRtpPacket()
//
@@ -597,8 +580,7 @@
//
TInt CRtpSession::SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
- const TDesC8& aPayloadData,
- const TArray<TRtpCSRC> *aCsrcList )
+ const TDesC8& aPayloadData )
{
if ( static_cast<TUint> (aPayloadData.Size()) > iCommNet->MaxSocketSize() )
{
@@ -613,16 +595,12 @@
{
CRtpTranStream* tempStream = ( CRtpTranStream* ) streamAddress;
tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse,
- iPktSnd, aCsrcList );
-
- ReadyToSendRtpPacket(aTranStreamId);
-
+ iPktSnd );
ret = iCommNet->Send( ERTPPort, iPktSnd->Des() );
}
return ret;
}
-
// ---------------------------------------------------------------------------
// TInt CRtpSession::SendRtpPacket()
//
@@ -631,8 +609,7 @@
TInt CRtpSession::SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList )
+ TRequestStatus& aStatus )
{
if ( static_cast<TUint>( aPayloadData.Size() ) > iCommNet->MaxSocketSize() )
{
@@ -648,10 +625,7 @@
CRtpTranStream* tempStream =
reinterpret_cast<CRtpTranStream*>( streamAddress );
tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse,
- iPktSnd, aCsrcList );
-
- ReadyToSendRtpPacket(aTranStreamId);
-
+ iPktSnd );
iCommNet->Send( ERTPPort, iPktSnd->Des(), aStatus );
}
return ret;
@@ -733,8 +707,7 @@
TRtpSequence aSequenceNum,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList )
+ TRequestStatus& aStatus )
{
if ( static_cast<TUint>( aPayloadData.Size() ) > iCommNet->MaxSocketSize() )
{
@@ -750,10 +723,7 @@
CRtpTranStream* tempStream =
reinterpret_cast<CRtpTranStream*>( streamAddress );
tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, aSequenceNum,
- ETrue, iPktSnd, aCsrcList );
-
- ReadyToSendRtpPacket(aTranStreamId);
-
+ ETrue, iPktSnd );
iCommNet->Send( ERTPPort, iPktSnd->Des(), aStatus );
}
return ret;
@@ -1176,29 +1146,6 @@
}
}
-
-// ---------------------------------------------------------------------------
-// TInt CRtpSession::RegisterRtpPostProcessingObserver()
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRtpSession::RegisterRtpPostProcessingObserver( MRtpPostProcessingObserver& aRTPPacketObserver )
- {
- iRtpPacketObserver = &aRTPPacketObserver;
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CRtpSession::UnregisterRtpPostProcessingObserver()
-//
-// ---------------------------------------------------------------------------
-//
-void CRtpSession::UnregisterRtpPostProcessingObserver()
- {
- iRtpPacketObserver = NULL;
- }
-
// ---------------------------------------------------------------------------
// TInt CRtpSession::RegisterRtcpObserver()
//
--- a/rtp/rtpstack/src/rtpsessionsrtp.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtpsessionsrtp.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -117,8 +117,7 @@
TInt CRtpSessionSrtp::SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
- const TDesC8& aPayloadData,
- const TArray<TRtpCSRC> *aCsrcList )
+ const TDesC8& aPayloadData )
{
if ( static_cast<TUint> (aPayloadData.Size()) > iCommNet->MaxSocketSize() )
{
@@ -133,7 +132,7 @@
{
CRtpTranStream* tempStream = ( CRtpTranStream* ) streamAddress;
tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse,
- iPktSnd, aCsrcList );
+ iPktSnd );
if(iSndPacket)
{
@@ -160,8 +159,7 @@
TInt CRtpSessionSrtp::SendRtpPacket( TRtpId aTranStreamId,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList )
+ TRequestStatus& aStatus )
{
if ( static_cast<TUint> (aPayloadData.Size()) > iCommNet->MaxSocketSize() )
{
@@ -176,7 +174,7 @@
{
CRtpTranStream* tempStream = ( CRtpTranStream* ) streamAddress;
tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, 0, EFalse,
- iPktSnd, aCsrcList );
+ iPktSnd );
if(iSndPacket)
{
delete iSndPacket;
@@ -204,8 +202,7 @@
TRtpSequence aSequenceNum,
const TRtpSendHeader& aHeaderInfo,
const TDesC8& aPayloadData,
- TRequestStatus& aStatus,
- const TArray<TRtpCSRC> *aCsrcList )
+ TRequestStatus& aStatus )
{
if ( static_cast<TUint>( aPayloadData.Size() ) > iCommNet->MaxSocketSize() )
{
@@ -221,7 +218,7 @@
CRtpTranStream* tempStream =
reinterpret_cast<CRtpTranStream*>( streamAddress );
tempStream->BuildRtpPacket( aHeaderInfo, aPayloadData, aSequenceNum,
- ETrue, iPktSnd, aCsrcList );
+ ETrue, iPktSnd );
if(iSndPacket)
{
delete iSndPacket;
--- a/rtp/rtpstack/src/rtptranstream.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/src/rtptranstream.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -187,8 +187,7 @@
const TDesC8& aPayloadData,
TRtpSequence aSeqNum,
TBool aSetSeqNum,
- CRtpPacket* aPktSnd,
- const TArray<TRtpCSRC> *aCsrcList)
+ CRtpPacket* aPktSnd )
{
TRtpPacketStreamParam streamParam;
TRtpPacketIOParam inParam;
@@ -235,21 +234,6 @@
inParam.TRTP.payloadData = const_cast<TUint8*>( aPayloadData.Ptr() );
inParam.TRTP.payloadDataLen = aPayloadData.Length();
-
- if(aCsrcList && aCsrcList->Count())
- {
- // Maxm 15 CSRC identifiers will be supported
- if( aCsrcList->Count() <= KMaxCsrcIdentifiers )
- {
- inParam.TRTP.numCSRC = (TUint8)aCsrcList->Count();
- }
- else
- {
- inParam.TRTP.numCSRC = KMaxCsrcIdentifiers;
- }
-
- inParam.TRTP.iCsrcList = aCsrcList;
- }
streamParam.TRTP.payload = aHeaderInfo.iPayloadType;
--- a/rtp/rtpstack/tsrc/rtptestapp/group/bld.inf Thu Jun 24 14:43:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2002-2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-/**
- @file
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_TESTMMPFILES
-
-rtptestapp.mmp
\ No newline at end of file
--- a/rtp/rtpstack/tsrc/rtptestapp/group/rtptestapp.mmp Thu Jun 24 14:43:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2002-2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Application for Rtp functional testing
-*
-*/
-
-/**
- @file
-*/
-#include<platform_paths.hrh>
-
-
-
-TARGETTYPE EXE
-TARGET rtptestapp.exe
-UID 0x1000008d 0x101F85CF
-
-SOURCEPATH ../src
-
-SOURCE rtptestapp.cpp
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY rtpservice.lib euser.lib
-LIBRARY esock.lib insock.lib
-LIBRARY commdb.lib srtp.lib
-
-DEBUGLIBRARY flogger.lib
-
-CAPABILITY All -TCB
\ No newline at end of file
--- a/rtp/rtpstack/tsrc/rtptestapp/src/rtptestapp.cpp Thu Jun 24 14:43:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,422 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-// HEADERS
-#include <connpref.h>
-#include <es_sock.h>
-#include <commdbconnpref.h>
-#include "in_sock.h"
-#include <e32cons.h>
-#include <e32err.h>
-#include <e32std.h>
-#include <e32base.h>
-#include <badesca.h>
-#include <random.h>
-#include "rtpheader.h"
-#include "rtptestapp.h"
-
-const TUint KIAPID = 1;
-const TInt KLength = 20;
-_LIT8(KHello, "RTP APIs...testing");
-_LIT8(KNoCName, "");
-
-CConsoleBase *gConsole;
-CActiveScheduler *sched;
-
-void MainL()
- {
- // Create a Console
- gConsole = Console::NewL(_L("Test Console"), TSize(KConsFullScreen, KConsFullScreen));
- CleanupStack::PushL(gConsole);
-
- // Create an Active scheduler
- sched = new (ELeave) CActiveScheduler;
- CActiveScheduler::Install(sched);
-
- //IAP(Internet Access Point) id to be chaged as per comms dat
- CRtpTestApp * iRtpTestApp = CRtpTestApp::NewL();
-
- // Send RTP Packet with CSRC and Check RTP Stack
- // Supports maximum 15 contributing sources
- iRtpTestApp->SendRtpPacketL();
-
- // Send RTP packet with zero length paylpoad
- iRtpTestApp->SendZeroLengthRtpPacketL();
-
- // Send RTP Packets and Modify packet in callback function
- iRtpTestApp->SendRtpPacketLoopbackL();
-
-
- User::After(5000000);
- delete iRtpTestApp;
- delete sched;
- CleanupStack::PopAndDestroy(gConsole);
-
- }
-
-CRtpTestApp * CRtpTestApp::NewL()
-{
- gConsole->Printf(_L("RtpTestApp::NewL\n"));
- CRtpTestApp* self = new( ELeave ) CRtpTestApp();
- CleanupStack::PushL( self );
-
- // To construct the objects in the second-phase of the construction
- self->ConstructL( );
- CleanupStack::Pop( self);
- return self;
-}
-
-CRtpTestApp::CRtpTestApp()
- {
-
- }
-
-
-void CRtpTestApp::ErrorNotify( TInt /*aErrCode*/ )
- {
-
- }
-
-void CRtpTestApp::SdesReceived( TRtpSSRC /*aSSRC*/,
- const TRtpSdesParams& /*aParams*/ )
- {
-
- }
-
-void CRtpTestApp::ByeReceived( TRtpId /*aStreamId*/, TRtpSSRC /*aSSRC*/,
- const TDesC8& /*aReason*/ )
- {
-
- }
-
-void CRtpTestApp::AppReceived( TRtpId /*aStreamId*/, TRtpSSRC /*aSSRC*/,
- const TRtcpApp& /*aApp*/ )
- {
-
- }
-
-void CRtpTestApp::SrReceived( TRtpId /*aStreamId*/, TRtpSSRC /*aSSRC*/,
- const TTimeStamps& /*aTimeStamps*/ )
- {
-
- }
-
-void CRtpTestApp::RrReceived( TRtpId /*aStreamId*/, TRtpSSRC /*aSSRC*/ )
- {
-
- }
-
-void CRtpTestApp::RtpPacketReceived( TRtpId /*aStreamId*/, const TRtpRecvHeader& aHeaderInfo, const TDesC8& /*aPayloadData*/ )
- {
- gConsole->Printf(_L("RtpPacketReceived .. \n"));
-
- for(int i=0; i<aHeaderInfo.iCsrcCount; i++)
- {
- if ( (*iCsrclist)[i] == *(aHeaderInfo.iCsrcList+i) )
- {
- gConsole->Printf(_L("RtpPacketReceived, Successfully\n"));
- }
- else
- {
- gConsole->Printf(_L("Malformed RTP Packet Received\n"));
- gConsole->Printf(_L("Test Case Failed\n"));
- }
- }
-
- // Check for modified Padding, header extension, Marker bit values 1
- if( aHeaderInfo.iMarker == 0 )
- {
- gConsole->Printf(_L("Test Case Failed\n"));
- }
- }
-
-void CRtpTestApp::ReadyToSendRtpPacket( TRtpId /*aTranStreamId*/, TPtr8 &aPacket )
- {
- gConsole->Printf(_L("ReadyToSendRtpPacket Callback..\n"));
-
- // Change Marker bit value from 0 to 1
- aPacket[1] = aPacket[1] | 0x80;
-
- TUint32* data32 = reinterpret_cast<TUint32*>(&(aPacket[8]));
- //Change SSRC Value from
- *data32 = ByteOrder::Swap32(0xDEADBEEF);
- }
-
-void CrtpDataSender::RunL()
- {
- gConsole->Printf(_L("CrtpDataSender::RunL\n"));
- CActiveScheduler::Stop();
- }
-
-void CRtpTestApp::ConstructL()
- {
- iRtpApi = CRtpAPI::NewL(*this );
-
- TVersion version = iRtpApi->Version();
-
- TInt result(KErrNone);
-
- iParams.iCName.Set(KNoCName());
-
- iRtpApi->OpenL( iParams, NULL, NULL, NULL );
-
- result = iRtpApi->StartConnection(KIAPID);
- gConsole->Printf(_L("Local Ip Address %d\n"),result);
-
- TBuf<50> addrStr;
- TInetAddr inetaddr = iRtpApi->GetLocalIPAddressL();
- inetaddr.Output(addrStr);
-
- gConsole->Printf(_L("Local Ip Address %s\n"),addrStr.PtrZ());
-
- iSessionParams.iPriority = TCreateSessionParams::EPriorityStandard;
- iSessionParams.iSocketBufSize = KSocketBufSize;
-
-
- iPort1 = 8000 ;
- iPort2 = 9000;
-
- iRtcpParams.iRtcpFraction = 10;
- iRtcpParams.iRtcpTimeOut = 5000000;
- iRtcpParams.iSessionBWidth = 300;
-
- iEnableRtcp = EFalse;
-
- //Creating New session
- iSessionId1 = KNullId;
- iSessionId2 = KNullId;
- iSessionId1 = iRtpApi->CreateSessionL(iSessionParams, iPort1, iEnableRtcp, &iRtcpParams);
- iSessionId2 = iRtpApi->CreateSessionL(iSessionParams,iPort2,EFalse,&iRtcpParams);
-
- TInetAddr remAddress = iRtpApi->GetLocalIPAddressL();
- remAddress.SetPort(iPort2); //Session 1 sends data to Session 2
-
- iRtpApi->SetRemoteAddress(iSessionId1, remAddress);
-
- iRtpApi->RegisterRtpObserver(iSessionId1, *this);
- iRtpApi->RegisterRtcpObserver(iSessionId1, *this);
- iRtpApi->RegisterRtpObserver(iSessionId2, *this);
- iRtpApi->RegisterRtcpObserver(iSessionId2, *this);
- iRtpApi->RegisterRtpPostProcessingObserver(iSessionId1, *this);
-
- TTranStreamParams streamParams;
- streamParams.iPayloadType = 98;
- TRtpSSRC locSSRC;
-
- iS1T1 = iRtpApi->CreateTransmitStreamL(iSessionId1,streamParams,locSSRC);
-
- TRcvStreamParams rcvParams;
- rcvParams.iPayloadType = 98;
-
- iS2R1 = iRtpApi->CreateReceiveStreamL(iSessionId2,rcvParams);
-
-
- /* Start both the sessions */
- TInt ret = iRtpApi->StartSession(iSessionId1);
- ret = iRtpApi->StartSession(iSessionId2);
-
- iRtpApi->SetSamplingRate(98,8000);
- }
-
-
-void CRtpTestApp::SendRtpPacketL()
- {
- gConsole->Printf(_L("SendRtpPackets TO Loopback address and Verify Header fields.. \n"));
-
- TRtpSendHeader headerinfo;
- headerinfo.iHeaderExtension = NULL;
- headerinfo.iMarker = 0;
- headerinfo.iPadding = 0;
- headerinfo.iPayloadType = 98;
- headerinfo.iTimestamp = 1000;
-
- HBufC8* data = HBufC8::NewLC(KLength);
- data->Des().Copy(KHello);
-
-
- TRtpSendPktParams *header = new(ELeave) TRtpSendPktParams(headerinfo);
- CleanupDeletePushL(header);
- header->iTranStreamId = iS1T1;
- header->iPayloadData.Set(data->Des());
-
- const TUint KArrayGranularity = 15;
-
- iCsrclist = new(ELeave) CArrayFixFlat<TUint32>(KArrayGranularity);
-
- // Send RTP Packets with CSRC list - 17 CSRC. Max Supported CSRC list is 15.
- iCsrclist->AppendL(100001);
- iCsrclist->AppendL(100002);
- iCsrclist->AppendL(100003);
- iCsrclist->AppendL(100004);
- iCsrclist->AppendL(100005);
- iCsrclist->AppendL(100006);
- iCsrclist->AppendL(100007);
- iCsrclist->AppendL(100008);
- iCsrclist->AppendL(100009);
- iCsrclist->AppendL(100010);
- iCsrclist->AppendL(100011);
- iCsrclist->AppendL(100012);
- iCsrclist->AppendL(100013);
- iCsrclist->AppendL(100014);
- iCsrclist->AppendL(100015);
- iCsrclist->AppendL(100016);
- iCsrclist->AppendL(100017);
-
- iRtpApi->SetSamplingRate(headerinfo.iPayloadType, 8000);
- TInt ret1 = iRtpApi->SendRtpPacket(*header, iCsrclist->Array());
-
- CrtpDataSender *datasend = CrtpDataSender::NewL(iRtpApi, iS1T1);
- CleanupStack::PushL(datasend);
-
- datasend->SendRtpData(*header, iCsrclist->Array());
-
- gConsole->Printf(_L("SendRtpPacket %d\n"),ret1);
-
- CActiveScheduler::Start();
-
- CleanupStack::PopAndDestroy(3);
- delete iCsrclist;
- iCsrclist = 0;
- }
-
-
-void CRtpTestApp::SendRtpPacketLoopbackL()
- {
- gConsole->Printf(_L("SendRtpPackets TO Loopback address and Verify Header fields.. \n"));
-
- TRtpSendHeader header;
- header.iHeaderExtension = NULL;
- header.iMarker = 0;
- header.iPadding = 0;
- header.iPayloadType = 98;
- header.iTimestamp = 1000;
-
- HBufC8* data = HBufC8::NewLC(KLength);
- data->Des().Copy(KHello);
-
- TRtpSendPktParams *headerinfo = new(ELeave) TRtpSendPktParams(header);
- CleanupDeletePushL(headerinfo);
- headerinfo->iTranStreamId = iS1T1;
- headerinfo->iPayloadData.Set(data->Des());
-
- const TUint KArrayGranularity = 15;
-
- // Create CSRC list and Append CSRC identifiers
- iCsrclist = new(ELeave) CArrayFixFlat<TUint32>(KArrayGranularity);
-
- iCsrclist->AppendL(123456);
- iCsrclist->AppendL(999999);
-
- TInt error2( KErrNone );
- // Try sending synchronously with Csrc
- error2 = iRtpApi->SendRtpPacket(*headerinfo, iCsrclist->Array());
- gConsole->Printf(_L("SendRtpPacket.. %d\n"), error2);
-
- // Try sending asynchronously with CSRC
- CrtpDataSender *datasend = CrtpDataSender::NewL(iRtpApi, iS1T1);
- CleanupStack::PushL(datasend);
- datasend->SendRtpData(*headerinfo, iCsrclist->Array());
- gConsole->Printf(_L("SendRtpPacket.. %d\n"), error2);
-
- CActiveScheduler::Start();
-
- CleanupStack::PopAndDestroy(3);
- delete iCsrclist;
- iCsrclist = 0;
- }
-
-void CRtpTestApp::SendZeroLengthRtpPacketL()
- {
- // Start Session on Session id
- iRtpApi->StartSession(iSessionId1);
-
- TInetAddr remAddress = iRtpApi->GetLocalIPAddressL();
- remAddress.SetPort(9000); //Session 1 sends data to Session 2
-
- iRtpApi->SetRemoteAddress(iSessionId1, remAddress);
-
- iRtpApi->RegisterRtpObserver(iSessionId1, *this);
- iRtpApi->RegisterRtcpObserver(iSessionId1, *this);
- iRtpApi->RegisterRtpPostProcessingObserver(iSessionId1, *this);
-
- //iRtpApi->SetNonRTPDataObserver(iSessionId1, *this);
-
- TTranStreamParams tranStreamParams;
- tranStreamParams.iPayloadType = 96;
- TRtpSSRC ssrc = 4567890;
-
- TRtpId streamId = iRtpApi->CreateTransmitStreamL(iSessionId1, tranStreamParams, ssrc);
-
-
- TRtpSendHeader headerinfo;
- headerinfo.iHeaderExtension = 0;
- headerinfo.iPayloadType = 96;
- headerinfo.iTimestamp = 12345678;
-
- TRtpSendPktParams *header = new(ELeave) TRtpSendPktParams(headerinfo);
- CleanupDeletePushL(header);
- header->iTranStreamId = streamId;
-
- const TUint KArrayGranularity = 15;
-
- iCsrclist = new(ELeave) CArrayFixFlat<TUint32>(KArrayGranularity);
-
- // Send RTP Packets with CSRC list
- iCsrclist->AppendL(100001);
- iCsrclist->AppendL(100002);
-
- iRtpApi->SetSamplingRate(headerinfo.iPayloadType, 8000);
-
- TInt ret1 = iRtpApi->SendRtpPacket(*header, iCsrclist->Array());
-
- CrtpDataSender *datasend = CrtpDataSender::NewL(iRtpApi, streamId);
- CleanupStack::PushL(datasend);
- datasend->SendRtpData(*header, iCsrclist->Array());
-
- CActiveScheduler::Start();
-
- CleanupStack::PopAndDestroy(2);
- delete iCsrclist;
- iCsrclist = 0;
- }
-
-CRtpTestApp::~CRtpTestApp()
- {
- delete iRtpApi;
- }
-
-GLDEF_C TInt E32Main()
-/**
- * @return - Standard Epoc error code on exit
- */
- {
- __UHEAP_MARK;
- CTrapCleanup* cleanup = CTrapCleanup::New();
- if(!cleanup)
- {
- return KErrNoMemory;
- }
- TInt err = 0;
- TRAP(err,MainL());
- delete cleanup;
- __UHEAP_MARKEND;
- return err;
- }
-
-
--- a/rtp/rtpstack/tsrc/rtptestapp/src/rtptestapp.h Thu Jun 24 14:43:49 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header for class specific to rtp functional tests
-*
-*/
-
-
-
-#ifndef __RTPTESTAPP_H
-#define __RTPTESTAPP_H
-
-#include "rtpapi.h"
-
-
-// Class Declaration
-class CRtpTestApp : public CBase, public MRtpErrNotify, public MRtcpObserver, public MRtpObserver, public MRtpPostProcessingObserver
- {
-public:
-
- static CRtpTestApp* NewL();
-
- void ConstructL();
-
- void SendRtpPacketL();
-
- void SendRtpPacketLoopbackL();
-
- void SendZeroLengthRtpPacketL();
-
- ~CRtpTestApp();
-
- //From observer interface
- void ErrorNotify( TInt aErrCode ) ;
-
- // from MRtcpObserver
-
- void SdesReceived( TRtpSSRC aSSRC,
- const TRtpSdesParams& aParams );
-
- void ByeReceived( TRtpId aStreamId, TRtpSSRC aSSRC,
- const TDesC8& aReason );
-
- void AppReceived( TRtpId aStreamId, TRtpSSRC aSSRC,
- const TRtcpApp& aApp );
-
- void SrReceived( TRtpId aStreamId, TRtpSSRC aSSRC,
- const TTimeStamps& aTimeStamps );
-
- void RrReceived( TRtpId aStreamId, TRtpSSRC aSSRC );
-
- // From MRtpObserver
- void RtpPacketReceived( TRtpId aStreamId, const TRtpRecvHeader& aHeaderInfo, const TDesC8& aPayloadData );
-
- // From MRtpPostProcessingObserver
-
- void ReadyToSendRtpPacket( TRtpId aTranStreamId, TPtr8 &aPacket );
-
-
- TInt iError;
- TBool iIgnoreIncrease;
-
- private:
- CRtpTestApp();
- CRtpAPI* iRtpApi ;
-
- TRtpSdesParams iParams;
- TCreateSessionParams iSessionParams;
- TBool iEnableRtcp;
- TRtcpParams iRtcpParams;
- TRtpId iSessionId1;
- TRtpId iSessionId2;
- TUint iPort1;
- TUint iPort2;
- CArrayFixFlat<TUint32>* iCsrclist;
- TInt iNoOfRtpPackets;
- TRtpId iS1T1;
- TRtpId iS2R1;
- };
-
-
-class CrtpDataSender: public CActive
- {
-public:
- static CrtpDataSender* NewL(CRtpAPI* aRtpApi, TRtpId sessId)
- {
- CrtpDataSender *pSelf = new(ELeave) CrtpDataSender();
- pSelf->iRtpApi = aRtpApi;
- pSelf->iSessId = sessId;
- return pSelf;
- }
-
- virtual void DoCancel()
- {
- iRtpApi->CancelSend(iSessId);
- }
-
- void RunL();
-
- void SendRtpData( TRtpSendPktParams& aHeaderInfo , TArray<TRtpCSRC> aCSRCList)
- {
- aHeaderInfo.iStatus = &iStatus;
- iRtpApi->SendRtpPacket(aHeaderInfo, aCSRCList);
- SetActive();
- }
-private:
- CrtpDataSender():CActive(EPriorityStandard)
- {
- CActiveScheduler::Add(this);
- }
- CRtpAPI *iRtpApi;
- TRtpId iSessId;
- };
-
-#endif
-
-
--- a/rtp/rtpstack/tsrc/ut_rtpstack/inc/UT_CRtpAPI.h Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/tsrc/ut_rtpstack/inc/UT_CRtpAPI.h Mon Jun 28 19:10:29 2010 +0300
@@ -65,8 +65,7 @@
public MRtpObserver,
public MNonRTPDataObserver,
public MRtcpObserver,
- public MSRTPReKeyingObserver,
- public MRtpPostProcessingObserver
+ public MSRTPReKeyingObserver
{
public: // Constructors and destructors
@@ -104,8 +103,6 @@
void SRTPMasterKeyStaleEvent(const CSRTPSession& aSession);
void SRTPMasterKeyStaleEvent(const CSRTPStream& aStream);
- void ReadyToSendRtpPacket( TRtpId aTranStreamId, TPtr8 &aPacket );
-
private: // New methods
void SetupL();
@@ -243,12 +240,7 @@
void UT_CRtpAPI_VersionL();
-
- void UT_CRtpAPI_RegisterRtpPostProcessingObserverL();
-
- void UT_CRtpAPI_SendRtpPacketWithCSRCL();
-
- void UT_CRtpAPI_UnregisterRtpPostProcessingObserverL();
+
private: // Data
@@ -264,9 +256,8 @@
TBuf8<32> iMKI;
TBuf8<32> iRFC3711_TestMasterKey128bits;
TBuf8<32> iRFC3711_TestMasterSalt112bits;
- TBuf8<32> iSalt;
+ TBuf8<32> iSalt;
TBuf8<32> iKey;
- TBool iIsCallBackReceived;
};
#endif // __UT_CRTPAPI_H__
--- a/rtp/rtpstack/tsrc/ut_rtpstack/src/UT_CRtpAPI.cpp Thu Jun 24 14:43:49 2010 +0300
+++ b/rtp/rtpstack/tsrc/ut_rtpstack/src/UT_CRtpAPI.cpp Mon Jun 28 19:10:29 2010 +0300
@@ -68,8 +68,6 @@
#endif
_LIT8(KHello, "hello...testing");
-_LIT8(KNoCName, "");
-
// CONSTRUCTION
UT_CRtpAPI* UT_CRtpAPI::NewL()
{
@@ -1424,7 +1422,6 @@
{
iErr= aErrCode;
}
-
//from Obs
void UT_CRtpAPI::RtpPacketReceived( TRtpId /*aStreamId*/,
const TRtpRecvHeader& /*aHeaderInfo*/,
@@ -1474,279 +1471,6 @@
{
}
-
-void UT_CRtpAPI::ReadyToSendRtpPacket( TRtpId /*aTranStreamId*/, TPtr8 &/*aPacket*/ )
- {
- // RTP Packet Callback received
- iIsCallBackReceived = ETrue;
- }
-
-
-void UT_CRtpAPI::UT_CRtpAPI_RegisterRtpPostProcessingObserverL( )
- {
- TInt result(KErrNone);
- TRtpSdesParams params;
-
- result = iRtpAPI->OpenL( params, NULL, NULL, NULL );
- EUNIT_ASSERT(result==KErrNone);
-
- TRequestStatus status;
- result = iRtpAPI->StartConnection( status, KDefaultIap2 ); // KDefaultIap
- RTP_EUNIT_ASSERT_EQUALS ( result, KErrNone );
- // Wait until the connection is really up
- User::WaitForRequest( status );
-
- //create session
- TCreateSessionParams sessionParams;
- sessionParams.iPriority = TCreateSessionParams::EPriorityStandard;
- sessionParams.iSocketBufSize = KSocketBufSize;
- TUint port( 5000 );
- TBool enableRtcp( EFalse );
- TRtcpParams rtcpParams;
- rtcpParams.iRtcpFraction = 0.10;
- rtcpParams.iRtcpTimeOut = 0;
- rtcpParams.iSessionBWidth = 32000;
-
- TRtpId error( KNullId );
- error = iRtpAPI->CreateSessionL( sessionParams,
- port,
- enableRtcp,
- &rtcpParams );
- RTP_EUNIT_ASSERT_RTP_ID( error );
-
- TRcvStreamParams recvparams;
- recvparams.iPayloadType = 0;
-
- TRtpId error2( KNullId );
- TInt err( KErrNone );
- error2 = iRtpAPI->CreateReceiveStreamL( error /*session id*/, recvparams );
- RTP_EUNIT_ASSERT_RTP_ID ( error2 );
-
-
- err = iRtpAPI->RegisterRtpPostProcessingObserver( error, *this );
- EUNIT_ASSERT ( err == KErrNone )
- }
-
-
-void UT_CRtpAPI::UT_CRtpAPI_SendRtpPacketWithCSRCL()
- {
- TInt result(KErrNone);
- TRtpSdesParams params;
-
- result = iRtpAPI->OpenL( params, NULL, NULL, NULL );
- RTP_EUNIT_ASSERT_EQUALS(result, KErrNone);
-
- TRequestStatus status;
- result = iRtpAPI->StartConnection( status, KDefaultIap ); // KDefaultIap
- RTP_EUNIT_ASSERT_EQUALS ( result, KErrNone );
- // Wait until the connection is really up
- User::WaitForRequest( status );
-
- //create session
- TCreateSessionParams sessionParams;
- sessionParams.iPriority = TCreateSessionParams::EPriorityStandard;
- sessionParams.iSocketBufSize = KSocketBufSize;
- TUint port( 5000 );
- TBool enableRtcp( EFalse );
- TRtcpParams rtcpParams;
- rtcpParams.iRtcpFraction = 0.10;
- rtcpParams.iRtcpTimeOut = 0;
- rtcpParams.iSessionBWidth = 32000;
-
- TRtpId error( KNullId );
- error = iRtpAPI->CreateSessionL( sessionParams,
- port,
- enableRtcp,
- &rtcpParams );
- RTP_EUNIT_ASSERT_RTP_ID( error );
-
- TTranStreamParams transparams;
- transparams.iPayloadType = 0;
- TRtpSSRC ssrc( 0 );
-
- TInt err( KErrNone );
- err = iRtpAPI->RegisterRtpPostProcessingObserver( error, *this );
- EUNIT_ASSERT ( err == KErrNone )
-
-
- err = iRtpAPI->CreateTransmitStreamL( error /*session id*/, transparams, ssrc );
- RTP_EUNIT_ASSERT_RTP_ID ( err );
-
-
- TRtpSendHeader header;
- header.iHeaderExtension = NULL;
- header.iMarker = 0;
- header.iPadding = 0;
- header.iPayloadType = 0;
- header.iTimestamp = 10;
-
- HBufC8* data = HBufC8::NewLC(KLength);
- data->Des().Copy(KHello);
- CleanupStack::Pop(data);
-
- TRtpSendPktParams *headerinfo = new(ELeave) TRtpSendPktParams(header);
- headerinfo->iTranStreamId = err;
- headerinfo->iPayloadData.Set(data->Des());
-
- const TUint KArrayGranularity = 15;
-
- CArrayFixFlat<TUint32>* fix;
- fix = new(ELeave) CArrayFixFlat<TUint32>(KArrayGranularity);
-
- fix->AppendL(123456);
- fix->AppendL(999999);
-
- TInt error2( KErrNone );
- iIsCallBackReceived = EFalse;
- // Try sending synchronously with Csrc
- error2 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array());
- RTP_EUNIT_ASSERT_EQUALS ( error2, KErrNone );
-
- CRtpSession* rtpSession = iRtpAPI->iManager->GetSession( err );
- User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus );
- rtpSession->iCommNet->iSender[ERTPPort]->RunL();
- rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus();
- EUNIT_ASSERT(iIsCallBackReceived == ETrue);
-
- iIsCallBackReceived = EFalse;
- // Try sending asynchronously with CSRC
- headerinfo->iStatus = &status;
- error2 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array());
- RTP_EUNIT_ASSERT_EQUALS ( error2, KErrNone );
- EUNIT_ASSERT( KRequestPending == status.Int() );
- User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus );
- rtpSession->iCommNet->iSender[ERTPPort]->RunL();
- rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus();
- User::WaitForRequest( status );
- EUNIT_ASSERT( KErrNone == status.Int() );
- // Is call back received check
- EUNIT_ASSERT(iIsCallBackReceived == ETrue);
-
- iIsCallBackReceived = EFalse;
- // Try sending asynchronously, specifying the sequence number with CSRC
- TRtpSequence seqNum = 42;
- headerinfo->iSequenceNum = &seqNum;
- error2 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array());
- RTP_EUNIT_ASSERT_EQUALS ( error2, KErrNone );
- EUNIT_ASSERT( KRequestPending == status.Int() );
- User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus );
- rtpSession->iCommNet->iSender[ERTPPort]->RunL();
- rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus();
- User::WaitForRequest( status );
- EUNIT_ASSERT( KErrNone == status.Int() );
- EUNIT_ASSERT(iIsCallBackReceived == ETrue);
-
- delete fix;
- delete headerinfo;
- delete data;
- }
-
-
-void UT_CRtpAPI::UT_CRtpAPI_UnregisterRtpPostProcessingObserverL( )
- {
- TInt result(KErrNone);
- TRtpSdesParams params;
-
- result = iRtpAPI->OpenL( params, NULL, NULL, NULL );
- EUNIT_ASSERT(result==KErrNone);
-
- TRequestStatus status;
- result = iRtpAPI->StartConnection( status, KDefaultIap2 ); // KDefaultIap
- RTP_EUNIT_ASSERT_EQUALS ( result, KErrNone );
- // Wait until the connection is really up
- User::WaitForRequest( status );
-
- //create session
- TCreateSessionParams sessionParams;
- sessionParams.iPriority = TCreateSessionParams::EPriorityStandard;
- sessionParams.iSocketBufSize = KSocketBufSize;
- TUint port( 5000 );
- TBool enableRtcp( EFalse );
- TRtcpParams rtcpParams;
- rtcpParams.iRtcpFraction = 0.10;
- rtcpParams.iRtcpTimeOut = 0;
- rtcpParams.iSessionBWidth = 32000;
-
- TRtpId error( KNullId );
- error = iRtpAPI->CreateSessionL( sessionParams,
- port,
- enableRtcp,
- &rtcpParams );
- RTP_EUNIT_ASSERT_RTP_ID( error );
-
- TRcvStreamParams recvparams;
- recvparams.iPayloadType = 0;
-
- TRtpId error2( KNullId );
- TInt err( KErrNone );
- error2 = iRtpAPI->CreateReceiveStreamL( error /*session id*/, recvparams );
- RTP_EUNIT_ASSERT_RTP_ID ( error2 );
-
- TTranStreamParams transparams;
- transparams.iPayloadType = 0;
- TRtpSSRC ssrc( 0 );
-
- err = iRtpAPI->RegisterRtpPostProcessingObserver( error, *this );
- EUNIT_ASSERT ( err == KErrNone )
-
- err = iRtpAPI->CreateTransmitStreamL( error /*session id*/, transparams, ssrc );
- RTP_EUNIT_ASSERT_RTP_ID ( err );
-
-
- TRtpSendHeader header;
- header.iHeaderExtension = NULL;
- header.iMarker = 0;
- header.iPadding = 0;
- header.iPayloadType = 0;
- header.iTimestamp = 10;
-
- HBufC8* data = HBufC8::NewLC(KLength);
- data->Des().Copy(KHello);
- CleanupStack::Pop(data);
-
- TRtpSendPktParams *headerinfo = new(ELeave) TRtpSendPktParams(header);
- headerinfo->iTranStreamId = err;
- headerinfo->iPayloadData.Set(data->Des());
-
- const TUint KArrayGranularity = 15;
-
- CArrayFixFlat<TUint32>* fix;
- fix = new(ELeave) CArrayFixFlat<TUint32>(KArrayGranularity);
-
- fix->AppendL(123456);
- fix->AppendL(999999);
-
- TInt error3( KErrNone );
- iIsCallBackReceived = EFalse;
- // Try sending synchronously with Csrc
- error3 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array());
- RTP_EUNIT_ASSERT_EQUALS ( error3, KErrNone );
-
- CRtpSession* rtpSession = iRtpAPI->iManager->GetSession( err );
- User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus );
- rtpSession->iCommNet->iSender[ERTPPort]->RunL();
- rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus();
- EUNIT_ASSERT(iIsCallBackReceived == ETrue);
-
- // Unregister callback
- iRtpAPI->UnregisterRtpPostProcessingObserver(error);
-
- iIsCallBackReceived = EFalse;
- error3 = KErrNone;
- // Try sending synchronously with Csrc
- error3 = iRtpAPI->SendRtpPacket(*headerinfo, fix->Array());
- RTP_EUNIT_ASSERT_EQUALS ( error3, KErrNone );
-
- User::WaitForRequest( rtpSession->iCommNet->iSender[ERTPPort]->iStatus );
- rtpSession->iCommNet->iSender[ERTPPort]->RunL();
- rtpSession->iCommNet->iSender[ERTPPort]->iStatus = TRequestStatus();
- EUNIT_ASSERT(iIsCallBackReceived == EFalse);
-
- delete fix;
- delete headerinfo;
- delete data;
- }
-
// TEST TABLE
EUNIT_BEGIN_TEST_TABLE(
@@ -2075,30 +1799,8 @@
"Version",
"FUNCTIONALITY",
SetupL, UT_CRtpAPI_VersionL, Teardown)
-
-EUNIT_TEST(
- "RegisterRtpPostProcessingObserver - test ",
- "CRtpAPI",
- "RegisterRtpPostProcessingObserver",
- "FUNCTIONALITY",
- SetupL, UT_CRtpAPI_RegisterRtpPostProcessingObserverL, Teardown)
-EUNIT_TEST(
- "SendRtpPacketWithCSRC - test ",
- "CRtpAPI",
- "SendRtpPacket",
- "FUNCTIONALITY",
- SetupL, UT_CRtpAPI_SendRtpPacketWithCSRCL, Teardown)
-
-EUNIT_TEST(
- "UnregisterRtpPostProcessingObserver - test ",
- "CRtpAPI",
- "UnregisterRtpPostProcessingObserver",
- "FUNCTIONALITY",
- SetupL, UT_CRtpAPI_UnregisterRtpPostProcessingObserverL, Teardown)
-
-
EUNIT_END_TEST_TABLE
// END OF FILE