LinphoneCallStats.h 1.53 KB
Newer Older
Sylvain Berfini's avatar
Sylvain Berfini committed
1 2
#pragma once

3 4
#include "LinphoneCore.h"

Sylvain Berfini's avatar
Sylvain Berfini committed
5 6
namespace Linphone
{
7
	namespace Core
Sylvain Berfini's avatar
Sylvain Berfini committed
8
	{
9
		public enum class MediaType : int
Sylvain Berfini's avatar
Sylvain Berfini committed
10
		{
11 12
			Audio = 0,
			Video = 1
Sylvain Berfini's avatar
Sylvain Berfini committed
13 14
		};

15
		public enum class IceState : int
Sylvain Berfini's avatar
Sylvain Berfini committed
16
		{
17 18 19 20 21 22
			NotActivated = 0,
			Failed = 1,
			InProgress = 2,
			HostConnection = 3,
			ReflexiveConnection = 4,
			RelayConnection = 5
Sylvain Berfini's avatar
Sylvain Berfini committed
23 24 25 26 27
		};

		public ref class LinphoneCallStats sealed
		{
		public:
28 29
			MediaType GetMediaType();
			IceState GetIceState();
30 31 32 33

			/// <summary>
			/// Gets the download bandwidth in kbits/s.
			/// </summary>
Sylvain Berfini's avatar
Sylvain Berfini committed
34
			float GetDownloadBandwidth();
35 36 37 38

			/// <summary>
			/// Gets the upload bandwidth in kbits/s.
			/// </summary>
Sylvain Berfini's avatar
Sylvain Berfini committed
39 40 41 42 43
			float GetUploadBandwidth();
			float GetSenderLossRate();
			float GetReceiverLossRate();
			float GetSenderInterarrivalJitter();
			float GetReceiverInterarrivalJitter();
44 45 46 47 48 49 50

			/// <summary>
			/// Gets the round trip delay in seconds.
			/// </summary>
			/// <returns>
			/// -1 if the information is not available.
			/// </returns>
Sylvain Berfini's avatar
Sylvain Berfini committed
51 52
			float GetRoundTripDelay();
			int64 GetLatePacketsCumulativeNumber();
53 54 55 56

			/// <summary>
			/// Gets the jitter buffer size in milliseconds.
			/// </summary>
Sylvain Berfini's avatar
Sylvain Berfini committed
57
			float GetJitterBufferSize();
58 59 60 61 62 63 64 65 66 67 68 69 70

			float GetLocalLossRate();
			float GetLocalLateRate();

		private:
			friend class Linphone::Core::Utils;
			friend ref class Linphone::Core::LinphoneCore;

			LinphoneCallStats(::LinphoneCallStats* stats, ::LinphoneCall *call);
			~LinphoneCallStats();

			::LinphoneCallStats *stats;
			::LinphoneCall *call;
Sylvain Berfini's avatar
Sylvain Berfini committed
71 72 73
		};
	}
}