|
1 /* |
|
2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef RtpStreamDef_H |
|
22 #define RtpStreamDef_H |
|
23 |
|
24 |
|
25 |
|
26 // CONSTANTS |
|
27 const TUint KSNMaxArray = 200; |
|
28 |
|
29 // Number of seconds between 1-Jan-1900 and 1-jan-1970 |
|
30 const TUint32 KGetTimeOfDayToNTPOffset = 2208988800U; |
|
31 |
|
32 |
|
33 |
|
34 // CLASS DECLARATIONS |
|
35 /** |
|
36 * Callback class used by CRtpStream and CRtpSession. |
|
37 * |
|
38 * @lib RtpService.dll |
|
39 */ |
|
40 class MSsrcCheckCallback |
|
41 { |
|
42 public: |
|
43 /** |
|
44 * Inform this object that a new SSRC is found within a packet |
|
45 */ |
|
46 virtual TInt CheckRemoteSsrcL( TRtpSSRC& aSSRC ) = 0; |
|
47 virtual TBool CheckRemoteAddr() =0; |
|
48 }; |
|
49 |
|
50 |
|
51 /** |
|
52 * stream time synchronization struct for NTP time calculation |
|
53 * |
|
54 * @lib RtpService.dll |
|
55 */ |
|
56 class TRtpTimeSync |
|
57 { |
|
58 public: |
|
59 // for RX stream: they record the NTP time from SR and will be used by creating RR |
|
60 // for TX stream: they are generated for creating SR. |
|
61 TUint32 iNTPTimeStampSec; // seconds |
|
62 TUint32 iNTPTimeStampFrac; // fraction |
|
63 |
|
64 // RTP Time stamp of last packet sent by TX stream |
|
65 TRtpTimeStamp iTimeStamp; |
|
66 |
|
67 // for RX stream: time when last NTP time stamp (SR report) has been received. |
|
68 // for TX stream: time of initialization (for NTP synchronization) |
|
69 TUint32 iLastUpdateLocalTime; |
|
70 }; |
|
71 |
|
72 |
|
73 /** |
|
74 * stream time jitter struct, just be used by receiving stream |
|
75 * |
|
76 * @lib RtpService.dll |
|
77 */ |
|
78 class TRtpTimeJitter |
|
79 { |
|
80 public: |
|
81 TUint32 iTimeStampResolution; |
|
82 |
|
83 // The time of arrival in tenth of ms. |
|
84 TUint32 iLastPacketR; |
|
85 |
|
86 // The RTP timestamp from last packet |
|
87 TRtpTimeStamp iLastPacketS; |
|
88 |
|
89 // |
|
90 // keeps jitter time for RR report. |
|
91 // It will be tailored to TUint32 when assigned to RR.JitterTime. |
|
92 // |
|
93 TReal64 iJitterTime; |
|
94 |
|
95 TUint32 iWaitTime; |
|
96 }; |
|
97 |
|
98 class TRtcpReceiverStats |
|
99 { |
|
100 public: |
|
101 TRtpSSRC iSSRC; // SSRC receiver number |
|
102 TUint8 iFractionLost; // fraction lost |
|
103 TUint32 iCumNumPacketsLost; // packets lost |
|
104 TUint32 iSeqNumReceived; // sequence number |
|
105 TUint32 iArrivalJitter; // arrival jitter |
|
106 TUint32 iRoundTripDelay; // round trip delay of RTP packet |
|
107 TUint32 iBandwidth; // receiver bandwidth (bps) calculated by the transmitter |
|
108 TUint32 iTxBandwidth; // transmitter bandwidth (bps) calculated at transmitter |
|
109 TUint32 iChannelBufferSize; // an estimate of the channel buffer size |
|
110 }; |
|
111 |
|
112 class TRtcpSenderStats |
|
113 { |
|
114 public: |
|
115 TRtpSSRC iSSRC; // SSRC transmitter number |
|
116 TUint32 iNumPacketsSent; // number of packets sent |
|
117 TUint32 iCumNumOctetsSent; // number of octets sent |
|
118 TUint32 iNTPTimeStampSec; // NTP seconds |
|
119 TUint32 iNTPTimeStampFrac; // NTPfraction |
|
120 TUint32 iTimeStamp; // RTP Time stamp of last packet sent by TX stream |
|
121 }; |
|
122 |
|
123 class TRtcpStats |
|
124 { |
|
125 public: |
|
126 TRtcpSenderStats iRtcpSenderStats; // Sender's statistic structure |
|
127 TRtcpReceiverStats iRtcpReceiverStats; // Receiver's statistic structure |
|
128 }; |
|
129 |
|
130 |
|
131 #endif // RtpStreamDef_H |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |