1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/rtcp.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,248 @@
1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef RTCP_H
1.20 +#define RTCP_H
1.21 +
1.22 +#include <e32std.h>
1.23 +
1.24 +/** @file
1.25 +
1.26 +RTCP is a protocol that only makes sense in the context of RTP, so
1.27 +the RTCP implementation is an extension of the RTP code, and most
1.28 +of the relevant classes are defined in rtp.h
1.29 +*/
1.30 +
1.31 +class TRtcpRRItem;
1.32 +class TRtcpRRPart;
1.33 +class TRtcpSRPart;
1.34 +
1.35 +/**
1.36 +@publishedPartner
1.37 +@released
1.38 +
1.39 +A handle to an RR (Receiver Report) RTP packet.
1.40 +
1.41 +An instance of this class represents the reception report of one host
1.42 +about another host; it may have come from either a SR (Sender Report) or
1.43 +a RR (Receiver Report) packet, which may contain
1.44 +other RRs (Receiver Reports) as well.
1.45 +
1.46 +An object of this type is returned from a call to the RRtcpRRPart
1.47 +indexing operator and specifying the index of the required RR.
1.48 +
1.49 +Note that resources accessed thorugh this handle are owned by other objects
1.50 +and therefore has no Close() member function.
1.51 +
1.52 +@see RRtcpRRPart
1.53 +*/
1.54 +class RRtcpRRItem
1.55 + {
1.56 +public:
1.57 + /**
1.58 + Default constructor.
1.59 + */
1.60 + IMPORT_C RRtcpRRItem();
1.61 +
1.62 + /**
1.63 + Gets the sender's SSRC, i.e. the sender's 32-bit numeric
1.64 + synchronisation source identifier.
1.65 +
1.66 + @return The sender's SSRC.
1.67 + */
1.68 + IMPORT_C TUint SenderSSRC() const;
1.69 +
1.70 +
1.71 + /**
1.72 + Gets the number of packets lost.
1.73 +
1.74 + @return The number of packets lost.
1.75 + */
1.76 + IMPORT_C TUint PacketsLost() const;
1.77 +
1.78 +
1.79 + /**
1.80 + Gets the SSRC related to this packet.
1.81 +
1.82 + @return The sender's SSRC.
1.83 + */
1.84 + IMPORT_C TUint AboutSSRC() const;
1.85 +
1.86 +
1.87 + /**
1.88 + Gets the number of packets lost, in 256ths of the total number.
1.89 +
1.90 + @return The number of last packets, in 256ths of the total number.
1.91 + */
1.92 + IMPORT_C TUint FractionLost() const;
1.93 +
1.94 +
1.95 + /**
1.96 + Gets the extended highest sequence number recieved.
1.97 +
1.98 + @return The extended highest sequence number.
1.99 + */
1.100 + IMPORT_C TUint ExtendedHighestSequenceNumber() const;
1.101 +
1.102 +
1.103 + /**
1.104 + Gets the interarrival jitter value.
1.105 +
1.106 + @return The interarrival jitter value.
1.107 +
1.108 + */
1.109 + IMPORT_C TUint InterarrivalJitter() const;
1.110 +
1.111 +
1.112 + /**
1.113 + Gets the time of the last received SR (Sender Report)
1.114 +
1.115 + @return The time of the last received SR.
1.116 + */
1.117 + IMPORT_C TUint LastSRTimestamp() const;
1.118 +
1.119 +
1.120 + /**
1.121 + Gets the time between the receipt of the last SR (Sender Report) and
1.122 + the time when this packet was sent.
1.123 +
1.124 + @return The tme difference in 65,536ths of a second.
1.125 + */
1.126 + IMPORT_C TUint DelaySinceLastSR() const;
1.127 +
1.128 +private:
1.129 + friend class RRtcpRRPart;
1.130 + TRtcpRRItem* iPtr;
1.131 + };
1.132 +
1.133 +/**
1.134 +@publishedPartner
1.135 +@released
1.136 +
1.137 +An array containing the most recent RRs (Receiver Reports) from
1.138 +all hosts who are reporting on our send stream.
1.139 +
1.140 +An object of this type is returned by calling RRs() on a handle to
1.141 +an RTP session (an RRtpSession object).
1.142 +
1.143 +@see RRtpSession::RRs()
1.144 +*/
1.145 +class RRtcpRRPart
1.146 + {
1.147 +public:
1.148 + IMPORT_C RRtcpRRPart(TRtcpRRPart& aRR);
1.149 + /**
1.150 + Gets the number of Receiver Reports.
1.151 +
1.152 + @return The number fo receiver reports.
1.153 + */
1.154 + IMPORT_C TInt Count() const;
1.155 +
1.156 + IMPORT_C TUint SenderSSRC() const;
1.157 +
1.158 + /**
1.159 + Gets a specific RR (Receiver Report) as identified by
1.160 + the specified index value.
1.161 +
1.162 + @param aIndex An index value identifying the specific RR.
1.163 + The index is relative to zero, i.e. zero implies
1.164 + the first RR report.
1.165 + The value must not be negative and must be less than
1.166 + the the value returned by Count().
1.167 +
1.168 + @return A handle to the RR (Receiver Report).
1.169 + */
1.170 + IMPORT_C RRtcpRRItem operator [](TInt aIndex) const;
1.171 +private:
1.172 + TRtcpRRPart& iRRPart;
1.173 + };
1.174 +
1.175 +/**
1.176 +@publishedPartner
1.177 +@released
1.178 +
1.179 +A handle to a SR (Sender Report) packet.
1.180 +
1.181 +RRs (Receiver Reports) received as part of a SR (Sender Report) are classified
1.182 +with the RRs. The resources accessed through this handle are owned by
1.183 +the receive stream object, a RRtpReceiveStream instance, and therefore has no
1.184 +Close() member function.
1.185 +*/
1.186 +class RRtcpSRPart
1.187 + {
1.188 + public:
1.189 + /**
1.190 + Default constructor.
1.191 + */
1.192 + IMPORT_C RRtcpSRPart(TRtcpSRPart& aSr);
1.193 +
1.194 +
1.195 + /**
1.196 + Gets the absolute time when this SR was sent, in TTime format.
1.197 +
1.198 + @return The time in NTP format.
1.199 + */
1.200 + IMPORT_C void NTPTimestamp(TTime& aTime) const;
1.201 +
1.202 +
1.203 + /**
1.204 + Gets the RTP time when this packet was sent.
1.205 +
1.206 + Note that RTP time is profile dependant and may have an arbitrary start
1.207 + time, but this is useful for tying the SR with the timestamps in the
1.208 + data stream
1.209 +
1.210 + @return The time when the packet was sent.
1.211 + */
1.212 + IMPORT_C TUint RTPTimestamp() const;
1.213 +
1.214 +
1.215 + /**
1.216 + Gets the number of packets that have been sent.
1.217 +
1.218 + @return The number of packets.
1.219 + */
1.220 + IMPORT_C TUint PacketCount() const;
1.221 +
1.222 +
1.223 + /**
1.224 + Gets the number of bytes that have been sent.
1.225 +
1.226 + @return The number of bytes sent.
1.227 + */
1.228 + IMPORT_C TUint ByteCount() const;
1.229 +
1.230 +
1.231 + /**
1.232 + Gets the profile-specific extension.
1.233 +
1.234 + @return An un-modifiable descriptor reference to the extension data.
1.235 + */
1.236 + IMPORT_C const TDesC8& Extension();
1.237 +
1.238 + /**
1.239 + // added as Fix to Defect PDEF101761
1.240 + Gets the timestamp when this SR was sent, in seconds and fraction
1.241 +
1.242 + @ return The time in Seconds and Fraction
1.243 + */
1.244 + IMPORT_C void NTPTimestamp(TUint32& aSec,TUint32& aFrac) const;
1.245 +
1.246 +
1.247 +private:
1.248 + TRtcpSRPart& iSrPtr;
1.249 + };
1.250 +
1.251 +#endif // RTCP_H