diff options
Diffstat (limited to 'bindings/csharp')
-rwxr-xr-x | bindings/csharp/MediaSessionMgr.cs | 16 | ||||
-rw-r--r-- | bindings/csharp/QoS.cs | 121 | ||||
-rwxr-xr-x | bindings/csharp/tinyWRAPPINVOKE.cs | 57 | ||||
-rwxr-xr-x | bindings/csharp/tinyWRAP_wrap.cxx | 228 |
4 files changed, 422 insertions, 0 deletions
diff --git a/bindings/csharp/MediaSessionMgr.cs b/bindings/csharp/MediaSessionMgr.cs index 8ee9d86..50d95a6 100755 --- a/bindings/csharp/MediaSessionMgr.cs +++ b/bindings/csharp/MediaSessionMgr.cs @@ -51,6 +51,12 @@ public class MediaSessionMgr : IDisposable { return ret; } + public QoS sessionGetQoS(twrap_media_type_t media) { + IntPtr cPtr = tinyWRAPPINVOKE.MediaSessionMgr_sessionGetQoS(swigCPtr, (int)media); + QoS ret = (cPtr == IntPtr.Zero) ? null : new QoS(cPtr, true); + return ret; + } + public bool consumerSetInt32(twrap_media_type_t media, string key, int value) { bool ret = tinyWRAPPINVOKE.MediaSessionMgr_consumerSetInt32(swigCPtr, (int)media, key, value); return ret; @@ -149,6 +155,16 @@ public class MediaSessionMgr : IDisposable { return ret; } + public static bool defaultsSetPrefVideoSizeOutRange(tmedia_pref_video_size_t min, tmedia_pref_video_size_t max) { + bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetPrefVideoSizeOutRange((int)min, (int)max); + return ret; + } + + public static bool defaultsSetAdaptativeVideoSizeOutEnabled(bool enabled) { + bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAdaptativeVideoSizeOutEnabled(enabled); + return ret; + } + public static bool defaultsSetJbMargin(uint jb_margin_ms) { bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetJbMargin(jb_margin_ms); return ret; diff --git a/bindings/csharp/QoS.cs b/bindings/csharp/QoS.cs new file mode 100644 index 0000000..87aa892 --- /dev/null +++ b/bindings/csharp/QoS.cs @@ -0,0 +1,121 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 2.0.9 + * + * Do not make changes to this file unless you know what you are doing--modify + * the SWIG interface file instead. + * ----------------------------------------------------------------------------- */ + +namespace org.doubango.tinyWRAP { + +using System; +using System.Runtime.InteropServices; + +public class QoS : IDisposable { + private HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal QoS(IntPtr cPtr, bool cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = new HandleRef(this, cPtr); + } + + internal static HandleRef getCPtr(QoS obj) { + return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; + } + + ~QoS() { + Dispose(); + } + + public virtual void Dispose() { + lock(this) { + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_QoS(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); + } + GC.SuppressFinalize(this); + } + } + + public float getQavg() { + float ret = tinyWRAPPINVOKE.QoS_getQavg(swigCPtr); + return ret; + } + + public float getQ1() { + float ret = tinyWRAPPINVOKE.QoS_getQ1(swigCPtr); + return ret; + } + + public float getQ2() { + float ret = tinyWRAPPINVOKE.QoS_getQ2(swigCPtr); + return ret; + } + + public float getQ3() { + float ret = tinyWRAPPINVOKE.QoS_getQ3(swigCPtr); + return ret; + } + + public float getQ4() { + float ret = tinyWRAPPINVOKE.QoS_getQ4(swigCPtr); + return ret; + } + + public float getQ5() { + float ret = tinyWRAPPINVOKE.QoS_getQ5(swigCPtr); + return ret; + } + + public uint getVideoInWidth() { + uint ret = tinyWRAPPINVOKE.QoS_getVideoInWidth(swigCPtr); + return ret; + } + + public uint getVideoOutWidth() { + uint ret = tinyWRAPPINVOKE.QoS_getVideoOutWidth(swigCPtr); + return ret; + } + + public uint getVideoInHeight() { + uint ret = tinyWRAPPINVOKE.QoS_getVideoInHeight(swigCPtr); + return ret; + } + + public uint getVideoOutHeight() { + uint ret = tinyWRAPPINVOKE.QoS_getVideoOutHeight(swigCPtr); + return ret; + } + + public uint getBandwidthDownKbps() { + uint ret = tinyWRAPPINVOKE.QoS_getBandwidthDownKbps(swigCPtr); + return ret; + } + + public uint getBandwidthUpKbps() { + uint ret = tinyWRAPPINVOKE.QoS_getBandwidthUpKbps(swigCPtr); + return ret; + } + + public uint getVideoInAvgFps() { + uint ret = tinyWRAPPINVOKE.QoS_getVideoInAvgFps(swigCPtr); + return ret; + } + + public uint getVideoDecAvgTime() { + uint ret = tinyWRAPPINVOKE.QoS_getVideoDecAvgTime(swigCPtr); + return ret; + } + + public uint getVideoEncAvgTime() { + uint ret = tinyWRAPPINVOKE.QoS_getVideoEncAvgTime(swigCPtr); + return ret; + } + +} + +} diff --git a/bindings/csharp/tinyWRAPPINVOKE.cs b/bindings/csharp/tinyWRAPPINVOKE.cs index 84f9165..e76ff31 100755 --- a/bindings/csharp/tinyWRAPPINVOKE.cs +++ b/bindings/csharp/tinyWRAPPINVOKE.cs @@ -264,6 +264,54 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_ActionConfig_setMediaInt")] public static extern IntPtr ActionConfig_setMediaInt(HandleRef jarg1, int jarg2, string jarg3, int jarg4); + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_QoS")] + public static extern void delete_QoS(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getQavg")] + public static extern float QoS_getQavg(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getQ1")] + public static extern float QoS_getQ1(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getQ2")] + public static extern float QoS_getQ2(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getQ3")] + public static extern float QoS_getQ3(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getQ4")] + public static extern float QoS_getQ4(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getQ5")] + public static extern float QoS_getQ5(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getVideoInWidth")] + public static extern uint QoS_getVideoInWidth(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getVideoOutWidth")] + public static extern uint QoS_getVideoOutWidth(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getVideoInHeight")] + public static extern uint QoS_getVideoInHeight(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getVideoOutHeight")] + public static extern uint QoS_getVideoOutHeight(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getBandwidthDownKbps")] + public static extern uint QoS_getBandwidthDownKbps(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getBandwidthUpKbps")] + public static extern uint QoS_getBandwidthUpKbps(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getVideoInAvgFps")] + public static extern uint QoS_getVideoInAvgFps(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getVideoDecAvgTime")] + public static extern uint QoS_getVideoDecAvgTime(HandleRef jarg1); + + [DllImport("tinyWRAP", EntryPoint="CSharp_QoS_getVideoEncAvgTime")] + public static extern uint QoS_getVideoEncAvgTime(HandleRef jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_delete_Codec")] public static extern void delete_Codec(HandleRef jarg1); @@ -297,6 +345,9 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_MediaSessionMgr_sessionGetInt32")] public static extern int MediaSessionMgr_sessionGetInt32(HandleRef jarg1, int jarg2, string jarg3); + [DllImport("tinyWRAP", EntryPoint="CSharp_MediaSessionMgr_sessionGetQoS")] + public static extern IntPtr MediaSessionMgr_sessionGetQoS(HandleRef jarg1, int jarg2); + [DllImport("tinyWRAP", EntryPoint="CSharp_MediaSessionMgr_consumerSetInt32")] public static extern bool MediaSessionMgr_consumerSetInt32(HandleRef jarg1, int jarg2, string jarg3, int jarg4); @@ -354,6 +405,12 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_MediaSessionMgr_defaultsSetPrefVideoSize")] public static extern bool MediaSessionMgr_defaultsSetPrefVideoSize(int jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_MediaSessionMgr_defaultsSetPrefVideoSizeOutRange")] + public static extern bool MediaSessionMgr_defaultsSetPrefVideoSizeOutRange(int jarg1, int jarg2); + + [DllImport("tinyWRAP", EntryPoint="CSharp_MediaSessionMgr_defaultsSetAdaptativeVideoSizeOutEnabled")] + public static extern bool MediaSessionMgr_defaultsSetAdaptativeVideoSizeOutEnabled(bool jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_MediaSessionMgr_defaultsSetJbMargin")] public static extern bool MediaSessionMgr_defaultsSetJbMargin(uint jarg1); diff --git a/bindings/csharp/tinyWRAP_wrap.cxx b/bindings/csharp/tinyWRAP_wrap.cxx index d2c8e32..5b7d245 100755 --- a/bindings/csharp/tinyWRAP_wrap.cxx +++ b/bindings/csharp/tinyWRAP_wrap.cxx @@ -1488,6 +1488,194 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_ActionConfig_setMediaInt(void * jarg1, int } +SWIGEXPORT void SWIGSTDCALL CSharp_delete_QoS(void * jarg1) { + QoS *arg1 = (QoS *) 0 ; + + arg1 = (QoS *)jarg1; + delete arg1; +} + + +SWIGEXPORT float SWIGSTDCALL CSharp_QoS_getQavg(void * jarg1) { + float jresult ; + QoS *arg1 = (QoS *) 0 ; + float result; + + arg1 = (QoS *)jarg1; + result = (float)(arg1)->getQavg(); + jresult = result; + return jresult; +} + + +SWIGEXPORT float SWIGSTDCALL CSharp_QoS_getQ1(void * jarg1) { + float jresult ; + QoS *arg1 = (QoS *) 0 ; + float result; + + arg1 = (QoS *)jarg1; + result = (float)(arg1)->getQ1(); + jresult = result; + return jresult; +} + + +SWIGEXPORT float SWIGSTDCALL CSharp_QoS_getQ2(void * jarg1) { + float jresult ; + QoS *arg1 = (QoS *) 0 ; + float result; + + arg1 = (QoS *)jarg1; + result = (float)(arg1)->getQ2(); + jresult = result; + return jresult; +} + + +SWIGEXPORT float SWIGSTDCALL CSharp_QoS_getQ3(void * jarg1) { + float jresult ; + QoS *arg1 = (QoS *) 0 ; + float result; + + arg1 = (QoS *)jarg1; + result = (float)(arg1)->getQ3(); + jresult = result; + return jresult; +} + + +SWIGEXPORT float SWIGSTDCALL CSharp_QoS_getQ4(void * jarg1) { + float jresult ; + QoS *arg1 = (QoS *) 0 ; + float result; + + arg1 = (QoS *)jarg1; + result = (float)(arg1)->getQ4(); + jresult = result; + return jresult; +} + + +SWIGEXPORT float SWIGSTDCALL CSharp_QoS_getQ5(void * jarg1) { + float jresult ; + QoS *arg1 = (QoS *) 0 ; + float result; + + arg1 = (QoS *)jarg1; + result = (float)(arg1)->getQ5(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getVideoInWidth(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getVideoInWidth(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getVideoOutWidth(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getVideoOutWidth(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getVideoInHeight(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getVideoInHeight(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getVideoOutHeight(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getVideoOutHeight(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getBandwidthDownKbps(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getBandwidthDownKbps(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getBandwidthUpKbps(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getBandwidthUpKbps(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getVideoInAvgFps(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getVideoInAvgFps(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getVideoDecAvgTime(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getVideoDecAvgTime(); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_QoS_getVideoEncAvgTime(void * jarg1) { + unsigned int jresult ; + QoS *arg1 = (QoS *) 0 ; + unsigned int result; + + arg1 = (QoS *)jarg1; + result = (unsigned int)(arg1)->getVideoEncAvgTime(); + jresult = result; + return jresult; +} + + SWIGEXPORT void SWIGSTDCALL CSharp_delete_Codec(void * jarg1) { Codec *arg1 = (Codec *) 0 ; @@ -1622,6 +1810,20 @@ SWIGEXPORT int SWIGSTDCALL CSharp_MediaSessionMgr_sessionGetInt32(void * jarg1, } +SWIGEXPORT void * SWIGSTDCALL CSharp_MediaSessionMgr_sessionGetQoS(void * jarg1, int jarg2) { + void * jresult ; + MediaSessionMgr *arg1 = (MediaSessionMgr *) 0 ; + twrap_media_type_t arg2 ; + QoS *result = 0 ; + + arg1 = (MediaSessionMgr *)jarg1; + arg2 = (twrap_media_type_t)jarg2; + result = (QoS *)(arg1)->sessionGetQoS(arg2); + jresult = (void *)result; + return jresult; +} + + SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MediaSessionMgr_consumerSetInt32(void * jarg1, int jarg2, char * jarg3, int jarg4) { unsigned int jresult ; MediaSessionMgr *arg1 = (MediaSessionMgr *) 0 ; @@ -1878,6 +2080,32 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MediaSessionMgr_defaultsSetPrefVideoS } +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MediaSessionMgr_defaultsSetPrefVideoSizeOutRange(int jarg1, int jarg2) { + unsigned int jresult ; + tmedia_pref_video_size_t arg1 ; + tmedia_pref_video_size_t arg2 ; + bool result; + + arg1 = (tmedia_pref_video_size_t)jarg1; + arg2 = (tmedia_pref_video_size_t)jarg2; + result = (bool)MediaSessionMgr::defaultsSetPrefVideoSizeOutRange(arg1,arg2); + jresult = result; + return jresult; +} + + +SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MediaSessionMgr_defaultsSetAdaptativeVideoSizeOutEnabled(unsigned int jarg1) { + unsigned int jresult ; + bool arg1 ; + bool result; + + arg1 = jarg1 ? true : false; + result = (bool)MediaSessionMgr::defaultsSetAdaptativeVideoSizeOutEnabled(arg1); + jresult = result; + return jresult; +} + + SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MediaSessionMgr_defaultsSetJbMargin(unsigned int jarg1) { unsigned int jresult ; uint32_t arg1 ; |