// DO NOT EDIT! This is an autogenerated file. All changes will be
// overwritten!

//	Copyright (c) 2023 Vidyo, Inc. All rights reserved.


using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;

namespace VidyoClient
{
	public class CameraEffectStatsFactory
	{
		public static CameraEffectStats Create()
		{
			return new CameraEffectStats(IntPtr.Zero);
		}
		public static void Destroy(CameraEffectStats obj)
		{
		}
	}
	/// <summary>
	/// Statistics for a camera effect.
	/// </summary>
	public class CameraEffectStats {
#if __IOS__
		const string importLib = "__Internal";
#else
		const string importLib = "libVidyoClient";
#endif
		private IntPtr objPtr; // opaque VidyoCameraEffectStats reference.
		public IntPtr GetObjectPtr() {

			VidyoCameraEffectStatsSetaverageBanubaProcessingTimeNative(objPtr, averageBanubaProcessingTime);
			VidyoCameraEffectStatsSetaverageBufferReadingTimeNative(objPtr, averageBufferReadingTime);
			VidyoCameraEffectStatsSetaverageFrameProcessingTimeNative(objPtr, averageFrameProcessingTime);
			VidyoCameraEffectStatsSetframesDroppedNative(objPtr, framesDropped);
			VidyoCameraEffectStatsSetmaxBanubaProcessingTimeNative(objPtr, maxBanubaProcessingTime);
			VidyoCameraEffectStatsSetmaxBufferReadingTimeNative(objPtr, maxBufferReadingTime);
			VidyoCameraEffectStatsSetmaxFrameProcessingTimeNative(objPtr, maxFrameProcessingTime);

			return objPtr;
		}
		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern double VidyoCameraEffectStatsGetaverageBanubaProcessingTimeNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoCameraEffectStatsSetaverageBanubaProcessingTimeNative(IntPtr obj, double averageBanubaProcessingTime);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern double VidyoCameraEffectStatsGetaverageBufferReadingTimeNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoCameraEffectStatsSetaverageBufferReadingTimeNative(IntPtr obj, double averageBufferReadingTime);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern double VidyoCameraEffectStatsGetaverageFrameProcessingTimeNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoCameraEffectStatsSetaverageFrameProcessingTimeNative(IntPtr obj, double averageFrameProcessingTime);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern uint VidyoCameraEffectStatsGetframesDroppedNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoCameraEffectStatsSetframesDroppedNative(IntPtr obj, uint framesDropped);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern double VidyoCameraEffectStatsGetmaxBanubaProcessingTimeNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoCameraEffectStatsSetmaxBanubaProcessingTimeNative(IntPtr obj, double maxBanubaProcessingTime);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern double VidyoCameraEffectStatsGetmaxBufferReadingTimeNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoCameraEffectStatsSetmaxBufferReadingTimeNative(IntPtr obj, double maxBufferReadingTime);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern double VidyoCameraEffectStatsGetmaxFrameProcessingTimeNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoCameraEffectStatsSetmaxFrameProcessingTimeNative(IntPtr obj, double maxFrameProcessingTime);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr VidyoCameraEffectStatsConstructCopyNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr VidyoCameraEffectStatsConstructDefaultNative();

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern void VidyoCameraEffectStatsDestructNative(IntPtr obj);

		/// <summary>
		/// Represents the average processing banuba time.
		/// </summary>
		public double averageBanubaProcessingTime;
		/// <summary>
		/// Represents the average buffer reading time.
		/// </summary>
		public double averageBufferReadingTime;
		/// <summary>
		/// Represents the average processing time.
		/// </summary>
		public double averageFrameProcessingTime;
		/// <summary>
		/// Represents the number of frames were dropped.
		/// </summary>
		public uint framesDropped;
		/// <summary>
		/// Represents the maximum processing banuba time.
		/// </summary>
		public double maxBanubaProcessingTime;
		/// <summary>
		/// Represents the maximum buffer reading time.
		/// </summary>
		public double maxBufferReadingTime;
		/// <summary>
		/// Represents the maximum processing time.
		/// </summary>
		public double maxFrameProcessingTime;
		public CameraEffectStats(IntPtr obj){
			if(obj == IntPtr.Zero) {
				objPtr = VidyoCameraEffectStatsConstructDefaultNative();
			}
			else {
				objPtr = VidyoCameraEffectStatsConstructCopyNative(obj);
			}

			averageBanubaProcessingTime = VidyoCameraEffectStatsGetaverageBanubaProcessingTimeNative(objPtr);
			averageBufferReadingTime = VidyoCameraEffectStatsGetaverageBufferReadingTimeNative(objPtr);
			averageFrameProcessingTime = VidyoCameraEffectStatsGetaverageFrameProcessingTimeNative(objPtr);
			framesDropped = VidyoCameraEffectStatsGetframesDroppedNative(objPtr);
			maxBanubaProcessingTime = VidyoCameraEffectStatsGetmaxBanubaProcessingTimeNative(objPtr);
			maxBufferReadingTime = VidyoCameraEffectStatsGetmaxBufferReadingTimeNative(objPtr);
			maxFrameProcessingTime = VidyoCameraEffectStatsGetmaxFrameProcessingTimeNative(objPtr);
		}
		~CameraEffectStats() {
			VidyoCameraEffectStatsDestructNative(objPtr);
		 }
	};
}
