CallStats.h 3.77 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
/*
CallStats.h
Copyright (C) 2015  Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
14
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
15 16 17 18 19 20 21
*/

#pragma once

#include "Core.h"


22
namespace BelledonneCommunications
23
{
24
	namespace Linphone
25
	{
26
		namespace Native
27 28
		{
			/// <summary>
29 30 31
			/// Object representing the statistics of a call.
			/// To get the statistics of a call use the Call::GetAudioStats() method. It gives the call statistics at the specific time it is asked for.
			/// So to have updated statistics you need to get the statistics from the call again.
32
			/// </summary>
33
			public ref class CallStats sealed
34
			{
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
			public:
				/// <summary>
				/// Gets the download bandwidth in kbits/s.
				/// </summary>
				property float DownloadBandwidth
				{
					float get();
				}

				/// <summary>
				/// Gets the state of the ICE process.
				/// </summary>
				property IceState IceState
				{
					BelledonneCommunications::Linphone::Native::IceState get();
				}

				/// <summary>
				/// Gets the jitter buffer size in milliseconds.
				/// </summary>
				property float JitterBufferSize
				{
					float get();
				}

				/// <summary>
				/// Gets the cumulative number of late packets.
				/// </summary>
				property int64 LatePacketsCumulativeNumber
				{
					int64 get();
				}

				/// <summary>
				/// Get the local late packets rate. The value returned here is updated every second.
				/// </summary>
				property float LocalLateRate
				{
					float get();
				}

				/// <summary>
				/// Get the local loss rate. Unlike GetSenderLossRate() that returns this loss rate "since last emitted RTCP report", the value returned here is updated every second.
				/// </summary>
				property float LocalLossRate
				{
					float get();
				}

				/// <summary>
				/// Gets the media type (audio or video).
				/// </summary>
				property MediaType MediaType
				{
					BelledonneCommunications::Linphone::Native::MediaType get();
				}

				/// <summary>
				/// Gets the remote reported interarrival jitter.
				/// </summary>
				property float ReceiverInterarrivalJitter
				{
					float get();
				}

				/// <summary>
				/// Gets the remote loss rate from the last received RTCP report.
				/// </summary>
				property float ReceiverLossRate
				{
					float get();
				}

				/// <summary>
				/// Gets the round trip delay in seconds. -1 if the information is not available.
				/// </summary>
				property float RoundTripDelay
				{
					float get();
				}

				/// <summary>
				/// Gets the local interarrival jitter.
				/// </summary>
				property float SenderInterarrivalJitter
				{
					float get();
				}

				/// <summary>
				/// Gets the local loss rate since last emitted RTCP report.
				/// </summary>
				property float SenderLossRate
				{
					float get();
				}

				/// <summary>
				/// Gets the upload bandwidth in kbits/s.
				/// </summary>
				property float UploadBandwidth
				{
					float get();
				}

			private:
				friend class Utils;
				friend ref class Core;

				CallStats(::LinphoneCall *call, BelledonneCommunications::Linphone::Native::MediaType mediaType);
				CallStats(::LinphoneCallStats *callStats);
				~CallStats();

148
				::LinphoneCallStats *stats;
149 150
			};
		}
151
	}
Sylvain Berfini's avatar
Sylvain Berfini committed
152
}