realtimenetprots/rtp/shimrtp/inc/rtpprepostprocessingcallback.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description: M Class that gives the interface functions for pre/post processing callback
       
    14 // functions for RTP/RTCP packets.
       
    15 //
       
    16 
       
    17 /**
       
    18 @file
       
    19 @internalComponent
       
    20 */
       
    21 
       
    22 #ifndef PREPOSTPROCESSINGCALLBACK_H
       
    23 #define PREPOSTPROCESSINGCALLBACK_H
       
    24 
       
    25 /**
       
    26  * @internalComponent
       
    27  */
       
    28 class MPrePostProcessingCallback
       
    29 	{
       
    30 	public:
       
    31 	virtual TInt PreRtpProcessing(TDes8&) = 0;
       
    32 	virtual void PostRtpProcessing(TDes8&) = 0;
       
    33 	virtual TInt PreRtcpProcessing(TDes8&) = 0;
       
    34 	virtual void PostRtcpProcessing(TDes8&) = 0;
       
    35 	};
       
    36 	
       
    37 /**
       
    38 @internalComponent
       
    39 
       
    40 RTCP statistics class.
       
    41 
       
    42 The class stores following RTCP statistics for the current RTP session
       
    43 
       
    44 1. Cumulative number of packet sent since 
       
    45    the RTP session started until current SR report is generated
       
    46 2. Number of payload octets sent since the RTP session started until 
       
    47    current SR report is generated
       
    48 3. Inter arrival jitter 
       
    49 4. Cumulative number of packet lost since the beginning of reception 
       
    50 5. Fraction of packets lost current active RTP session since the previous 
       
    51    RR packet was sent
       
    52 
       
    53 @see RRtpSession
       
    54 @see RRtpSendSource
       
    55 @see RRtpReceiveSource
       
    56 */
       
    57 	
       
    58 class TRtcpStatistics 
       
    59 	{
       
    60 private:
       
    61 	TUint32 iPacketsSent;
       
    62 	TUint32 iOctetsSent;
       
    63 	TUint32 iJitter;
       
    64 	TInt iPacketsLost;
       
    65 	TUint8 iFractionLost;
       
    66 public:
       
    67 	inline TRtcpStatistics();
       
    68 	inline TUint32 PacketsSent();
       
    69 	inline TUint32 OctetsSent();
       
    70 	inline TUint32 Jitter();
       
    71 	inline TInt PacketsLost();
       
    72 	inline TUint8 FractionLost();
       
    73 	inline void SetPacketsSent(TUint32);
       
    74 	inline void SetOctetsSent(TUint32);
       
    75 	inline void SetJitter(TUint32);
       
    76 	inline void SetPacketsLost(TInt);
       
    77 	inline void SetFractionLost(TUint8);
       
    78 	};
       
    79 
       
    80 /**
       
    81 Constructor for the RTCP statistics class
       
    82 */
       
    83 
       
    84 inline TRtcpStatistics::TRtcpStatistics()
       
    85 	{
       
    86 	iPacketsSent = 0;
       
    87 	iOctetsSent = 0;
       
    88 	iJitter = 0;
       
    89 	iPacketsLost = 0;
       
    90 	iFractionLost = 0;
       
    91 	}
       
    92 	
       
    93 
       
    94 /**
       
    95 Sets the Packets sent remote RTCP Staistics for the current RTP session
       
    96     
       
    97 @param Packets Sent for the current session
       
    98 
       
    99 */
       
   100 
       
   101 inline void TRtcpStatistics::SetPacketsSent(TUint32 aPacketsSent)
       
   102 	{
       
   103 	iPacketsSent = aPacketsSent;
       
   104 	}
       
   105 	
       
   106 /**
       
   107 Sets the Octets sent remote RTCP Staistics for the current RTP session
       
   108     
       
   109 @param Octets Sent for the current session
       
   110 
       
   111 */
       
   112 
       
   113 inline void TRtcpStatistics::SetOctetsSent(TUint32 aOctetsSent)
       
   114 	{
       
   115 	iOctetsSent = aOctetsSent;
       
   116 	}
       
   117 	
       
   118 /**
       
   119 Sets the Jitter remote RTCP Staistics for the current RTP session
       
   120     
       
   121 @param Jitter for the current session
       
   122 
       
   123 */
       
   124 
       
   125 inline void TRtcpStatistics::SetJitter(TUint32 aJitter)
       
   126 	{
       
   127 	iJitter = aJitter;
       
   128 	}
       
   129 	
       
   130 /**
       
   131 Sets the Packets lost remote RTCP Staistics for the current RTP session
       
   132     
       
   133 @param Packets lost for the current session
       
   134 
       
   135 */
       
   136 
       
   137 inline void TRtcpStatistics::SetPacketsLost(TInt aPacketsLost)
       
   138 	{
       
   139 	iPacketsLost = aPacketsLost;
       
   140 	}
       
   141 	
       
   142 /**
       
   143 Sets the Fraction of Packets lost remote RTCP Staistics for the current RTP session
       
   144     
       
   145 @param Fraction of Packets lost for the current session
       
   146 
       
   147 */
       
   148 
       
   149 inline void TRtcpStatistics::SetFractionLost(TUint8 aFractionLost)
       
   150 	{
       
   151 	iFractionLost = aFractionLost;
       
   152 	}
       
   153 	
       
   154 /**
       
   155 Gets the Packets sent remote RTCP Staistics for the current RTP session
       
   156     
       
   157 @return Packets Sent for the current session
       
   158 
       
   159 */
       
   160 
       
   161 inline TUint32 TRtcpStatistics::PacketsSent()
       
   162 	{
       
   163 	return iPacketsSent;
       
   164 	}
       
   165 
       
   166 /**
       
   167 Gets the Octets sent remote RTCP Staistics for the current RTP session
       
   168     
       
   169 @return Octets Sent for the current session
       
   170 
       
   171 */
       
   172 
       
   173 inline TUint32 TRtcpStatistics::OctetsSent()
       
   174 	{
       
   175 	return iOctetsSent;
       
   176 	}
       
   177 	
       
   178 /**
       
   179 Gets the Jitter remote RTCP Staistics for the current RTP session
       
   180     
       
   181 @return Jitter for the current session
       
   182 
       
   183 */
       
   184 
       
   185 inline TUint32 TRtcpStatistics::Jitter()
       
   186 	{
       
   187 	return iJitter;
       
   188 	}
       
   189 	
       
   190 /**
       
   191 Gets the Packets lost remote RTCP Staistics for the current RTP session
       
   192     
       
   193 @return Packets lost for the current session
       
   194 
       
   195 */
       
   196 
       
   197 inline TInt TRtcpStatistics::PacketsLost()
       
   198 	{
       
   199 	return iPacketsLost;
       
   200 	}
       
   201 	
       
   202 /**
       
   203 Gets the Fraction of Packets lost remote RTCP Staistics for the current RTP session
       
   204     
       
   205 @return Fraction of Packets lost for the current session
       
   206 
       
   207 */
       
   208 
       
   209 inline TUint8 TRtcpStatistics::FractionLost()
       
   210 	{
       
   211 	return iFractionLost;
       
   212 	}
       
   213 
       
   214 	
       
   215 #endif // PREPOSTPROCESSINGCALLBACK_H