diff --git a/branches/2.0/doubango/bindings/_common/SipStack.i b/branches/2.0/doubango/bindings/_common/SipStack.i index 1593eb03..a80efe0c 100644 --- a/branches/2.0/doubango/bindings/_common/SipStack.i +++ b/branches/2.0/doubango/bindings/_common/SipStack.i @@ -256,6 +256,6 @@ typedef enum tdav_codec_id_e tdav_codec_id_h264_bp30 = 0x00010000<<6, tdav_codec_id_theora = 0x00010000<<7, tdav_codec_id_mp4ves_es = 0x00010000<<8, - + tdav_codec_id_vp8 = 0x00010000<<9, } tdav_codec_id_t; \ No newline at end of file diff --git a/branches/2.0/doubango/bindings/csharp/ActionConfig.cs b/branches/2.0/doubango/bindings/csharp/ActionConfig.cs index 5f55f6f0..8e1d5d7c 100644 --- a/branches/2.0/doubango/bindings/csharp/ActionConfig.cs +++ b/branches/2.0/doubango/bindings/csharp/ActionConfig.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ActionConfig : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ActionConfig(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ActionConfig(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/AudioResampler.cs b/branches/2.0/doubango/bindings/csharp/AudioResampler.cs index 336d789e..ea67e76f 100644 --- a/branches/2.0/doubango/bindings/csharp/AudioResampler.cs +++ b/branches/2.0/doubango/bindings/csharp/AudioResampler.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class AudioResampler : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_AudioResampler(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_AudioResampler(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/CallSession.cs b/branches/2.0/doubango/bindings/csharp/CallSession.cs index b6cf9673..f9622cbe 100644 --- a/branches/2.0/doubango/bindings/csharp/CallSession.cs +++ b/branches/2.0/doubango/bindings/csharp/CallSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class CallSession : InviteSession { private HandleRef swigCPtr; - internal CallSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.CallSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal CallSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.CallSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class CallSession : InviteSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_CallSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_CallSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/DDebugCallback.cs b/branches/2.0/doubango/bindings/csharp/DDebugCallback.cs index 47d95063..eef4626d 100644 --- a/branches/2.0/doubango/bindings/csharp/DDebugCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/DDebugCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class DDebugCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_DDebugCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_DDebugCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,22 +44,22 @@ public class DDebugCallback : IDisposable { } public virtual int OnDebugInfo(string message) { - int ret = (SwigDerivedClassHasMethod("OnDebugInfo", swigMethodTypes0) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugInfoSwigExplicitDDebugCallback(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugInfo(swigCPtr, message)); + int ret = ((this.GetType() == typeof(DDebugCallback)) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugInfo(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugInfoSwigExplicitDDebugCallback(swigCPtr, message)); return ret; } public virtual int OnDebugWarn(string message) { - int ret = (SwigDerivedClassHasMethod("OnDebugWarn", swigMethodTypes1) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugWarnSwigExplicitDDebugCallback(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugWarn(swigCPtr, message)); + int ret = ((this.GetType() == typeof(DDebugCallback)) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugWarn(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugWarnSwigExplicitDDebugCallback(swigCPtr, message)); return ret; } public virtual int OnDebugError(string message) { - int ret = (SwigDerivedClassHasMethod("OnDebugError", swigMethodTypes2) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugErrorSwigExplicitDDebugCallback(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugError(swigCPtr, message)); + int ret = ((this.GetType() == typeof(DDebugCallback)) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugError(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugErrorSwigExplicitDDebugCallback(swigCPtr, message)); return ret; } public virtual int OnDebugFatal(string message) { - int ret = (SwigDerivedClassHasMethod("OnDebugFatal", swigMethodTypes3) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugFatalSwigExplicitDDebugCallback(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugFatal(swigCPtr, message)); + int ret = ((this.GetType() == typeof(DDebugCallback)) ? tinyWRAPPINVOKE.DDebugCallback_OnDebugFatal(swigCPtr, message) : tinyWRAPPINVOKE.DDebugCallback_OnDebugFatalSwigExplicitDDebugCallback(swigCPtr, message)); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/DialogEvent.cs b/branches/2.0/doubango/bindings/csharp/DialogEvent.cs index 83258582..e8bfc0dc 100644 --- a/branches/2.0/doubango/bindings/csharp/DialogEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/DialogEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class DialogEvent : SipEvent { private HandleRef swigCPtr; - internal DialogEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.DialogEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal DialogEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.DialogEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class DialogEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_DialogEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_DialogEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/InviteEvent.cs b/branches/2.0/doubango/bindings/csharp/InviteEvent.cs index bf0fbbe6..4c489d69 100644 --- a/branches/2.0/doubango/bindings/csharp/InviteEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/InviteEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class InviteEvent : SipEvent { private HandleRef swigCPtr; - internal InviteEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.InviteEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal InviteEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.InviteEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class InviteEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_InviteEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_InviteEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/InviteSession.cs b/branches/2.0/doubango/bindings/csharp/InviteSession.cs index 1b093fca..5339614b 100644 --- a/branches/2.0/doubango/bindings/csharp/InviteSession.cs +++ b/branches/2.0/doubango/bindings/csharp/InviteSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class InviteSession : SipSession { private HandleRef swigCPtr; - internal InviteSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.InviteSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal InviteSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.InviteSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class InviteSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_InviteSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_InviteSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/MediaContent.cs b/branches/2.0/doubango/bindings/csharp/MediaContent.cs index 9ccf454d..c4aca0aa 100644 --- a/branches/2.0/doubango/bindings/csharp/MediaContent.cs +++ b/branches/2.0/doubango/bindings/csharp/MediaContent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class MediaContent : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MediaContent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MediaContent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/MediaContentCPIM.cs b/branches/2.0/doubango/bindings/csharp/MediaContentCPIM.cs index 9cebbbc3..8bab1c81 100644 --- a/branches/2.0/doubango/bindings/csharp/MediaContentCPIM.cs +++ b/branches/2.0/doubango/bindings/csharp/MediaContentCPIM.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class MediaContentCPIM : MediaContent { private HandleRef swigCPtr; - internal MediaContentCPIM(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MediaContentCPIM_SWIGUpcast(cPtr), cMemoryOwn) { + internal MediaContentCPIM(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MediaContentCPIMUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class MediaContentCPIM : MediaContent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MediaContentCPIM(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MediaContentCPIM(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/MediaSessionMgr.cs b/branches/2.0/doubango/bindings/csharp/MediaSessionMgr.cs index bf23dd66..845f25b1 100644 --- a/branches/2.0/doubango/bindings/csharp/MediaSessionMgr.cs +++ b/branches/2.0/doubango/bindings/csharp/MediaSessionMgr.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class MediaSessionMgr : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MediaSessionMgr(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MediaSessionMgr(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/MessagingEvent.cs b/branches/2.0/doubango/bindings/csharp/MessagingEvent.cs index 5ec48b5c..6c41de2f 100644 --- a/branches/2.0/doubango/bindings/csharp/MessagingEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/MessagingEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class MessagingEvent : SipEvent { private HandleRef swigCPtr; - internal MessagingEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MessagingEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal MessagingEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MessagingEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class MessagingEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MessagingEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MessagingEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/MessagingSession.cs b/branches/2.0/doubango/bindings/csharp/MessagingSession.cs index b8647a18..6174dbec 100644 --- a/branches/2.0/doubango/bindings/csharp/MessagingSession.cs +++ b/branches/2.0/doubango/bindings/csharp/MessagingSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class MessagingSession : SipSession { private HandleRef swigCPtr; - internal MessagingSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MessagingSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal MessagingSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MessagingSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class MessagingSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MessagingSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MessagingSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/MsrpCallback.cs b/branches/2.0/doubango/bindings/csharp/MsrpCallback.cs index 0ec7e0c0..98fd5b3e 100644 --- a/branches/2.0/doubango/bindings/csharp/MsrpCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/MsrpCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class MsrpCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MsrpCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MsrpCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,7 +44,7 @@ public class MsrpCallback : IDisposable { } public virtual int OnEvent(MsrpEvent e) { - int ret = (SwigDerivedClassHasMethod("OnEvent", swigMethodTypes0) ? tinyWRAPPINVOKE.MsrpCallback_OnEventSwigExplicitMsrpCallback(swigCPtr, MsrpEvent.getCPtr(e)) : tinyWRAPPINVOKE.MsrpCallback_OnEvent(swigCPtr, MsrpEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(MsrpCallback)) ? tinyWRAPPINVOKE.MsrpCallback_OnEvent(swigCPtr, MsrpEvent.getCPtr(e)) : tinyWRAPPINVOKE.MsrpCallback_OnEventSwigExplicitMsrpCallback(swigCPtr, MsrpEvent.getCPtr(e))); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/MsrpEvent.cs b/branches/2.0/doubango/bindings/csharp/MsrpEvent.cs index 42214071..92956e3d 100644 --- a/branches/2.0/doubango/bindings/csharp/MsrpEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/MsrpEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class MsrpEvent : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MsrpEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MsrpEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/MsrpMessage.cs b/branches/2.0/doubango/bindings/csharp/MsrpMessage.cs index f898bd7a..b69953e1 100644 --- a/branches/2.0/doubango/bindings/csharp/MsrpMessage.cs +++ b/branches/2.0/doubango/bindings/csharp/MsrpMessage.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class MsrpMessage : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MsrpMessage(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MsrpMessage(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/MsrpSession.cs b/branches/2.0/doubango/bindings/csharp/MsrpSession.cs index c798e20c..cafe8616 100644 --- a/branches/2.0/doubango/bindings/csharp/MsrpSession.cs +++ b/branches/2.0/doubango/bindings/csharp/MsrpSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class MsrpSession : InviteSession { private HandleRef swigCPtr; - internal MsrpSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MsrpSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal MsrpSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.MsrpSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class MsrpSession : InviteSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_MsrpSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_MsrpSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/OptionsEvent.cs b/branches/2.0/doubango/bindings/csharp/OptionsEvent.cs index eed05a09..379c34e8 100644 --- a/branches/2.0/doubango/bindings/csharp/OptionsEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/OptionsEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class OptionsEvent : SipEvent { private HandleRef swigCPtr; - internal OptionsEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.OptionsEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal OptionsEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.OptionsEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class OptionsEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_OptionsEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_OptionsEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/OptionsSession.cs b/branches/2.0/doubango/bindings/csharp/OptionsSession.cs index a0039e72..6e6843b4 100644 --- a/branches/2.0/doubango/bindings/csharp/OptionsSession.cs +++ b/branches/2.0/doubango/bindings/csharp/OptionsSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class OptionsSession : SipSession { private HandleRef swigCPtr; - internal OptionsSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.OptionsSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal OptionsSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.OptionsSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class OptionsSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_OptionsSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_OptionsSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumer.cs b/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumer.cs index 1fe400cb..b7729b1e 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumer.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumer.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class ProxyAudioConsumer : ProxyPlugin { private HandleRef swigCPtr; - internal ProxyAudioConsumer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyAudioConsumer_SWIGUpcast(cPtr), cMemoryOwn) { + internal ProxyAudioConsumer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyAudioConsumerUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class ProxyAudioConsumer : ProxyPlugin { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyAudioConsumer(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyAudioConsumer(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumerCallback.cs b/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumerCallback.cs index 38a6dd4f..9e4661ed 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumerCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyAudioConsumerCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyAudioConsumerCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyAudioConsumerCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyAudioConsumerCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,22 +44,22 @@ public class ProxyAudioConsumerCallback : IDisposable { } public virtual int prepare(int ptime, int rate, int channels) { - int ret = (SwigDerivedClassHasMethod("prepare", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_prepareSwigExplicitProxyAudioConsumerCallback(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_prepare(swigCPtr, ptime, rate, channels)); + int ret = ((this.GetType() == typeof(ProxyAudioConsumerCallback)) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_prepare(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_prepareSwigExplicitProxyAudioConsumerCallback(swigCPtr, ptime, rate, channels)); return ret; } public virtual int start() { - int ret = (SwigDerivedClassHasMethod("start", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_startSwigExplicitProxyAudioConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_start(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyAudioConsumerCallback)) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_start(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_startSwigExplicitProxyAudioConsumerCallback(swigCPtr)); return ret; } public virtual int pause() { - int ret = (SwigDerivedClassHasMethod("pause", swigMethodTypes2) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_pauseSwigExplicitProxyAudioConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_pause(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyAudioConsumerCallback)) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_pause(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_pauseSwigExplicitProxyAudioConsumerCallback(swigCPtr)); return ret; } public virtual int stop() { - int ret = (SwigDerivedClassHasMethod("stop", swigMethodTypes3) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_stopSwigExplicitProxyAudioConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_stop(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyAudioConsumerCallback)) ? tinyWRAPPINVOKE.ProxyAudioConsumerCallback_stop(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioConsumerCallback_stopSwigExplicitProxyAudioConsumerCallback(swigCPtr)); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyAudioProducer.cs b/branches/2.0/doubango/bindings/csharp/ProxyAudioProducer.cs index f40aef41..2215c614 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyAudioProducer.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyAudioProducer.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class ProxyAudioProducer : ProxyPlugin { private HandleRef swigCPtr; - internal ProxyAudioProducer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyAudioProducer_SWIGUpcast(cPtr), cMemoryOwn) { + internal ProxyAudioProducer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyAudioProducerUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class ProxyAudioProducer : ProxyPlugin { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyAudioProducer(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyAudioProducer(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyAudioProducerCallback.cs b/branches/2.0/doubango/bindings/csharp/ProxyAudioProducerCallback.cs index 0df536cf..81064713 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyAudioProducerCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyAudioProducerCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyAudioProducerCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyAudioProducerCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyAudioProducerCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,22 +44,22 @@ public class ProxyAudioProducerCallback : IDisposable { } public virtual int prepare(int ptime, int rate, int channels) { - int ret = (SwigDerivedClassHasMethod("prepare", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_prepareSwigExplicitProxyAudioProducerCallback(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_prepare(swigCPtr, ptime, rate, channels)); + int ret = ((this.GetType() == typeof(ProxyAudioProducerCallback)) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_prepare(swigCPtr, ptime, rate, channels) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_prepareSwigExplicitProxyAudioProducerCallback(swigCPtr, ptime, rate, channels)); return ret; } public virtual int start() { - int ret = (SwigDerivedClassHasMethod("start", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_startSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_start(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyAudioProducerCallback)) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_start(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_startSwigExplicitProxyAudioProducerCallback(swigCPtr)); return ret; } public virtual int pause() { - int ret = (SwigDerivedClassHasMethod("pause", swigMethodTypes2) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_pauseSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_pause(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyAudioProducerCallback)) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_pause(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_pauseSwigExplicitProxyAudioProducerCallback(swigCPtr)); return ret; } public virtual int stop() { - int ret = (SwigDerivedClassHasMethod("stop", swigMethodTypes3) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_stop(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyAudioProducerCallback)) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_stop(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(swigCPtr)); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyPlugin.cs b/branches/2.0/doubango/bindings/csharp/ProxyPlugin.cs index c5215348..cb62dd6c 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyPlugin.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyPlugin.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyPlugin : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyPlugin(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyPlugin(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyPluginMgr.cs b/branches/2.0/doubango/bindings/csharp/ProxyPluginMgr.cs index d32a6626..ef1be3fb 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyPluginMgr.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyPluginMgr.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyPluginMgr : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyPluginMgr(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyPluginMgr(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyPluginMgrCallback.cs b/branches/2.0/doubango/bindings/csharp/ProxyPluginMgrCallback.cs index fffa458a..f391f36f 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyPluginMgrCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyPluginMgrCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyPluginMgrCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyPluginMgrCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyPluginMgrCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,12 +44,12 @@ public class ProxyPluginMgrCallback : IDisposable { } public virtual int OnPluginCreated(ulong id, twrap_proxy_plugin_type_t type) { - int ret = (SwigDerivedClassHasMethod("OnPluginCreated", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginCreatedSwigExplicitProxyPluginMgrCallback(swigCPtr, id, (int)type) : tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginCreated(swigCPtr, id, (int)type)); + int ret = ((this.GetType() == typeof(ProxyPluginMgrCallback)) ? tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginCreated(swigCPtr, id, (int)type) : tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginCreatedSwigExplicitProxyPluginMgrCallback(swigCPtr, id, (int)type)); return ret; } public virtual int OnPluginDestroyed(ulong id, twrap_proxy_plugin_type_t type) { - int ret = (SwigDerivedClassHasMethod("OnPluginDestroyed", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginDestroyedSwigExplicitProxyPluginMgrCallback(swigCPtr, id, (int)type) : tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginDestroyed(swigCPtr, id, (int)type)); + int ret = ((this.GetType() == typeof(ProxyPluginMgrCallback)) ? tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginDestroyed(swigCPtr, id, (int)type) : tinyWRAPPINVOKE.ProxyPluginMgrCallback_OnPluginDestroyedSwigExplicitProxyPluginMgrCallback(swigCPtr, id, (int)type)); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumer.cs b/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumer.cs index ae0fcc36..d5b6bc38 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumer.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumer.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class ProxyVideoConsumer : ProxyPlugin { private HandleRef swigCPtr; - internal ProxyVideoConsumer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyVideoConsumer_SWIGUpcast(cPtr), cMemoryOwn) { + internal ProxyVideoConsumer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyVideoConsumerUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class ProxyVideoConsumer : ProxyPlugin { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyVideoConsumer(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyVideoConsumer(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumerCallback.cs b/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumerCallback.cs index 6d3cad62..59b80bf4 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumerCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyVideoConsumerCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyVideoConsumerCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyVideoConsumerCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyVideoConsumerCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,32 +44,32 @@ public class ProxyVideoConsumerCallback : IDisposable { } public virtual int prepare(int nWidth, int nHeight, int nFps) { - int ret = (SwigDerivedClassHasMethod("prepare", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_prepareSwigExplicitProxyVideoConsumerCallback(swigCPtr, nWidth, nHeight, nFps) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_prepare(swigCPtr, nWidth, nHeight, nFps)); + int ret = ((this.GetType() == typeof(ProxyVideoConsumerCallback)) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_prepare(swigCPtr, nWidth, nHeight, nFps) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_prepareSwigExplicitProxyVideoConsumerCallback(swigCPtr, nWidth, nHeight, nFps)); return ret; } public virtual int consume(ProxyVideoFrame frame) { - int ret = (SwigDerivedClassHasMethod("consume", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_consumeSwigExplicitProxyVideoConsumerCallback(swigCPtr, ProxyVideoFrame.getCPtr(frame)) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_consume(swigCPtr, ProxyVideoFrame.getCPtr(frame))); + int ret = ((this.GetType() == typeof(ProxyVideoConsumerCallback)) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_consume(swigCPtr, ProxyVideoFrame.getCPtr(frame)) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_consumeSwigExplicitProxyVideoConsumerCallback(swigCPtr, ProxyVideoFrame.getCPtr(frame))); return ret; } public virtual int bufferCopied(uint nCopiedSize, uint nAvailableSize) { - int ret = (SwigDerivedClassHasMethod("bufferCopied", swigMethodTypes2) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_bufferCopiedSwigExplicitProxyVideoConsumerCallback(swigCPtr, nCopiedSize, nAvailableSize) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_bufferCopied(swigCPtr, nCopiedSize, nAvailableSize)); + int ret = ((this.GetType() == typeof(ProxyVideoConsumerCallback)) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_bufferCopied(swigCPtr, nCopiedSize, nAvailableSize) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_bufferCopiedSwigExplicitProxyVideoConsumerCallback(swigCPtr, nCopiedSize, nAvailableSize)); return ret; } public virtual int start() { - int ret = (SwigDerivedClassHasMethod("start", swigMethodTypes3) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_startSwigExplicitProxyVideoConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_start(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyVideoConsumerCallback)) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_start(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_startSwigExplicitProxyVideoConsumerCallback(swigCPtr)); return ret; } public virtual int pause() { - int ret = (SwigDerivedClassHasMethod("pause", swigMethodTypes4) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_pauseSwigExplicitProxyVideoConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_pause(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyVideoConsumerCallback)) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_pause(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_pauseSwigExplicitProxyVideoConsumerCallback(swigCPtr)); return ret; } public virtual int stop() { - int ret = (SwigDerivedClassHasMethod("stop", swigMethodTypes5) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_stopSwigExplicitProxyVideoConsumerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_stop(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyVideoConsumerCallback)) ? tinyWRAPPINVOKE.ProxyVideoConsumerCallback_stop(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoConsumerCallback_stopSwigExplicitProxyVideoConsumerCallback(swigCPtr)); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyVideoFrame.cs b/branches/2.0/doubango/bindings/csharp/ProxyVideoFrame.cs index 37333671..f8af974c 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyVideoFrame.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyVideoFrame.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyVideoFrame : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyVideoFrame(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyVideoFrame(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyVideoProducer.cs b/branches/2.0/doubango/bindings/csharp/ProxyVideoProducer.cs index be6c6d82..e88f8e59 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyVideoProducer.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyVideoProducer.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class ProxyVideoProducer : ProxyPlugin { private HandleRef swigCPtr; - internal ProxyVideoProducer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyVideoProducer_SWIGUpcast(cPtr), cMemoryOwn) { + internal ProxyVideoProducer(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.ProxyVideoProducerUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class ProxyVideoProducer : ProxyPlugin { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyVideoProducer(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyVideoProducer(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/ProxyVideoProducerCallback.cs b/branches/2.0/doubango/bindings/csharp/ProxyVideoProducerCallback.cs index ad21c25b..7deb2a75 100644 --- a/branches/2.0/doubango/bindings/csharp/ProxyVideoProducerCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/ProxyVideoProducerCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class ProxyVideoProducerCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_ProxyVideoProducerCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_ProxyVideoProducerCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,22 +44,22 @@ public class ProxyVideoProducerCallback : IDisposable { } public virtual int prepare(int width, int height, int fps) { - int ret = (SwigDerivedClassHasMethod("prepare", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_prepareSwigExplicitProxyVideoProducerCallback(swigCPtr, width, height, fps) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_prepare(swigCPtr, width, height, fps)); + int ret = ((this.GetType() == typeof(ProxyVideoProducerCallback)) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_prepare(swigCPtr, width, height, fps) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_prepareSwigExplicitProxyVideoProducerCallback(swigCPtr, width, height, fps)); return ret; } public virtual int start() { - int ret = (SwigDerivedClassHasMethod("start", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_startSwigExplicitProxyVideoProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_start(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyVideoProducerCallback)) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_start(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_startSwigExplicitProxyVideoProducerCallback(swigCPtr)); return ret; } public virtual int pause() { - int ret = (SwigDerivedClassHasMethod("pause", swigMethodTypes2) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_pauseSwigExplicitProxyVideoProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_pause(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyVideoProducerCallback)) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_pause(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_pauseSwigExplicitProxyVideoProducerCallback(swigCPtr)); return ret; } public virtual int stop() { - int ret = (SwigDerivedClassHasMethod("stop", swigMethodTypes3) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_stopSwigExplicitProxyVideoProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_stop(swigCPtr)); + int ret = ((this.GetType() == typeof(ProxyVideoProducerCallback)) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_stop(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_stopSwigExplicitProxyVideoProducerCallback(swigCPtr)); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/PublicationEvent.cs b/branches/2.0/doubango/bindings/csharp/PublicationEvent.cs index 707f7a4e..55de1e3f 100644 --- a/branches/2.0/doubango/bindings/csharp/PublicationEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/PublicationEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class PublicationEvent : SipEvent { private HandleRef swigCPtr; - internal PublicationEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.PublicationEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal PublicationEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.PublicationEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class PublicationEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/PublicationSession.cs b/branches/2.0/doubango/bindings/csharp/PublicationSession.cs index 3e1ff5c6..3c38aff9 100644 --- a/branches/2.0/doubango/bindings/csharp/PublicationSession.cs +++ b/branches/2.0/doubango/bindings/csharp/PublicationSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class PublicationSession : SipSession { private HandleRef swigCPtr; - internal PublicationSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.PublicationSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal PublicationSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.PublicationSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class PublicationSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_PublicationSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/RPMessage.cs b/branches/2.0/doubango/bindings/csharp/RPMessage.cs index a485b15c..c984c070 100644 --- a/branches/2.0/doubango/bindings/csharp/RPMessage.cs +++ b/branches/2.0/doubango/bindings/csharp/RPMessage.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class RPMessage : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RPMessage(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RPMessage(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/RegistrationEvent.cs b/branches/2.0/doubango/bindings/csharp/RegistrationEvent.cs index 1e60362d..21dbc2ae 100644 --- a/branches/2.0/doubango/bindings/csharp/RegistrationEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/RegistrationEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class RegistrationEvent : SipEvent { private HandleRef swigCPtr; - internal RegistrationEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.RegistrationEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal RegistrationEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.RegistrationEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class RegistrationEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/RegistrationSession.cs b/branches/2.0/doubango/bindings/csharp/RegistrationSession.cs index 6755242f..cb4b5ae7 100644 --- a/branches/2.0/doubango/bindings/csharp/RegistrationSession.cs +++ b/branches/2.0/doubango/bindings/csharp/RegistrationSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class RegistrationSession : SipSession { private HandleRef swigCPtr; - internal RegistrationSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.RegistrationSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal RegistrationSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.RegistrationSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class RegistrationSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_RegistrationSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/SMSData.cs b/branches/2.0/doubango/bindings/csharp/SMSData.cs index d96fb946..4d17a218 100644 --- a/branches/2.0/doubango/bindings/csharp/SMSData.cs +++ b/branches/2.0/doubango/bindings/csharp/SMSData.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SMSData : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SMSData(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SMSData(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/SMSEncoder.cs b/branches/2.0/doubango/bindings/csharp/SMSEncoder.cs index 292d42b5..30eaaff2 100644 --- a/branches/2.0/doubango/bindings/csharp/SMSEncoder.cs +++ b/branches/2.0/doubango/bindings/csharp/SMSEncoder.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SMSEncoder : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SMSEncoder(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SMSEncoder(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/SafeObject.cs b/branches/2.0/doubango/bindings/csharp/SafeObject.cs index 09fd6b1f..28217da6 100644 --- a/branches/2.0/doubango/bindings/csharp/SafeObject.cs +++ b/branches/2.0/doubango/bindings/csharp/SafeObject.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SafeObject : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SafeObject(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/SdpMessage.cs b/branches/2.0/doubango/bindings/csharp/SdpMessage.cs index f796a2f1..2a54b1a5 100644 --- a/branches/2.0/doubango/bindings/csharp/SdpMessage.cs +++ b/branches/2.0/doubango/bindings/csharp/SdpMessage.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SdpMessage : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SdpMessage(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SdpMessage(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/SipCallback.cs b/branches/2.0/doubango/bindings/csharp/SipCallback.cs index 185e647b..1a5ae0a6 100644 --- a/branches/2.0/doubango/bindings/csharp/SipCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/SipCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SipCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,42 +44,42 @@ public class SipCallback : IDisposable { } public virtual int OnDialogEvent(DialogEvent e) { - int ret = (SwigDerivedClassHasMethod("OnDialogEvent", swigMethodTypes0) ? tinyWRAPPINVOKE.SipCallback_OnDialogEventSwigExplicitSipCallback(swigCPtr, DialogEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnDialogEvent(swigCPtr, DialogEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnDialogEvent(swigCPtr, DialogEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnDialogEventSwigExplicitSipCallback(swigCPtr, DialogEvent.getCPtr(e))); return ret; } public virtual int OnStackEvent(StackEvent e) { - int ret = (SwigDerivedClassHasMethod("OnStackEvent", swigMethodTypes1) ? tinyWRAPPINVOKE.SipCallback_OnStackEventSwigExplicitSipCallback(swigCPtr, StackEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnStackEvent(swigCPtr, StackEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnStackEvent(swigCPtr, StackEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnStackEventSwigExplicitSipCallback(swigCPtr, StackEvent.getCPtr(e))); return ret; } public virtual int OnInviteEvent(InviteEvent e) { - int ret = (SwigDerivedClassHasMethod("OnInviteEvent", swigMethodTypes2) ? tinyWRAPPINVOKE.SipCallback_OnInviteEventSwigExplicitSipCallback(swigCPtr, InviteEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnInviteEvent(swigCPtr, InviteEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnInviteEvent(swigCPtr, InviteEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnInviteEventSwigExplicitSipCallback(swigCPtr, InviteEvent.getCPtr(e))); return ret; } public virtual int OnMessagingEvent(MessagingEvent e) { - int ret = (SwigDerivedClassHasMethod("OnMessagingEvent", swigMethodTypes3) ? tinyWRAPPINVOKE.SipCallback_OnMessagingEventSwigExplicitSipCallback(swigCPtr, MessagingEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnMessagingEvent(swigCPtr, MessagingEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnMessagingEvent(swigCPtr, MessagingEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnMessagingEventSwigExplicitSipCallback(swigCPtr, MessagingEvent.getCPtr(e))); return ret; } public virtual int OnOptionsEvent(OptionsEvent e) { - int ret = (SwigDerivedClassHasMethod("OnOptionsEvent", swigMethodTypes4) ? tinyWRAPPINVOKE.SipCallback_OnOptionsEventSwigExplicitSipCallback(swigCPtr, OptionsEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnOptionsEvent(swigCPtr, OptionsEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnOptionsEvent(swigCPtr, OptionsEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnOptionsEventSwigExplicitSipCallback(swigCPtr, OptionsEvent.getCPtr(e))); return ret; } public virtual int OnPublicationEvent(PublicationEvent e) { - int ret = (SwigDerivedClassHasMethod("OnPublicationEvent", swigMethodTypes5) ? tinyWRAPPINVOKE.SipCallback_OnPublicationEventSwigExplicitSipCallback(swigCPtr, PublicationEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnPublicationEvent(swigCPtr, PublicationEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnPublicationEvent(swigCPtr, PublicationEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnPublicationEventSwigExplicitSipCallback(swigCPtr, PublicationEvent.getCPtr(e))); return ret; } public virtual int OnRegistrationEvent(RegistrationEvent e) { - int ret = (SwigDerivedClassHasMethod("OnRegistrationEvent", swigMethodTypes6) ? tinyWRAPPINVOKE.SipCallback_OnRegistrationEventSwigExplicitSipCallback(swigCPtr, RegistrationEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnRegistrationEvent(swigCPtr, RegistrationEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnRegistrationEvent(swigCPtr, RegistrationEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnRegistrationEventSwigExplicitSipCallback(swigCPtr, RegistrationEvent.getCPtr(e))); return ret; } public virtual int OnSubscriptionEvent(SubscriptionEvent e) { - int ret = (SwigDerivedClassHasMethod("OnSubscriptionEvent", swigMethodTypes7) ? tinyWRAPPINVOKE.SipCallback_OnSubscriptionEventSwigExplicitSipCallback(swigCPtr, SubscriptionEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnSubscriptionEvent(swigCPtr, SubscriptionEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(SipCallback)) ? tinyWRAPPINVOKE.SipCallback_OnSubscriptionEvent(swigCPtr, SubscriptionEvent.getCPtr(e)) : tinyWRAPPINVOKE.SipCallback_OnSubscriptionEventSwigExplicitSipCallback(swigCPtr, SubscriptionEvent.getCPtr(e))); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/SipEvent.cs b/branches/2.0/doubango/bindings/csharp/SipEvent.cs index 0296659e..f81cc554 100644 --- a/branches/2.0/doubango/bindings/csharp/SipEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/SipEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SipEvent : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/SipMessage.cs b/branches/2.0/doubango/bindings/csharp/SipMessage.cs index 71717028..4d176083 100644 --- a/branches/2.0/doubango/bindings/csharp/SipMessage.cs +++ b/branches/2.0/doubango/bindings/csharp/SipMessage.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SipMessage : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipMessage(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/SipSession.cs b/branches/2.0/doubango/bindings/csharp/SipSession.cs index fd71ad03..94fc020f 100644 --- a/branches/2.0/doubango/bindings/csharp/SipSession.cs +++ b/branches/2.0/doubango/bindings/csharp/SipSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SipSession : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/SipStack.cs b/branches/2.0/doubango/bindings/csharp/SipStack.cs index 62c9da81..8467b940 100644 --- a/branches/2.0/doubango/bindings/csharp/SipStack.cs +++ b/branches/2.0/doubango/bindings/csharp/SipStack.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class SipStack : SafeObject { private HandleRef swigCPtr; - internal SipStack(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SipStack_SWIGUpcast(cPtr), cMemoryOwn) { + internal SipStack(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SipStackUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class SipStack : SafeObject { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipStack(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipStack(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/SipUri.cs b/branches/2.0/doubango/bindings/csharp/SipUri.cs index 24b9c249..3ff26e5f 100644 --- a/branches/2.0/doubango/bindings/csharp/SipUri.cs +++ b/branches/2.0/doubango/bindings/csharp/SipUri.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class SipUri : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SipUri(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SipUri(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/StackEvent.cs b/branches/2.0/doubango/bindings/csharp/StackEvent.cs index 4c67c42b..e2220426 100644 --- a/branches/2.0/doubango/bindings/csharp/StackEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/StackEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class StackEvent : SipEvent { private HandleRef swigCPtr; - internal StackEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.StackEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal StackEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.StackEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class StackEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_StackEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_StackEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/SubscriptionEvent.cs b/branches/2.0/doubango/bindings/csharp/SubscriptionEvent.cs index 129ed099..a00691c4 100644 --- a/branches/2.0/doubango/bindings/csharp/SubscriptionEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/SubscriptionEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class SubscriptionEvent : SipEvent { private HandleRef swigCPtr; - internal SubscriptionEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SubscriptionEvent_SWIGUpcast(cPtr), cMemoryOwn) { + internal SubscriptionEvent(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SubscriptionEventUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class SubscriptionEvent : SipEvent { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/SubscriptionSession.cs b/branches/2.0/doubango/bindings/csharp/SubscriptionSession.cs index 3b845f17..0726174c 100644 --- a/branches/2.0/doubango/bindings/csharp/SubscriptionSession.cs +++ b/branches/2.0/doubango/bindings/csharp/SubscriptionSession.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -14,7 +14,7 @@ using System.Runtime.InteropServices; public class SubscriptionSession : SipSession { private HandleRef swigCPtr; - internal SubscriptionSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SubscriptionSession_SWIGUpcast(cPtr), cMemoryOwn) { + internal SubscriptionSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.SubscriptionSessionUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } @@ -28,13 +28,11 @@ public class SubscriptionSession : SipSession { public override void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_SubscriptionSession(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } diff --git a/branches/2.0/doubango/bindings/csharp/XcapCallback.cs b/branches/2.0/doubango/bindings/csharp/XcapCallback.cs index 4028185e..29af4217 100644 --- a/branches/2.0/doubango/bindings/csharp/XcapCallback.cs +++ b/branches/2.0/doubango/bindings/csharp/XcapCallback.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class XcapCallback : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_XcapCallback(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_XcapCallback(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } @@ -46,7 +44,7 @@ public class XcapCallback : IDisposable { } public virtual int onEvent(XcapEvent e) { - int ret = (SwigDerivedClassHasMethod("onEvent", swigMethodTypes0) ? tinyWRAPPINVOKE.XcapCallback_onEventSwigExplicitXcapCallback(swigCPtr, XcapEvent.getCPtr(e)) : tinyWRAPPINVOKE.XcapCallback_onEvent(swigCPtr, XcapEvent.getCPtr(e))); + int ret = ((this.GetType() == typeof(XcapCallback)) ? tinyWRAPPINVOKE.XcapCallback_onEvent(swigCPtr, XcapEvent.getCPtr(e)) : tinyWRAPPINVOKE.XcapCallback_onEventSwigExplicitXcapCallback(swigCPtr, XcapEvent.getCPtr(e))); return ret; } diff --git a/branches/2.0/doubango/bindings/csharp/XcapEvent.cs b/branches/2.0/doubango/bindings/csharp/XcapEvent.cs index c64ef0d8..4358aec4 100644 --- a/branches/2.0/doubango/bindings/csharp/XcapEvent.cs +++ b/branches/2.0/doubango/bindings/csharp/XcapEvent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class XcapEvent : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_XcapEvent(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_XcapEvent(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/XcapMessage.cs b/branches/2.0/doubango/bindings/csharp/XcapMessage.cs index 508ea385..38506448 100644 --- a/branches/2.0/doubango/bindings/csharp/XcapMessage.cs +++ b/branches/2.0/doubango/bindings/csharp/XcapMessage.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class XcapMessage : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_XcapMessage(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_XcapMessage(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/XcapSelector.cs b/branches/2.0/doubango/bindings/csharp/XcapSelector.cs index d93763d7..bb420a10 100644 --- a/branches/2.0/doubango/bindings/csharp/XcapSelector.cs +++ b/branches/2.0/doubango/bindings/csharp/XcapSelector.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class XcapSelector : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_XcapSelector(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_XcapSelector(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/XcapStack.cs b/branches/2.0/doubango/bindings/csharp/XcapStack.cs index 0a74eefc..04d0f52a 100644 --- a/branches/2.0/doubango/bindings/csharp/XcapStack.cs +++ b/branches/2.0/doubango/bindings/csharp/XcapStack.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -30,13 +30,11 @@ public class XcapStack : IDisposable { public virtual void Dispose() { lock(this) { - if (swigCPtr.Handle != IntPtr.Zero) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPPINVOKE.delete_XcapStack(swigCPtr); - } - swigCPtr = new HandleRef(null, IntPtr.Zero); + if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPPINVOKE.delete_XcapStack(swigCPtr); } + swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/branches/2.0/doubango/bindings/csharp/tdav_codec_id_t.cs b/branches/2.0/doubango/bindings/csharp/tdav_codec_id_t.cs index 1c2ef508..a3998bc3 100644 --- a/branches/2.0/doubango/bindings/csharp/tdav_codec_id_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tdav_codec_id_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33,7 +33,8 @@ public enum tdav_codec_id_t { tdav_codec_id_h264_bp20 = 0x00010000 << 5, tdav_codec_id_h264_bp30 = 0x00010000 << 6, tdav_codec_id_theora = 0x00010000 << 7, - tdav_codec_id_mp4ves_es = 0x00010000 << 8 + tdav_codec_id_mp4ves_es = 0x00010000 << 8, + tdav_codec_id_vp8 = 0x00010000 << 9 } } diff --git a/branches/2.0/doubango/bindings/csharp/thttp_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/thttp_event_type_t.cs index 6868226a..fa1b85be 100644 --- a/branches/2.0/doubango/bindings/csharp/thttp_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/thttp_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tinyWRAP.cs b/branches/2.0/doubango/bindings/csharp/tinyWRAP.cs index def459b3..cfd0c640 100644 --- a/branches/2.0/doubango/bindings/csharp/tinyWRAP.cs +++ b/branches/2.0/doubango/bindings/csharp/tinyWRAP.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tinyWRAPPINVOKE.cs b/branches/2.0/doubango/bindings/csharp/tinyWRAPPINVOKE.cs index 2ea60e24..31ad54e2 100644 --- a/branches/2.0/doubango/bindings/csharp/tinyWRAPPINVOKE.cs +++ b/branches/2.0/doubango/bindings/csharp/tinyWRAPPINVOKE.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -185,10 +185,6 @@ class tinyWRAPPINVOKE { static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper(); - static tinyWRAPPINVOKE() { - } - - [DllImport("tinyWRAP", EntryPoint="CSharp_new_DDebugCallback")] public static extern IntPtr new_DDebugCallback(); @@ -1680,71 +1676,71 @@ class tinyWRAPPINVOKE { [DllImport("tinyWRAP", EntryPoint="CSharp_MsrpCallback_director_connect")] public static extern void MsrpCallback_director_connect(HandleRef jarg1, MsrpCallback.SwigDelegateMsrpCallback_0 delegate0); - [DllImport("tinyWRAP", EntryPoint="CSharp_MediaContentCPIM_SWIGUpcast")] - public static extern IntPtr MediaContentCPIM_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_MediaContentCPIMUpcast")] + public static extern IntPtr MediaContentCPIMUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_DialogEvent_SWIGUpcast")] - public static extern IntPtr DialogEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_DialogEventUpcast")] + public static extern IntPtr DialogEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_StackEvent_SWIGUpcast")] - public static extern IntPtr StackEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_StackEventUpcast")] + public static extern IntPtr StackEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_InviteEvent_SWIGUpcast")] - public static extern IntPtr InviteEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_InviteEventUpcast")] + public static extern IntPtr InviteEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_MessagingEvent_SWIGUpcast")] - public static extern IntPtr MessagingEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_MessagingEventUpcast")] + public static extern IntPtr MessagingEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_OptionsEvent_SWIGUpcast")] - public static extern IntPtr OptionsEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_OptionsEventUpcast")] + public static extern IntPtr OptionsEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_PublicationEvent_SWIGUpcast")] - public static extern IntPtr PublicationEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_PublicationEventUpcast")] + public static extern IntPtr PublicationEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationEvent_SWIGUpcast")] - public static extern IntPtr RegistrationEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationEventUpcast")] + public static extern IntPtr RegistrationEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionEvent_SWIGUpcast")] - public static extern IntPtr SubscriptionEvent_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionEventUpcast")] + public static extern IntPtr SubscriptionEventUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_InviteSession_SWIGUpcast")] - public static extern IntPtr InviteSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_InviteSessionUpcast")] + public static extern IntPtr InviteSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_CallSession_SWIGUpcast")] - public static extern IntPtr CallSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_CallSessionUpcast")] + public static extern IntPtr CallSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_MsrpSession_SWIGUpcast")] - public static extern IntPtr MsrpSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_MsrpSessionUpcast")] + public static extern IntPtr MsrpSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_MessagingSession_SWIGUpcast")] - public static extern IntPtr MessagingSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_MessagingSessionUpcast")] + public static extern IntPtr MessagingSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_OptionsSession_SWIGUpcast")] - public static extern IntPtr OptionsSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_OptionsSessionUpcast")] + public static extern IntPtr OptionsSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_PublicationSession_SWIGUpcast")] - public static extern IntPtr PublicationSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_PublicationSessionUpcast")] + public static extern IntPtr PublicationSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationSession_SWIGUpcast")] - public static extern IntPtr RegistrationSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_RegistrationSessionUpcast")] + public static extern IntPtr RegistrationSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionSession_SWIGUpcast")] - public static extern IntPtr SubscriptionSession_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_SubscriptionSessionUpcast")] + public static extern IntPtr SubscriptionSessionUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumer_SWIGUpcast")] - public static extern IntPtr ProxyAudioConsumer_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioConsumerUpcast")] + public static extern IntPtr ProxyAudioConsumerUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoConsumer_SWIGUpcast")] - public static extern IntPtr ProxyVideoConsumer_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoConsumerUpcast")] + public static extern IntPtr ProxyVideoConsumerUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_SWIGUpcast")] - public static extern IntPtr ProxyAudioProducer_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducerUpcast")] + public static extern IntPtr ProxyAudioProducerUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_SWIGUpcast")] - public static extern IntPtr ProxyVideoProducer_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducerUpcast")] + public static extern IntPtr ProxyVideoProducerUpcast(IntPtr objectRef); - [DllImport("tinyWRAP", EntryPoint="CSharp_SipStack_SWIGUpcast")] - public static extern IntPtr SipStack_SWIGUpcast(IntPtr jarg1); + [DllImport("tinyWRAP", EntryPoint="CSharp_SipStackUpcast")] + public static extern IntPtr SipStackUpcast(IntPtr objectRef); } } diff --git a/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.cxx b/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.cxx index 098df9d6..62ab3317 100644 --- a/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.cxx +++ b/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,114 +35,114 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + #include @@ -202,7 +202,7 @@ static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { { SWIG_CSharpArgumentException, NULL }, { SWIG_CSharpArgumentNullException, NULL }, - { SWIG_CSharpArgumentOutOfRangeException, NULL } + { SWIG_CSharpArgumentOutOfRangeException, NULL }, }; static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { @@ -280,53 +280,56 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_tinyWRAP(SWIG_CSharpStrin #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else -/* ----------------------------------------------------------------------------- - * director.swg - * - * This file contains support for director classes so that C# proxy - * methods can be called from C++. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus - -#if defined(DEBUG_DIRECTOR_OWNED) -#include -#endif -#include - -namespace Swig { - /* Director base class - not currently used in C# directors */ - class Director { - }; - - /* Base class for director exceptions */ - class DirectorException { - protected: - std::string swig_msg; - - public: - DirectorException(const char* msg) : swig_msg(msg) { - } - DirectorException(const std::string &msg) : swig_msg(msg) { - } - const std::string& what() const { - return swig_msg; - } - virtual ~DirectorException() { - } - }; - - /* Pure virtual method exception */ - class DirectorPureVirtualException : public Swig::DirectorException { - public: - DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) { - } - }; -} - -#endif /* __cplusplus */ - - +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes so that C# proxy + * methods can be called from C++. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus + +#if defined(DEBUG_DIRECTOR_OWNED) +#include +#endif +#include + +namespace Swig { + /* Director base class - not currently used in C# directors */ + class Director { + }; + + /* Base class for director exceptions */ + class DirectorException { + protected: + std::string swig_msg; + + public: + DirectorException(const char* msg) : swig_msg(msg) { + } + DirectorException(const std::string &msg) : swig_msg(msg) { + } + const std::string& what() const { + return swig_msg; + } + virtual ~DirectorException() { + } + }; + + /* Pure virtual method exception */ + class DirectorPureVirtualException : public Swig::DirectorException { + public: + DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) { + } + }; +} + +#endif /* __cplusplus */ + + #include // Use the C99 official header @@ -6125,7 +6128,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_transport_error_get() { int jresult ; int result; - result = (int)(702); + result = (int) 702; jresult = result; return jresult; } @@ -6135,7 +6138,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_global_error_get() { int jresult ; int result; - result = (int)(703); + result = (int) 703; jresult = result; return jresult; } @@ -6145,7 +6148,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_message_error_get() { int jresult ; int result; - result = (int)(704); + result = (int) 704; jresult = result; return jresult; } @@ -6155,7 +6158,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_request_incoming_get() int jresult ; int result; - result = (int)(800); + result = (int) 800; jresult = result; return jresult; } @@ -6165,7 +6168,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_request_outgoing_get() int jresult ; int result; - result = (int)(802); + result = (int) 802; jresult = result; return jresult; } @@ -6175,7 +6178,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_request_cancelled_get() int jresult ; int result; - result = (int)(803); + result = (int) 803; jresult = result; return jresult; } @@ -6185,7 +6188,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_request_sent_get() { int jresult ; int result; - result = (int)(804); + result = (int) 804; jresult = result; return jresult; } @@ -6195,7 +6198,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_connecting_get() { int jresult ; int result; - result = (int)(900); + result = (int) 900; jresult = result; return jresult; } @@ -6205,7 +6208,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_connected_get() { int jresult ; int result; - result = (int)(901); + result = (int) 901; jresult = result; return jresult; } @@ -6215,7 +6218,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_terminating_get() { int jresult ; int result; - result = (int)(902); + result = (int) 902; jresult = result; return jresult; } @@ -6225,7 +6228,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_dialog_terminated_get() { int jresult ; int result; - result = (int)(903); + result = (int) 903; jresult = result; return jresult; } @@ -6235,7 +6238,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_started_get() { int jresult ; int result; - result = (int)(950); + result = (int) 950; jresult = result; return jresult; } @@ -6245,7 +6248,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_stopped_get() { int jresult ; int result; - result = (int)(951); + result = (int) 951; jresult = result; return jresult; } @@ -6255,7 +6258,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_failed_to_start_get() { int jresult ; int result; - result = (int)(952); + result = (int) 952; jresult = result; return jresult; } @@ -6265,7 +6268,7 @@ SWIGEXPORT int SWIGSTDCALL CSharp_tsip_event_code_stack_failed_to_stop_get() { int jresult ; int result; - result = (int)(953); + result = (int) 953; jresult = result; return jresult; } @@ -7460,92 +7463,92 @@ SWIGEXPORT void SWIGSTDCALL CSharp_MsrpCallback_director_connect(void *objarg, S } -SWIGEXPORT MediaContent * SWIGSTDCALL CSharp_MediaContentCPIM_SWIGUpcast(MediaContentCPIM *jarg1) { - return (MediaContent *)jarg1; +SWIGEXPORT MediaContent * SWIGSTDCALL CSharp_MediaContentCPIMUpcast(MediaContentCPIM *objectRef) { + return (MediaContent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_DialogEvent_SWIGUpcast(DialogEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_DialogEventUpcast(DialogEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_StackEvent_SWIGUpcast(StackEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_StackEventUpcast(StackEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_InviteEvent_SWIGUpcast(InviteEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_InviteEventUpcast(InviteEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_MessagingEvent_SWIGUpcast(MessagingEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_MessagingEventUpcast(MessagingEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_OptionsEvent_SWIGUpcast(OptionsEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_OptionsEventUpcast(OptionsEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_PublicationEvent_SWIGUpcast(PublicationEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_PublicationEventUpcast(PublicationEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_RegistrationEvent_SWIGUpcast(RegistrationEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_RegistrationEventUpcast(RegistrationEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_SubscriptionEvent_SWIGUpcast(SubscriptionEvent *jarg1) { - return (SipEvent *)jarg1; +SWIGEXPORT SipEvent * SWIGSTDCALL CSharp_SubscriptionEventUpcast(SubscriptionEvent *objectRef) { + return (SipEvent *)objectRef; } -SWIGEXPORT SipSession * SWIGSTDCALL CSharp_InviteSession_SWIGUpcast(InviteSession *jarg1) { - return (SipSession *)jarg1; +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_InviteSessionUpcast(InviteSession *objectRef) { + return (SipSession *)objectRef; } -SWIGEXPORT InviteSession * SWIGSTDCALL CSharp_CallSession_SWIGUpcast(CallSession *jarg1) { - return (InviteSession *)jarg1; +SWIGEXPORT InviteSession * SWIGSTDCALL CSharp_CallSessionUpcast(CallSession *objectRef) { + return (InviteSession *)objectRef; } -SWIGEXPORT InviteSession * SWIGSTDCALL CSharp_MsrpSession_SWIGUpcast(MsrpSession *jarg1) { - return (InviteSession *)jarg1; +SWIGEXPORT InviteSession * SWIGSTDCALL CSharp_MsrpSessionUpcast(MsrpSession *objectRef) { + return (InviteSession *)objectRef; } -SWIGEXPORT SipSession * SWIGSTDCALL CSharp_MessagingSession_SWIGUpcast(MessagingSession *jarg1) { - return (SipSession *)jarg1; +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_MessagingSessionUpcast(MessagingSession *objectRef) { + return (SipSession *)objectRef; } -SWIGEXPORT SipSession * SWIGSTDCALL CSharp_OptionsSession_SWIGUpcast(OptionsSession *jarg1) { - return (SipSession *)jarg1; +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_OptionsSessionUpcast(OptionsSession *objectRef) { + return (SipSession *)objectRef; } -SWIGEXPORT SipSession * SWIGSTDCALL CSharp_PublicationSession_SWIGUpcast(PublicationSession *jarg1) { - return (SipSession *)jarg1; +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_PublicationSessionUpcast(PublicationSession *objectRef) { + return (SipSession *)objectRef; } -SWIGEXPORT SipSession * SWIGSTDCALL CSharp_RegistrationSession_SWIGUpcast(RegistrationSession *jarg1) { - return (SipSession *)jarg1; +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_RegistrationSessionUpcast(RegistrationSession *objectRef) { + return (SipSession *)objectRef; } -SWIGEXPORT SipSession * SWIGSTDCALL CSharp_SubscriptionSession_SWIGUpcast(SubscriptionSession *jarg1) { - return (SipSession *)jarg1; +SWIGEXPORT SipSession * SWIGSTDCALL CSharp_SubscriptionSessionUpcast(SubscriptionSession *objectRef) { + return (SipSession *)objectRef; } -SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyAudioConsumer_SWIGUpcast(ProxyAudioConsumer *jarg1) { - return (ProxyPlugin *)jarg1; +SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyAudioConsumerUpcast(ProxyAudioConsumer *objectRef) { + return (ProxyPlugin *)objectRef; } -SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyVideoConsumer_SWIGUpcast(ProxyVideoConsumer *jarg1) { - return (ProxyPlugin *)jarg1; +SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyVideoConsumerUpcast(ProxyVideoConsumer *objectRef) { + return (ProxyPlugin *)objectRef; } -SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyAudioProducer_SWIGUpcast(ProxyAudioProducer *jarg1) { - return (ProxyPlugin *)jarg1; +SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyAudioProducerUpcast(ProxyAudioProducer *objectRef) { + return (ProxyPlugin *)objectRef; } -SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyVideoProducer_SWIGUpcast(ProxyVideoProducer *jarg1) { - return (ProxyPlugin *)jarg1; +SWIGEXPORT ProxyPlugin * SWIGSTDCALL CSharp_ProxyVideoProducerUpcast(ProxyVideoProducer *objectRef) { + return (ProxyPlugin *)objectRef; } -SWIGEXPORT SafeObject * SWIGSTDCALL CSharp_SipStack_SWIGUpcast(SipStack *jarg1) { - return (SafeObject *)jarg1; +SWIGEXPORT SafeObject * SWIGSTDCALL CSharp_SipStackUpcast(SipStack *objectRef) { + return (SafeObject *)objectRef; } #ifdef __cplusplus diff --git a/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.h b/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.h index 753aebcb..6158f07a 100644 --- a/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.h +++ b/branches/2.0/doubango/bindings/csharp/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make diff --git a/branches/2.0/doubango/bindings/csharp/tmedia_bandwidth_level_t.cs b/branches/2.0/doubango/bindings/csharp/tmedia_bandwidth_level_t.cs index ab45a459..9dd278fb 100644 --- a/branches/2.0/doubango/bindings/csharp/tmedia_bandwidth_level_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tmedia_bandwidth_level_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tmedia_chroma_t.cs b/branches/2.0/doubango/bindings/csharp/tmedia_chroma_t.cs index 0673c529..ebec6bcb 100644 --- a/branches/2.0/doubango/bindings/csharp/tmedia_chroma_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tmedia_chroma_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tmedia_qos_strength_t.cs b/branches/2.0/doubango/bindings/csharp/tmedia_qos_strength_t.cs index effef1bd..6727f16e 100644 --- a/branches/2.0/doubango/bindings/csharp/tmedia_qos_strength_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tmedia_qos_strength_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tmedia_qos_stype_t.cs b/branches/2.0/doubango/bindings/csharp/tmedia_qos_stype_t.cs index 0485c819..22d93fac 100644 --- a/branches/2.0/doubango/bindings/csharp/tmedia_qos_stype_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tmedia_qos_stype_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tmsrp_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tmsrp_event_type_t.cs index c4d61f54..f11ee64a 100644 --- a/branches/2.0/doubango/bindings/csharp/tmsrp_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tmsrp_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tmsrp_request_type_t.cs b/branches/2.0/doubango/bindings/csharp/tmsrp_request_type_t.cs index d9407786..a3f53cce 100644 --- a/branches/2.0/doubango/bindings/csharp/tmsrp_request_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tmsrp_request_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tsip_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tsip_event_type_t.cs index cfd5460d..232f02f7 100644 --- a/branches/2.0/doubango/bindings/csharp/tsip_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tsip_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tsip_invite_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tsip_invite_event_type_t.cs index a753b412..4986f69a 100644 --- a/branches/2.0/doubango/bindings/csharp/tsip_invite_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tsip_invite_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tsip_message_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tsip_message_event_type_t.cs index 6a1c17e0..b4072593 100644 --- a/branches/2.0/doubango/bindings/csharp/tsip_message_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tsip_message_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tsip_options_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tsip_options_event_type_t.cs index 6dfac190..b90d62bf 100644 --- a/branches/2.0/doubango/bindings/csharp/tsip_options_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tsip_options_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tsip_publish_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tsip_publish_event_type_t.cs index b01e8e3b..52b850b0 100644 --- a/branches/2.0/doubango/bindings/csharp/tsip_publish_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tsip_publish_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tsip_register_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tsip_register_event_type_t.cs index badf164f..7d5929ae 100644 --- a/branches/2.0/doubango/bindings/csharp/tsip_register_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tsip_register_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/tsip_subscribe_event_type_t.cs b/branches/2.0/doubango/bindings/csharp/tsip_subscribe_event_type_t.cs index ee966d0c..afaa290e 100644 --- a/branches/2.0/doubango/bindings/csharp/tsip_subscribe_event_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/tsip_subscribe_event_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/twrap_media_type_t.cs b/branches/2.0/doubango/bindings/csharp/twrap_media_type_t.cs index 4671b0a8..b0f1b404 100644 --- a/branches/2.0/doubango/bindings/csharp/twrap_media_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/twrap_media_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/twrap_proxy_plugin_type_t.cs b/branches/2.0/doubango/bindings/csharp/twrap_proxy_plugin_type_t.cs index e43adab7..0e2613e9 100644 --- a/branches/2.0/doubango/bindings/csharp/twrap_proxy_plugin_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/twrap_proxy_plugin_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/twrap_rpmessage_type_t.cs b/branches/2.0/doubango/bindings/csharp/twrap_rpmessage_type_t.cs index ec49f0d6..03cde348 100644 --- a/branches/2.0/doubango/bindings/csharp/twrap_rpmessage_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/twrap_rpmessage_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/csharp/twrap_sms_type_t.cs b/branches/2.0/doubango/bindings/csharp/twrap_sms_type_t.cs index 1a9b8431..42980dd1 100644 --- a/branches/2.0/doubango/bindings/csharp/twrap_sms_type_t.cs +++ b/branches/2.0/doubango/bindings/csharp/twrap_sms_type_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/ActionConfig.java b/branches/2.0/doubango/bindings/java/ActionConfig.java index 6e952654..6f5cf166 100644 --- a/branches/2.0/doubango/bindings/java/ActionConfig.java +++ b/branches/2.0/doubango/bindings/java/ActionConfig.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ActionConfig { private long swigCPtr; protected boolean swigCMemOwn; - public ActionConfig(long cPtr, boolean cMemoryOwn) { + protected ActionConfig(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ActionConfig obj) { + protected static long getCPtr(ActionConfig obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ActionConfig { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ActionConfig(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ActionConfig(swigCPtr); } + swigCPtr = 0; } public ActionConfig() { diff --git a/branches/2.0/doubango/bindings/java/AudioResampler.java b/branches/2.0/doubango/bindings/java/AudioResampler.java index 8eaad354..2ced31fb 100644 --- a/branches/2.0/doubango/bindings/java/AudioResampler.java +++ b/branches/2.0/doubango/bindings/java/AudioResampler.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class AudioResampler { private long swigCPtr; protected boolean swigCMemOwn; - public AudioResampler(long cPtr, boolean cMemoryOwn) { + protected AudioResampler(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(AudioResampler obj) { + protected static long getCPtr(AudioResampler obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class AudioResampler { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_AudioResampler(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_AudioResampler(swigCPtr); } + swigCPtr = 0; } public AudioResampler(long nInFreq, long nOutFreq, long nFrameDuration, long nChannels, long nQuality) { diff --git a/branches/2.0/doubango/bindings/java/CallSession.java b/branches/2.0/doubango/bindings/java/CallSession.java index d042950f..1412b70b 100644 --- a/branches/2.0/doubango/bindings/java/CallSession.java +++ b/branches/2.0/doubango/bindings/java/CallSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class CallSession extends InviteSession { private long swigCPtr; - public CallSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.CallSession_SWIGUpcast(cPtr), cMemoryOwn); + protected CallSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGCallSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(CallSession obj) { + protected static long getCPtr(CallSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class CallSession extends InviteSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_CallSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_CallSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/DDebugCallback.java b/branches/2.0/doubango/bindings/java/DDebugCallback.java index 7e3e6ac9..ebef9cec 100644 --- a/branches/2.0/doubango/bindings/java/DDebugCallback.java +++ b/branches/2.0/doubango/bindings/java/DDebugCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class DDebugCallback { private long swigCPtr; protected boolean swigCMemOwn; - public DDebugCallback(long cPtr, boolean cMemoryOwn) { + protected DDebugCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(DDebugCallback obj) { + protected static long getCPtr(DDebugCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class DDebugCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DDebugCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DDebugCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/DialogEvent.java b/branches/2.0/doubango/bindings/java/DialogEvent.java index 3233b3bd..ac409f64 100644 --- a/branches/2.0/doubango/bindings/java/DialogEvent.java +++ b/branches/2.0/doubango/bindings/java/DialogEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class DialogEvent extends SipEvent { private long swigCPtr; - public DialogEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.DialogEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected DialogEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGDialogEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(DialogEvent obj) { + protected static long getCPtr(DialogEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class DialogEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DialogEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DialogEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/InviteEvent.java b/branches/2.0/doubango/bindings/java/InviteEvent.java index c3578fc5..e7a79c9e 100644 --- a/branches/2.0/doubango/bindings/java/InviteEvent.java +++ b/branches/2.0/doubango/bindings/java/InviteEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class InviteEvent extends SipEvent { private long swigCPtr; - public InviteEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.InviteEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected InviteEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGInviteEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(InviteEvent obj) { + protected static long getCPtr(InviteEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class InviteEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_InviteEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_InviteEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/InviteSession.java b/branches/2.0/doubango/bindings/java/InviteSession.java index fa5e05e7..71d6f6c9 100644 --- a/branches/2.0/doubango/bindings/java/InviteSession.java +++ b/branches/2.0/doubango/bindings/java/InviteSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class InviteSession extends SipSession { private long swigCPtr; - public InviteSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.InviteSession_SWIGUpcast(cPtr), cMemoryOwn); + protected InviteSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGInviteSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(InviteSession obj) { + protected static long getCPtr(InviteSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class InviteSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_InviteSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_InviteSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/MediaContent.java b/branches/2.0/doubango/bindings/java/MediaContent.java index cf6f9d0b..2a499c30 100644 --- a/branches/2.0/doubango/bindings/java/MediaContent.java +++ b/branches/2.0/doubango/bindings/java/MediaContent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MediaContent { private long swigCPtr; protected boolean swigCMemOwn; - public MediaContent(long cPtr, boolean cMemoryOwn) { + protected MediaContent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MediaContent obj) { + protected static long getCPtr(MediaContent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MediaContent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MediaContent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MediaContent(swigCPtr); } + swigCPtr = 0; } public String getType() { diff --git a/branches/2.0/doubango/bindings/java/MediaContentCPIM.java b/branches/2.0/doubango/bindings/java/MediaContentCPIM.java index 663ae908..b4e53eff 100644 --- a/branches/2.0/doubango/bindings/java/MediaContentCPIM.java +++ b/branches/2.0/doubango/bindings/java/MediaContentCPIM.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MediaContentCPIM extends MediaContent { private long swigCPtr; - public MediaContentCPIM(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MediaContentCPIM_SWIGUpcast(cPtr), cMemoryOwn); + protected MediaContentCPIM(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMediaContentCPIMUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MediaContentCPIM obj) { + protected static long getCPtr(MediaContentCPIM obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MediaContentCPIM extends MediaContent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MediaContentCPIM(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MediaContentCPIM(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/MediaSessionMgr.java b/branches/2.0/doubango/bindings/java/MediaSessionMgr.java index cae96a7a..53933174 100644 --- a/branches/2.0/doubango/bindings/java/MediaSessionMgr.java +++ b/branches/2.0/doubango/bindings/java/MediaSessionMgr.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MediaSessionMgr { private long swigCPtr; protected boolean swigCMemOwn; - public MediaSessionMgr(long cPtr, boolean cMemoryOwn) { + protected MediaSessionMgr(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MediaSessionMgr obj) { + protected static long getCPtr(MediaSessionMgr obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MediaSessionMgr { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MediaSessionMgr(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MediaSessionMgr(swigCPtr); } + swigCPtr = 0; } public boolean sessionSetInt32(twrap_media_type_t media, String key, int value) { diff --git a/branches/2.0/doubango/bindings/java/MessagingEvent.java b/branches/2.0/doubango/bindings/java/MessagingEvent.java index d67d96c8..c502d313 100644 --- a/branches/2.0/doubango/bindings/java/MessagingEvent.java +++ b/branches/2.0/doubango/bindings/java/MessagingEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MessagingEvent extends SipEvent { private long swigCPtr; - public MessagingEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MessagingEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected MessagingEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMessagingEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MessagingEvent obj) { + protected static long getCPtr(MessagingEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MessagingEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/MessagingSession.java b/branches/2.0/doubango/bindings/java/MessagingSession.java index d7977b7f..a59b055d 100644 --- a/branches/2.0/doubango/bindings/java/MessagingSession.java +++ b/branches/2.0/doubango/bindings/java/MessagingSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MessagingSession extends SipSession { private long swigCPtr; - public MessagingSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MessagingSession_SWIGUpcast(cPtr), cMemoryOwn); + protected MessagingSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMessagingSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MessagingSession obj) { + protected static long getCPtr(MessagingSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MessagingSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/MsrpCallback.java b/branches/2.0/doubango/bindings/java/MsrpCallback.java index d88cdbc1..35071895 100644 --- a/branches/2.0/doubango/bindings/java/MsrpCallback.java +++ b/branches/2.0/doubango/bindings/java/MsrpCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MsrpCallback { private long swigCPtr; protected boolean swigCMemOwn; - public MsrpCallback(long cPtr, boolean cMemoryOwn) { + protected MsrpCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MsrpCallback obj) { + protected static long getCPtr(MsrpCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MsrpCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/MsrpEvent.java b/branches/2.0/doubango/bindings/java/MsrpEvent.java index d4659c97..4703fdea 100644 --- a/branches/2.0/doubango/bindings/java/MsrpEvent.java +++ b/branches/2.0/doubango/bindings/java/MsrpEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MsrpEvent { private long swigCPtr; protected boolean swigCMemOwn; - public MsrpEvent(long cPtr, boolean cMemoryOwn) { + protected MsrpEvent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MsrpEvent obj) { + protected static long getCPtr(MsrpEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MsrpEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpEvent(swigCPtr); } + swigCPtr = 0; } public tmsrp_event_type_t getType() { diff --git a/branches/2.0/doubango/bindings/java/MsrpMessage.java b/branches/2.0/doubango/bindings/java/MsrpMessage.java index c596bcaa..379d2019 100644 --- a/branches/2.0/doubango/bindings/java/MsrpMessage.java +++ b/branches/2.0/doubango/bindings/java/MsrpMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MsrpMessage { private long swigCPtr; protected boolean swigCMemOwn; - public MsrpMessage(long cPtr, boolean cMemoryOwn) { + protected MsrpMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MsrpMessage obj) { + protected static long getCPtr(MsrpMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MsrpMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpMessage(swigCPtr); } + swigCPtr = 0; } public MsrpMessage() { diff --git a/branches/2.0/doubango/bindings/java/MsrpSession.java b/branches/2.0/doubango/bindings/java/MsrpSession.java index e2afb278..4ac2c5cf 100644 --- a/branches/2.0/doubango/bindings/java/MsrpSession.java +++ b/branches/2.0/doubango/bindings/java/MsrpSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MsrpSession extends InviteSession { private long swigCPtr; - public MsrpSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MsrpSession_SWIGUpcast(cPtr), cMemoryOwn); + protected MsrpSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMsrpSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MsrpSession obj) { + protected static long getCPtr(MsrpSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MsrpSession extends InviteSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/OptionsEvent.java b/branches/2.0/doubango/bindings/java/OptionsEvent.java index 5a2520f9..32fd47c6 100644 --- a/branches/2.0/doubango/bindings/java/OptionsEvent.java +++ b/branches/2.0/doubango/bindings/java/OptionsEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class OptionsEvent extends SipEvent { private long swigCPtr; - public OptionsEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.OptionsEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected OptionsEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGOptionsEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(OptionsEvent obj) { + protected static long getCPtr(OptionsEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class OptionsEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/OptionsSession.java b/branches/2.0/doubango/bindings/java/OptionsSession.java index bbb095cf..5a1698fd 100644 --- a/branches/2.0/doubango/bindings/java/OptionsSession.java +++ b/branches/2.0/doubango/bindings/java/OptionsSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class OptionsSession extends SipSession { private long swigCPtr; - public OptionsSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.OptionsSession_SWIGUpcast(cPtr), cMemoryOwn); + protected OptionsSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGOptionsSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(OptionsSession obj) { + protected static long getCPtr(OptionsSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class OptionsSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/ProxyAudioConsumer.java b/branches/2.0/doubango/bindings/java/ProxyAudioConsumer.java index 377e669f..c79089fe 100644 --- a/branches/2.0/doubango/bindings/java/ProxyAudioConsumer.java +++ b/branches/2.0/doubango/bindings/java/ProxyAudioConsumer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyAudioConsumer extends ProxyPlugin { private long swigCPtr; - public ProxyAudioConsumer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyAudioConsumer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyAudioConsumer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyAudioConsumerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioConsumer obj) { + protected static long getCPtr(ProxyAudioConsumer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyAudioConsumer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioConsumer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioConsumer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/ProxyAudioConsumerCallback.java b/branches/2.0/doubango/bindings/java/ProxyAudioConsumerCallback.java index c755d7a0..3d78ff4f 100644 --- a/branches/2.0/doubango/bindings/java/ProxyAudioConsumerCallback.java +++ b/branches/2.0/doubango/bindings/java/ProxyAudioConsumerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyAudioConsumerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyAudioConsumerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyAudioConsumerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioConsumerCallback obj) { + protected static long getCPtr(ProxyAudioConsumerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyAudioConsumerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioConsumerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioConsumerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/ProxyAudioProducer.java b/branches/2.0/doubango/bindings/java/ProxyAudioProducer.java index 0647a941..2ab4e60f 100644 --- a/branches/2.0/doubango/bindings/java/ProxyAudioProducer.java +++ b/branches/2.0/doubango/bindings/java/ProxyAudioProducer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyAudioProducer extends ProxyPlugin { private long swigCPtr; - public ProxyAudioProducer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyAudioProducer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyAudioProducer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyAudioProducerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioProducer obj) { + protected static long getCPtr(ProxyAudioProducer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyAudioProducer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioProducer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioProducer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/ProxyAudioProducerCallback.java b/branches/2.0/doubango/bindings/java/ProxyAudioProducerCallback.java index 941789cb..1f190e39 100644 --- a/branches/2.0/doubango/bindings/java/ProxyAudioProducerCallback.java +++ b/branches/2.0/doubango/bindings/java/ProxyAudioProducerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyAudioProducerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyAudioProducerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyAudioProducerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioProducerCallback obj) { + protected static long getCPtr(ProxyAudioProducerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyAudioProducerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioProducerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioProducerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/ProxyPlugin.java b/branches/2.0/doubango/bindings/java/ProxyPlugin.java index 392d78dc..62e2afc7 100644 --- a/branches/2.0/doubango/bindings/java/ProxyPlugin.java +++ b/branches/2.0/doubango/bindings/java/ProxyPlugin.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyPlugin { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyPlugin(long cPtr, boolean cMemoryOwn) { + protected ProxyPlugin(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyPlugin obj) { + protected static long getCPtr(ProxyPlugin obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyPlugin(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyPlugin(swigCPtr); } + swigCPtr = 0; } public twrap_proxy_plugin_type_t getType() { diff --git a/branches/2.0/doubango/bindings/java/ProxyPluginMgr.java b/branches/2.0/doubango/bindings/java/ProxyPluginMgr.java index b9dfa2e5..03f96834 100644 --- a/branches/2.0/doubango/bindings/java/ProxyPluginMgr.java +++ b/branches/2.0/doubango/bindings/java/ProxyPluginMgr.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyPluginMgr { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyPluginMgr(long cPtr, boolean cMemoryOwn) { + protected ProxyPluginMgr(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyPluginMgr obj) { + protected static long getCPtr(ProxyPluginMgr obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyPluginMgr { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyPluginMgr(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyPluginMgr(swigCPtr); } + swigCPtr = 0; } public static ProxyPluginMgr createInstance(ProxyPluginMgrCallback callback) { diff --git a/branches/2.0/doubango/bindings/java/ProxyPluginMgrCallback.java b/branches/2.0/doubango/bindings/java/ProxyPluginMgrCallback.java index 7009df1c..1a313045 100644 --- a/branches/2.0/doubango/bindings/java/ProxyPluginMgrCallback.java +++ b/branches/2.0/doubango/bindings/java/ProxyPluginMgrCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyPluginMgrCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyPluginMgrCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyPluginMgrCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyPluginMgrCallback obj) { + protected static long getCPtr(ProxyPluginMgrCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyPluginMgrCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyPluginMgrCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyPluginMgrCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/ProxyVideoConsumer.java b/branches/2.0/doubango/bindings/java/ProxyVideoConsumer.java index d440cf2f..a9e83bd7 100644 --- a/branches/2.0/doubango/bindings/java/ProxyVideoConsumer.java +++ b/branches/2.0/doubango/bindings/java/ProxyVideoConsumer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyVideoConsumer extends ProxyPlugin { private long swigCPtr; - public ProxyVideoConsumer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyVideoConsumer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyVideoConsumer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyVideoConsumerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoConsumer obj) { + protected static long getCPtr(ProxyVideoConsumer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyVideoConsumer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoConsumer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoConsumer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/ProxyVideoConsumerCallback.java b/branches/2.0/doubango/bindings/java/ProxyVideoConsumerCallback.java index 0d17fb9d..9a5c01d1 100644 --- a/branches/2.0/doubango/bindings/java/ProxyVideoConsumerCallback.java +++ b/branches/2.0/doubango/bindings/java/ProxyVideoConsumerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyVideoConsumerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyVideoConsumerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyVideoConsumerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoConsumerCallback obj) { + protected static long getCPtr(ProxyVideoConsumerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyVideoConsumerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoConsumerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoConsumerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/ProxyVideoFrame.java b/branches/2.0/doubango/bindings/java/ProxyVideoFrame.java index 09e12788..e487bf41 100644 --- a/branches/2.0/doubango/bindings/java/ProxyVideoFrame.java +++ b/branches/2.0/doubango/bindings/java/ProxyVideoFrame.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyVideoFrame { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyVideoFrame(long cPtr, boolean cMemoryOwn) { + protected ProxyVideoFrame(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoFrame obj) { + protected static long getCPtr(ProxyVideoFrame obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyVideoFrame { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoFrame(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoFrame(swigCPtr); } + swigCPtr = 0; } public long getSize() { diff --git a/branches/2.0/doubango/bindings/java/ProxyVideoProducer.java b/branches/2.0/doubango/bindings/java/ProxyVideoProducer.java index d1e079ec..1281beac 100644 --- a/branches/2.0/doubango/bindings/java/ProxyVideoProducer.java +++ b/branches/2.0/doubango/bindings/java/ProxyVideoProducer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyVideoProducer extends ProxyPlugin { private long swigCPtr; - public ProxyVideoProducer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyVideoProducer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyVideoProducer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyVideoProducerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoProducer obj) { + protected static long getCPtr(ProxyVideoProducer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyVideoProducer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoProducer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoProducer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/ProxyVideoProducerCallback.java b/branches/2.0/doubango/bindings/java/ProxyVideoProducerCallback.java index 84900516..d05440e9 100644 --- a/branches/2.0/doubango/bindings/java/ProxyVideoProducerCallback.java +++ b/branches/2.0/doubango/bindings/java/ProxyVideoProducerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyVideoProducerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyVideoProducerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyVideoProducerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoProducerCallback obj) { + protected static long getCPtr(ProxyVideoProducerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyVideoProducerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoProducerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoProducerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/PublicationEvent.java b/branches/2.0/doubango/bindings/java/PublicationEvent.java index 246a59cd..88541683 100644 --- a/branches/2.0/doubango/bindings/java/PublicationEvent.java +++ b/branches/2.0/doubango/bindings/java/PublicationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class PublicationEvent extends SipEvent { private long swigCPtr; - public PublicationEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.PublicationEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected PublicationEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGPublicationEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(PublicationEvent obj) { + protected static long getCPtr(PublicationEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/PublicationSession.java b/branches/2.0/doubango/bindings/java/PublicationSession.java index cc064022..f80f3dcb 100644 --- a/branches/2.0/doubango/bindings/java/PublicationSession.java +++ b/branches/2.0/doubango/bindings/java/PublicationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class PublicationSession extends SipSession { private long swigCPtr; - public PublicationSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.PublicationSession_SWIGUpcast(cPtr), cMemoryOwn); + protected PublicationSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGPublicationSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(PublicationSession obj) { + protected static long getCPtr(PublicationSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/RPMessage.java b/branches/2.0/doubango/bindings/java/RPMessage.java index 74a5c8a2..711f9907 100644 --- a/branches/2.0/doubango/bindings/java/RPMessage.java +++ b/branches/2.0/doubango/bindings/java/RPMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class RPMessage { private long swigCPtr; protected boolean swigCMemOwn; - public RPMessage(long cPtr, boolean cMemoryOwn) { + protected RPMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(RPMessage obj) { + protected static long getCPtr(RPMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class RPMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RPMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RPMessage(swigCPtr); } + swigCPtr = 0; } public RPMessage() { diff --git a/branches/2.0/doubango/bindings/java/RegistrationEvent.java b/branches/2.0/doubango/bindings/java/RegistrationEvent.java index 6f436aa6..6ae317b1 100644 --- a/branches/2.0/doubango/bindings/java/RegistrationEvent.java +++ b/branches/2.0/doubango/bindings/java/RegistrationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class RegistrationEvent extends SipEvent { private long swigCPtr; - public RegistrationEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.RegistrationEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected RegistrationEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(RegistrationEvent obj) { + protected static long getCPtr(RegistrationEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/RegistrationSession.java b/branches/2.0/doubango/bindings/java/RegistrationSession.java index d72afa1e..48866fc7 100644 --- a/branches/2.0/doubango/bindings/java/RegistrationSession.java +++ b/branches/2.0/doubango/bindings/java/RegistrationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class RegistrationSession extends SipSession { private long swigCPtr; - public RegistrationSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.RegistrationSession_SWIGUpcast(cPtr), cMemoryOwn); + protected RegistrationSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(RegistrationSession obj) { + protected static long getCPtr(RegistrationSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/SMSData.java b/branches/2.0/doubango/bindings/java/SMSData.java index 02824970..12957ecd 100644 --- a/branches/2.0/doubango/bindings/java/SMSData.java +++ b/branches/2.0/doubango/bindings/java/SMSData.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SMSData { private long swigCPtr; protected boolean swigCMemOwn; - public SMSData(long cPtr, boolean cMemoryOwn) { + protected SMSData(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SMSData obj) { + protected static long getCPtr(SMSData obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SMSData { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SMSData(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SMSData(swigCPtr); } + swigCPtr = 0; } public SMSData() { diff --git a/branches/2.0/doubango/bindings/java/SMSEncoder.java b/branches/2.0/doubango/bindings/java/SMSEncoder.java index fe24b2f0..3e445730 100644 --- a/branches/2.0/doubango/bindings/java/SMSEncoder.java +++ b/branches/2.0/doubango/bindings/java/SMSEncoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SMSEncoder { private long swigCPtr; protected boolean swigCMemOwn; - public SMSEncoder(long cPtr, boolean cMemoryOwn) { + protected SMSEncoder(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SMSEncoder obj) { + protected static long getCPtr(SMSEncoder obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SMSEncoder { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SMSEncoder(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SMSEncoder(swigCPtr); } + swigCPtr = 0; } public static RPMessage encodeSubmit(int mr, String smsc, String destination, String ascii) { diff --git a/branches/2.0/doubango/bindings/java/SafeObject.java b/branches/2.0/doubango/bindings/java/SafeObject.java index 8503a758..4cef0759 100644 --- a/branches/2.0/doubango/bindings/java/SafeObject.java +++ b/branches/2.0/doubango/bindings/java/SafeObject.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SafeObject { private long swigCPtr; protected boolean swigCMemOwn; - public SafeObject(long cPtr, boolean cMemoryOwn) { + protected SafeObject(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SafeObject obj) { + protected static long getCPtr(SafeObject obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); } + swigCPtr = 0; } public SafeObject() { diff --git a/branches/2.0/doubango/bindings/java/SdpMessage.java b/branches/2.0/doubango/bindings/java/SdpMessage.java index a12e7201..410ba163 100644 --- a/branches/2.0/doubango/bindings/java/SdpMessage.java +++ b/branches/2.0/doubango/bindings/java/SdpMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SdpMessage { private long swigCPtr; protected boolean swigCMemOwn; - public SdpMessage(long cPtr, boolean cMemoryOwn) { + protected SdpMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SdpMessage obj) { + protected static long getCPtr(SdpMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SdpMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SdpMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SdpMessage(swigCPtr); } + swigCPtr = 0; } public SdpMessage() { diff --git a/branches/2.0/doubango/bindings/java/SipCallback.java b/branches/2.0/doubango/bindings/java/SipCallback.java index 06ba8439..acf7b028 100644 --- a/branches/2.0/doubango/bindings/java/SipCallback.java +++ b/branches/2.0/doubango/bindings/java/SipCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipCallback { private long swigCPtr; protected boolean swigCMemOwn; - public SipCallback(long cPtr, boolean cMemoryOwn) { + protected SipCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipCallback obj) { + protected static long getCPtr(SipCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/SipEvent.java b/branches/2.0/doubango/bindings/java/SipEvent.java index 0c213839..48cab3a9 100644 --- a/branches/2.0/doubango/bindings/java/SipEvent.java +++ b/branches/2.0/doubango/bindings/java/SipEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipEvent { private long swigCPtr; protected boolean swigCMemOwn; - public SipEvent(long cPtr, boolean cMemoryOwn) { + protected SipEvent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipEvent obj) { + protected static long getCPtr(SipEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); } + swigCPtr = 0; } public short getCode() { diff --git a/branches/2.0/doubango/bindings/java/SipMessage.java b/branches/2.0/doubango/bindings/java/SipMessage.java index fda8f98d..a898fdaa 100644 --- a/branches/2.0/doubango/bindings/java/SipMessage.java +++ b/branches/2.0/doubango/bindings/java/SipMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipMessage { private long swigCPtr; protected boolean swigCMemOwn; - public SipMessage(long cPtr, boolean cMemoryOwn) { + protected SipMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipMessage obj) { + protected static long getCPtr(SipMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); } + swigCPtr = 0; } public byte[] getSipContent() { diff --git a/branches/2.0/doubango/bindings/java/SipSession.java b/branches/2.0/doubango/bindings/java/SipSession.java index bf709058..eaff336c 100644 --- a/branches/2.0/doubango/bindings/java/SipSession.java +++ b/branches/2.0/doubango/bindings/java/SipSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipSession { private long swigCPtr; protected boolean swigCMemOwn; - public SipSession(long cPtr, boolean cMemoryOwn) { + protected SipSession(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipSession obj) { + protected static long getCPtr(SipSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); } + swigCPtr = 0; } protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) { diff --git a/branches/2.0/doubango/bindings/java/SipStack.java b/branches/2.0/doubango/bindings/java/SipStack.java index 484a9a0e..3c4f9c30 100644 --- a/branches/2.0/doubango/bindings/java/SipStack.java +++ b/branches/2.0/doubango/bindings/java/SipStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class SipStack extends SafeObject { private long swigCPtr; - public SipStack(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.SipStack_SWIGUpcast(cPtr), cMemoryOwn); + protected SipStack(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSipStackUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(SipStack obj) { + protected static long getCPtr(SipStack obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/SipUri.java b/branches/2.0/doubango/bindings/java/SipUri.java index 9a89121a..be2fb7ad 100644 --- a/branches/2.0/doubango/bindings/java/SipUri.java +++ b/branches/2.0/doubango/bindings/java/SipUri.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipUri { private long swigCPtr; protected boolean swigCMemOwn; - public SipUri(long cPtr, boolean cMemoryOwn) { + protected SipUri(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipUri obj) { + protected static long getCPtr(SipUri obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipUri { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); } + swigCPtr = 0; } public SipUri(String uriString, String displayName) { diff --git a/branches/2.0/doubango/bindings/java/StackEvent.java b/branches/2.0/doubango/bindings/java/StackEvent.java index a776348c..ee0ba843 100644 --- a/branches/2.0/doubango/bindings/java/StackEvent.java +++ b/branches/2.0/doubango/bindings/java/StackEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class StackEvent extends SipEvent { private long swigCPtr; - public StackEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.StackEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected StackEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGStackEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(StackEvent obj) { + protected static long getCPtr(StackEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class StackEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_StackEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_StackEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/SubscriptionEvent.java b/branches/2.0/doubango/bindings/java/SubscriptionEvent.java index b3e69ba5..03d6345c 100644 --- a/branches/2.0/doubango/bindings/java/SubscriptionEvent.java +++ b/branches/2.0/doubango/bindings/java/SubscriptionEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class SubscriptionEvent extends SipEvent { private long swigCPtr; - public SubscriptionEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.SubscriptionEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected SubscriptionEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSubscriptionEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(SubscriptionEvent obj) { + protected static long getCPtr(SubscriptionEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/SubscriptionSession.java b/branches/2.0/doubango/bindings/java/SubscriptionSession.java index a083433e..a69036a9 100644 --- a/branches/2.0/doubango/bindings/java/SubscriptionSession.java +++ b/branches/2.0/doubango/bindings/java/SubscriptionSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class SubscriptionSession extends SipSession { private long swigCPtr; - public SubscriptionSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.SubscriptionSession_SWIGUpcast(cPtr), cMemoryOwn); + protected SubscriptionSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSubscriptionSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(SubscriptionSession obj) { + protected static long getCPtr(SubscriptionSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/XcapCallback.java b/branches/2.0/doubango/bindings/java/XcapCallback.java index 318afbd5..030d99b8 100644 --- a/branches/2.0/doubango/bindings/java/XcapCallback.java +++ b/branches/2.0/doubango/bindings/java/XcapCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapCallback { private long swigCPtr; protected boolean swigCMemOwn; - public XcapCallback(long cPtr, boolean cMemoryOwn) { + protected XcapCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapCallback obj) { + protected static long getCPtr(XcapCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/XcapEvent.java b/branches/2.0/doubango/bindings/java/XcapEvent.java index a627bafe..86ed7971 100644 --- a/branches/2.0/doubango/bindings/java/XcapEvent.java +++ b/branches/2.0/doubango/bindings/java/XcapEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapEvent { private long swigCPtr; protected boolean swigCMemOwn; - public XcapEvent(long cPtr, boolean cMemoryOwn) { + protected XcapEvent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapEvent obj) { + protected static long getCPtr(XcapEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapEvent(swigCPtr); } + swigCPtr = 0; } public thttp_event_type_t getType() { diff --git a/branches/2.0/doubango/bindings/java/XcapMessage.java b/branches/2.0/doubango/bindings/java/XcapMessage.java index b7ab384e..07dbfbb8 100644 --- a/branches/2.0/doubango/bindings/java/XcapMessage.java +++ b/branches/2.0/doubango/bindings/java/XcapMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapMessage { private long swigCPtr; protected boolean swigCMemOwn; - public XcapMessage(long cPtr, boolean cMemoryOwn) { + protected XcapMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapMessage obj) { + protected static long getCPtr(XcapMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapMessage(swigCPtr); } + swigCPtr = 0; } public byte[] getXcapContent() { diff --git a/branches/2.0/doubango/bindings/java/XcapSelector.java b/branches/2.0/doubango/bindings/java/XcapSelector.java index 20851b19..efcda497 100644 --- a/branches/2.0/doubango/bindings/java/XcapSelector.java +++ b/branches/2.0/doubango/bindings/java/XcapSelector.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapSelector { private long swigCPtr; protected boolean swigCMemOwn; - public XcapSelector(long cPtr, boolean cMemoryOwn) { + protected XcapSelector(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapSelector obj) { + protected static long getCPtr(XcapSelector obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapSelector { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapSelector(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapSelector(swigCPtr); } + swigCPtr = 0; } public XcapSelector(XcapStack stack) { diff --git a/branches/2.0/doubango/bindings/java/XcapStack.java b/branches/2.0/doubango/bindings/java/XcapStack.java index ee726fe2..95d28e9d 100644 --- a/branches/2.0/doubango/bindings/java/XcapStack.java +++ b/branches/2.0/doubango/bindings/java/XcapStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapStack { private long swigCPtr; protected boolean swigCMemOwn; - public XcapStack(long cPtr, boolean cMemoryOwn) { + protected XcapStack(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapStack obj) { + protected static long getCPtr(XcapStack obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapStack { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapStack(swigCPtr); } + swigCPtr = 0; } public XcapStack(XcapCallback callback, String xui, String password, String xcap_root) { diff --git a/branches/2.0/doubango/bindings/java/android/ActionConfig.java b/branches/2.0/doubango/bindings/java/android/ActionConfig.java index 6e952654..6f5cf166 100644 --- a/branches/2.0/doubango/bindings/java/android/ActionConfig.java +++ b/branches/2.0/doubango/bindings/java/android/ActionConfig.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ActionConfig { private long swigCPtr; protected boolean swigCMemOwn; - public ActionConfig(long cPtr, boolean cMemoryOwn) { + protected ActionConfig(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ActionConfig obj) { + protected static long getCPtr(ActionConfig obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ActionConfig { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ActionConfig(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ActionConfig(swigCPtr); } + swigCPtr = 0; } public ActionConfig() { diff --git a/branches/2.0/doubango/bindings/java/android/AudioResampler.java b/branches/2.0/doubango/bindings/java/android/AudioResampler.java index 8eaad354..2ced31fb 100644 --- a/branches/2.0/doubango/bindings/java/android/AudioResampler.java +++ b/branches/2.0/doubango/bindings/java/android/AudioResampler.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class AudioResampler { private long swigCPtr; protected boolean swigCMemOwn; - public AudioResampler(long cPtr, boolean cMemoryOwn) { + protected AudioResampler(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(AudioResampler obj) { + protected static long getCPtr(AudioResampler obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class AudioResampler { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_AudioResampler(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_AudioResampler(swigCPtr); } + swigCPtr = 0; } public AudioResampler(long nInFreq, long nOutFreq, long nFrameDuration, long nChannels, long nQuality) { diff --git a/branches/2.0/doubango/bindings/java/android/CallSession.java b/branches/2.0/doubango/bindings/java/android/CallSession.java index d042950f..1412b70b 100644 --- a/branches/2.0/doubango/bindings/java/android/CallSession.java +++ b/branches/2.0/doubango/bindings/java/android/CallSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class CallSession extends InviteSession { private long swigCPtr; - public CallSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.CallSession_SWIGUpcast(cPtr), cMemoryOwn); + protected CallSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGCallSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(CallSession obj) { + protected static long getCPtr(CallSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class CallSession extends InviteSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_CallSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_CallSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/DDebugCallback.java b/branches/2.0/doubango/bindings/java/android/DDebugCallback.java index 06a6401a..e84922c4 100644 --- a/branches/2.0/doubango/bindings/java/android/DDebugCallback.java +++ b/branches/2.0/doubango/bindings/java/android/DDebugCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class DDebugCallback { private long swigCPtr; protected boolean swigCMemOwn; - public DDebugCallback(long cPtr, boolean cMemoryOwn) { + protected DDebugCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(DDebugCallback obj) { + protected static long getCPtr(DDebugCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class DDebugCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DDebugCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DDebugCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/DialogEvent.java b/branches/2.0/doubango/bindings/java/android/DialogEvent.java index 3233b3bd..ac409f64 100644 --- a/branches/2.0/doubango/bindings/java/android/DialogEvent.java +++ b/branches/2.0/doubango/bindings/java/android/DialogEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class DialogEvent extends SipEvent { private long swigCPtr; - public DialogEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.DialogEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected DialogEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGDialogEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(DialogEvent obj) { + protected static long getCPtr(DialogEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class DialogEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_DialogEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_DialogEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/InviteEvent.java b/branches/2.0/doubango/bindings/java/android/InviteEvent.java index c3578fc5..e7a79c9e 100644 --- a/branches/2.0/doubango/bindings/java/android/InviteEvent.java +++ b/branches/2.0/doubango/bindings/java/android/InviteEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class InviteEvent extends SipEvent { private long swigCPtr; - public InviteEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.InviteEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected InviteEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGInviteEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(InviteEvent obj) { + protected static long getCPtr(InviteEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class InviteEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_InviteEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_InviteEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/InviteSession.java b/branches/2.0/doubango/bindings/java/android/InviteSession.java index fa5e05e7..71d6f6c9 100644 --- a/branches/2.0/doubango/bindings/java/android/InviteSession.java +++ b/branches/2.0/doubango/bindings/java/android/InviteSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class InviteSession extends SipSession { private long swigCPtr; - public InviteSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.InviteSession_SWIGUpcast(cPtr), cMemoryOwn); + protected InviteSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGInviteSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(InviteSession obj) { + protected static long getCPtr(InviteSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class InviteSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_InviteSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_InviteSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/MediaContent.java b/branches/2.0/doubango/bindings/java/android/MediaContent.java index cf6f9d0b..2a499c30 100644 --- a/branches/2.0/doubango/bindings/java/android/MediaContent.java +++ b/branches/2.0/doubango/bindings/java/android/MediaContent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MediaContent { private long swigCPtr; protected boolean swigCMemOwn; - public MediaContent(long cPtr, boolean cMemoryOwn) { + protected MediaContent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MediaContent obj) { + protected static long getCPtr(MediaContent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MediaContent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MediaContent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MediaContent(swigCPtr); } + swigCPtr = 0; } public String getType() { diff --git a/branches/2.0/doubango/bindings/java/android/MediaContentCPIM.java b/branches/2.0/doubango/bindings/java/android/MediaContentCPIM.java index 663ae908..b4e53eff 100644 --- a/branches/2.0/doubango/bindings/java/android/MediaContentCPIM.java +++ b/branches/2.0/doubango/bindings/java/android/MediaContentCPIM.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MediaContentCPIM extends MediaContent { private long swigCPtr; - public MediaContentCPIM(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MediaContentCPIM_SWIGUpcast(cPtr), cMemoryOwn); + protected MediaContentCPIM(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMediaContentCPIMUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MediaContentCPIM obj) { + protected static long getCPtr(MediaContentCPIM obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MediaContentCPIM extends MediaContent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MediaContentCPIM(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MediaContentCPIM(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/MediaSessionMgr.java b/branches/2.0/doubango/bindings/java/android/MediaSessionMgr.java index cae96a7a..53933174 100644 --- a/branches/2.0/doubango/bindings/java/android/MediaSessionMgr.java +++ b/branches/2.0/doubango/bindings/java/android/MediaSessionMgr.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MediaSessionMgr { private long swigCPtr; protected boolean swigCMemOwn; - public MediaSessionMgr(long cPtr, boolean cMemoryOwn) { + protected MediaSessionMgr(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MediaSessionMgr obj) { + protected static long getCPtr(MediaSessionMgr obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MediaSessionMgr { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MediaSessionMgr(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MediaSessionMgr(swigCPtr); } + swigCPtr = 0; } public boolean sessionSetInt32(twrap_media_type_t media, String key, int value) { diff --git a/branches/2.0/doubango/bindings/java/android/MessagingEvent.java b/branches/2.0/doubango/bindings/java/android/MessagingEvent.java index d67d96c8..c502d313 100644 --- a/branches/2.0/doubango/bindings/java/android/MessagingEvent.java +++ b/branches/2.0/doubango/bindings/java/android/MessagingEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MessagingEvent extends SipEvent { private long swigCPtr; - public MessagingEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MessagingEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected MessagingEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMessagingEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MessagingEvent obj) { + protected static long getCPtr(MessagingEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MessagingEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/MessagingSession.java b/branches/2.0/doubango/bindings/java/android/MessagingSession.java index d7977b7f..a59b055d 100644 --- a/branches/2.0/doubango/bindings/java/android/MessagingSession.java +++ b/branches/2.0/doubango/bindings/java/android/MessagingSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MessagingSession extends SipSession { private long swigCPtr; - public MessagingSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MessagingSession_SWIGUpcast(cPtr), cMemoryOwn); + protected MessagingSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMessagingSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MessagingSession obj) { + protected static long getCPtr(MessagingSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MessagingSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MessagingSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MessagingSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/MsrpCallback.java b/branches/2.0/doubango/bindings/java/android/MsrpCallback.java index b9a904d4..021bd93c 100644 --- a/branches/2.0/doubango/bindings/java/android/MsrpCallback.java +++ b/branches/2.0/doubango/bindings/java/android/MsrpCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MsrpCallback { private long swigCPtr; protected boolean swigCMemOwn; - public MsrpCallback(long cPtr, boolean cMemoryOwn) { + protected MsrpCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MsrpCallback obj) { + protected static long getCPtr(MsrpCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MsrpCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/MsrpEvent.java b/branches/2.0/doubango/bindings/java/android/MsrpEvent.java index d4659c97..4703fdea 100644 --- a/branches/2.0/doubango/bindings/java/android/MsrpEvent.java +++ b/branches/2.0/doubango/bindings/java/android/MsrpEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MsrpEvent { private long swigCPtr; protected boolean swigCMemOwn; - public MsrpEvent(long cPtr, boolean cMemoryOwn) { + protected MsrpEvent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MsrpEvent obj) { + protected static long getCPtr(MsrpEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MsrpEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpEvent(swigCPtr); } + swigCPtr = 0; } public tmsrp_event_type_t getType() { diff --git a/branches/2.0/doubango/bindings/java/android/MsrpMessage.java b/branches/2.0/doubango/bindings/java/android/MsrpMessage.java index c596bcaa..379d2019 100644 --- a/branches/2.0/doubango/bindings/java/android/MsrpMessage.java +++ b/branches/2.0/doubango/bindings/java/android/MsrpMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class MsrpMessage { private long swigCPtr; protected boolean swigCMemOwn; - public MsrpMessage(long cPtr, boolean cMemoryOwn) { + protected MsrpMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(MsrpMessage obj) { + protected static long getCPtr(MsrpMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class MsrpMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpMessage(swigCPtr); } + swigCPtr = 0; } public MsrpMessage() { diff --git a/branches/2.0/doubango/bindings/java/android/MsrpSession.java b/branches/2.0/doubango/bindings/java/android/MsrpSession.java index e2afb278..4ac2c5cf 100644 --- a/branches/2.0/doubango/bindings/java/android/MsrpSession.java +++ b/branches/2.0/doubango/bindings/java/android/MsrpSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class MsrpSession extends InviteSession { private long swigCPtr; - public MsrpSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.MsrpSession_SWIGUpcast(cPtr), cMemoryOwn); + protected MsrpSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGMsrpSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(MsrpSession obj) { + protected static long getCPtr(MsrpSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class MsrpSession extends InviteSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_MsrpSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_MsrpSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/OptionsEvent.java b/branches/2.0/doubango/bindings/java/android/OptionsEvent.java index 5a2520f9..32fd47c6 100644 --- a/branches/2.0/doubango/bindings/java/android/OptionsEvent.java +++ b/branches/2.0/doubango/bindings/java/android/OptionsEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class OptionsEvent extends SipEvent { private long swigCPtr; - public OptionsEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.OptionsEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected OptionsEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGOptionsEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(OptionsEvent obj) { + protected static long getCPtr(OptionsEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class OptionsEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/OptionsSession.java b/branches/2.0/doubango/bindings/java/android/OptionsSession.java index bbb095cf..5a1698fd 100644 --- a/branches/2.0/doubango/bindings/java/android/OptionsSession.java +++ b/branches/2.0/doubango/bindings/java/android/OptionsSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class OptionsSession extends SipSession { private long swigCPtr; - public OptionsSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.OptionsSession_SWIGUpcast(cPtr), cMemoryOwn); + protected OptionsSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGOptionsSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(OptionsSession obj) { + protected static long getCPtr(OptionsSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class OptionsSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_OptionsSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_OptionsSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumer.java b/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumer.java index 377e669f..c79089fe 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumer.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyAudioConsumer extends ProxyPlugin { private long swigCPtr; - public ProxyAudioConsumer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyAudioConsumer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyAudioConsumer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyAudioConsumerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioConsumer obj) { + protected static long getCPtr(ProxyAudioConsumer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyAudioConsumer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioConsumer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioConsumer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumerCallback.java b/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumerCallback.java index 08fb9f00..836c7e8f 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumerCallback.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyAudioConsumerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyAudioConsumerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyAudioConsumerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyAudioConsumerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioConsumerCallback obj) { + protected static long getCPtr(ProxyAudioConsumerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyAudioConsumerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioConsumerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioConsumerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/ProxyAudioProducer.java b/branches/2.0/doubango/bindings/java/android/ProxyAudioProducer.java index 0647a941..2ab4e60f 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyAudioProducer.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyAudioProducer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyAudioProducer extends ProxyPlugin { private long swigCPtr; - public ProxyAudioProducer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyAudioProducer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyAudioProducer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyAudioProducerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioProducer obj) { + protected static long getCPtr(ProxyAudioProducer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyAudioProducer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioProducer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioProducer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/ProxyAudioProducerCallback.java b/branches/2.0/doubango/bindings/java/android/ProxyAudioProducerCallback.java index 2534791b..a54e2812 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyAudioProducerCallback.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyAudioProducerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyAudioProducerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyAudioProducerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyAudioProducerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyAudioProducerCallback obj) { + protected static long getCPtr(ProxyAudioProducerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyAudioProducerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyAudioProducerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyAudioProducerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/ProxyPlugin.java b/branches/2.0/doubango/bindings/java/android/ProxyPlugin.java index 392d78dc..62e2afc7 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyPlugin.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyPlugin.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyPlugin { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyPlugin(long cPtr, boolean cMemoryOwn) { + protected ProxyPlugin(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyPlugin obj) { + protected static long getCPtr(ProxyPlugin obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyPlugin(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyPlugin(swigCPtr); } + swigCPtr = 0; } public twrap_proxy_plugin_type_t getType() { diff --git a/branches/2.0/doubango/bindings/java/android/ProxyPluginMgr.java b/branches/2.0/doubango/bindings/java/android/ProxyPluginMgr.java index b9dfa2e5..03f96834 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyPluginMgr.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyPluginMgr.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyPluginMgr { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyPluginMgr(long cPtr, boolean cMemoryOwn) { + protected ProxyPluginMgr(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyPluginMgr obj) { + protected static long getCPtr(ProxyPluginMgr obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyPluginMgr { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyPluginMgr(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyPluginMgr(swigCPtr); } + swigCPtr = 0; } public static ProxyPluginMgr createInstance(ProxyPluginMgrCallback callback) { diff --git a/branches/2.0/doubango/bindings/java/android/ProxyPluginMgrCallback.java b/branches/2.0/doubango/bindings/java/android/ProxyPluginMgrCallback.java index cc7d8649..8a8c6846 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyPluginMgrCallback.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyPluginMgrCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyPluginMgrCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyPluginMgrCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyPluginMgrCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyPluginMgrCallback obj) { + protected static long getCPtr(ProxyPluginMgrCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyPluginMgrCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyPluginMgrCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyPluginMgrCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumer.java b/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumer.java index d440cf2f..a9e83bd7 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumer.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyVideoConsumer extends ProxyPlugin { private long swigCPtr; - public ProxyVideoConsumer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyVideoConsumer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyVideoConsumer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyVideoConsumerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoConsumer obj) { + protected static long getCPtr(ProxyVideoConsumer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyVideoConsumer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoConsumer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoConsumer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumerCallback.java b/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumerCallback.java index 4e12b45a..1c0a8e64 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumerCallback.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyVideoConsumerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyVideoConsumerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyVideoConsumerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyVideoConsumerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoConsumerCallback obj) { + protected static long getCPtr(ProxyVideoConsumerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyVideoConsumerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoConsumerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoConsumerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/ProxyVideoFrame.java b/branches/2.0/doubango/bindings/java/android/ProxyVideoFrame.java index 09e12788..e487bf41 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyVideoFrame.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyVideoFrame.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyVideoFrame { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyVideoFrame(long cPtr, boolean cMemoryOwn) { + protected ProxyVideoFrame(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoFrame obj) { + protected static long getCPtr(ProxyVideoFrame obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyVideoFrame { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoFrame(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoFrame(swigCPtr); } + swigCPtr = 0; } public long getSize() { diff --git a/branches/2.0/doubango/bindings/java/android/ProxyVideoProducer.java b/branches/2.0/doubango/bindings/java/android/ProxyVideoProducer.java index d1e079ec..1281beac 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyVideoProducer.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyVideoProducer.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class ProxyVideoProducer extends ProxyPlugin { private long swigCPtr; - public ProxyVideoProducer(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.ProxyVideoProducer_SWIGUpcast(cPtr), cMemoryOwn); + protected ProxyVideoProducer(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGProxyVideoProducerUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoProducer obj) { + protected static long getCPtr(ProxyVideoProducer obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class ProxyVideoProducer extends ProxyPlugin { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoProducer(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoProducer(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/ProxyVideoProducerCallback.java b/branches/2.0/doubango/bindings/java/android/ProxyVideoProducerCallback.java index eb9236f4..3c533c2e 100644 --- a/branches/2.0/doubango/bindings/java/android/ProxyVideoProducerCallback.java +++ b/branches/2.0/doubango/bindings/java/android/ProxyVideoProducerCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class ProxyVideoProducerCallback { private long swigCPtr; protected boolean swigCMemOwn; - public ProxyVideoProducerCallback(long cPtr, boolean cMemoryOwn) { + protected ProxyVideoProducerCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(ProxyVideoProducerCallback obj) { + protected static long getCPtr(ProxyVideoProducerCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class ProxyVideoProducerCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_ProxyVideoProducerCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_ProxyVideoProducerCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/PublicationEvent.java b/branches/2.0/doubango/bindings/java/android/PublicationEvent.java index 246a59cd..88541683 100644 --- a/branches/2.0/doubango/bindings/java/android/PublicationEvent.java +++ b/branches/2.0/doubango/bindings/java/android/PublicationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class PublicationEvent extends SipEvent { private long swigCPtr; - public PublicationEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.PublicationEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected PublicationEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGPublicationEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(PublicationEvent obj) { + protected static long getCPtr(PublicationEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class PublicationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/PublicationSession.java b/branches/2.0/doubango/bindings/java/android/PublicationSession.java index cc064022..f80f3dcb 100644 --- a/branches/2.0/doubango/bindings/java/android/PublicationSession.java +++ b/branches/2.0/doubango/bindings/java/android/PublicationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class PublicationSession extends SipSession { private long swigCPtr; - public PublicationSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.PublicationSession_SWIGUpcast(cPtr), cMemoryOwn); + protected PublicationSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGPublicationSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(PublicationSession obj) { + protected static long getCPtr(PublicationSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class PublicationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_PublicationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_PublicationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/RPMessage.java b/branches/2.0/doubango/bindings/java/android/RPMessage.java index 74a5c8a2..711f9907 100644 --- a/branches/2.0/doubango/bindings/java/android/RPMessage.java +++ b/branches/2.0/doubango/bindings/java/android/RPMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class RPMessage { private long swigCPtr; protected boolean swigCMemOwn; - public RPMessage(long cPtr, boolean cMemoryOwn) { + protected RPMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(RPMessage obj) { + protected static long getCPtr(RPMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class RPMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RPMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RPMessage(swigCPtr); } + swigCPtr = 0; } public RPMessage() { diff --git a/branches/2.0/doubango/bindings/java/android/RegistrationEvent.java b/branches/2.0/doubango/bindings/java/android/RegistrationEvent.java index 6f436aa6..6ae317b1 100644 --- a/branches/2.0/doubango/bindings/java/android/RegistrationEvent.java +++ b/branches/2.0/doubango/bindings/java/android/RegistrationEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class RegistrationEvent extends SipEvent { private long swigCPtr; - public RegistrationEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.RegistrationEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected RegistrationEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(RegistrationEvent obj) { + protected static long getCPtr(RegistrationEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class RegistrationEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/RegistrationSession.java b/branches/2.0/doubango/bindings/java/android/RegistrationSession.java index d72afa1e..48866fc7 100644 --- a/branches/2.0/doubango/bindings/java/android/RegistrationSession.java +++ b/branches/2.0/doubango/bindings/java/android/RegistrationSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class RegistrationSession extends SipSession { private long swigCPtr; - public RegistrationSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.RegistrationSession_SWIGUpcast(cPtr), cMemoryOwn); + protected RegistrationSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGRegistrationSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(RegistrationSession obj) { + protected static long getCPtr(RegistrationSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class RegistrationSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_RegistrationSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_RegistrationSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/SMSData.java b/branches/2.0/doubango/bindings/java/android/SMSData.java index 02824970..12957ecd 100644 --- a/branches/2.0/doubango/bindings/java/android/SMSData.java +++ b/branches/2.0/doubango/bindings/java/android/SMSData.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SMSData { private long swigCPtr; protected boolean swigCMemOwn; - public SMSData(long cPtr, boolean cMemoryOwn) { + protected SMSData(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SMSData obj) { + protected static long getCPtr(SMSData obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SMSData { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SMSData(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SMSData(swigCPtr); } + swigCPtr = 0; } public SMSData() { diff --git a/branches/2.0/doubango/bindings/java/android/SMSEncoder.java b/branches/2.0/doubango/bindings/java/android/SMSEncoder.java index fe24b2f0..3e445730 100644 --- a/branches/2.0/doubango/bindings/java/android/SMSEncoder.java +++ b/branches/2.0/doubango/bindings/java/android/SMSEncoder.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SMSEncoder { private long swigCPtr; protected boolean swigCMemOwn; - public SMSEncoder(long cPtr, boolean cMemoryOwn) { + protected SMSEncoder(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SMSEncoder obj) { + protected static long getCPtr(SMSEncoder obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SMSEncoder { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SMSEncoder(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SMSEncoder(swigCPtr); } + swigCPtr = 0; } public static RPMessage encodeSubmit(int mr, String smsc, String destination, String ascii) { diff --git a/branches/2.0/doubango/bindings/java/android/SafeObject.java b/branches/2.0/doubango/bindings/java/android/SafeObject.java index 8503a758..4cef0759 100644 --- a/branches/2.0/doubango/bindings/java/android/SafeObject.java +++ b/branches/2.0/doubango/bindings/java/android/SafeObject.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SafeObject { private long swigCPtr; protected boolean swigCMemOwn; - public SafeObject(long cPtr, boolean cMemoryOwn) { + protected SafeObject(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SafeObject obj) { + protected static long getCPtr(SafeObject obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SafeObject(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SafeObject(swigCPtr); } + swigCPtr = 0; } public SafeObject() { diff --git a/branches/2.0/doubango/bindings/java/android/SdpMessage.java b/branches/2.0/doubango/bindings/java/android/SdpMessage.java index a12e7201..410ba163 100644 --- a/branches/2.0/doubango/bindings/java/android/SdpMessage.java +++ b/branches/2.0/doubango/bindings/java/android/SdpMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SdpMessage { private long swigCPtr; protected boolean swigCMemOwn; - public SdpMessage(long cPtr, boolean cMemoryOwn) { + protected SdpMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SdpMessage obj) { + protected static long getCPtr(SdpMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SdpMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SdpMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SdpMessage(swigCPtr); } + swigCPtr = 0; } public SdpMessage() { diff --git a/branches/2.0/doubango/bindings/java/android/SipCallback.java b/branches/2.0/doubango/bindings/java/android/SipCallback.java index 1f5f6071..dcf3207a 100644 --- a/branches/2.0/doubango/bindings/java/android/SipCallback.java +++ b/branches/2.0/doubango/bindings/java/android/SipCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipCallback { private long swigCPtr; protected boolean swigCMemOwn; - public SipCallback(long cPtr, boolean cMemoryOwn) { + protected SipCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipCallback obj) { + protected static long getCPtr(SipCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/SipEvent.java b/branches/2.0/doubango/bindings/java/android/SipEvent.java index 0c213839..48cab3a9 100644 --- a/branches/2.0/doubango/bindings/java/android/SipEvent.java +++ b/branches/2.0/doubango/bindings/java/android/SipEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipEvent { private long swigCPtr; protected boolean swigCMemOwn; - public SipEvent(long cPtr, boolean cMemoryOwn) { + protected SipEvent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipEvent obj) { + protected static long getCPtr(SipEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipEvent(swigCPtr); } + swigCPtr = 0; } public short getCode() { diff --git a/branches/2.0/doubango/bindings/java/android/SipMessage.java b/branches/2.0/doubango/bindings/java/android/SipMessage.java index fda8f98d..a898fdaa 100644 --- a/branches/2.0/doubango/bindings/java/android/SipMessage.java +++ b/branches/2.0/doubango/bindings/java/android/SipMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipMessage { private long swigCPtr; protected boolean swigCMemOwn; - public SipMessage(long cPtr, boolean cMemoryOwn) { + protected SipMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipMessage obj) { + protected static long getCPtr(SipMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipMessage(swigCPtr); } + swigCPtr = 0; } public byte[] getSipContent() { diff --git a/branches/2.0/doubango/bindings/java/android/SipSession.java b/branches/2.0/doubango/bindings/java/android/SipSession.java index bf709058..eaff336c 100644 --- a/branches/2.0/doubango/bindings/java/android/SipSession.java +++ b/branches/2.0/doubango/bindings/java/android/SipSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipSession { private long swigCPtr; protected boolean swigCMemOwn; - public SipSession(long cPtr, boolean cMemoryOwn) { + protected SipSession(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipSession obj) { + protected static long getCPtr(SipSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipSession(swigCPtr); } + swigCPtr = 0; } protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) { diff --git a/branches/2.0/doubango/bindings/java/android/SipStack.java b/branches/2.0/doubango/bindings/java/android/SipStack.java index 484a9a0e..3c4f9c30 100644 --- a/branches/2.0/doubango/bindings/java/android/SipStack.java +++ b/branches/2.0/doubango/bindings/java/android/SipStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class SipStack extends SafeObject { private long swigCPtr; - public SipStack(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.SipStack_SWIGUpcast(cPtr), cMemoryOwn); + protected SipStack(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSipStackUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(SipStack obj) { + protected static long getCPtr(SipStack obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class SipStack extends SafeObject { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipStack(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/SipUri.java b/branches/2.0/doubango/bindings/java/android/SipUri.java index 9a89121a..be2fb7ad 100644 --- a/branches/2.0/doubango/bindings/java/android/SipUri.java +++ b/branches/2.0/doubango/bindings/java/android/SipUri.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class SipUri { private long swigCPtr; protected boolean swigCMemOwn; - public SipUri(long cPtr, boolean cMemoryOwn) { + protected SipUri(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(SipUri obj) { + protected static long getCPtr(SipUri obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class SipUri { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SipUri(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SipUri(swigCPtr); } + swigCPtr = 0; } public SipUri(String uriString, String displayName) { diff --git a/branches/2.0/doubango/bindings/java/android/StackEvent.java b/branches/2.0/doubango/bindings/java/android/StackEvent.java index a776348c..ee0ba843 100644 --- a/branches/2.0/doubango/bindings/java/android/StackEvent.java +++ b/branches/2.0/doubango/bindings/java/android/StackEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class StackEvent extends SipEvent { private long swigCPtr; - public StackEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.StackEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected StackEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGStackEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(StackEvent obj) { + protected static long getCPtr(StackEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class StackEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_StackEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_StackEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/SubscriptionEvent.java b/branches/2.0/doubango/bindings/java/android/SubscriptionEvent.java index b3e69ba5..03d6345c 100644 --- a/branches/2.0/doubango/bindings/java/android/SubscriptionEvent.java +++ b/branches/2.0/doubango/bindings/java/android/SubscriptionEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class SubscriptionEvent extends SipEvent { private long swigCPtr; - public SubscriptionEvent(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.SubscriptionEvent_SWIGUpcast(cPtr), cMemoryOwn); + protected SubscriptionEvent(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSubscriptionEventUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(SubscriptionEvent obj) { + protected static long getCPtr(SubscriptionEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class SubscriptionEvent extends SipEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/SubscriptionSession.java b/branches/2.0/doubango/bindings/java/android/SubscriptionSession.java index a083433e..a69036a9 100644 --- a/branches/2.0/doubango/bindings/java/android/SubscriptionSession.java +++ b/branches/2.0/doubango/bindings/java/android/SubscriptionSession.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -11,12 +11,12 @@ package org.doubango.tinyWRAP; public class SubscriptionSession extends SipSession { private long swigCPtr; - public SubscriptionSession(long cPtr, boolean cMemoryOwn) { - super(tinyWRAPJNI.SubscriptionSession_SWIGUpcast(cPtr), cMemoryOwn); + protected SubscriptionSession(long cPtr, boolean cMemoryOwn) { + super(tinyWRAPJNI.SWIGSubscriptionSessionUpcast(cPtr), cMemoryOwn); swigCPtr = cPtr; } - public static long getCPtr(SubscriptionSession obj) { + protected static long getCPtr(SubscriptionSession obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -25,13 +25,11 @@ public class SubscriptionSession extends SipSession { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_SubscriptionSession(swigCPtr); } + swigCPtr = 0; super.delete(); } diff --git a/branches/2.0/doubango/bindings/java/android/XcapCallback.java b/branches/2.0/doubango/bindings/java/android/XcapCallback.java index a64515f9..5a588915 100644 --- a/branches/2.0/doubango/bindings/java/android/XcapCallback.java +++ b/branches/2.0/doubango/bindings/java/android/XcapCallback.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapCallback { private long swigCPtr; protected boolean swigCMemOwn; - public XcapCallback(long cPtr, boolean cMemoryOwn) { + protected XcapCallback(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapCallback obj) { + protected static long getCPtr(XcapCallback obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapCallback { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapCallback(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapCallback(swigCPtr); } + swigCPtr = 0; } protected void swigDirectorDisconnect() { diff --git a/branches/2.0/doubango/bindings/java/android/XcapEvent.java b/branches/2.0/doubango/bindings/java/android/XcapEvent.java index a627bafe..86ed7971 100644 --- a/branches/2.0/doubango/bindings/java/android/XcapEvent.java +++ b/branches/2.0/doubango/bindings/java/android/XcapEvent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapEvent { private long swigCPtr; protected boolean swigCMemOwn; - public XcapEvent(long cPtr, boolean cMemoryOwn) { + protected XcapEvent(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapEvent obj) { + protected static long getCPtr(XcapEvent obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapEvent { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapEvent(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapEvent(swigCPtr); } + swigCPtr = 0; } public thttp_event_type_t getType() { diff --git a/branches/2.0/doubango/bindings/java/android/XcapMessage.java b/branches/2.0/doubango/bindings/java/android/XcapMessage.java index b7ab384e..07dbfbb8 100644 --- a/branches/2.0/doubango/bindings/java/android/XcapMessage.java +++ b/branches/2.0/doubango/bindings/java/android/XcapMessage.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapMessage { private long swigCPtr; protected boolean swigCMemOwn; - public XcapMessage(long cPtr, boolean cMemoryOwn) { + protected XcapMessage(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapMessage obj) { + protected static long getCPtr(XcapMessage obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapMessage { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapMessage(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapMessage(swigCPtr); } + swigCPtr = 0; } public byte[] getXcapContent() { diff --git a/branches/2.0/doubango/bindings/java/android/XcapSelector.java b/branches/2.0/doubango/bindings/java/android/XcapSelector.java index 20851b19..efcda497 100644 --- a/branches/2.0/doubango/bindings/java/android/XcapSelector.java +++ b/branches/2.0/doubango/bindings/java/android/XcapSelector.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapSelector { private long swigCPtr; protected boolean swigCMemOwn; - public XcapSelector(long cPtr, boolean cMemoryOwn) { + protected XcapSelector(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapSelector obj) { + protected static long getCPtr(XcapSelector obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapSelector { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapSelector(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapSelector(swigCPtr); } + swigCPtr = 0; } public XcapSelector(XcapStack stack) { diff --git a/branches/2.0/doubango/bindings/java/android/XcapStack.java b/branches/2.0/doubango/bindings/java/android/XcapStack.java index ee726fe2..95d28e9d 100644 --- a/branches/2.0/doubango/bindings/java/android/XcapStack.java +++ b/branches/2.0/doubango/bindings/java/android/XcapStack.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -12,12 +12,12 @@ public class XcapStack { private long swigCPtr; protected boolean swigCMemOwn; - public XcapStack(long cPtr, boolean cMemoryOwn) { + protected XcapStack(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } - public static long getCPtr(XcapStack obj) { + protected static long getCPtr(XcapStack obj) { return (obj == null) ? 0 : obj.swigCPtr; } @@ -26,13 +26,11 @@ public class XcapStack { } public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - tinyWRAPJNI.delete_XcapStack(swigCPtr); - } - swigCPtr = 0; + if(swigCPtr != 0 && swigCMemOwn) { + swigCMemOwn = false; + tinyWRAPJNI.delete_XcapStack(swigCPtr); } + swigCPtr = 0; } public XcapStack(XcapCallback callback, String xui, String password, String xcap_root) { diff --git a/branches/2.0/doubango/bindings/java/android/commercial.sh b/branches/2.0/doubango/bindings/java/android/commercial.sh index 05be704d..ff0e68f9 100644 --- a/branches/2.0/doubango/bindings/java/android/commercial.sh +++ b/branches/2.0/doubango/bindings/java/android/commercial.sh @@ -6,6 +6,6 @@ export COMMERCIAL_PARAMS="LICENSE=lgpl FFMPEG=yes H264=no THEORA=yes OPENCORE_AM for IS_NEON in no yes do -../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $COMMERCIAL_PARAMS HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON +../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $COMMERCIAL_PARAMS VPX=$IS_NEON HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON done diff --git a/branches/2.0/doubango/bindings/java/android/droid-makefile b/branches/2.0/doubango/bindings/java/android/droid-makefile index d44592a7..ac151c1c 100644 --- a/branches/2.0/doubango/bindings/java/android/droid-makefile +++ b/branches/2.0/doubango/bindings/java/android/droid-makefile @@ -30,28 +30,32 @@ FFMPEG_LDFLAGS := -lavutil-$(LICENSE) -lswscale-$(LICENSE) -lavcore-$(LICENSE) - endif endif +ifeq ($(VPX),yes) + VPX_LDLAGS := -lvpx_$(MARCH) +endif + ifneq ($(OPENCORE_AMR), no) -OPENCORE_ARM_LDFLAGS := -lopencore-amrnb + OPENCORE_ARM_LDFLAGS := -lopencore-amrnb endif ifeq ($(SPEEX_DSP), yes) -SPEEX_DSP_LDFLAGS := -lspeexdsp + SPEEX_DSP_LDFLAGS := -lspeexdsp endif ifeq ($(SPEEX), yes) -SPEEX_LDFLAGS := -lspeex + SPEEX_LDFLAGS := -lspeex endif ifeq ($(HAVE_WEBRTC), yes) - WEBRTC_LDFLAGS := -lwebrtc_aec_$(MARCH) -lwebrtc_apm_utility_$(MARCH) -lwebrtc_ns_$(MARCH) -lwebrtc_system_wrappers_$(MARCH) + WEBRTC_LDFLAGS := -lwebrtc_aecm_$(MARCH) -lwebrtc_aec_$(MARCH) -lwebrtc_spl_$(MARCH) -lwebrtc_apm_utility_$(MARCH) -lwebrtc_ns_$(MARCH) -lwebrtc_system_wrappers_$(MARCH) endif ifeq ($(ILBC), yes) -ILBC_LDFLAGS := -liLBC + ILBC_LDFLAGS := -liLBC endif ifneq ($(LIBGSM),no) -LIBGSM_LDFLAGS := -lgsm + LIBGSM_LDFLAGS := -lgsm endif #BV16_LDFLAGS := -lbv16 @@ -72,7 +76,7 @@ else _LT=Bstatic endif -LDFLAGS := $(LDFLAGS_LIB) -L$(THIRDPARTIES_LIB) -L$(THIRDPARTIES_MARCH_LIB) $(FFMPEG_LDFLAGS) $(WEBRTC_LDFLAGS) $(SPEEX_DSP_LDFLAGS) $(SPEEX_LDFLAGS) $(OPENCORE_ARM_LDFLAGS) $(BV16_LDFLAGS) $(ILBC_LDFLAGS) $(LIBGSM_LDFLAGS) $(G729_LDFLAGS)\ +LDFLAGS := $(LDFLAGS_LIB) -L$(THIRDPARTIES_LIB) -L$(THIRDPARTIES_MARCH_LIB) $(FFMPEG_LDFLAGS) $(VPX_LDLAGS) $(WEBRTC_LDFLAGS) $(SPEEX_DSP_LDFLAGS) $(SPEEX_LDFLAGS) $(OPENCORE_ARM_LDFLAGS) $(BV16_LDFLAGS) $(ILBC_LDFLAGS) $(LIBGSM_LDFLAGS) $(G729_LDFLAGS)\ -Wl,-Bdynamic -lm -lstdc++ -lgcc -llog \ -Wl,-$(_LT) -ltinySAK_$(MARCH) -ltinyHTTP_$(MARCH) -ltinyXCAP_$(MARCH) -ltinyIPSec_$(MARCH) -ltinySIGCOMP_$(MARCH) -ltinySMS_$(MARCH) -ltinyNET_$(MARCH) -ltinySDP_$(MARCH) -ltinyRTP_$(MARCH) -ltinyMEDIA_$(MARCH) -ltinyMSRP_$(MARCH) -ltinyDAV_$(MARCH) -ltinySIP_$(MARCH) diff --git a/branches/2.0/doubango/bindings/java/android/gpl.sh b/branches/2.0/doubango/bindings/java/android/gpl.sh index 66f6a99c..338f4ce3 100644 --- a/branches/2.0/doubango/bindings/java/android/gpl.sh +++ b/branches/2.0/doubango/bindings/java/android/gpl.sh @@ -6,6 +6,6 @@ export GPL_PARAMS="LICENSE=gpl NO_FREE=yes FFMPEG=yes H264=yes THEORA=yes OPENCO for IS_NEON in no yes do -../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $GPL_PARAMS HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON +../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $GPL_PARAMS VPX=$IS_NEON HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON done diff --git a/branches/2.0/doubango/bindings/java/android/lgpl.sh b/branches/2.0/doubango/bindings/java/android/lgpl.sh index 547e71c1..74b9d310 100644 --- a/branches/2.0/doubango/bindings/java/android/lgpl.sh +++ b/branches/2.0/doubango/bindings/java/android/lgpl.sh @@ -6,6 +6,6 @@ export LGPL_PARAMS="LICENSE=lgpl FFMPEG=yes H264=no THEORA=yes OPENCORE_AMR=yes for IS_NEON in no yes do -../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $LGPL_PARAMS HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON +../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $LGPL_PARAMS VPX=$IS_NEON HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON done diff --git a/branches/2.0/doubango/bindings/java/android/minimal.sh b/branches/2.0/doubango/bindings/java/android/minimal.sh index 8b1c880b..216a6004 100644 --- a/branches/2.0/doubango/bindings/java/android/minimal.sh +++ b/branches/2.0/doubango/bindings/java/android/minimal.sh @@ -6,5 +6,5 @@ export MINIMAL_PARAMS="FFMPEG=no H264=no THEORA=no OPENCORE_AMR=no SPEEX_DSP=yes for IS_NEON in no yes do -../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $MINIMAL_PARAMS HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON +../bindings/java/android/buildAll.sh $@ NEON=$IS_NEON $MINIMAL_PARAMS VPX=$IS_NEON HAVE_WEBRTC=$IS_NEON HAVE_WEBRTC_DENOISE=$IS_NEON done diff --git a/branches/2.0/doubango/bindings/java/android/tdav_codec_id_t.java b/branches/2.0/doubango/bindings/java/android/tdav_codec_id_t.java index 48275e5a..0498e051 100644 --- a/branches/2.0/doubango/bindings/java/android/tdav_codec_id_t.java +++ b/branches/2.0/doubango/bindings/java/android/tdav_codec_id_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33,7 +33,8 @@ public enum tdav_codec_id_t { tdav_codec_id_h264_bp20(0x00010000 << 5), tdav_codec_id_h264_bp30(0x00010000 << 6), tdav_codec_id_theora(0x00010000 << 7), - tdav_codec_id_mp4ves_es(0x00010000 << 8); + tdav_codec_id_mp4ves_es(0x00010000 << 8), + tdav_codec_id_vp8(0x00010000 << 9); public final int swigValue() { return swigValue; diff --git a/branches/2.0/doubango/bindings/java/android/thttp_event_type_t.java b/branches/2.0/doubango/bindings/java/android/thttp_event_type_t.java index d4f15f20..de06855b 100644 --- a/branches/2.0/doubango/bindings/java/android/thttp_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/thttp_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tinyWRAP.java b/branches/2.0/doubango/bindings/java/android/tinyWRAP.java index 71d240c5..d10c59ad 100644 --- a/branches/2.0/doubango/bindings/java/android/tinyWRAP.java +++ b/branches/2.0/doubango/bindings/java/android/tinyWRAP.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tinyWRAPConstants.java b/branches/2.0/doubango/bindings/java/android/tinyWRAPConstants.java index b3a5149e..1c7f7324 100644 --- a/branches/2.0/doubango/bindings/java/android/tinyWRAPConstants.java +++ b/branches/2.0/doubango/bindings/java/android/tinyWRAPConstants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tinyWRAPJNI.java b/branches/2.0/doubango/bindings/java/android/tinyWRAPJNI.java index 5e3b0ab6..a44d7a50 100644 --- a/branches/2.0/doubango/bindings/java/android/tinyWRAPJNI.java +++ b/branches/2.0/doubango/bindings/java/android/tinyWRAPJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -8,7 +8,7 @@ package org.doubango.tinyWRAP; -public class tinyWRAPJNI { +class tinyWRAPJNI { public final static native long new_DDebugCallback(); public final static native void delete_DDebugCallback(long jarg1); public final static native int DDebugCallback_OnDebugInfo(long jarg1, DDebugCallback jarg1_, String jarg2); @@ -500,28 +500,28 @@ public class tinyWRAPJNI { public final static native int MsrpCallback_OnEventSwigExplicitMsrpCallback(long jarg1, MsrpCallback jarg1_, long jarg2, MsrpEvent jarg2_); public final static native void MsrpCallback_director_connect(MsrpCallback obj, long cptr, boolean mem_own, boolean weak_global); public final static native void MsrpCallback_change_ownership(MsrpCallback obj, long cptr, boolean take_or_release); - public final static native long MediaContentCPIM_SWIGUpcast(long jarg1); - public final static native long DialogEvent_SWIGUpcast(long jarg1); - public final static native long StackEvent_SWIGUpcast(long jarg1); - public final static native long InviteEvent_SWIGUpcast(long jarg1); - public final static native long MessagingEvent_SWIGUpcast(long jarg1); - public final static native long OptionsEvent_SWIGUpcast(long jarg1); - public final static native long PublicationEvent_SWIGUpcast(long jarg1); - public final static native long RegistrationEvent_SWIGUpcast(long jarg1); - public final static native long SubscriptionEvent_SWIGUpcast(long jarg1); - public final static native long InviteSession_SWIGUpcast(long jarg1); - public final static native long CallSession_SWIGUpcast(long jarg1); - public final static native long MsrpSession_SWIGUpcast(long jarg1); - public final static native long MessagingSession_SWIGUpcast(long jarg1); - public final static native long OptionsSession_SWIGUpcast(long jarg1); - public final static native long PublicationSession_SWIGUpcast(long jarg1); - public final static native long RegistrationSession_SWIGUpcast(long jarg1); - public final static native long SubscriptionSession_SWIGUpcast(long jarg1); - public final static native long ProxyAudioConsumer_SWIGUpcast(long jarg1); - public final static native long ProxyVideoConsumer_SWIGUpcast(long jarg1); - public final static native long ProxyAudioProducer_SWIGUpcast(long jarg1); - public final static native long ProxyVideoProducer_SWIGUpcast(long jarg1); - public final static native long SipStack_SWIGUpcast(long jarg1); + public final static native long SWIGMediaContentCPIMUpcast(long jarg1); + public final static native long SWIGDialogEventUpcast(long jarg1); + public final static native long SWIGStackEventUpcast(long jarg1); + public final static native long SWIGInviteEventUpcast(long jarg1); + public final static native long SWIGMessagingEventUpcast(long jarg1); + public final static native long SWIGOptionsEventUpcast(long jarg1); + public final static native long SWIGPublicationEventUpcast(long jarg1); + public final static native long SWIGRegistrationEventUpcast(long jarg1); + public final static native long SWIGSubscriptionEventUpcast(long jarg1); + public final static native long SWIGInviteSessionUpcast(long jarg1); + public final static native long SWIGCallSessionUpcast(long jarg1); + public final static native long SWIGMsrpSessionUpcast(long jarg1); + public final static native long SWIGMessagingSessionUpcast(long jarg1); + public final static native long SWIGOptionsSessionUpcast(long jarg1); + public final static native long SWIGPublicationSessionUpcast(long jarg1); + public final static native long SWIGRegistrationSessionUpcast(long jarg1); + public final static native long SWIGSubscriptionSessionUpcast(long jarg1); + public final static native long SWIGProxyAudioConsumerUpcast(long jarg1); + public final static native long SWIGProxyVideoConsumerUpcast(long jarg1); + public final static native long SWIGProxyAudioProducerUpcast(long jarg1); + public final static native long SWIGProxyVideoProducerUpcast(long jarg1); + public final static native long SWIGSipStackUpcast(long jarg1); public static int SwigDirector_DDebugCallback_OnDebugInfo(DDebugCallback self, String message) { return self.OnDebugInfo(message); diff --git a/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.cxx b/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.cxx index 72e49678..c59f8451 100644 --- a/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.cxx +++ b/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -193,8 +193,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } - }; + { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) @@ -212,6 +211,9 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else /* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * * director.swg * * This file contains support for director classes that proxy @@ -400,10 +402,8 @@ namespace Swig { namespace Swig { - namespace { - jclass jclass_tinyWRAPJNI = NULL; - jmethodID director_methids[34]; - } + static jclass jclass_tinyWRAPJNI = NULL; + static jmethodID director_methids[34]; } #include // Use the C99 official header @@ -2712,7 +2712,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContent_1 (void)jarg1_; arg1 = *(MediaContent **)&jarg1; result = (char *)(arg1)->getType(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -2894,7 +2894,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContentCP if (!arg2) return 0; } result = (char *)(arg1)->getHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); return jresult; } @@ -2999,7 +2999,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getSch (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getScheme(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3014,7 +3014,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getHos (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getHost(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3044,7 +3044,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getUse (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getUserName(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3059,7 +3059,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getPas (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getPassword(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3074,7 +3074,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getDis (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getDisplayName(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3095,7 +3095,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getPar if (!arg2) return 0; } result = (char *)(arg1)->getParamValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); return jresult; } @@ -3161,7 +3161,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SdpMessage_1ge arg3 = (char)jarg3; arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getSdpHeaderValue((char const *)arg2,arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3186,7 +3186,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SdpMessage_1ge } arg3 = (char)jarg3; result = (char *)(arg1)->getSdpHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3215,7 +3215,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SdpMessage_1ge if (!arg3) return 0; } result = (char *)(arg1)->getSdpHeaderAValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -3293,7 +3293,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg3 = (unsigned int)jarg3; result = (char *)(arg1)->getSipHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3316,7 +3316,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg2) return 0; } result = (char *)(arg1)->getSipHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3347,7 +3347,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -3377,7 +3377,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg3) return 0; } result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -3471,7 +3471,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getP (void)jarg1_; arg1 = *(SipEvent **)&jarg1; result = (char *)((SipEvent const *)arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -8586,7 +8586,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1dnsE if (!arg4) return 0; } result = (char *)(arg1)->dnsENUM((char const *)arg2,(char const *)arg3,(char const *)arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4); @@ -8630,7 +8630,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1dnsN arg4 = &temp4; } result = (char *)(arg1)->dnsNaptrSrv((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); { jint jvalue = (jint)temp4; jenv->SetIntArrayRegion(jarg4, 0, 1, &jvalue); @@ -8672,7 +8672,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1dnsS arg3 = &temp3; } result = (char *)(arg1)->dnsSrv((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); { jint jvalue = (jint)temp3; jenv->SetIntArrayRegion(jarg3, 0, 1, &jvalue); @@ -8713,7 +8713,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1getL arg3 = &temp3; } result = (char *)(arg1)->getLocalIPnPort((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); { jint jvalue = (jint)temp3; jenv->SetIntArrayRegion(jarg3, 0, 1, &jvalue); @@ -8735,7 +8735,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1getP (void)jarg1_; arg1 = *(SipStack **)&jarg1; result = (char *)(arg1)->getPreferredIdentity(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); delete [] result; return jresult; } @@ -9043,7 +9043,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapSelector_1 (void)jarg1_; arg1 = *(XcapSelector **)&jarg1; result = (char *)(arg1)->getString(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); delete [] result; return jresult; } @@ -9107,7 +9107,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g (void)jarg1_; arg1 = *(XcapMessage **)&jarg1; result = (char *)((XcapMessage const *)arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -9130,7 +9130,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g } arg3 = (unsigned int)jarg3; result = (char *)(arg1)->getXcapHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -9153,7 +9153,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g if (!arg2) return 0; } result = (char *)(arg1)->getXcapHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -9184,7 +9184,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g } arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getXcapHeaderParamValue((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -9214,7 +9214,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g if (!arg3) return 0; } result = (char *)(arg1)->getXcapHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -10049,7 +10049,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SMSData_1getOA (void)jarg1_; arg1 = *(SMSData **)&jarg1; result = (char *)(arg1)->getOA(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -10064,7 +10064,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SMSData_1getDA (void)jarg1_; arg1 = *(SMSData **)&jarg1; result = (char *)(arg1)->getDA(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -10291,7 +10291,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1g (void)jarg1_; arg1 = *(MsrpMessage **)&jarg1; result = (char *)(arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -10422,7 +10422,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1g if (!arg2) return 0; } result = (char *)(arg1)->getMsrpHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -10451,7 +10451,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1g if (!arg3) return 0; } result = (char *)(arg1)->getMsrpHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -10628,7 +10628,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpCallback_1cha } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContentCPIM_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMediaContentCPIMUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10636,7 +10636,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContentCPIM return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DialogEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGDialogEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10644,7 +10644,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DialogEvent_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_StackEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGStackEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10652,7 +10652,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_StackEvent_1SWIG return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInviteEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10660,7 +10660,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteEvent_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10668,7 +10668,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingEvent_1 return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10676,7 +10676,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsEvent_1SW return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGPublicationEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10684,7 +10684,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGRegistrationEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10692,7 +10692,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationEven return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSubscriptionEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10700,7 +10700,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEven return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInviteSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10708,7 +10708,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1S return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGCallSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10716,7 +10716,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMsrpSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10724,7 +10724,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpSession_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10732,7 +10732,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingSession return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10740,7 +10740,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsSession_1 return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGPublicationSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10748,7 +10748,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSessi return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGRegistrationSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10756,7 +10756,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationSess return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSubscriptionSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10764,7 +10764,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionSess return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyAudioConsumerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10772,7 +10772,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsum return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoConsumer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyVideoConsumerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10780,7 +10780,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoConsum return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyAudioProducerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10788,7 +10788,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProduc return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyVideoProducerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10796,7 +10796,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProduc return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSipStackUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; diff --git a/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.h b/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.h index b0be5623..ec1fb642 100644 --- a/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.h +++ b/branches/2.0/doubango/bindings/java/android/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make diff --git a/branches/2.0/doubango/bindings/java/android/tmedia_bandwidth_level_t.java b/branches/2.0/doubango/bindings/java/android/tmedia_bandwidth_level_t.java index 9f0259a8..46a2fe37 100644 --- a/branches/2.0/doubango/bindings/java/android/tmedia_bandwidth_level_t.java +++ b/branches/2.0/doubango/bindings/java/android/tmedia_bandwidth_level_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tmedia_chroma_t.java b/branches/2.0/doubango/bindings/java/android/tmedia_chroma_t.java index a9750744..18fbb979 100644 --- a/branches/2.0/doubango/bindings/java/android/tmedia_chroma_t.java +++ b/branches/2.0/doubango/bindings/java/android/tmedia_chroma_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tmedia_qos_strength_t.java b/branches/2.0/doubango/bindings/java/android/tmedia_qos_strength_t.java index cca89686..5bd80172 100644 --- a/branches/2.0/doubango/bindings/java/android/tmedia_qos_strength_t.java +++ b/branches/2.0/doubango/bindings/java/android/tmedia_qos_strength_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tmedia_qos_stype_t.java b/branches/2.0/doubango/bindings/java/android/tmedia_qos_stype_t.java index d8b31061..e81416e0 100644 --- a/branches/2.0/doubango/bindings/java/android/tmedia_qos_stype_t.java +++ b/branches/2.0/doubango/bindings/java/android/tmedia_qos_stype_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tmsrp_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tmsrp_event_type_t.java index 7e924e3c..c849e756 100644 --- a/branches/2.0/doubango/bindings/java/android/tmsrp_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tmsrp_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tmsrp_request_type_t.java b/branches/2.0/doubango/bindings/java/android/tmsrp_request_type_t.java index 9605705a..5c0d6914 100644 --- a/branches/2.0/doubango/bindings/java/android/tmsrp_request_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tmsrp_request_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tsip_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tsip_event_type_t.java index 628eb74a..6527ee1e 100644 --- a/branches/2.0/doubango/bindings/java/android/tsip_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tsip_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tsip_invite_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tsip_invite_event_type_t.java index c4698a6c..4567c5ac 100644 --- a/branches/2.0/doubango/bindings/java/android/tsip_invite_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tsip_invite_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tsip_message_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tsip_message_event_type_t.java index c6c8c35b..280845ac 100644 --- a/branches/2.0/doubango/bindings/java/android/tsip_message_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tsip_message_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tsip_options_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tsip_options_event_type_t.java index afc3af91..70166763 100644 --- a/branches/2.0/doubango/bindings/java/android/tsip_options_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tsip_options_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tsip_publish_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tsip_publish_event_type_t.java index fb935135..a9ec14a0 100644 --- a/branches/2.0/doubango/bindings/java/android/tsip_publish_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tsip_publish_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tsip_register_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tsip_register_event_type_t.java index 21531bbf..298204e0 100644 --- a/branches/2.0/doubango/bindings/java/android/tsip_register_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tsip_register_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/tsip_subscribe_event_type_t.java b/branches/2.0/doubango/bindings/java/android/tsip_subscribe_event_type_t.java index 623d98f0..5091b658 100644 --- a/branches/2.0/doubango/bindings/java/android/tsip_subscribe_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/tsip_subscribe_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/twrap_media_type_t.java b/branches/2.0/doubango/bindings/java/android/twrap_media_type_t.java index 449d405a..c70e6c96 100644 --- a/branches/2.0/doubango/bindings/java/android/twrap_media_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/twrap_media_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/twrap_proxy_plugin_type_t.java b/branches/2.0/doubango/bindings/java/android/twrap_proxy_plugin_type_t.java index cdaf0dcd..bc0421bf 100644 --- a/branches/2.0/doubango/bindings/java/android/twrap_proxy_plugin_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/twrap_proxy_plugin_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/twrap_rpmessage_type_t.java b/branches/2.0/doubango/bindings/java/android/twrap_rpmessage_type_t.java index 3785e246..f8ed86a3 100644 --- a/branches/2.0/doubango/bindings/java/android/twrap_rpmessage_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/twrap_rpmessage_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/android/twrap_sms_type_t.java b/branches/2.0/doubango/bindings/java/android/twrap_sms_type_t.java index 4260cc79..dde6e1b6 100644 --- a/branches/2.0/doubango/bindings/java/android/twrap_sms_type_t.java +++ b/branches/2.0/doubango/bindings/java/android/twrap_sms_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tdav_codec_id_t.java b/branches/2.0/doubango/bindings/java/tdav_codec_id_t.java index 48275e5a..0498e051 100644 --- a/branches/2.0/doubango/bindings/java/tdav_codec_id_t.java +++ b/branches/2.0/doubango/bindings/java/tdav_codec_id_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -33,7 +33,8 @@ public enum tdav_codec_id_t { tdav_codec_id_h264_bp20(0x00010000 << 5), tdav_codec_id_h264_bp30(0x00010000 << 6), tdav_codec_id_theora(0x00010000 << 7), - tdav_codec_id_mp4ves_es(0x00010000 << 8); + tdav_codec_id_mp4ves_es(0x00010000 << 8), + tdav_codec_id_vp8(0x00010000 << 9); public final int swigValue() { return swigValue; diff --git a/branches/2.0/doubango/bindings/java/thttp_event_type_t.java b/branches/2.0/doubango/bindings/java/thttp_event_type_t.java index d4f15f20..de06855b 100644 --- a/branches/2.0/doubango/bindings/java/thttp_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/thttp_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tinyWRAP.java b/branches/2.0/doubango/bindings/java/tinyWRAP.java index 71d240c5..d10c59ad 100644 --- a/branches/2.0/doubango/bindings/java/tinyWRAP.java +++ b/branches/2.0/doubango/bindings/java/tinyWRAP.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tinyWRAPConstants.java b/branches/2.0/doubango/bindings/java/tinyWRAPConstants.java index b3a5149e..1c7f7324 100644 --- a/branches/2.0/doubango/bindings/java/tinyWRAPConstants.java +++ b/branches/2.0/doubango/bindings/java/tinyWRAPConstants.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tinyWRAPJNI.java b/branches/2.0/doubango/bindings/java/tinyWRAPJNI.java index 5e3b0ab6..a44d7a50 100644 --- a/branches/2.0/doubango/bindings/java/tinyWRAPJNI.java +++ b/branches/2.0/doubango/bindings/java/tinyWRAPJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -8,7 +8,7 @@ package org.doubango.tinyWRAP; -public class tinyWRAPJNI { +class tinyWRAPJNI { public final static native long new_DDebugCallback(); public final static native void delete_DDebugCallback(long jarg1); public final static native int DDebugCallback_OnDebugInfo(long jarg1, DDebugCallback jarg1_, String jarg2); @@ -500,28 +500,28 @@ public class tinyWRAPJNI { public final static native int MsrpCallback_OnEventSwigExplicitMsrpCallback(long jarg1, MsrpCallback jarg1_, long jarg2, MsrpEvent jarg2_); public final static native void MsrpCallback_director_connect(MsrpCallback obj, long cptr, boolean mem_own, boolean weak_global); public final static native void MsrpCallback_change_ownership(MsrpCallback obj, long cptr, boolean take_or_release); - public final static native long MediaContentCPIM_SWIGUpcast(long jarg1); - public final static native long DialogEvent_SWIGUpcast(long jarg1); - public final static native long StackEvent_SWIGUpcast(long jarg1); - public final static native long InviteEvent_SWIGUpcast(long jarg1); - public final static native long MessagingEvent_SWIGUpcast(long jarg1); - public final static native long OptionsEvent_SWIGUpcast(long jarg1); - public final static native long PublicationEvent_SWIGUpcast(long jarg1); - public final static native long RegistrationEvent_SWIGUpcast(long jarg1); - public final static native long SubscriptionEvent_SWIGUpcast(long jarg1); - public final static native long InviteSession_SWIGUpcast(long jarg1); - public final static native long CallSession_SWIGUpcast(long jarg1); - public final static native long MsrpSession_SWIGUpcast(long jarg1); - public final static native long MessagingSession_SWIGUpcast(long jarg1); - public final static native long OptionsSession_SWIGUpcast(long jarg1); - public final static native long PublicationSession_SWIGUpcast(long jarg1); - public final static native long RegistrationSession_SWIGUpcast(long jarg1); - public final static native long SubscriptionSession_SWIGUpcast(long jarg1); - public final static native long ProxyAudioConsumer_SWIGUpcast(long jarg1); - public final static native long ProxyVideoConsumer_SWIGUpcast(long jarg1); - public final static native long ProxyAudioProducer_SWIGUpcast(long jarg1); - public final static native long ProxyVideoProducer_SWIGUpcast(long jarg1); - public final static native long SipStack_SWIGUpcast(long jarg1); + public final static native long SWIGMediaContentCPIMUpcast(long jarg1); + public final static native long SWIGDialogEventUpcast(long jarg1); + public final static native long SWIGStackEventUpcast(long jarg1); + public final static native long SWIGInviteEventUpcast(long jarg1); + public final static native long SWIGMessagingEventUpcast(long jarg1); + public final static native long SWIGOptionsEventUpcast(long jarg1); + public final static native long SWIGPublicationEventUpcast(long jarg1); + public final static native long SWIGRegistrationEventUpcast(long jarg1); + public final static native long SWIGSubscriptionEventUpcast(long jarg1); + public final static native long SWIGInviteSessionUpcast(long jarg1); + public final static native long SWIGCallSessionUpcast(long jarg1); + public final static native long SWIGMsrpSessionUpcast(long jarg1); + public final static native long SWIGMessagingSessionUpcast(long jarg1); + public final static native long SWIGOptionsSessionUpcast(long jarg1); + public final static native long SWIGPublicationSessionUpcast(long jarg1); + public final static native long SWIGRegistrationSessionUpcast(long jarg1); + public final static native long SWIGSubscriptionSessionUpcast(long jarg1); + public final static native long SWIGProxyAudioConsumerUpcast(long jarg1); + public final static native long SWIGProxyVideoConsumerUpcast(long jarg1); + public final static native long SWIGProxyAudioProducerUpcast(long jarg1); + public final static native long SWIGProxyVideoProducerUpcast(long jarg1); + public final static native long SWIGSipStackUpcast(long jarg1); public static int SwigDirector_DDebugCallback_OnDebugInfo(DDebugCallback self, String message) { return self.OnDebugInfo(message); diff --git a/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.cxx b/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.cxx index 1e9312fc..a7c079ac 100644 --- a/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.cxx +++ b/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,114 +35,114 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + /* Fix for jlong on some versions of gcc on Windows */ @@ -193,8 +193,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } - }; + { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) @@ -211,199 +210,200 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else -/* ----------------------------------------------------------------------------- - * director.swg - * - * This file contains support for director classes that proxy - * method calls from C++ to Java extensions. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus - -#if defined(DEBUG_DIRECTOR_OWNED) -#include -#endif - +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes that proxy + * method calls from C++ to Java extensions. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus + +#if defined(DEBUG_DIRECTOR_OWNED) +#include +#endif + +namespace Swig { + /* Java object wrapper */ + class JObjectWrapper { + public: + JObjectWrapper() : jthis_(NULL), weak_global_(true) { + } + + ~JObjectWrapper() { + jthis_ = NULL; + weak_global_ = true; + } + + bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) { + if (!jthis_) { + weak_global_ = weak_global; + if (jobj) + jthis_ = ((weak_global_ || !mem_own) ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj)); +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> " << jthis_ << std::endl; +#endif + return true; + } else { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> already set" << std::endl; +#endif + return false; + } + } + + jobject get(JNIEnv *jenv) const { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::get("; + if (jthis_) + std::cout << jthis_; + else + std::cout << "null"; + std::cout << ") -> return new local ref" << std::endl; +#endif + return (jthis_ ? jenv->NewLocalRef(jthis_) : jthis_); + } + + void release(JNIEnv *jenv) { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl; +#endif + if (jthis_) { + if (weak_global_) { + if (jenv->IsSameObject(jthis_, NULL) == JNI_FALSE) + jenv->DeleteWeakGlobalRef((jweak)jthis_); + } else + jenv->DeleteGlobalRef(jthis_); + } + + jthis_ = NULL; + weak_global_ = true; + } + + jobject peek() { + return jthis_; + } + + /* Java proxy releases ownership of C++ object, C++ object is now + responsible for destruction (creates NewGlobalRef to pin Java + proxy) */ + void java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { + if (take_or_release) { /* Java takes ownership of C++ object's lifetime. */ + if (!weak_global_) { + jenv->DeleteGlobalRef(jthis_); + jthis_ = jenv->NewWeakGlobalRef(jself); + weak_global_ = true; + } + } else { /* Java releases ownership of C++ object's lifetime */ + if (weak_global_) { + jenv->DeleteWeakGlobalRef((jweak)jthis_); + jthis_ = jenv->NewGlobalRef(jself); + weak_global_ = false; + } + } + } + + private: + /* pointer to Java object */ + jobject jthis_; + /* Local or global reference flag */ + bool weak_global_; + }; + + /* director base class */ + class Director { + /* pointer to Java virtual machine */ + JavaVM *swig_jvm_; + + protected: +#if defined (_MSC_VER) && (_MSC_VER<1300) + class JNIEnvWrapper; + friend class JNIEnvWrapper; +#endif + /* Utility class for managing the JNI environment */ + class JNIEnvWrapper { + const Director *director_; + JNIEnv *jenv_; + public: + JNIEnvWrapper(const Director *director) : director_(director), jenv_(0) { +#if defined(SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON) + // Attach a daemon thread to the JVM. Useful when the JVM should not wait for + // the thread to exit upon shutdown. Only for jdk-1.4 and later. + director_->swig_jvm_->AttachCurrentThreadAsDaemon((void **) &jenv_, NULL); +#else + director_->swig_jvm_->AttachCurrentThread((void **) &jenv_, NULL); +#endif + } + ~JNIEnvWrapper() { +#if !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD) + // Some JVMs, eg jdk-1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call. + // However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak. + director_->swig_jvm_->DetachCurrentThread(); +#endif + } + JNIEnv *getJNIEnv() const { + return jenv_; + } + }; + + /* Java object wrapper */ + JObjectWrapper swig_self_; + + /* Disconnect director from Java object */ + void swig_disconnect_director_self(const char *disconn_method) { + JNIEnvWrapper jnienv(this) ; + JNIEnv *jenv = jnienv.getJNIEnv() ; + jobject jobj = swig_self_.peek(); +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "Swig::Director::disconnect_director_self(" << jobj << ")" << std::endl; +#endif + if (jobj && jenv->IsSameObject(jobj, NULL) == JNI_FALSE) { + jmethodID disconn_meth = jenv->GetMethodID(jenv->GetObjectClass(jobj), disconn_method, "()V"); + if (disconn_meth) { +#if defined(DEBUG_DIRECTOR_OWNED) + std::cout << "Swig::Director::disconnect_director_self upcall to " << disconn_method << std::endl; +#endif + jenv->CallVoidMethod(jobj, disconn_meth); + } + } + } + + public: + Director(JNIEnv *jenv) : swig_jvm_((JavaVM *) NULL), swig_self_() { + /* Acquire the Java VM pointer */ + jenv->GetJavaVM(&swig_jvm_); + } + + virtual ~Director() { + JNIEnvWrapper jnienv(this) ; + JNIEnv *jenv = jnienv.getJNIEnv() ; + swig_self_.release(jenv); + } + + bool swig_set_self(JNIEnv *jenv, jobject jself, bool mem_own, bool weak_global) { + return swig_self_.set(jenv, jself, mem_own, weak_global); + } + + jobject swig_get_self(JNIEnv *jenv) const { + return swig_self_.get(jenv); + } + + // Change C++ object's ownership, relative to Java + void swig_java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { + swig_self_.java_change_ownership(jenv, jself, take_or_release); + } + }; +} + +#endif /* __cplusplus */ + + namespace Swig { - /* Java object wrapper */ - class JObjectWrapper { - public: - JObjectWrapper() : jthis_(NULL), weak_global_(true) { - } - - ~JObjectWrapper() { - jthis_ = NULL; - weak_global_ = true; - } - - bool set(JNIEnv *jenv, jobject jobj, bool mem_own, bool weak_global) { - if (!jthis_) { - weak_global_ = weak_global; - if (jobj) - jthis_ = ((weak_global_ || !mem_own) ? jenv->NewWeakGlobalRef(jobj) : jenv->NewGlobalRef(jobj)); -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> " << jthis_ << std::endl; -#endif - return true; - } else { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::set(" << jobj << ", " << (weak_global ? "weak_global" : "global_ref") << ") -> already set" << std::endl; -#endif - return false; - } - } - - jobject get(JNIEnv *jenv) const { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::get("; - if (jthis_) - std::cout << jthis_; - else - std::cout << "null"; - std::cout << ") -> return new local ref" << std::endl; -#endif - return (jthis_ ? jenv->NewLocalRef(jthis_) : jthis_); - } - - void release(JNIEnv *jenv) { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "JObjectWrapper::release(" << jthis_ << "): " << (weak_global_ ? "weak global ref" : "global ref") << std::endl; -#endif - if (jthis_) { - if (weak_global_) { - if (jenv->IsSameObject(jthis_, NULL) == JNI_FALSE) - jenv->DeleteWeakGlobalRef((jweak)jthis_); - } else - jenv->DeleteGlobalRef(jthis_); - } - - jthis_ = NULL; - weak_global_ = true; - } - - jobject peek() { - return jthis_; - } - - /* Java proxy releases ownership of C++ object, C++ object is now - responsible for destruction (creates NewGlobalRef to pin Java - proxy) */ - void java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { - if (take_or_release) { /* Java takes ownership of C++ object's lifetime. */ - if (!weak_global_) { - jenv->DeleteGlobalRef(jthis_); - jthis_ = jenv->NewWeakGlobalRef(jself); - weak_global_ = true; - } - } else { /* Java releases ownership of C++ object's lifetime */ - if (weak_global_) { - jenv->DeleteWeakGlobalRef((jweak)jthis_); - jthis_ = jenv->NewGlobalRef(jself); - weak_global_ = false; - } - } - } - - private: - /* pointer to Java object */ - jobject jthis_; - /* Local or global reference flag */ - bool weak_global_; - }; - - /* director base class */ - class Director { - /* pointer to Java virtual machine */ - JavaVM *swig_jvm_; - - protected: -#if defined (_MSC_VER) && (_MSC_VER<1300) - class JNIEnvWrapper; - friend class JNIEnvWrapper; -#endif - /* Utility class for managing the JNI environment */ - class JNIEnvWrapper { - const Director *director_; - JNIEnv *jenv_; - public: - JNIEnvWrapper(const Director *director) : director_(director), jenv_(0) { -#if defined(SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON) - // Attach a daemon thread to the JVM. Useful when the JVM should not wait for - // the thread to exit upon shutdown. Only for jdk-1.4 and later. - director_->swig_jvm_->AttachCurrentThreadAsDaemon((void **) &jenv_, NULL); -#else - director_->swig_jvm_->AttachCurrentThread((void **) &jenv_, NULL); -#endif - } - ~JNIEnvWrapper() { -#if !defined(SWIG_JAVA_NO_DETACH_CURRENT_THREAD) - // Some JVMs, eg jdk-1.4.2 and lower on Solaris have a bug and crash with the DetachCurrentThread call. - // However, without this call, the JVM hangs on exit when the thread was not created by the JVM and creates a memory leak. - director_->swig_jvm_->DetachCurrentThread(); -#endif - } - JNIEnv *getJNIEnv() const { - return jenv_; - } - }; - - /* Java object wrapper */ - JObjectWrapper swig_self_; - - /* Disconnect director from Java object */ - void swig_disconnect_director_self(const char *disconn_method) { - JNIEnvWrapper jnienv(this) ; - JNIEnv *jenv = jnienv.getJNIEnv() ; - jobject jobj = swig_self_.peek(); -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "Swig::Director::disconnect_director_self(" << jobj << ")" << std::endl; -#endif - if (jobj && jenv->IsSameObject(jobj, NULL) == JNI_FALSE) { - jmethodID disconn_meth = jenv->GetMethodID(jenv->GetObjectClass(jobj), disconn_method, "()V"); - if (disconn_meth) { -#if defined(DEBUG_DIRECTOR_OWNED) - std::cout << "Swig::Director::disconnect_director_self upcall to " << disconn_method << std::endl; -#endif - jenv->CallVoidMethod(jobj, disconn_meth); - } - } - } - - public: - Director(JNIEnv *jenv) : swig_jvm_((JavaVM *) NULL), swig_self_() { - /* Acquire the Java VM pointer */ - jenv->GetJavaVM(&swig_jvm_); - } - - virtual ~Director() { - JNIEnvWrapper jnienv(this) ; - JNIEnv *jenv = jnienv.getJNIEnv() ; - swig_self_.release(jenv); - } - - bool swig_set_self(JNIEnv *jenv, jobject jself, bool mem_own, bool weak_global) { - return swig_self_.set(jenv, jself, mem_own, weak_global); - } - - jobject swig_get_self(JNIEnv *jenv) const { - return swig_self_.get(jenv); - } - - // Change C++ object's ownership, relative to Java - void swig_java_change_ownership(JNIEnv *jenv, jobject jself, bool take_or_release) { - swig_self_.java_change_ownership(jenv, jself, take_or_release); - } - }; -} - -#endif /* __cplusplus */ - - -namespace Swig { - namespace { - jclass jclass_tinyWRAPJNI = NULL; - jmethodID director_methids[34]; - } + static jclass jclass_tinyWRAPJNI = NULL; + static jmethodID director_methids[34]; } #include // Use the C99 official header @@ -2712,7 +2712,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContent_1 (void)jarg1_; arg1 = *(MediaContent **)&jarg1; result = (char *)(arg1)->getType(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -2894,7 +2894,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContentCP if (!arg2) return 0; } result = (char *)(arg1)->getHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); return jresult; } @@ -2999,7 +2999,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getSch (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getScheme(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3014,7 +3014,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getHos (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getHost(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3044,7 +3044,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getUse (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getUserName(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3059,7 +3059,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getPas (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getPassword(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3074,7 +3074,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getDis (void)jarg1_; arg1 = *(SipUri **)&jarg1; result = (char *)(arg1)->getDisplayName(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -3095,7 +3095,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipUri_1getPar if (!arg2) return 0; } result = (char *)(arg1)->getParamValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); return jresult; } @@ -3161,7 +3161,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SdpMessage_1ge arg3 = (char)jarg3; arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getSdpHeaderValue((char const *)arg2,arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3186,7 +3186,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SdpMessage_1ge } arg3 = (char)jarg3; result = (char *)(arg1)->getSdpHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3215,7 +3215,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SdpMessage_1ge if (!arg3) return 0; } result = (char *)(arg1)->getSdpHeaderAValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -3293,7 +3293,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg3 = (unsigned int)jarg3; result = (char *)(arg1)->getSipHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3316,7 +3316,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg2) return 0; } result = (char *)(arg1)->getSipHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -3347,7 +3347,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge } arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -3377,7 +3377,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipMessage_1ge if (!arg3) return 0; } result = (char *)(arg1)->getSipHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -3471,7 +3471,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipEvent_1getP (void)jarg1_; arg1 = *(SipEvent **)&jarg1; result = (char *)((SipEvent const *)arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -8586,7 +8586,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1dnsE if (!arg4) return 0; } result = (char *)(arg1)->dnsENUM((char const *)arg2,(char const *)arg3,(char const *)arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4); @@ -8630,7 +8630,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1dnsN arg4 = &temp4; } result = (char *)(arg1)->dnsNaptrSrv((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); { jint jvalue = (jint)temp4; jenv->SetIntArrayRegion(jarg4, 0, 1, &jvalue); @@ -8672,7 +8672,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1dnsS arg3 = &temp3; } result = (char *)(arg1)->dnsSrv((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); { jint jvalue = (jint)temp3; jenv->SetIntArrayRegion(jarg3, 0, 1, &jvalue); @@ -8713,7 +8713,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1getL arg3 = &temp3; } result = (char *)(arg1)->getLocalIPnPort((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); { jint jvalue = (jint)temp3; jenv->SetIntArrayRegion(jarg3, 0, 1, &jvalue); @@ -8735,7 +8735,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1getP (void)jarg1_; arg1 = *(SipStack **)&jarg1; result = (char *)(arg1)->getPreferredIdentity(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); delete [] result; return jresult; } @@ -9043,7 +9043,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapSelector_1 (void)jarg1_; arg1 = *(XcapSelector **)&jarg1; result = (char *)(arg1)->getString(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); delete [] result; return jresult; } @@ -9107,7 +9107,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g (void)jarg1_; arg1 = *(XcapMessage **)&jarg1; result = (char *)((XcapMessage const *)arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -9130,7 +9130,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g } arg3 = (unsigned int)jarg3; result = (char *)(arg1)->getXcapHeaderValue((char const *)arg2,arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -9153,7 +9153,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g if (!arg2) return 0; } result = (char *)(arg1)->getXcapHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -9184,7 +9184,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g } arg4 = (unsigned int)jarg4; result = (char *)(arg1)->getXcapHeaderParamValue((char const *)arg2,(char const *)arg3,arg4); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -9214,7 +9214,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_XcapMessage_1g if (!arg3) return 0; } result = (char *)(arg1)->getXcapHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -10049,7 +10049,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SMSData_1getOA (void)jarg1_; arg1 = *(SMSData **)&jarg1; result = (char *)(arg1)->getOA(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -10064,7 +10064,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SMSData_1getDA (void)jarg1_; arg1 = *(SMSData **)&jarg1; result = (char *)(arg1)->getDA(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -10291,7 +10291,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1g (void)jarg1_; arg1 = *(MsrpMessage **)&jarg1; result = (char *)(arg1)->getPhrase(); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -10422,7 +10422,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1g if (!arg2) return 0; } result = (char *)(arg1)->getMsrpHeaderValue((char const *)arg2); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); delete [] result; return jresult; @@ -10451,7 +10451,7 @@ SWIGEXPORT jstring JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpMessage_1g if (!arg3) return 0; } result = (char *)(arg1)->getMsrpHeaderParamValue((char const *)arg2,(char const *)arg3); - if (result) jresult = jenv->NewStringUTF((const char *)result); + if(result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3); delete [] result; @@ -10628,7 +10628,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpCallback_1cha } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContentCPIM_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMediaContentCPIMUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10636,7 +10636,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MediaContentCPIM return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DialogEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGDialogEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10644,7 +10644,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_DialogEvent_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_StackEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGStackEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10652,7 +10652,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_StackEvent_1SWIG return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInviteEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10660,7 +10660,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteEvent_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10668,7 +10668,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingEvent_1 return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10676,7 +10676,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsEvent_1SW return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGPublicationEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10684,7 +10684,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationEvent return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGRegistrationEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10692,7 +10692,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationEven return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEvent_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSubscriptionEventUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10700,7 +10700,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionEven return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGInviteSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10708,7 +10708,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_InviteSession_1S return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGCallSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10716,7 +10716,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_CallSession_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMsrpSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10724,7 +10724,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MsrpSession_1SWI return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGMessagingSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10732,7 +10732,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_MessagingSession return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGOptionsSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10740,7 +10740,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_OptionsSession_1 return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGPublicationSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10748,7 +10748,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_PublicationSessi return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGRegistrationSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10756,7 +10756,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_RegistrationSess return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionSession_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSubscriptionSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10764,7 +10764,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SubscriptionSess return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsumer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyAudioConsumerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10772,7 +10772,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioConsum return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoConsumer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyVideoConsumerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10780,7 +10780,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoConsum return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyAudioProducerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10788,7 +10788,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProduc return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGProxyVideoProducerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; @@ -10796,7 +10796,7 @@ SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProduc return baseptr; } -SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SipStack_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { +SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_SWIGSipStackUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) { jlong baseptr = 0; (void)jenv; (void)jcls; diff --git a/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.h b/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.h index b0be5623..ec1fb642 100644 --- a/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.h +++ b/branches/2.0/doubango/bindings/java/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make diff --git a/branches/2.0/doubango/bindings/java/tmedia_bandwidth_level_t.java b/branches/2.0/doubango/bindings/java/tmedia_bandwidth_level_t.java index 9f0259a8..46a2fe37 100644 --- a/branches/2.0/doubango/bindings/java/tmedia_bandwidth_level_t.java +++ b/branches/2.0/doubango/bindings/java/tmedia_bandwidth_level_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tmedia_chroma_t.java b/branches/2.0/doubango/bindings/java/tmedia_chroma_t.java index a9750744..18fbb979 100644 --- a/branches/2.0/doubango/bindings/java/tmedia_chroma_t.java +++ b/branches/2.0/doubango/bindings/java/tmedia_chroma_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tmedia_qos_strength_t.java b/branches/2.0/doubango/bindings/java/tmedia_qos_strength_t.java index cca89686..5bd80172 100644 --- a/branches/2.0/doubango/bindings/java/tmedia_qos_strength_t.java +++ b/branches/2.0/doubango/bindings/java/tmedia_qos_strength_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tmedia_qos_stype_t.java b/branches/2.0/doubango/bindings/java/tmedia_qos_stype_t.java index d8b31061..e81416e0 100644 --- a/branches/2.0/doubango/bindings/java/tmedia_qos_stype_t.java +++ b/branches/2.0/doubango/bindings/java/tmedia_qos_stype_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tmsrp_event_type_t.java b/branches/2.0/doubango/bindings/java/tmsrp_event_type_t.java index 7e924e3c..c849e756 100644 --- a/branches/2.0/doubango/bindings/java/tmsrp_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tmsrp_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tmsrp_request_type_t.java b/branches/2.0/doubango/bindings/java/tmsrp_request_type_t.java index 9605705a..5c0d6914 100644 --- a/branches/2.0/doubango/bindings/java/tmsrp_request_type_t.java +++ b/branches/2.0/doubango/bindings/java/tmsrp_request_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tsip_event_type_t.java b/branches/2.0/doubango/bindings/java/tsip_event_type_t.java index 628eb74a..6527ee1e 100644 --- a/branches/2.0/doubango/bindings/java/tsip_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tsip_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tsip_invite_event_type_t.java b/branches/2.0/doubango/bindings/java/tsip_invite_event_type_t.java index c4698a6c..4567c5ac 100644 --- a/branches/2.0/doubango/bindings/java/tsip_invite_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tsip_invite_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tsip_message_event_type_t.java b/branches/2.0/doubango/bindings/java/tsip_message_event_type_t.java index c6c8c35b..280845ac 100644 --- a/branches/2.0/doubango/bindings/java/tsip_message_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tsip_message_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tsip_options_event_type_t.java b/branches/2.0/doubango/bindings/java/tsip_options_event_type_t.java index afc3af91..70166763 100644 --- a/branches/2.0/doubango/bindings/java/tsip_options_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tsip_options_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tsip_publish_event_type_t.java b/branches/2.0/doubango/bindings/java/tsip_publish_event_type_t.java index fb935135..a9ec14a0 100644 --- a/branches/2.0/doubango/bindings/java/tsip_publish_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tsip_publish_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tsip_register_event_type_t.java b/branches/2.0/doubango/bindings/java/tsip_register_event_type_t.java index 21531bbf..298204e0 100644 --- a/branches/2.0/doubango/bindings/java/tsip_register_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tsip_register_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/tsip_subscribe_event_type_t.java b/branches/2.0/doubango/bindings/java/tsip_subscribe_event_type_t.java index 623d98f0..5091b658 100644 --- a/branches/2.0/doubango/bindings/java/tsip_subscribe_event_type_t.java +++ b/branches/2.0/doubango/bindings/java/tsip_subscribe_event_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/twrap_media_type_t.java b/branches/2.0/doubango/bindings/java/twrap_media_type_t.java index 449d405a..c70e6c96 100644 --- a/branches/2.0/doubango/bindings/java/twrap_media_type_t.java +++ b/branches/2.0/doubango/bindings/java/twrap_media_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/twrap_proxy_plugin_type_t.java b/branches/2.0/doubango/bindings/java/twrap_proxy_plugin_type_t.java index cdaf0dcd..bc0421bf 100644 --- a/branches/2.0/doubango/bindings/java/twrap_proxy_plugin_type_t.java +++ b/branches/2.0/doubango/bindings/java/twrap_proxy_plugin_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/twrap_rpmessage_type_t.java b/branches/2.0/doubango/bindings/java/twrap_rpmessage_type_t.java index 3785e246..f8ed86a3 100644 --- a/branches/2.0/doubango/bindings/java/twrap_rpmessage_type_t.java +++ b/branches/2.0/doubango/bindings/java/twrap_rpmessage_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/java/twrap_sms_type_t.java b/branches/2.0/doubango/bindings/java/twrap_sms_type_t.java index 4260cc79..dde6e1b6 100644 --- a/branches/2.0/doubango/bindings/java/twrap_sms_type_t.java +++ b/branches/2.0/doubango/bindings/java/twrap_sms_type_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/branches/2.0/doubango/bindings/perl/tinyWRAP.pm b/branches/2.0/doubango/bindings/perl/tinyWRAP.pm index 883c2b34..88b82c3a 100644 --- a/branches/2.0/doubango/bindings/perl/tinyWRAP.pm +++ b/branches/2.0/doubango/bindings/perl/tinyWRAP.pm @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 2.0.2 +# Version 1.3.39 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -2306,6 +2306,7 @@ package tinyWRAP; *tdav_codec_id_h264_bp30 = *tinyWRAPc::tdav_codec_id_h264_bp30; *tdav_codec_id_theora = *tinyWRAPc::tdav_codec_id_theora; *tdav_codec_id_mp4ves_es = *tinyWRAPc::tdav_codec_id_mp4ves_es; +*tdav_codec_id_vp8 = *tinyWRAPc::tdav_codec_id_vp8; *thttp_event_dialog_started = *tinyWRAPc::thttp_event_dialog_started; *thttp_event_message = *tinyWRAPc::thttp_event_message; *thttp_event_auth_failed = *tinyWRAPc::thttp_event_auth_failed; diff --git a/branches/2.0/doubango/bindings/perl/tinyWRAP_wrap.cxx b/branches/2.0/doubango/bindings/perl/tinyWRAP_wrap.cxx index 666f0233..b60bf340 100644 --- a/branches/2.0/doubango/bindings/perl/tinyWRAP_wrap.cxx +++ b/branches/2.0/doubango/bindings/perl/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -35,1478 +35,1455 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -#ifdef __cplusplus -/* Needed on some windows machines---since MS plays funny games with the header files under C++ */ -#include -#include -extern "C" { -#endif -#include "EXTERN.h" -#include "perl.h" -#include "XSUB.h" - -/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ - -/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ -#ifndef PERL_REVISION -# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) -# define PERL_PATCHLEVEL_H_IMPLICIT -# include -# endif -# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) -# include -# endif -# ifndef PERL_REVISION -# define PERL_REVISION (5) -# define PERL_VERSION PATCHLEVEL -# define PERL_SUBVERSION SUBVERSION -# endif -#endif - -#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) -#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) -#endif - -#ifndef SvIOK_UV -# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) -#endif - -#ifndef SvUOK -# define SvUOK(sv) SvIOK_UV(sv) -#endif - -#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) -# define PL_sv_undef sv_undef -# define PL_na na -# define PL_errgv errgv -# define PL_sv_no sv_no -# define PL_sv_yes sv_yes -# define PL_markstack_ptr markstack_ptr -#endif - -#ifndef IVSIZE -# ifdef LONGSIZE -# define IVSIZE LONGSIZE -# else -# define IVSIZE 4 /* A bold guess, but the best we can make. */ -# endif -#endif - -#ifndef INT2PTR -# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) -# define PTRV UV -# define INT2PTR(any,d) (any)(d) -# else -# if PTRSIZE == LONGSIZE -# define PTRV unsigned long -# else -# define PTRV unsigned -# endif -# define INT2PTR(any,d) (any)(PTRV)(d) -# endif - -# define NUM2PTR(any,d) (any)(PTRV)(d) -# define PTR2IV(p) INT2PTR(IV,p) -# define PTR2UV(p) INT2PTR(UV,p) -# define PTR2NV(p) NUM2PTR(NV,p) - -# if PTRSIZE == LONGSIZE -# define PTR2ul(p) (unsigned long)(p) -# else -# define PTR2ul(p) INT2PTR(unsigned long,p) -# endif -#endif /* !INT2PTR */ - -#ifndef SvPV_nolen -# define SvPV_nolen(x) SvPV(x,PL_na) -#endif - -#ifndef get_sv -# define get_sv perl_get_sv -#endif - -#ifndef ERRSV -# define ERRSV get_sv("@",FALSE) -#endif - -#ifndef pTHX_ -#define pTHX_ -#endif - -#include -#ifdef __cplusplus -} -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGINTERN const char* -SWIG_Perl_ErrorType(int code) { - const char* type = 0; - switch(code) { - case SWIG_MemoryError: - type = "MemoryError"; - break; - case SWIG_IOError: - type = "IOError"; - break; - case SWIG_RuntimeError: - type = "RuntimeError"; - break; - case SWIG_IndexError: - type = "IndexError"; - break; - case SWIG_TypeError: - type = "TypeError"; - break; - case SWIG_DivisionByZero: - type = "ZeroDivisionError"; - break; - case SWIG_OverflowError: - type = "OverflowError"; - break; - case SWIG_SyntaxError: - type = "SyntaxError"; - break; - case SWIG_ValueError: - type = "ValueError"; - break; - case SWIG_SystemError: - type = "SystemError"; - break; - case SWIG_AttributeError: - type = "AttributeError"; - break; - default: - type = "RuntimeError"; - } - return type; -} - - - - -/* ----------------------------------------------------------------------------- - * perlrun.swg - * - * This file contains the runtime support for Perl modules - * and includes code for managing global variables and pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -#ifdef PERL_OBJECT -#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), -#define SWIG_PERL_OBJECT_CALL pPerl, -#else -#define SWIG_PERL_OBJECT_DECL -#define SWIG_PERL_OBJECT_CALL -#endif - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) -#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own) -#define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) -#define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() -#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) - - -/* Error manipulation */ - -#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) -#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - -/* Perl-specific SWIG API */ - -#define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) -#define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) -#define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) - - -#define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) -#define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) -#define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) -#define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -/* For backward compatibility only */ -#define SWIG_POINTER_EXCEPTION 0 - -#ifdef __cplusplus -extern "C" { -#endif - -#define SWIG_OWNER SWIG_POINTER_OWN -#define SWIG_SHADOW SWIG_OWNER << 1 - -#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL - -/* SWIG Perl macros */ - -/* Macro to declare an XS function */ -#ifndef XSPROTO -# define XSPROTO(name) void name(pTHX_ CV* cv) -#endif - -/* Macro to call an XS function */ -#ifdef PERL_OBJECT -# define SWIG_CALLXS(_name) _name(cv,pPerl) -#else -# ifndef MULTIPLICITY -# define SWIG_CALLXS(_name) _name(cv) -# else -# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) -# endif -#endif - -#ifdef PERL_OBJECT -#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) -#define SWIGCLASS_STATIC - -#else /* PERL_OBJECT */ - -#define MAGIC_PPERL -#define SWIGCLASS_STATIC static SWIGUNUSED - -#ifndef MULTIPLICITY -#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (*SwigMagicFunc)(SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#else /* MULTIPLICITY */ - -#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) - -#ifdef __cplusplus -extern "C" { -#endif -typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); -#ifdef __cplusplus -} -#endif - -#endif /* MULTIPLICITY */ -#endif /* PERL_OBJECT */ - -/* Workaround for bug in perl 5.6.x croak and earlier */ -#if (PERL_VERSION < 8) -# ifdef PERL_OBJECT -# define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) -static void SWIG_Perl_croak_null(CPerlObj *pPerl) -# else -static void SWIG_croak_null() -# endif -{ - SV *err=ERRSV; -# if (PERL_VERSION < 6) - croak("%_", err); -# else - if (SvOK(err) && !SvROK(err)) croak("%_", err); - croak(Nullch); -# endif -} -#else -# define SWIG_croak_null() croak(Nullch) -#endif - - -/* - Define how strict is the cast between strings and integers/doubles - when overloading between these types occurs. - - The default is making it as strict as possible by using SWIG_AddCast - when needed. - - You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to - disable the SWIG_AddCast, making the casting between string and - numbers less strict. - - In the end, we try to solve the overloading between strings and - numerical types in the more natural way, but if you can avoid it, - well, avoid it using %rename, for example. -*/ -#ifndef SWIG_PERL_NO_STRICT_STR2NUM -# ifndef SWIG_PERL_STRICT_STR2NUM -# define SWIG_PERL_STRICT_STR2NUM -# endif -#endif -#ifdef SWIG_PERL_STRICT_STR2NUM -/* string takes precedence */ -#define SWIG_Str2NumCast(x) SWIG_AddCast(x) -#else -/* number takes precedence */ -#define SWIG_Str2NumCast(x) x -#endif - - - -#include - -SWIGRUNTIME const char * -SWIG_Perl_TypeProxyName(const swig_type_info *type) { - if (!type) return NULL; - if (type->clientdata != NULL) { - return (const char*) type->clientdata; - } - else { - return type->name; - } -} - -/* Identical to SWIG_TypeCheck, except for strcmp comparison */ -SWIGRUNTIME swig_cast_info * -SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || - (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* Function for getting a pointer value */ - -SWIGRUNTIME int -SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) { - swig_cast_info *tc; - void *voidptr = (void *)0; - SV *tsv = 0; - - if (own) - *own = 0; - - /* If magical, apply more magic */ - if (SvGMAGICAL(sv)) - mg_get(sv); - - /* Check to see if this is an object */ - if (sv_isobject(sv)) { - IV tmp = 0; - tsv = (SV*) SvRV(sv); - if ((SvTYPE(tsv) == SVt_PVHV)) { - MAGIC *mg; - if (SvMAGICAL(tsv)) { - mg = mg_find(tsv,'P'); - if (mg) { - sv = mg->mg_obj; - if (sv_isobject(sv)) { - tsv = (SV*)SvRV(sv); - tmp = SvIV(tsv); - } - } - } else { - return SWIG_ERROR; - } - } else { - tmp = SvIV(tsv); - } - voidptr = INT2PTR(void *,tmp); - } else if (! SvOK(sv)) { /* Check for undef */ - *(ptr) = (void *) 0; - return SWIG_OK; - } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ - if (!SvROK(sv)) { - *(ptr) = (void *) 0; - return SWIG_OK; - } else { - return SWIG_ERROR; - } - } else { /* Don't know what it is */ - return SWIG_ERROR; - } - if (_t) { - /* Now see if the types match */ - char *_c = HvNAME(SvSTASH(SvRV(sv))); - tc = SWIG_TypeProxyCheck(_c,_t); - if (!tc) { - return SWIG_ERROR; - } - { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - } else { - *ptr = voidptr; - } - - /* - * DISOWN implementation: we need a perl guru to check this one. - */ - if (tsv && (flags & SWIG_POINTER_DISOWN)) { - /* - * almost copy paste code from below SWIG_POINTER_OWN setting - */ - SV *obj = sv; - HV *stash = SvSTASH(SvRV(obj)); - GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE); - if (isGV(gv)) { - HV *hv = GvHVn(gv); - /* - * To set ownership (see below), a newSViv(1) entry is added. - * Hence, to remove ownership, we delete the entry. - */ - if (hv_exists_ent(hv, obj, 0)) { - hv_delete_ent(hv, obj, 0, 0); - } - } - } - return SWIG_OK; -} - -SWIGRUNTIME int -SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { - return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0); -} - -SWIGRUNTIME void -SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { - if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) { - SV *self; - SV *obj=newSV(0); - HV *hash=newHV(); - HV *stash; - sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); - stash=SvSTASH(SvRV(obj)); - if (flags & SWIG_POINTER_OWN) { - HV *hv; - GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE); - if (!isGV(gv)) - gv_init(gv, stash, "OWNER", 5, FALSE); - hv=GvHVn(gv); - hv_store_ent(hv, obj, newSViv(1), 0); - } - sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); - SvREFCNT_dec(obj); - self=newRV_noinc((SV *)hash); - sv_setsv(sv, self); - SvREFCNT_dec((SV *)self); - sv_bless(sv, stash); - } - else { - sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); - } -} - -SWIGRUNTIMEINLINE SV * -SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { - SV *result = sv_newmortal(); - SWIG_MakePtr(result, ptr, t, flags); - return result; -} - -SWIGRUNTIME void -SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { - char result[1024]; - char *r = result; - if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - strcpy(r,SWIG_Perl_TypeProxyName(type)); - sv_setpv(sv, result); -} - -SWIGRUNTIME SV * -SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { - SV *result = sv_newmortal(); - SWIG_Perl_MakePackedObj(result, ptr, sz, type); - return result; -} - -/* Convert a packed value value */ -SWIGRUNTIME int -SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { - swig_cast_info *tc; - const char *c = 0; - - if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; - c = SvPV_nolen(obj); - /* Pointer values must start with leading underscore */ - if (*c != '_') return SWIG_ERROR; - c++; - c = SWIG_UnpackData(c,ptr,sz); - if (ty) { - tc = SWIG_TypeCheck(c,ty); - if (!tc) return SWIG_ERROR; - } - return SWIG_OK; -} - - -/* Macros for low-level exception handling */ -#define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } - - -typedef XSPROTO(SwigPerlWrapper); -typedef SwigPerlWrapper *SwigPerlWrapperPtr; - -/* Structure for command table */ -typedef struct { - const char *name; - SwigPerlWrapperPtr wrapper; -} swig_command_info; - -/* Information for constant table */ - -#define SWIG_INT 1 -#define SWIG_FLOAT 2 -#define SWIG_STRING 3 -#define SWIG_POINTER 4 -#define SWIG_BINARY 5 - -/* Constant information structure */ -typedef struct swig_constant_info { - int type; - const char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_constant_info; - - -/* Structure for variable table */ -typedef struct { - const char *name; - SwigMagicFunc set; - SwigMagicFunc get; - swig_type_info **type; -} swig_variable_info; - -/* Magic variable code */ -#ifndef PERL_OBJECT -#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) - #ifndef MULTIPLICITY - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) - #else - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) - #endif -#else -# define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) -SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) -#endif -{ - MAGIC *mg; - sv_magic(sv,sv,'U',(char *) name,strlen(name)); - mg = mg_find(sv,'U'); - mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); - mg->mg_virtual->svt_get = (SwigMagicFunc) get; - mg->mg_virtual->svt_set = (SwigMagicFunc) set; - mg->mg_virtual->svt_len = 0; - mg->mg_virtual->svt_clear = 0; - mg->mg_virtual->svt_free = 0; -} - - -SWIGRUNTIME swig_module_info * -SWIG_Perl_GetModule(void) { - static void *type_pointer = (void *)0; - SV *pointer; - - /* first check if pointer already created */ - if (!type_pointer) { - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); - if (pointer && SvOK(pointer)) { - type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); - } - } - - return (swig_module_info *) type_pointer; -} - -SWIGRUNTIME void -SWIG_Perl_SetModule(swig_module_info *module) { - SV *pointer; - - /* create a new pointer */ - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); - sv_setiv(pointer, PTR2IV(module)); -} - -#ifdef __cplusplus -} -#endif - -/* Workaround perl5 global namespace pollution. Note that undefining library - * functions like fopen will not solve the problem on all platforms as fopen - * might be a macro on Windows but not necessarily on other operating systems. */ -#ifdef do_open - #undef do_open -#endif -#ifdef do_close - #undef do_close -#endif -#ifdef do_exec - #undef do_exec -#endif -#ifdef scalar - #undef scalar -#endif -#ifdef list - #undef list -#endif -#ifdef apply - #undef apply -#endif -#ifdef convert - #undef convert -#endif -#ifdef Error - #undef Error -#endif -#ifdef form - #undef form -#endif -#ifdef vform - #undef vform -#endif -#ifdef LABEL - #undef LABEL -#endif -#ifdef METHOD - #undef METHOD -#endif -#ifdef Move - #undef Move -#endif -#ifdef yylex - #undef yylex -#endif -#ifdef yyparse - #undef yyparse -#endif -#ifdef yyerror - #undef yyerror -#endif -#ifdef invert - #undef invert -#endif -#ifdef ref - #undef ref -#endif -#ifdef read - #undef read -#endif -#ifdef write - #undef write -#endif -#ifdef eof - #undef eof -#endif -#ifdef bool - #undef bool -#endif -#ifdef close - #undef close -#endif -#ifdef rewind - #undef rewind -#endif -#ifdef free - #undef free -#endif -#ifdef malloc - #undef malloc -#endif -#ifdef calloc - #undef calloc -#endif -#ifdef Stat - #undef Stat -#endif -#ifdef check - #undef check -#endif -#ifdef seekdir - #undef seekdir -#endif -#ifdef open - #undef open -#endif -#ifdef readdir - #undef readdir -#endif -#ifdef bind - #undef bind -#endif -#ifdef access - #undef access -#endif -#ifdef stat - #undef stat -#endif +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +#ifdef __cplusplus +/* Needed on some windows machines---since MS plays funny games with the header files under C++ */ +#include +#include +extern "C" { +#endif +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ + +/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */ +#ifndef PERL_REVISION +# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) +# define PERL_PATCHLEVEL_H_IMPLICIT +# include +# endif +# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) +# include +# endif +# ifndef PERL_REVISION +# define PERL_REVISION (5) +# define PERL_VERSION PATCHLEVEL +# define PERL_SUBVERSION SUBVERSION +# endif +#endif + +#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) +#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) +#endif + +#ifndef SvIOK_UV +# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) +#endif + +#ifndef SvUOK +# define SvUOK(sv) SvIOK_UV(sv) +#endif + +#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))) +# define PL_sv_undef sv_undef +# define PL_na na +# define PL_errgv errgv +# define PL_sv_no sv_no +# define PL_sv_yes sv_yes +# define PL_markstack_ptr markstack_ptr +#endif + +#ifndef IVSIZE +# ifdef LONGSIZE +# define IVSIZE LONGSIZE +# else +# define IVSIZE 4 /* A bold guess, but the best we can make. */ +# endif +#endif + +#ifndef INT2PTR +# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) +# define PTRV UV +# define INT2PTR(any,d) (any)(d) +# else +# if PTRSIZE == LONGSIZE +# define PTRV unsigned long +# else +# define PTRV unsigned +# endif +# define INT2PTR(any,d) (any)(PTRV)(d) +# endif + +# define NUM2PTR(any,d) (any)(PTRV)(d) +# define PTR2IV(p) INT2PTR(IV,p) +# define PTR2UV(p) INT2PTR(UV,p) +# define PTR2NV(p) NUM2PTR(NV,p) + +# if PTRSIZE == LONGSIZE +# define PTR2ul(p) (unsigned long)(p) +# else +# define PTR2ul(p) INT2PTR(unsigned long,p) +# endif +#endif /* !INT2PTR */ + +#ifndef SvPV_nolen +# define SvPV_nolen(x) SvPV(x,PL_na) +#endif + +#ifndef get_sv +# define get_sv perl_get_sv +#endif + +#ifndef ERRSV +# define ERRSV get_sv("@",FALSE) +#endif + +#ifndef pTHX_ +#define pTHX_ +#endif + +#include +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGINTERN const char* +SWIG_Perl_ErrorType(int code) { + const char* type = 0; + switch(code) { + case SWIG_MemoryError: + type = "MemoryError"; + break; + case SWIG_IOError: + type = "IOError"; + break; + case SWIG_RuntimeError: + type = "RuntimeError"; + break; + case SWIG_IndexError: + type = "IndexError"; + break; + case SWIG_TypeError: + type = "TypeError"; + break; + case SWIG_DivisionByZero: + type = "ZeroDivisionError"; + break; + case SWIG_OverflowError: + type = "OverflowError"; + break; + case SWIG_SyntaxError: + type = "SyntaxError"; + break; + case SWIG_ValueError: + type = "ValueError"; + break; + case SWIG_SystemError: + type = "SystemError"; + break; + case SWIG_AttributeError: + type = "AttributeError"; + break; + default: + type = "RuntimeError"; + } + return type; +} + + + + +/* ----------------------------------------------------------------------------- + * perlrun.swg + * + * This file contains the runtime support for Perl modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +#ifdef PERL_OBJECT +#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl), +#define SWIG_PERL_OBJECT_CALL pPerl, +#else +#define SWIG_PERL_OBJECT_DECL +#define SWIG_PERL_OBJECT_CALL +#endif + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) +#define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type) +#define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) +#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + +/* Perl-specific SWIG API */ + +#define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags) +#define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type) +#define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str) + + +#define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1) +#define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1) +#define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2) +#define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2) + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +#ifdef __cplusplus +extern "C" { +#endif + +#define SWIG_OWNER SWIG_POINTER_OWN +#define SWIG_SHADOW SWIG_OWNER << 1 + +#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL + +/* SWIG Perl macros */ + +/* Macro to declare an XS function */ +#ifndef XSPROTO +# define XSPROTO(name) void name(pTHX_ CV* cv) +#endif + +/* Macro to call an XS function */ +#ifdef PERL_OBJECT +# define SWIG_CALLXS(_name) _name(cv,pPerl) +#else +# ifndef MULTIPLICITY +# define SWIG_CALLXS(_name) _name(cv) +# else +# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) +# endif +#endif + +#ifdef PERL_OBJECT +#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) +#define SWIGCLASS_STATIC + +#else /* PERL_OBJECT */ + +#define MAGIC_PPERL +#define SWIGCLASS_STATIC static SWIGUNUSED + +#ifndef MULTIPLICITY +#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#else /* MULTIPLICITY */ + +#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif +typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); +#ifdef __cplusplus +} +#endif + +#endif /* MULTIPLICITY */ +#endif /* PERL_OBJECT */ + +/* Workaround for bug in perl 5.6.x croak and earlier */ +#if (PERL_VERSION < 8) +# ifdef PERL_OBJECT +# define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) +static void SWIG_Perl_croak_null(CPerlObj *pPerl) +# else +static void SWIG_croak_null() +# endif +{ + SV *err=ERRSV; +# if (PERL_VERSION < 6) + croak("%_", err); +# else + if (SvOK(err) && !SvROK(err)) croak("%_", err); + croak(Nullch); +# endif +} +#else +# define SWIG_croak_null() croak(Nullch) +#endif + + +/* + Define how strict is the cast between strings and integers/doubles + when overloading between these types occurs. + + The default is making it as strict as possible by using SWIG_AddCast + when needed. + + You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to + disable the SWIG_AddCast, making the casting between string and + numbers less strict. + + In the end, we try to solve the overloading between strings and + numerical types in the more natural way, but if you can avoid it, + well, avoid it using %rename, for example. +*/ +#ifndef SWIG_PERL_NO_STRICT_STR2NUM +# ifndef SWIG_PERL_STRICT_STR2NUM +# define SWIG_PERL_STRICT_STR2NUM +# endif +#endif +#ifdef SWIG_PERL_STRICT_STR2NUM +/* string takes precedence */ +#define SWIG_Str2NumCast(x) SWIG_AddCast(x) +#else +/* number takes precedence */ +#define SWIG_Str2NumCast(x) x +#endif + + + +#include + +SWIGRUNTIME const char * +SWIG_Perl_TypeProxyName(const swig_type_info *type) { + if (!type) return NULL; + if (type->clientdata != NULL) { + return (const char*) type->clientdata; + } + else { + return type->name; + } +} + +/* Identical to SWIG_TypeCheck, except for strcmp comparison */ +SWIGRUNTIME swig_cast_info * +SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || + (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* Function for getting a pointer value */ + +SWIGRUNTIME int +SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { + swig_cast_info *tc; + void *voidptr = (void *)0; + SV *tsv = 0; + /* If magical, apply more magic */ + if (SvGMAGICAL(sv)) + mg_get(sv); + + /* Check to see if this is an object */ + if (sv_isobject(sv)) { + IV tmp = 0; + tsv = (SV*) SvRV(sv); + if ((SvTYPE(tsv) == SVt_PVHV)) { + MAGIC *mg; + if (SvMAGICAL(tsv)) { + mg = mg_find(tsv,'P'); + if (mg) { + sv = mg->mg_obj; + if (sv_isobject(sv)) { + tsv = (SV*)SvRV(sv); + tmp = SvIV(tsv); + } + } + } else { + return SWIG_ERROR; + } + } else { + tmp = SvIV(tsv); + } + voidptr = INT2PTR(void *,tmp); + } else if (! SvOK(sv)) { /* Check for undef */ + *(ptr) = (void *) 0; + return SWIG_OK; + } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ + if (!SvROK(sv)) { + *(ptr) = (void *) 0; + return SWIG_OK; + } else { + return SWIG_ERROR; + } + } else { /* Don't know what it is */ + return SWIG_ERROR; + } + if (_t) { + /* Now see if the types match */ + char *_c = HvNAME(SvSTASH(SvRV(sv))); + tc = SWIG_TypeProxyCheck(_c,_t); + if (!tc) { + return SWIG_ERROR; + } + { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } + } else { + *ptr = voidptr; + } + + /* + * DISOWN implementation: we need a perl guru to check this one. + */ + if (tsv && (flags & SWIG_POINTER_DISOWN)) { + /* + * almost copy paste code from below SWIG_POINTER_OWN setting + */ + SV *obj = sv; + HV *stash = SvSTASH(SvRV(obj)); + GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); + if (isGV(gv)) { + HV *hv = GvHVn(gv); + /* + * To set ownership (see below), a newSViv(1) entry is added. + * Hence, to remove ownership, we delete the entry. + */ + if (hv_exists_ent(hv, obj, 0)) { + hv_delete_ent(hv, obj, 0, 0); + } + } + } + return SWIG_OK; +} + +SWIGRUNTIME void +SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { + if (ptr && (flags & SWIG_SHADOW)) { + SV *self; + SV *obj=newSV(0); + HV *hash=newHV(); + HV *stash; + sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); + stash=SvSTASH(SvRV(obj)); + if (flags & SWIG_POINTER_OWN) { + HV *hv; + GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); + if (!isGV(gv)) + gv_init(gv, stash, "OWNER", 5, FALSE); + hv=GvHVn(gv); + hv_store_ent(hv, obj, newSViv(1), 0); + } + sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); + SvREFCNT_dec(obj); + self=newRV_noinc((SV *)hash); + sv_setsv(sv, self); + SvREFCNT_dec((SV *)self); + sv_bless(sv, stash); + } + else { + sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); + } +} + +SWIGRUNTIMEINLINE SV * +SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { + SV *result = sv_newmortal(); + SWIG_MakePtr(result, ptr, t, flags); + return result; +} + +SWIGRUNTIME void +SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + strcpy(r,SWIG_Perl_TypeProxyName(type)); + sv_setpv(sv, result); +} + +SWIGRUNTIME SV * +SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { + SV *result = sv_newmortal(); + SWIG_Perl_MakePackedObj(result, ptr, sz, type); + return result; +} + +/* Convert a packed value value */ +SWIGRUNTIME int +SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c = 0; + + if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; + c = SvPV_nolen(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') return SWIG_ERROR; + c++; + c = SWIG_UnpackData(c,ptr,sz); + if (ty) { + tc = SWIG_TypeCheck(c,ty); + if (!tc) return SWIG_ERROR; + } + return SWIG_OK; +} + + +/* Macros for low-level exception handling */ +#define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } + + +typedef XSPROTO(SwigPerlWrapper); +typedef SwigPerlWrapper *SwigPerlWrapperPtr; + +/* Structure for command table */ +typedef struct { + const char *name; + SwigPerlWrapperPtr wrapper; +} swig_command_info; + +/* Information for constant table */ + +#define SWIG_INT 1 +#define SWIG_FLOAT 2 +#define SWIG_STRING 3 +#define SWIG_POINTER 4 +#define SWIG_BINARY 5 + +/* Constant information structure */ +typedef struct swig_constant_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_constant_info; + + +/* Structure for variable table */ +typedef struct { + const char *name; + SwigMagicFunc set; + SwigMagicFunc get; + swig_type_info **type; +} swig_variable_info; + +/* Magic variable code */ +#ifndef PERL_OBJECT +#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) + #ifndef MULTIPLICITY + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) + #else + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) + #endif +#else +# define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) +SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) +#endif +{ + MAGIC *mg; + sv_magic(sv,sv,'U',(char *) name,strlen(name)); + mg = mg_find(sv,'U'); + mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); + mg->mg_virtual->svt_get = (SwigMagicFunc) get; + mg->mg_virtual->svt_set = (SwigMagicFunc) set; + mg->mg_virtual->svt_len = 0; + mg->mg_virtual->svt_clear = 0; + mg->mg_virtual->svt_free = 0; +} + + +SWIGRUNTIME swig_module_info * +SWIG_Perl_GetModule(void) { + static void *type_pointer = (void *)0; + SV *pointer; + + /* first check if pointer already created */ + if (!type_pointer) { + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); + if (pointer && SvOK(pointer)) { + type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); + } + } + + return (swig_module_info *) type_pointer; +} + +SWIGRUNTIME void +SWIG_Perl_SetModule(swig_module_info *module) { + SV *pointer; + + /* create a new pointer */ + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); + sv_setiv(pointer, PTR2IV(module)); +} + +#ifdef __cplusplus +} +#endif + +/* Workaround perl5 global namespace pollution. Note that undefining library + * functions like fopen will not solve the problem on all platforms as fopen + * might be a macro on Windows but not necessarily on other operating systems. */ +#ifdef do_open + #undef do_open +#endif +#ifdef do_close + #undef do_close +#endif +#ifdef scalar + #undef scalar +#endif +#ifdef list + #undef list +#endif +#ifdef apply + #undef apply +#endif +#ifdef convert + #undef convert +#endif +#ifdef Error + #undef Error +#endif +#ifdef form + #undef form +#endif +#ifdef vform + #undef vform +#endif +#ifdef LABEL + #undef LABEL +#endif +#ifdef METHOD + #undef METHOD +#endif +#ifdef Move + #undef Move +#endif +#ifdef yylex + #undef yylex +#endif +#ifdef yyparse + #undef yyparse +#endif +#ifdef yyerror + #undef yyerror +#endif +#ifdef invert + #undef invert +#endif +#ifdef ref + #undef ref +#endif +#ifdef read + #undef read +#endif +#ifdef write + #undef write +#endif +#ifdef eof + #undef eof +#endif +#ifdef bool + #undef bool +#endif +#ifdef close + #undef close +#endif +#ifdef rewind + #undef rewind +#endif +#ifdef free + #undef free +#endif +#ifdef malloc + #undef malloc +#endif +#ifdef calloc + #undef calloc +#endif +#ifdef Stat + #undef Stat +#endif +#ifdef check + #undef check +#endif +#ifdef seekdir + #undef seekdir +#endif +#ifdef open + #undef open +#endif +#ifdef readdir + #undef readdir +#endif +#ifdef bind + #undef bind +#endif @@ -1612,7 +1589,7 @@ static swig_module_info swig_module = {swig_types, 82, 0, 0, 0, 0}; #define SWIG_name "tinyWRAPc::boot_tinyWRAP" #define SWIG_prefix "tinyWRAPc::" -#define SWIGVERSION 0x020002 +#define SWIGVERSION 0x010339 #define SWIG_VERSION SWIGVERSION @@ -1739,9 +1716,7 @@ SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; - double v; - errno = 0; - v = strtod(nptr, &endptr); + double v = strtod(nptr, &endptr); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; @@ -21803,242 +21778,242 @@ static swig_command_info swig_commands[] = { {"tinyWRAPc::MsrpCallback_OnEvent", _wrap_MsrpCallback_OnEvent}, {0,0} }; -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif +#if 0 +} /* c-mode */ +#endif +#endif -#if 0 -#define SWIGRUNTIME_DEBUG -#endif +#if 0 +#define SWIGRUNTIME_DEBUG +#endif -SWIGRUNTIME void +SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int found, init; + size_t i; + swig_module_info *module_head, *iter; + int found, init; - clientdata = clientdata; + clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ + /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; } else { - init = 0; - } + init = 0; + } - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; - iter=module_head; + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; do { if (iter==&swig_module) { - found=1; - break; - } - iter=iter->next; - } while (iter!= module_head); + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif - /* if there is another module already loaded */ + /* if there is another module already loaded */ if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } } else { - type = swig_module.type_initial[i]; - } + type = swig_module.type_initial[i]; + } - /* Insert casting types */ - cast = swig_module.cast_initial[i]; + /* Insert casting types */ + cast = swig_module.cast_initial[i]; while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } if (ret) { if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; + size_t i; + swig_cast_info *equiv; + static int init_run = 0; - if (init_run) return; - init_run = 1; + if (init_run) return; + init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; + equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} -#ifdef __cplusplus -#if 0 +#ifdef __cplusplus +#if 0 { - /* c-mode */ -#endif -} -#endif + /* c-mode */ +#endif +} +#endif @@ -22097,27 +22072,27 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_DDebugCallback, (void*) "tinyWRAP::DDebugCallback"); SWIG_TypeClientData(SWIGTYPE_p_AudioResampler, (void*) "tinyWRAP::AudioResampler"); - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_media_none", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_media_none))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_media_audio", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_media_audio))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_media_video", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_media_video))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_media_audiovideo", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_media_audiovideo))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_media_msrp", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_media_msrp))); SvREADONLY_on(sv); @@ -22147,22 +22122,22 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_PublicationSession, (void*) "tinyWRAP::PublicationSession"); SWIG_TypeClientData(SWIGTYPE_p_RegistrationSession, (void*) "tinyWRAP::RegistrationSession"); SWIG_TypeClientData(SWIGTYPE_p_SubscriptionSession, (void*) "tinyWRAP::SubscriptionSession"); - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_proxy_plugin_audio_producer", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_proxy_plugin_audio_producer))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_proxy_plugin_video_producer", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_proxy_plugin_video_producer))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_proxy_plugin_audio_consumer", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_proxy_plugin_audio_consumer))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_proxy_plugin_video_consumer", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_proxy_plugin_video_consumer))); SvREADONLY_on(sv); @@ -22182,602 +22157,607 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_SipCallback, (void*) "tinyWRAP::SipCallback"); SWIG_TypeClientData(SWIGTYPE_p_SafeObject, (void*) "tinyWRAP::SafeObject"); SWIG_TypeClientData(SWIGTYPE_p_SipStack, (void*) "tinyWRAP::SipStack"); - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_invite", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_invite))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_options", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_options))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_dialog", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_event_dialog))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_transport_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(702))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_global_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(703))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_message_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(704))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_request_incoming", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(800))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_request_outgoing", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(802))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_request_cancelled", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(803))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_request_sent", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(804))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_connecting", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(900))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_connected", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(901))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_terminating", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(902))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_dialog_terminated", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(903))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_started", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(950))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_stopped", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(951))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_failed_to_start", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(952))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_event_code_stack_failed_to_stop", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(953))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_newreg", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_newreg))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_register", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_register))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unregister", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unregister))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_subscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_subscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unsubscribe", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unsubscribe))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_notify", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_notify))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_publish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_publish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_unpublish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_unpublish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_unpublish", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_unpublish))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_options", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_options))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_options", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_options))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_newcall", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_newcall))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_request", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_request))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_ao_request", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_ao_request))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_ect_ok", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_ect_ok))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_o_ect_nok", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_o_ect_nok))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_i_ect", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_i_ect))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_early_media", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_early_media))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_updating", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_updating))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_updated", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_updated))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_local_hold_ok", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_local_hold_ok))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_local_hold_nok", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_local_hold_nok))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_local_resume_ok", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_local_resume_ok))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_local_resume_nok", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_local_resume_nok))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_remote_hold", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_remote_hold))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tsip_m_remote_resume", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_remote_resume))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_rgb24", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_rgb24))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_bgr24", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_bgr24))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_rgb32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_rgb32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_rgb565le", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_rgb565le))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_rgb565be", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_rgb565be))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_nv12", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_nv12))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_nv21", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_nv21))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_yuv422p", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_yuv422p))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_uyvy422", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_uyvy422))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_yuv420p", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_yuv420p))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_stype_none", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_stype_none))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_stype_segmented", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_stype_segmented))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_stype_e2e", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_stype_e2e))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_strength_none", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_strength_none))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_strength_failure", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_strength_failure))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_strength_unknown", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_strength_unknown))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_strength_optional", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_strength_optional))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_qos_strength_mandatory", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_qos_strength_mandatory))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_bl_low", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_bl_low))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_bl_medium", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_bl_medium))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_bl_hight", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_bl_hight))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmedia_bl_unrestricted", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_bl_unrestricted))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_none", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_none))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_amr_nb_oa", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_amr_nb_oa))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_amr_nb_be", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_amr_nb_be))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_amr_wb_oa", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_amr_wb_oa))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_amr_wb_be", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_amr_wb_be))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_gsm", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_gsm))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_pcma", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_pcma))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_pcmu", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_pcmu))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_ilbc", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_ilbc))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_speex_nb", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_speex_nb))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_speex_wb", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_speex_wb))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_speex_uwb", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_speex_uwb))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_bv16", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_bv16))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_bv32", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_bv32))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_evrc", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_evrc))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_g729ab", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_g729ab))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_h261", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_h261))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_h263", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_h263))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_h263p", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_h263p))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_h263pp", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_h263pp))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_h264_bp10", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_h264_bp10))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_h264_bp20", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_h264_bp20))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_h264_bp30", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_h264_bp30))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_theora", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_theora))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_mp4ves_es", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_mp4ves_es))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "tdav_codec_id_vp8", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tdav_codec_id_vp8))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; SWIG_TypeClientData(SWIGTYPE_p_XcapSelector, (void*) "tinyWRAP::XcapSelector"); SWIG_TypeClientData(SWIGTYPE_p_XcapMessage, (void*) "tinyWRAP::XcapMessage"); SWIG_TypeClientData(SWIGTYPE_p_XcapEvent, (void*) "tinyWRAP::XcapEvent"); SWIG_TypeClientData(SWIGTYPE_p_XcapCallback, (void*) "tinyWRAP::XcapCallback"); SWIG_TypeClientData(SWIGTYPE_p_XcapStack, (void*) "tinyWRAP::XcapStack"); - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "thttp_event_dialog_started", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(thttp_event_dialog_started))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "thttp_event_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(thttp_event_message))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "thttp_event_auth_failed", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(thttp_event_auth_failed))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "thttp_event_closed", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(thttp_event_closed))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "thttp_event_transport_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(thttp_event_transport_error))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "thttp_event_dialog_terminated", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(thttp_event_dialog_terminated))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_rpmessage_type_sms_none", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_rpmessage_type_sms_none))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_rpmessage_type_sms_submit", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_rpmessage_type_sms_submit))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_rpmessage_type_sms_deliver", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_rpmessage_type_sms_deliver))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_rpmessage_type_sms_ack", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_rpmessage_type_sms_ack))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_rpmessage_type_sms_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_rpmessage_type_sms_error))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_sms_type_none", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_sms_type_none))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_sms_type_rpdata", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_sms_type_rpdata))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_sms_type_smma", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_sms_type_smma))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_sms_type_ack", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_sms_type_ack))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "twrap_sms_type_error", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(twrap_sms_type_error))); SvREADONLY_on(sv); @@ -22788,42 +22768,42 @@ XS(SWIG_init) { SWIG_TypeClientData(SWIGTYPE_p_MsrpMessage, (void*) "tinyWRAP::MsrpMessage"); SWIG_TypeClientData(SWIGTYPE_p_MsrpEvent, (void*) "tinyWRAP::MsrpEvent"); SWIG_TypeClientData(SWIGTYPE_p_MsrpCallback, (void*) "tinyWRAP::MsrpCallback"); - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_NONE", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_NONE))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_SEND", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_SEND))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_REPORT", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_REPORT))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_AUTH", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_AUTH))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_event_type_none", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_event_type_none))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_event_type_connected", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_event_type_connected))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_event_type_disconnected", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_event_type_disconnected))); SvREADONLY_on(sv); } while(0) /*@SWIG@*/; - /*@SWIG:/usr/local/share/swig/2.0.2/perl5/perltypemaps.swg,65,%set_constant@*/ do { + /*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do { SV *sv = get_sv((char*) SWIG_prefix "tmsrp_event_type_message", TRUE | 0x2 | GV_ADDMULTI); sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmsrp_event_type_message))); SvREADONLY_on(sv); diff --git a/branches/2.0/doubango/bindings/python/tinyWRAP.py b/branches/2.0/doubango/bindings/python/tinyWRAP.py index 487c9316..9793dc93 100644 --- a/branches/2.0/doubango/bindings/python/tinyWRAP.py +++ b/branches/2.0/doubango/bindings/python/tinyWRAP.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 2.0.2 +# Version 1.3.39 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. @@ -10,18 +10,12 @@ if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp - fp = None try: fp, pathname, description = imp.find_module('_tinyWRAP', [dirname(__file__)]) - except ImportError: - import _tinyWRAP - return _tinyWRAP - if fp is not None: - try: - _mod = imp.load_module('_tinyWRAP', fp, pathname, description) - finally: - fp.close() - return _mod + _mod = imp.load_module('_tinyWRAP', fp, pathname, description) + finally: + if fp is not None: fp.close() + return _mod _tinyWRAP = swig_import_helper() del swig_import_helper else: @@ -293,7 +287,7 @@ class MediaContent(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, MediaContent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, MediaContent, name) - def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") + def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr __swig_destroy__ = _tinyWRAP.delete_MediaContent __del__ = lambda self : None; @@ -1284,6 +1278,7 @@ tdav_codec_id_h264_bp20 = _tinyWRAP.tdav_codec_id_h264_bp20 tdav_codec_id_h264_bp30 = _tinyWRAP.tdav_codec_id_h264_bp30 tdav_codec_id_theora = _tinyWRAP.tdav_codec_id_theora tdav_codec_id_mp4ves_es = _tinyWRAP.tdav_codec_id_mp4ves_es +tdav_codec_id_vp8 = _tinyWRAP.tdav_codec_id_vp8 class XcapSelector(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, XcapSelector, name, value) diff --git a/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.cxx b/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.cxx index 4d7be520..554dae98 100644 --- a/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.cxx +++ b/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.cxx @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -36,2643 +36,2605 @@ template T SwigValueInit() { } #endif -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + /* Python.h has to appear first */ #include -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; -} - - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - register size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = ((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = ((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -/* Add PyObject_Del for old Pythons */ -#if PY_VERSION_HEX < 0x01060000 -# define PyObject_Del(op) PyMem_DEL((op)) -#endif -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* cc-mode */ -#endif -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyInstanceMethod_New(func); -#else - return NULL; -#endif -} - -#ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif -} -#endif - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, (char *) msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { - PyDict_SetItemString(d, (char*) name, obj); - Py_DECREF(obj); -} - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - register int i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* cc-mode */ -#endif -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData* data) -{ - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -} SwigPyObject; - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", name, v); - if (v->next) { -#ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -#else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -#endif -#if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -#else - PyString_ConcatAndDel(&repr,nrep); -#endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char *str; -#ifdef METH_NOARGS - PyObject *repr = SwigPyObject_repr(v); -#else - PyObject *repr = SwigPyObject_repr(v, NULL); -#endif - if (repr) { - str = SWIG_Python_str_AsChar(repr); - fputs(str, fp); - SWIG_Python_str_DelForPy3(str); - Py_DECREF(repr); - return 0; - } else { - return 1; - } -} - -SWIGRUNTIME PyObject * -SwigPyObject_str(SwigPyObject *v) -{ - char result[SWIG_BUFFER_SIZE]; - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? - SWIG_Python_str_FromChar(result) : 0; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) - res = Py_True; - else - res = Py_False; - Py_INCREF(res); - return res; -} - - -SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); - -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#else - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -_PySwigObject_type(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp - = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(&PyType_Type, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - (printfunc)SwigPyObject_print, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyObject_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpyobject_type = tmp; - /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ -#if PY_VERSION_HEX < 0x03000000 - swigpyobject_type.ob_type = &PyType_Type; -#endif - type_init = 1; - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == _PySwigPacked_type()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -_PySwigPacked_type(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp - = { - /* PyObject header changed in Python 3 */ -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(&PyType_Type, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ -#endif - }; - swigpypacked_type = tmp; - /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ -#if PY_VERSION_HEX < 0x03000000 - swigpypacked_type.ob_type = &PyType_Type; -#endif - type_init = 1; - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - if (SwigPyObject_Check(pyobj)) { - return (SwigPyObject *) pyobj; - } else { - PyObject *obj = 0; -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; - } -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - if (!obj) return SWIG_ERROR; - if (obj == Py_None) { - if (ptr) *ptr = 0; - return SWIG_OK; - } else { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - return SWIG_OK; - } else { - int res = SWIG_ERROR; - if (flags & SWIG_POINTER_IMPLICIT_CONV) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - return res; - } - } -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; -#else - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst; - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { - if (!ptr) { - return SWIG_Py_Void(); - } else { - int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - PyObject *robj = SwigPyObject_New(ptr, type, own); - SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - if (inst) { - Py_DECREF(robj); - robj = inst; - } - } - return robj; - } -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, - "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -SWIG_Python_DestroyModule(void *vptr) -{ - swig_module_info *swig_module = (swig_module_info *) vptr; - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); - swig_this = NULL; -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ - -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - swig_empty_runtime_method_table); -#endif - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); - } else { - swig_module_info *swig_module = SWIG_Python_GetModule(); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { - obj = PyCObject_FromVoidPtr(descriptor, NULL); - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : (char*)""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - - -#ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif -} -#endif +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store information on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +/* Compatibility marcos for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03000000 + str = PyUnicode_AsUTF8String(str); + return PyBytes_AsString(str); +#else + return PyString_AsString(str); +#endif +} + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +/* Add PyObject_Del for old Pythons */ +#if PY_VERSION_HEX < 0x01060000 +# define PyObject_Del(op) PyMem_DEL((op)) +#endif +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif + +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + + PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyInstanceMethod_New(func); +#else + return NULL; +#endif +} + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, (char *) msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + Py_DECREF(obj); +} + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* SwigPyClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; +} SwigPyClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } +} + +SWIGRUNTIME void +SwigPyClientData_Del(SwigPyClientData* data) +{ + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== SwigPyObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +} SwigPyObject; + +SWIGRUNTIME PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else + res = PyString_Format(ofmt,args); +#endif + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +SwigPyObject_repr(SwigPyObject *v) +#else +SwigPyObject_repr(SwigPyObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *hex = SwigPyObject_hex(v); + PyObject *repr = SWIG_Python_str_FromFormat("", name, hex); + Py_DECREF(hex); + if (v->next) { +#ifdef METH_NOARGS + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +#else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +#endif +#if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +#else + PyString_ConcatAndDel(&repr,nrep); +#endif + } + return repr; +} + +SWIGRUNTIME int +SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ +#ifdef METH_NOARGS + PyObject *repr = SwigPyObject_repr(v); +#else + PyObject *repr = SwigPyObject_repr(v, NULL); +#endif + if (repr) { + fputs(SWIG_Python_str_AsChar(repr), fp); + Py_DECREF(repr); + return 0; + } else { + return 1; + } +} + +SWIGRUNTIME PyObject * +SwigPyObject_str(SwigPyObject *v) +{ + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + SWIG_Python_str_FromChar(result) : 0; +} + +SWIGRUNTIME int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +/* Added for Python 3.x, whould it also useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ) + res = Py_True; + else + res = Py_False; + Py_INCREF(res); + return res; +} + + +SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); + +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyObject_Check(PyObject *op) { + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + if (data->delargs) { + /* we need to create a temporal object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + Py_XDECREF(res); + } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } +#endif + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!SwigPyObject_Check(next)) { + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +SwigPyObject_next(PyObject* v) +#else +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_disown(PyObject *v) +#else +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +SwigPyObject_acquire(PyObject *v) +#else +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#else + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v,args); + } else { + SwigPyObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +SwigPyObject_getattr(SwigPyObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc)0, /*nb_divide*/ +#endif + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ + (unaryfunc)SwigPyObject_long, /*nb_long*/ + (unaryfunc)0, /*nb_float*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + /* PyOjbect header changed in Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(&PyType_Type, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + (printfunc)SwigPyObject_print, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)SwigPyObject_compare, /* tp_compare */ + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyObject_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + swigpyobject_type = tmp; + /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */ +#if PY_VERSION_HEX < 0x03000000 + swigpyobject_type.ob_type = &PyType_Type; +#endif + type_init = 1; + } + return &swigpyobject_type; +} + +SWIGRUNTIME PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; + +SWIGRUNTIME int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return SWIG_Python_str_FromFormat("", result, v->ty->name); + } else { + return SWIG_Python_str_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} + +SWIGRUNTIME int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); + +SWIGRUNTIME PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); + return type; +} + +SWIGRUNTIMEINLINE int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} + +SWIGRUNTIME void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + /* PyObject header changed in Python 3 */ +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(&PyType_Type, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + (printfunc)SwigPyPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + swigpypacked_type = tmp; + /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */ +#if PY_VERSION_HEX < 0x03000000 + swigpypacked_type.ob_type = &PyType_Type; +#endif + type_init = 1; + } + return &swigpypacked_type; +} + +SWIGRUNTIME PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + if (SwigPyObject_Check(pyobj)) { + return (SwigPyObject *) pyobj; + } else { + PyObject *obj = 0; +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; + } +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return SWIG_ERROR; + if (obj == Py_None) { + if (ptr) *ptr = 0; + return SWIG_OK; + } else { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + return SWIG_OK; + } else { + int res = SWIG_ERROR; + if (flags & SWIG_POINTER_IMPLICIT_CONV) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + return res; + } + } +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return SWIG_ERROR; + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, whitout calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { +#if PY_VERSION_HEX >= 0x03000000 + inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + Py_INCREF(data->newargs); + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; +#else + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); +#endif + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst; + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return NULL; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + PyObject *robj = SwigPyObject_New(ptr, type, own); + SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + Py_DECREF(robj); + robj = inst; + } + } + return robj; + } +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +SWIG_Python_DestroyModule(void *vptr) +{ + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ + +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + swig_empty_runtime_method_table); +#endif + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, SWIG_Python_str_AsChar(old_str)); + } else { + PyErr_Format(type, "%s %s", SWIG_Python_str_AsChar(old_str), mesg); + } + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + if (flags & SWIG_POINTER_EXCEPTION) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } + } + return result; +} + + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif @@ -2681,478 +2643,481 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else -/* ----------------------------------------------------------------------------- - * director.swg - * - * This file contains support for director classes that proxy - * method calls from C++ to Python extensions. - * ----------------------------------------------------------------------------- */ - -#ifndef SWIG_DIRECTOR_PYTHON_HEADER_ -#define SWIG_DIRECTOR_PYTHON_HEADER_ - -#ifdef __cplusplus - -#include -#include -#include -#include -#include - - -/* - Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual - table', and avoid multiple GetAttr calls to retrieve the python - methods. -*/ - -#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE -#ifndef SWIG_PYTHON_DIRECTOR_VTABLE -#define SWIG_PYTHON_DIRECTOR_VTABLE -#endif -#endif - - - -/* - Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the - Undefined Exception Handler provided by swift -*/ -#ifndef SWIG_DIRECTOR_NO_UEH -#ifndef SWIG_DIRECTOR_UEH -#define SWIG_DIRECTOR_UEH -#endif -#endif - - -/* - Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the - 'Swig' namespace. This could be useful for multi-modules projects. -*/ -#ifdef SWIG_DIRECTOR_STATIC -/* Force anonymous (static) namespace */ -#define Swig -#endif - - -/* - Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the - native C++ RTTI and dynamic_cast<>. But be aware that directors - could stop working when using this option. -*/ -#ifdef SWIG_DIRECTOR_NORTTI -/* - When we don't use the native C++ RTTI, we implement a minimal one - only for Directors. -*/ -# ifndef SWIG_DIRECTOR_RTDIR -# define SWIG_DIRECTOR_RTDIR -#include - -namespace Swig { - class Director; - SWIGINTERN std::map& get_rtdir_map() { - static std::map rtdir_map; - return rtdir_map; - } - - SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) { - get_rtdir_map()[vptr] = rtdir; - } - - SWIGINTERNINLINE Director *get_rtdir(void *vptr) { - std::map::const_iterator pos = get_rtdir_map().find(vptr); - Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; - return rtdir; - } -} -# endif /* SWIG_DIRECTOR_RTDIR */ - -# define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast(ARG)) -# define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast(ARG1), ARG2) - -#else - -# define SWIG_DIRECTOR_CAST(ARG) dynamic_cast(ARG) -# define SWIG_DIRECTOR_RGTR(ARG1, ARG2) - -#endif /* SWIG_DIRECTOR_NORTTI */ - -extern "C" { - struct swig_type_info; -} - -namespace Swig { - - /* memory handler */ - struct GCItem - { - virtual ~GCItem() {} - - virtual int get_own() const - { - return 0; - } - }; - - struct GCItem_var - { - GCItem_var(GCItem *item = 0) : _item(item) - { - } - - GCItem_var& operator=(GCItem *item) - { - GCItem *tmp = _item; - _item = item; - delete tmp; - return *this; - } - - ~GCItem_var() - { - delete _item; - } - - GCItem * operator->() const - { - return _item; - } - - private: - GCItem *_item; - }; - - struct GCItem_Object : GCItem - { - GCItem_Object(int own) : _own(own) - { - } - - virtual ~GCItem_Object() - { - } - - int get_own() const - { - return _own; - } - - private: - int _own; - }; - - template - struct GCItem_T : GCItem - { - GCItem_T(Type *ptr) : _ptr(ptr) - { - } - - virtual ~GCItem_T() - { - delete _ptr; - } - - private: - Type *_ptr; - }; - - template - struct GCArray_T : GCItem - { - GCArray_T(Type *ptr) : _ptr(ptr) - { - } - - virtual ~GCArray_T() - { - delete[] _ptr; - } - - private: - Type *_ptr; - }; - - /* base class for director exceptions */ - class DirectorException { - protected: - std::string swig_msg; - public: - DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") - : swig_msg(hdr) - { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - if (strlen(msg)) { - swig_msg += " "; - swig_msg += msg; - } - if (!PyErr_Occurred()) { - PyErr_SetString(error, getMessage()); - } - SWIG_PYTHON_THREAD_END_BLOCK; - } - - const char *getMessage() const - { - return swig_msg.c_str(); - } - - static void raise(PyObject *error, const char *msg) - { - throw DirectorException(error, msg); - } - - static void raise(const char *msg) - { - raise(PyExc_RuntimeError, msg); - } - }; - - /* unknown exception handler */ - class UnknownExceptionHandler - { -#ifdef SWIG_DIRECTOR_UEH - static void handler() { - try { - throw; - } catch (DirectorException& e) { - std::cerr << "SWIG Director exception caught:" << std::endl - << e.getMessage() << std::endl; - } catch (std::exception& e) { - std::cerr << "std::exception caught: "<< e.what() << std::endl; - } catch (...) { - std::cerr << "Unknown exception caught." << std::endl; - } - - std::cerr << std::endl - << "Python interpreter traceback:" << std::endl; - PyErr_Print(); - std::cerr << std::endl; - - std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl - << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl - << std::endl - << "Exception is being re-thrown, program will like abort/terminate." << std::endl; - throw; - } - - public: - - std::unexpected_handler old; - UnknownExceptionHandler(std::unexpected_handler nh = handler) - { - old = std::set_unexpected(nh); - } - - ~UnknownExceptionHandler() - { - std::set_unexpected(old); - } -#endif - }; - - /* type mismatch in the return value from a python method call */ - class DirectorTypeMismatchException : public Swig::DirectorException { - public: - DirectorTypeMismatchException(PyObject *error, const char* msg="") - : Swig::DirectorException(error, "SWIG director type mismatch", msg) - { - } - - DirectorTypeMismatchException(const char* msg="") - : Swig::DirectorException(PyExc_TypeError, "SWIG director type mismatch", msg) - { - } - - static void raise(PyObject *error, const char *msg) - { - throw DirectorTypeMismatchException(error, msg); - } - - static void raise(const char *msg) - { - throw DirectorTypeMismatchException(msg); - } - }; - - /* any python exception that occurs during a director method call */ - class DirectorMethodException : public Swig::DirectorException { - public: - DirectorMethodException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "SWIG director method error.", msg) - { - } - - static void raise(const char *msg) - { - throw DirectorMethodException(msg); - } - }; - - /* attempt to call a pure virtual method via a director method */ - class DirectorPureVirtualException : public Swig::DirectorException - { - public: - DirectorPureVirtualException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "SWIG director pure virtual method called", msg) - { - } - - static void raise(const char *msg) - { - throw DirectorPureVirtualException(msg); - } - }; - - -#if defined(SWIG_PYTHON_THREADS) -/* __THREAD__ is the old macro to activate some thread support */ -# if !defined(__THREAD__) -# define __THREAD__ 1 -# endif -#endif - -#ifdef __THREAD__ -# include "pythread.h" - class Guard - { - PyThread_type_lock & mutex_; - - public: - Guard(PyThread_type_lock & mutex) : mutex_(mutex) - { - PyThread_acquire_lock(mutex_, WAIT_LOCK); - } - - ~Guard() - { - PyThread_release_lock(mutex_); - } - }; -# define SWIG_GUARD(mutex) Guard _guard(mutex) -#else -# define SWIG_GUARD(mutex) -#endif - - /* director base class */ - class Director { - private: - /* pointer to the wrapped python object */ - PyObject* swig_self; - /* flag indicating whether the object is owned by python or c++ */ - mutable bool swig_disown_flag; - - /* decrement the reference count of the wrapped python object */ - void swig_decref() const { - if (swig_disown_flag) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - Py_DECREF(swig_self); - SWIG_PYTHON_THREAD_END_BLOCK; - } - } - - public: - /* wrap a python object, optionally taking ownership */ - Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { - swig_incref(); - } - - - /* discard our reference at destruction */ - virtual ~Director() { - swig_decref(); - } - - - /* return a pointer to the wrapped python object */ - PyObject *swig_get_self() const { - return swig_self; - } - - /* acquire ownership of the wrapped python object (the sense of "disown" - * is from python) */ - void swig_disown() const { - if (!swig_disown_flag) { - swig_disown_flag=true; - swig_incref(); - } - } - - /* increase the reference count of the wrapped python object */ - void swig_incref() const { - if (swig_disown_flag) { - Py_INCREF(swig_self); - } - } - - /* methods to implement pseudo protected director members */ - virtual bool swig_get_inner(const char* /* swig_protected_method_name */) const { - return true; - } - - virtual void swig_set_inner(const char* /* swig_protected_method_name */, bool /* swig_val */) const { - } - - /* ownership management */ - private: - typedef std::map swig_ownership_map; - mutable swig_ownership_map swig_owner; -#ifdef __THREAD__ - static PyThread_type_lock swig_mutex_own; -#endif - - public: - template - void swig_acquire_ownership_array(Type *vptr) const - { - if (vptr) { - SWIG_GUARD(swig_mutex_own); - swig_owner[vptr] = new GCArray_T(vptr); - } - } - - template - void swig_acquire_ownership(Type *vptr) const - { - if (vptr) { - SWIG_GUARD(swig_mutex_own); - swig_owner[vptr] = new GCItem_T(vptr); - } - } - - void swig_acquire_ownership_obj(void *vptr, int own) const - { - if (vptr && own) { - SWIG_GUARD(swig_mutex_own); - swig_owner[vptr] = new GCItem_Object(own); - } - } - - int swig_release_ownership(void *vptr) const - { - int own = 0; - if (vptr) { - SWIG_GUARD(swig_mutex_own); - swig_ownership_map::iterator iter = swig_owner.find(vptr); - if (iter != swig_owner.end()) { - own = iter->second->get_own(); - swig_owner.erase(iter); - } - } - return own; - } - }; - -#ifdef __THREAD__ - PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); -#endif -} - -#endif /* __cplusplus */ - - -#endif +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes that proxy + * method calls from C++ to Python extensions. + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_DIRECTOR_PYTHON_HEADER_ +#define SWIG_DIRECTOR_PYTHON_HEADER_ + +#ifdef __cplusplus + +#include +#include +#include +#include +#include + + +/* + Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual + table', and avoid multiple GetAttr calls to retrieve the python + methods. +*/ + +#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE +#ifndef SWIG_PYTHON_DIRECTOR_VTABLE +#define SWIG_PYTHON_DIRECTOR_VTABLE +#endif +#endif + + + +/* + Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the + Undefined Exception Handler provided by swift +*/ +#ifndef SWIG_DIRECTOR_NO_UEH +#ifndef SWIG_DIRECTOR_UEH +#define SWIG_DIRECTOR_UEH +#endif +#endif + + +/* + Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the + 'Swig' namespace. This could be usefull for multi-modules projects. +*/ +#ifdef SWIG_DIRECTOR_STATIC +/* Force anonymous (static) namespace */ +#define Swig +#endif + + +/* + Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the + native C++ RTTI and dynamic_cast<>. But be aware that directors + could stop working when using this option. +*/ +#ifdef SWIG_DIRECTOR_NORTTI +/* + When we don't use the native C++ RTTI, we implement a minimal one + only for Directors. +*/ +# ifndef SWIG_DIRECTOR_RTDIR +# define SWIG_DIRECTOR_RTDIR +#include + +namespace Swig { + class Director; + SWIGINTERN std::map& get_rtdir_map() { + static std::map rtdir_map; + return rtdir_map; + } + + SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) { + get_rtdir_map()[vptr] = rtdir; + } + + SWIGINTERNINLINE Director *get_rtdir(void *vptr) { + std::map::const_iterator pos = get_rtdir_map().find(vptr); + Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; + return rtdir; + } +} +# endif /* SWIG_DIRECTOR_RTDIR */ + +# define SWIG_DIRECTOR_CAST(Arg) Swig::get_rtdir(static_cast(Arg)) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) Swig::set_rtdir(static_cast(Arg1), Arg2) + +#else + +# define SWIG_DIRECTOR_CAST(Arg) dynamic_cast(Arg) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) + +#endif /* SWIG_DIRECTOR_NORTTI */ + +extern "C" { + struct swig_type_info; +} + +namespace Swig { + + /* memory handler */ + struct GCItem + { + virtual ~GCItem() {} + + virtual int get_own() const + { + return 0; + } + }; + + struct GCItem_var + { + GCItem_var(GCItem *item = 0) : _item(item) + { + } + + GCItem_var& operator=(GCItem *item) + { + GCItem *tmp = _item; + _item = item; + delete tmp; + return *this; + } + + ~GCItem_var() + { + delete _item; + } + + GCItem * operator->() const + { + return _item; + } + + private: + GCItem *_item; + }; + + struct GCItem_Object : GCItem + { + GCItem_Object(int own) : _own(own) + { + } + + virtual ~GCItem_Object() + { + } + + int get_own() const + { + return _own; + } + + private: + int _own; + }; + + template + struct GCItem_T : GCItem + { + GCItem_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCItem_T() + { + delete _ptr; + } + + private: + Type *_ptr; + }; + + template + struct GCArray_T : GCItem + { + GCArray_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCArray_T() + { + delete[] _ptr; + } + + private: + Type *_ptr; + }; + + /* base class for director exceptions */ + class DirectorException { + protected: + std::string swig_msg; + public: + DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") + : swig_msg(hdr) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (strlen(msg)) { + swig_msg += " "; + swig_msg += msg; + } + if (!PyErr_Occurred()) { + PyErr_SetString(error, getMessage()); + } + SWIG_PYTHON_THREAD_END_BLOCK; + } + + const char *getMessage() const + { + return swig_msg.c_str(); + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorException(error, msg); + } + + static void raise(const char *msg) + { + raise(PyExc_RuntimeError, msg); + } + }; + + /* unknown exception handler */ + class UnknownExceptionHandler + { +#ifdef SWIG_DIRECTOR_UEH + static void handler() { + try { + throw; + } catch (DirectorException& e) { + std::cerr << "Swig Director exception caught:" << std::endl + << e.getMessage() << std::endl; + } catch (std::exception& e) { + std::cerr << "std::exception caught: "<< e.what() << std::endl; + } catch (...) { + std::cerr << "Unknown exception caught." << std::endl; + } + + std::cerr << std::endl + << "Python interpreter traceback:" << std::endl; + PyErr_Print(); + std::cerr << std::endl; + + std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl + << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl + << std::endl + << "Exception is being re-thrown, program will like abort/terminate." << std::endl; + throw; + } + + public: + + std::unexpected_handler old; + UnknownExceptionHandler(std::unexpected_handler nh = handler) + { + old = std::set_unexpected(nh); + } + + ~UnknownExceptionHandler() + { + std::set_unexpected(old); + } +#endif + }; + + /* type mismatch in the return value from a python method call */ + class DirectorTypeMismatchException : public Swig::DirectorException { + public: + DirectorTypeMismatchException(PyObject *error, const char* msg="") + : Swig::DirectorException(error, "Swig director type mismatch", msg) + { + } + + DirectorTypeMismatchException(const char* msg="") + : Swig::DirectorException(PyExc_TypeError, "Swig director type mismatch", msg) + { + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorTypeMismatchException(error, msg); + } + + static void raise(const char *msg) + { + throw DirectorTypeMismatchException(msg); + } + }; + + /* any python exception that occurs during a director method call */ + class DirectorMethodException : public Swig::DirectorException { + public: + DirectorMethodException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorMethodException(msg); + } + }; + + /* attempt to call a pure virtual method via a director method */ + class DirectorPureVirtualException : public Swig::DirectorException + { + public: + DirectorPureVirtualException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director pure virtual method called", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorPureVirtualException(msg); + } + }; + + +#if defined(SWIG_PYTHON_THREADS) +/* __THREAD__ is the old macro to activate some thread support */ +# if !defined(__THREAD__) +# define __THREAD__ 1 +# endif +#endif + +#ifdef __THREAD__ +# include "pythread.h" + class Guard + { + PyThread_type_lock & mutex_; + + public: + Guard(PyThread_type_lock & mutex) : mutex_(mutex) + { + PyThread_acquire_lock(mutex_, WAIT_LOCK); + } + + ~Guard() + { + PyThread_release_lock(mutex_); + } + }; +# define SWIG_GUARD(mutex) Guard _guard(mutex) +#else +# define SWIG_GUARD(mutex) +#endif + + /* director base class */ + class Director { + private: + /* pointer to the wrapped python object */ + PyObject* swig_self; + /* flag indicating whether the object is owned by python or c++ */ + mutable bool swig_disown_flag; + + /* decrement the reference count of the wrapped python object */ + void swig_decref() const { + if (swig_disown_flag) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_DECREF(swig_self); + SWIG_PYTHON_THREAD_END_BLOCK; + } + } + + public: + /* wrap a python object, optionally taking ownership */ + Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { + swig_incref(); + } + + + /* discard our reference at destruction */ + virtual ~Director() { + swig_decref(); + } + + + /* return a pointer to the wrapped python object */ + PyObject *swig_get_self() const { + return swig_self; + } + + /* acquire ownership of the wrapped python object (the sense of "disown" + * is from python) */ + void swig_disown() const { + if (!swig_disown_flag) { + swig_disown_flag=true; + swig_incref(); + } + } + + /* increase the reference count of the wrapped python object */ + void swig_incref() const { + if (swig_disown_flag) { + Py_INCREF(swig_self); + } + } + + /* methods to implement pseudo protected director members */ + virtual bool swig_get_inner(const char* /* name */) const { + return true; + } + + virtual void swig_set_inner(const char* /* name */, bool /* val */) const { + } + + /* ownership management */ + private: + typedef std::map ownership_map; + mutable ownership_map owner; +#ifdef __THREAD__ + static PyThread_type_lock swig_mutex_own; +#endif + + public: + template + void swig_acquire_ownership_array(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCArray_T(vptr); + } + } + + template + void swig_acquire_ownership(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_T(vptr); + } + } + + void swig_acquire_ownership_obj(void *vptr, int own) const + { + if (vptr && own) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_Object(own); + } + } + + int swig_release_ownership(void *vptr) const + { + int own = 0; + if (vptr) { + SWIG_GUARD(swig_mutex_own); + ownership_map::iterator iter = owner.find(vptr); + if (iter != owner.end()) { + own = iter->second->get_own(); + owner.erase(iter); + } + } + return own; + } + }; + +#ifdef __THREAD__ + PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); +#endif +} + +#endif /* __cplusplus */ + + +#endif /* -------- TYPES TABLE (BEGIN) -------- */ @@ -3263,7 +3228,7 @@ static swig_module_info swig_module = {swig_types, 82, 0, 0, 0, 0}; #endif #define SWIG_name "_tinyWRAP" -#define SWIGVERSION 0x020002 +#define SWIGVERSION 0x010339 #define SWIG_VERSION SWIGVERSION @@ -3360,27 +3325,19 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { #if PY_VERSION_HEX>=0x03000000 - if (PyUnicode_Check(obj)) + if (PyUnicode_Check(obj)) #else - if (PyString_Check(obj)) + if (PyString_Check(obj)) #endif { char *cstr; Py_ssize_t len; #if PY_VERSION_HEX>=0x03000000 - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } obj = PyUnicode_AsUTF8String(obj); PyBytes_AsStringAndSize(obj, &cstr, &len); - if(alloc) *alloc = SWIG_NEWOBJ; #else PyString_AsStringAndSize(obj, &cstr, &len); #endif - if (cptr) { + if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner @@ -3405,16 +3362,10 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) *alloc = SWIG_OLDOBJ; } } else { - #if PY_VERSION_HEX>=0x03000000 - assert(0); /* Should never reach here in Python 3 */ - #endif *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 - Py_XDECREF(obj); -#endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); @@ -3973,9 +3924,9 @@ int SwigDirector_DDebugCallback::OnDebugInfo(char const *message) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugInfo", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'DDebugCallback.OnDebugInfo'"); } } @@ -4004,9 +3955,9 @@ int SwigDirector_DDebugCallback::OnDebugWarn(char const *message) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugWarn", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'DDebugCallback.OnDebugWarn'"); } } @@ -4035,9 +3986,9 @@ int SwigDirector_DDebugCallback::OnDebugError(char const *message) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugError", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'DDebugCallback.OnDebugError'"); } } @@ -4066,9 +4017,9 @@ int SwigDirector_DDebugCallback::OnDebugFatal(char const *message) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDebugFatal", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'DDebugCallback.OnDebugFatal'"); } } @@ -4109,9 +4060,9 @@ int SwigDirector_ProxyPluginMgrCallback::OnPluginCreated(uint64_t id, enum twrap #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnPluginCreated", (char *)"(OO)" ,(PyObject *)obj0,(PyObject *)obj1); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyPluginMgrCallback.OnPluginCreated'"); } } @@ -4142,9 +4093,9 @@ int SwigDirector_ProxyPluginMgrCallback::OnPluginDestroyed(uint64_t id, enum twr #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnPluginDestroyed", (char *)"(OO)" ,(PyObject *)obj0,(PyObject *)obj1); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyPluginMgrCallback.OnPluginDestroyed'"); } } @@ -4187,9 +4138,9 @@ int SwigDirector_ProxyAudioConsumerCallback::prepare(int ptime, int rate, int ch #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"prepare", (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumerCallback.prepare'"); } } @@ -4216,9 +4167,9 @@ int SwigDirector_ProxyAudioConsumerCallback::start() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "start", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumerCallback.start'"); } } @@ -4245,9 +4196,9 @@ int SwigDirector_ProxyAudioConsumerCallback::pause() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "pause", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumerCallback.pause'"); } } @@ -4274,9 +4225,9 @@ int SwigDirector_ProxyAudioConsumerCallback::stop() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "stop", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioConsumerCallback.stop'"); } } @@ -4319,9 +4270,9 @@ int SwigDirector_ProxyVideoConsumerCallback::prepare(int nWidth, int nHeight, in #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"prepare", (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoConsumerCallback.prepare'"); } } @@ -4350,9 +4301,9 @@ int SwigDirector_ProxyVideoConsumerCallback::consume(ProxyVideoFrame const *fram #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"consume", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoConsumerCallback.consume'"); } } @@ -4383,9 +4334,9 @@ int SwigDirector_ProxyVideoConsumerCallback::bufferCopied(unsigned int nCopiedSi #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"bufferCopied", (char *)"(OO)" ,(PyObject *)obj0,(PyObject *)obj1); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoConsumerCallback.bufferCopied'"); } } @@ -4412,9 +4363,9 @@ int SwigDirector_ProxyVideoConsumerCallback::start() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "start", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoConsumerCallback.start'"); } } @@ -4441,9 +4392,9 @@ int SwigDirector_ProxyVideoConsumerCallback::pause() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "pause", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoConsumerCallback.pause'"); } } @@ -4470,9 +4421,9 @@ int SwigDirector_ProxyVideoConsumerCallback::stop() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "stop", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoConsumerCallback.stop'"); } } @@ -4515,9 +4466,9 @@ int SwigDirector_ProxyAudioProducerCallback::prepare(int ptime, int rate, int ch #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"prepare", (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducerCallback.prepare'"); } } @@ -4544,9 +4495,9 @@ int SwigDirector_ProxyAudioProducerCallback::start() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "start", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducerCallback.start'"); } } @@ -4573,9 +4524,9 @@ int SwigDirector_ProxyAudioProducerCallback::pause() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "pause", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducerCallback.pause'"); } } @@ -4602,9 +4553,9 @@ int SwigDirector_ProxyAudioProducerCallback::stop() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "stop", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducerCallback.stop'"); } } @@ -4647,9 +4598,9 @@ int SwigDirector_ProxyVideoProducerCallback::prepare(int width, int height, int #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"prepare", (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducerCallback.prepare'"); } } @@ -4676,9 +4627,9 @@ int SwigDirector_ProxyVideoProducerCallback::start() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "start", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducerCallback.start'"); } } @@ -4705,9 +4656,9 @@ int SwigDirector_ProxyVideoProducerCallback::pause() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "pause", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducerCallback.pause'"); } } @@ -4734,9 +4685,9 @@ int SwigDirector_ProxyVideoProducerCallback::stop() { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "stop", NULL); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducerCallback.stop'"); } } @@ -4775,9 +4726,9 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnDialogEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnDialogEvent'"); } } @@ -4806,9 +4757,9 @@ int SwigDirector_SipCallback::OnStackEvent(StackEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnStackEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnStackEvent'"); } } @@ -4837,9 +4788,9 @@ int SwigDirector_SipCallback::OnInviteEvent(InviteEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnInviteEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnInviteEvent'"); } } @@ -4868,9 +4819,9 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnMessagingEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnMessagingEvent'"); } } @@ -4899,9 +4850,9 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnOptionsEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnOptionsEvent'"); } } @@ -4930,9 +4881,9 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnPublicationEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnPublicationEvent'"); } } @@ -4961,9 +4912,9 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnRegistrationEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnRegistrationEvent'"); } } @@ -4992,9 +4943,9 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnSubscriptionEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'SipCallback.OnSubscriptionEvent'"); } } @@ -5033,9 +4984,9 @@ int SwigDirector_XcapCallback::onEvent(XcapEvent const *e) const { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"onEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'XcapCallback.onEvent'"); } } @@ -5074,9 +5025,9 @@ int SwigDirector_MsrpCallback::OnEvent(MsrpEvent const *e) { #else swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"OnEvent", (char *)"(O)" ,(PyObject *)obj0); #endif - if (!result) { + if (result == NULL) { PyObject *error = PyErr_Occurred(); - if (error) { + if (error != NULL) { Swig::DirectorMethodException::raise("Error detected when calling 'MsrpCallback.OnEvent'"); } } @@ -6763,7 +6714,7 @@ SWIGINTERN PyObject *_wrap_MediaContent_parse(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MediaContent_parse'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MediaContent_parse'.\n" " Possible C/C++ prototypes are:\n" " parse(void const *,unsigned int,char const *)\n" " MediaContent::parse(void const *,unsigned int)\n"); @@ -7054,7 +7005,7 @@ SWIGINTERN PyObject *_wrap_new_SipUri(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SipUri'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SipUri'.\n" " Possible C/C++ prototypes are:\n" " SipUri(char const *,char const *)\n" " SipUri(char const *)\n"); @@ -7159,7 +7110,7 @@ SWIGINTERN PyObject *_wrap_SipUri_isValid(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SipUri_isValid'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SipUri_isValid'.\n" " Possible C/C++ prototypes are:\n" " isValid(char const *)\n" " isValid(SipUri *)\n"); @@ -7560,7 +7511,7 @@ SWIGINTERN PyObject *_wrap_SdpMessage_getSdpHeaderValue(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SdpMessage_getSdpHeaderValue'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SdpMessage_getSdpHeaderValue'.\n" " Possible C/C++ prototypes are:\n" " getSdpHeaderValue(SdpMessage *,char const *,char,unsigned int)\n" " getSdpHeaderValue(SdpMessage *,char const *,char)\n"); @@ -7823,7 +7774,7 @@ SWIGINTERN PyObject *_wrap_SipMessage_getSipHeaderValue(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SipMessage_getSipHeaderValue'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SipMessage_getSipHeaderValue'.\n" " Possible C/C++ prototypes are:\n" " getSipHeaderValue(SipMessage *,char const *,unsigned int)\n" " getSipHeaderValue(SipMessage *,char const *)\n"); @@ -7986,7 +7937,7 @@ SWIGINTERN PyObject *_wrap_SipMessage_getSipHeaderParamValue(PyObject *self, PyO } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SipMessage_getSipHeaderParamValue'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SipMessage_getSipHeaderParamValue'.\n" " Possible C/C++ prototypes are:\n" " getSipHeaderParamValue(SipMessage *,char const *,char const *,unsigned int)\n" " getSipHeaderParamValue(SipMessage *,char const *,char const *)\n"); @@ -9086,7 +9037,7 @@ SWIGINTERN PyObject *_wrap_SipSession_addCaps(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SipSession_addCaps'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SipSession_addCaps'.\n" " Possible C/C++ prototypes are:\n" " addCaps(SipSession *,char const *,char const *)\n" " addCaps(SipSession *,char const *)\n"); @@ -9263,7 +9214,7 @@ SWIGINTERN PyObject *_wrap_SipSession_setFromUri(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SipSession_setFromUri'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SipSession_setFromUri'.\n" " Possible C/C++ prototypes are:\n" " setFromUri(SipSession *,char const *)\n" " setFromUri(SipSession *,SipUri const *)\n"); @@ -9375,7 +9326,7 @@ SWIGINTERN PyObject *_wrap_SipSession_setToUri(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SipSession_setToUri'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SipSession_setToUri'.\n" " Possible C/C++ prototypes are:\n" " setToUri(SipSession *,char const *)\n" " setToUri(SipSession *,SipUri const *)\n"); @@ -9630,7 +9581,7 @@ SWIGINTERN PyObject *_wrap_InviteSession_accept(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'InviteSession_accept'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'InviteSession_accept'.\n" " Possible C/C++ prototypes are:\n" " accept(InviteSession *,ActionConfig *)\n" " accept(InviteSession *)\n"); @@ -9726,7 +9677,7 @@ SWIGINTERN PyObject *_wrap_InviteSession_hangup(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'InviteSession_hangup'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'InviteSession_hangup'.\n" " Possible C/C++ prototypes are:\n" " hangup(InviteSession *,ActionConfig *)\n" " hangup(InviteSession *)\n"); @@ -9822,7 +9773,7 @@ SWIGINTERN PyObject *_wrap_InviteSession_reject(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'InviteSession_reject'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'InviteSession_reject'.\n" " Possible C/C++ prototypes are:\n" " reject(InviteSession *,ActionConfig *)\n" " reject(InviteSession *)\n"); @@ -10126,7 +10077,7 @@ SWIGINTERN PyObject *_wrap_CallSession_callAudio(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CallSession_callAudio'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CallSession_callAudio'.\n" " Possible C/C++ prototypes are:\n" " callAudio(CallSession *,char const *,ActionConfig *)\n" " callAudio(CallSession *,char const *)\n" @@ -10360,7 +10311,7 @@ SWIGINTERN PyObject *_wrap_CallSession_callAudioVideo(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CallSession_callAudioVideo'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CallSession_callAudioVideo'.\n" " Possible C/C++ prototypes are:\n" " callAudioVideo(CallSession *,char const *,ActionConfig *)\n" " callAudioVideo(CallSession *,char const *)\n" @@ -10594,7 +10545,7 @@ SWIGINTERN PyObject *_wrap_CallSession_callVideo(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CallSession_callVideo'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CallSession_callVideo'.\n" " Possible C/C++ prototypes are:\n" " callVideo(CallSession *,char const *,ActionConfig *)\n" " callVideo(CallSession *,char const *)\n" @@ -10806,7 +10757,7 @@ SWIGINTERN PyObject *_wrap_CallSession_hold(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CallSession_hold'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CallSession_hold'.\n" " Possible C/C++ prototypes are:\n" " hold(CallSession *,ActionConfig *)\n" " hold(CallSession *)\n"); @@ -10902,7 +10853,7 @@ SWIGINTERN PyObject *_wrap_CallSession_resume(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'CallSession_resume'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CallSession_resume'.\n" " Possible C/C++ prototypes are:\n" " resume(CallSession *,ActionConfig *)\n" " resume(CallSession *)\n"); @@ -11255,7 +11206,7 @@ SWIGINTERN PyObject *_wrap_MsrpSession_callMsrp(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MsrpSession_callMsrp'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MsrpSession_callMsrp'.\n" " Possible C/C++ prototypes are:\n" " callMsrp(MsrpSession *,char const *,ActionConfig *)\n" " callMsrp(MsrpSession *,char const *)\n" @@ -11407,7 +11358,7 @@ SWIGINTERN PyObject *_wrap_MsrpSession_sendMessage(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MsrpSession_sendMessage'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MsrpSession_sendMessage'.\n" " Possible C/C++ prototypes are:\n" " sendMessage(MsrpSession *,void const *,unsigned int,ActionConfig *)\n" " sendMessage(MsrpSession *,void const *,unsigned int)\n"); @@ -11503,7 +11454,7 @@ SWIGINTERN PyObject *_wrap_MsrpSession_sendFile(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MsrpSession_sendFile'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MsrpSession_sendFile'.\n" " Possible C/C++ prototypes are:\n" " sendFile(MsrpSession *,ActionConfig *)\n" " sendFile(MsrpSession *)\n"); @@ -11703,7 +11654,7 @@ SWIGINTERN PyObject *_wrap_MessagingSession_send(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MessagingSession_send'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MessagingSession_send'.\n" " Possible C/C++ prototypes are:\n" " send(MessagingSession *,void const *,unsigned int,ActionConfig *)\n" " send(MessagingSession *,void const *,unsigned int)\n"); @@ -11799,7 +11750,7 @@ SWIGINTERN PyObject *_wrap_MessagingSession_accept(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MessagingSession_accept'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MessagingSession_accept'.\n" " Possible C/C++ prototypes are:\n" " accept(MessagingSession *,ActionConfig *)\n" " accept(MessagingSession *)\n"); @@ -11895,7 +11846,7 @@ SWIGINTERN PyObject *_wrap_MessagingSession_reject(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MessagingSession_reject'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MessagingSession_reject'.\n" " Possible C/C++ prototypes are:\n" " reject(MessagingSession *,ActionConfig *)\n" " reject(MessagingSession *)\n"); @@ -12041,7 +11992,7 @@ SWIGINTERN PyObject *_wrap_OptionsSession_send(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OptionsSession_send'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'OptionsSession_send'.\n" " Possible C/C++ prototypes are:\n" " send(OptionsSession *,ActionConfig *)\n" " send(OptionsSession *)\n"); @@ -12137,7 +12088,7 @@ SWIGINTERN PyObject *_wrap_OptionsSession_accept(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OptionsSession_accept'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'OptionsSession_accept'.\n" " Possible C/C++ prototypes are:\n" " accept(OptionsSession *,ActionConfig *)\n" " accept(OptionsSession *)\n"); @@ -12233,7 +12184,7 @@ SWIGINTERN PyObject *_wrap_OptionsSession_reject(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OptionsSession_reject'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'OptionsSession_reject'.\n" " Possible C/C++ prototypes are:\n" " reject(OptionsSession *,ActionConfig *)\n" " reject(OptionsSession *)\n"); @@ -12433,7 +12384,7 @@ SWIGINTERN PyObject *_wrap_PublicationSession_publish(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'PublicationSession_publish'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PublicationSession_publish'.\n" " Possible C/C++ prototypes are:\n" " publish(PublicationSession *,void const *,unsigned int,ActionConfig *)\n" " publish(PublicationSession *,void const *,unsigned int)\n"); @@ -12529,7 +12480,7 @@ SWIGINTERN PyObject *_wrap_PublicationSession_unPublish(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'PublicationSession_unPublish'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PublicationSession_unPublish'.\n" " Possible C/C++ prototypes are:\n" " unPublish(PublicationSession *,ActionConfig *)\n" " unPublish(PublicationSession *)\n"); @@ -12719,7 +12670,7 @@ SWIGINTERN PyObject *_wrap_RegistrationSession_accept(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RegistrationSession_accept'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'RegistrationSession_accept'.\n" " Possible C/C++ prototypes are:\n" " accept(RegistrationSession *,ActionConfig *)\n" " accept(RegistrationSession *)\n"); @@ -12815,7 +12766,7 @@ SWIGINTERN PyObject *_wrap_RegistrationSession_reject(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RegistrationSession_reject'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'RegistrationSession_reject'.\n" " Possible C/C++ prototypes are:\n" " reject(RegistrationSession *,ActionConfig *)\n" " reject(RegistrationSession *)\n"); @@ -13870,7 +13821,7 @@ SWIGINTERN PyObject *_wrap_ProxyAudioConsumer_pull(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProxyAudioConsumer_pull'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ProxyAudioConsumer_pull'.\n" " Possible C/C++ prototypes are:\n" " pull(ProxyAudioConsumer *,void *,unsigned int)\n" " pull(ProxyAudioConsumer *,void *)\n" @@ -15198,7 +15149,7 @@ SWIGINTERN PyObject *_wrap_ProxyAudioProducer_push(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProxyAudioProducer_push'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ProxyAudioProducer_push'.\n" " Possible C/C++ prototypes are:\n" " push(ProxyAudioProducer *,void const *,unsigned int)\n" " push(ProxyAudioProducer *,void const *)\n" @@ -18450,7 +18401,7 @@ SWIGINTERN PyObject *_wrap_XcapMessage_getXcapHeaderValue(PyObject *self, PyObje } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'XcapMessage_getXcapHeaderValue'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'XcapMessage_getXcapHeaderValue'.\n" " Possible C/C++ prototypes are:\n" " getXcapHeaderValue(XcapMessage *,char const *,unsigned int)\n" " getXcapHeaderValue(XcapMessage *,char const *)\n"); @@ -18613,7 +18564,7 @@ SWIGINTERN PyObject *_wrap_XcapMessage_getXcapHeaderParamValue(PyObject *self, P } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'XcapMessage_getXcapHeaderParamValue'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'XcapMessage_getXcapHeaderParamValue'.\n" " Possible C/C++ prototypes are:\n" " getXcapHeaderParamValue(XcapMessage *,char const *,char const *,unsigned int)\n" " getXcapHeaderParamValue(XcapMessage *,char const *,char const *)\n"); @@ -21773,242 +21724,242 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif +#if 0 +} /* c-mode */ +#endif +#endif -#if 0 -#define SWIGRUNTIME_DEBUG -#endif +#if 0 +#define SWIGRUNTIME_DEBUG +#endif -SWIGRUNTIME void +SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int found, init; + size_t i; + swig_module_info *module_head, *iter; + int found, init; - clientdata = clientdata; + clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ + /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; } else { - init = 0; - } + init = 0; + } - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; - iter=module_head; + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; do { if (iter==&swig_module) { - found=1; - break; - } - iter=iter->next; - } while (iter!= module_head); + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif - /* if there is another module already loaded */ + /* if there is another module already loaded */ if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } } else { - type = swig_module.type_initial[i]; - } + type = swig_module.type_initial[i]; + } - /* Insert casting types */ - cast = swig_module.cast_initial[i]; + /* Insert casting types */ + cast = swig_module.cast_initial[i]; while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } if (ret) { if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; + size_t i; + swig_cast_info *equiv; + static int init_run = 0; - if (init_run) return; - init_run = 1; + if (init_run) return; + init_run = 1; for (i = 0; i < swig_module.size; i++) { if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; + equiv = swig_module.types[i]->cast; while (equiv) { if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} -#ifdef __cplusplus -#if 0 +#ifdef __cplusplus +#if 0 { - /* c-mode */ -#endif -} -#endif + /* c-mode */ +#endif +} +#endif @@ -22086,11 +22037,9 @@ extern "C" { SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); + fprintf(fp,"%s\n", SWIG_Python_str_AsChar(str)); Py_DECREF(str); return 0; } @@ -22158,7 +22107,7 @@ extern "C" { (char *)"swigvarlink", /* Type name (tp_name) */ sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 0, /* Itemsize (tp_itemsize) */ - (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ + (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ (printfunc) swig_varlink_print, /* Print (tp_print) */ (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ @@ -22169,7 +22118,7 @@ extern "C" { 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ + (reprfunc)swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ @@ -22190,7 +22139,7 @@ extern "C" { #endif }; varlink_type = tmp; - /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ + /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */ #if PY_VERSION_HEX < 0x03000000 varlink_type.ob_type = &PyType_Type; #endif @@ -22285,15 +22234,15 @@ extern "C" { } } if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); @@ -22326,7 +22275,10 @@ PyObject* void #endif SWIG_init(void) { - PyObject *m, *d; + PyObject *m, *d; + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, @@ -22339,12 +22291,7 @@ SWIG_init(void) { NULL, NULL }; -#endif - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); @@ -22467,6 +22414,7 @@ SWIG_init(void) { SWIG_Python_SetConstant(d, "tdav_codec_id_h264_bp30",SWIG_From_int(static_cast< int >(tdav_codec_id_h264_bp30))); SWIG_Python_SetConstant(d, "tdav_codec_id_theora",SWIG_From_int(static_cast< int >(tdav_codec_id_theora))); SWIG_Python_SetConstant(d, "tdav_codec_id_mp4ves_es",SWIG_From_int(static_cast< int >(tdav_codec_id_mp4ves_es))); + SWIG_Python_SetConstant(d, "tdav_codec_id_vp8",SWIG_From_int(static_cast< int >(tdav_codec_id_vp8))); SWIG_Python_SetConstant(d, "thttp_event_dialog_started",SWIG_From_int(static_cast< int >(thttp_event_dialog_started))); SWIG_Python_SetConstant(d, "thttp_event_message",SWIG_From_int(static_cast< int >(thttp_event_message))); SWIG_Python_SetConstant(d, "thttp_event_auth_failed",SWIG_From_int(static_cast< int >(thttp_event_auth_failed))); diff --git a/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.h b/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.h index 33ee3a2e..a360b011 100644 --- a/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.h +++ b/branches/2.0/doubango/bindings/python/tinyWRAP_wrap.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.2 + * Version 1.3.39 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -28,16 +28,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -47,7 +47,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class DDebugCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -74,16 +74,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -93,7 +93,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class ProxyPluginMgrCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -122,16 +122,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -141,7 +141,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class ProxyAudioConsumerCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -172,16 +172,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -191,7 +191,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class ProxyVideoConsumerCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -220,16 +220,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -239,7 +239,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class ProxyAudioProducerCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -268,16 +268,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -287,7 +287,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class ProxyVideoProducerCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -320,16 +320,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -339,7 +339,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class SipCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -365,16 +365,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -384,7 +384,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class XcapCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); @@ -410,16 +410,16 @@ public: /* Internal Director utilities */ public: - bool swig_get_inner(const char* swig_protected_method_name) const { - std::map::const_iterator iv = swig_inner.find(swig_protected_method_name); - return (iv != swig_inner.end() ? iv->second : false); + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); } - void swig_set_inner(const char* swig_protected_method_name, bool swig_val) const - { swig_inner[swig_protected_method_name] = swig_val;} + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} private: - mutable std::map swig_inner; + mutable std::map inner; #if defined(SWIG_PYTHON_DIRECTOR_VTABLE) @@ -429,7 +429,7 @@ private: if (!method) { swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); method = PyObject_GetAttr(swig_get_self(), name); - if (!method) { + if (method == NULL) { std::string msg = "Method in class MsrpCallback doesn't exist, undefined "; msg += method_name; Swig::DirectorMethodException::raise(msg.c_str()); diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vp8.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8.h new file mode 100644 index 00000000..27eefa30 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8.h @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup vp8 VP8 + * \ingroup codecs + * VP8 is vpx's newest video compression algorithm that uses motion + * compensated prediction, Discrete Cosine Transform (DCT) coding of the + * prediction error signal and context dependent entropy coding techniques + * based on arithmetic principles. It features: + * - YUV 4:2:0 image format + * - Macro-block based coding (16x16 luma plus two 8x8 chroma) + * - 1/4 (1/8) pixel accuracy motion compensated prediction + * - 4x4 DCT transform + * - 128 level linear quantizer + * - In loop deblocking filter + * - Context-based entropy coding + * + * @{ + */ +/*!\file + * \brief Provides controls common to both the VP8 encoder and decoder. + */ +#ifndef VP8_H +#define VP8_H +#include "vpx_codec_impl_top.h" + +/*!\brief Control functions + * + * The set of macros define the control functions of VP8 interface + */ +enum vp8_com_control_id +{ + VP8_SET_REFERENCE = 1, /**< pass in an external frame into decoder to be used as reference frame */ + VP8_COPY_REFERENCE = 2, /**< get a copy of reference frame from the decoder */ + VP8_SET_POSTPROC = 3, /**< set the decoder's post processing settings */ + VP8_SET_DBG_COLOR_REF_FRAME = 4, /**< set the reference frames to color for each macroblock */ + VP8_SET_DBG_COLOR_MB_MODES = 5, /**< set which macro block modes to color */ + VP8_SET_DBG_COLOR_B_MODES = 6, /**< set which blocks modes to color */ + VP8_SET_DBG_DISPLAY_MV = 7, /**< set which motion vector modes to draw */ + VP8_COMMON_CTRL_ID_MAX, + VP8_DECODER_CTRL_ID_START = 256, +}; + +/*!\brief post process flags + * + * The set of macros define VP8 decoder post processing flags + */ +enum vp8_postproc_level +{ + VP8_NOFILTERING = 0, + VP8_DEBLOCK = 1<<0, + VP8_DEMACROBLOCK = 1<<1, + VP8_ADDNOISE = 1<<2, + VP8_DEBUG_TXT_FRAME_INFO = 1<<3, /**< print frame information */ + VP8_DEBUG_TXT_MBLK_MODES = 1<<4, /**< print macro block modes over each macro block */ + VP8_DEBUG_TXT_DC_DIFF = 1<<5, /**< print dc diff for each macro block */ + VP8_DEBUG_TXT_RATE_INFO = 1<<6, /**< print video rate info (encoder only) */ +}; + +/*!\brief post process flags + * + * This define a structure that describe the post processing settings. For + * the best objective measure (using the PSNR metric) set post_proc_flag + * to VP8_DEBLOCK and deblocking_level to 1. + */ + +typedef struct vp8_postproc_cfg +{ + int post_proc_flag; /**< the types of post processing to be done, should be combination of "vp8_postproc_level" */ + int deblocking_level; /**< the strength of deblocking, valid range [0, 16] */ + int noise_level; /**< the strength of additive noise, valid range [0, 16] */ +} vp8_postproc_cfg_t; + +/*!\brief reference frame type + * + * The set of macros define the type of VP8 reference frames + */ +typedef enum vpx_ref_frame_type +{ + VP8_LAST_FRAME = 1, + VP8_GOLD_FRAME = 2, + VP8_ALTR_FRAME = 4 +} vpx_ref_frame_type_t; + +/*!\brief reference frame data struct + * + * define the data struct to access vp8 reference frames + */ + +typedef struct vpx_ref_frame +{ + vpx_ref_frame_type_t frame_type; /**< which reference frame */ + vpx_image_t img; /**< reference frame data in image format */ +} vpx_ref_frame_t; + + +/*!\brief vp8 decoder control function parameter type + * + * defines the data type for each of VP8 decoder control function requires + */ + +VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int) + + +/*! @} - end defgroup vp8 */ + +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +/* The following definitions are provided for backward compatibility with + * the VP8 1.0.x SDK. USE IN PRODUCTION CODE IS NOT RECOMMENDED. + */ + +DECLSPEC_DEPRECATED extern vpx_codec_iface_t vpx_codec_vp8_algo DEPRECATED; +#endif + +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vp8cx.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8cx.h new file mode 100644 index 00000000..482409e1 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8cx.h @@ -0,0 +1,317 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup vp8_encoder WebM VP8 Encoder + * \ingroup vp8 + * + * @{ + */ +#include "vp8.h" + +/*!\file + * \brief Provides definitions for using the VP8 encoder algorithm within the + * vpx Codec Interface. + */ +#ifndef VP8CX_H +#define VP8CX_H +#include "vpx_codec_impl_top.h" + +/*!\name Algorithm interface for VP8 + * + * This interface provides the capability to encode raw VP8 streams, as would + * be found in AVI files. + * @{ + */ +extern vpx_codec_iface_t vpx_codec_vp8_cx_algo; +extern vpx_codec_iface_t* vpx_codec_vp8_cx(void); +/*!@} - end algorithm interface member group*/ + + +/* + * Algorithm Flags + */ + +/*!\brief Don't reference the last frame + * + * When this flag is set, the encoder will not use the last frame as a + * predictor. When not set, the encoder will choose whether to use the + * last frame or not automatically. + */ +#define VP8_EFLAG_NO_REF_LAST (1<<16) + + +/*!\brief Don't reference the golden frame + * + * When this flag is set, the encoder will not use the golden frame as a + * predictor. When not set, the encoder will choose whether to use the + * golden frame or not automatically. + */ +#define VP8_EFLAG_NO_REF_GF (1<<17) + + +/*!\brief Don't reference the alternate reference frame + * + * When this flag is set, the encoder will not use the alt ref frame as a + * predictor. When not set, the encoder will choose whether to use the + * alt ref frame or not automatically. + */ +#define VP8_EFLAG_NO_REF_ARF (1<<21) + + +/*!\brief Don't update the last frame + * + * When this flag is set, the encoder will not update the last frame with + * the contents of the current frame. + */ +#define VP8_EFLAG_NO_UPD_LAST (1<<18) + + +/*!\brief Don't update the golden frame + * + * When this flag is set, the encoder will not update the golden frame with + * the contents of the current frame. + */ +#define VP8_EFLAG_NO_UPD_GF (1<<22) + + +/*!\brief Don't update the alternate reference frame + * + * When this flag is set, the encoder will not update the alt ref frame with + * the contents of the current frame. + */ +#define VP8_EFLAG_NO_UPD_ARF (1<<23) + + +/*!\brief Force golden frame update + * + * When this flag is set, the encoder copy the contents of the current frame + * to the golden frame buffer. + */ +#define VP8_EFLAG_FORCE_GF (1<<19) + + +/*!\brief Force alternate reference frame update + * + * When this flag is set, the encoder copy the contents of the current frame + * to the alternate reference frame buffer. + */ +#define VP8_EFLAG_FORCE_ARF (1<<24) + + +/*!\brief Disable entropy update + * + * When this flag is set, the encoder will not update its internal entropy + * model based on the entropy of this frame. + */ +#define VP8_EFLAG_NO_UPD_ENTROPY (1<<20) + + +/*!\brief VP8 encoder control functions + * + * This set of macros define the control functions available for the VP8 + * encoder interface. + * + * \sa #vpx_codec_control + */ +enum vp8e_enc_control_id +{ + VP8E_UPD_ENTROPY = 5, /**< control function to set mode of entropy update in encoder */ + VP8E_UPD_REFERENCE, /**< control function to set reference update mode in encoder */ + VP8E_USE_REFERENCE, /**< control function to set which reference frame encoder can use */ + VP8E_SET_ROI_MAP, /**< control function to pass an ROI map to encoder */ + VP8E_SET_ACTIVEMAP, /**< control function to pass an Active map to encoder */ + VP8E_SET_SCALEMODE = 11, /**< control function to set encoder scaling mode */ + /*!\brief control function to set vp8 encoder cpuused + * + * Changes in this value influences, among others, the encoder's selection + * of motion estimation methods. Values greater than 0 will increase encoder + * speed at the expense of quality. + * The full set of adjustments can be found in + * onyx_if.c:vp8_set_speed_features(). + * \todo List highlights of the changes at various levels. + * + * \note Valid range: -16..16 + */ + VP8E_SET_CPUUSED = 13, + VP8E_SET_ENABLEAUTOALTREF, /**< control function to enable vp8 to automatic set and use altref frame */ + VP8E_SET_NOISE_SENSITIVITY, /**< control function to set noise sensitivity */ + VP8E_SET_SHARPNESS, /**< control function to set sharpness */ + VP8E_SET_STATIC_THRESHOLD, /**< control function to set the threshold for macroblocks treated static */ + VP8E_SET_TOKEN_PARTITIONS, /**< control function to set the number of token partitions */ + VP8E_GET_LAST_QUANTIZER, /**< return the quantizer chosen by the + encoder for the last frame using the internal + scale */ + VP8E_GET_LAST_QUANTIZER_64, /**< return the quantizer chosen by the + encoder for the last frame, using the 0..63 + scale as used by the rc_*_quantizer config + parameters */ + VP8E_SET_ARNR_MAXFRAMES, /**< control function to set the max number of frames blurred creating arf*/ + VP8E_SET_ARNR_STRENGTH , /**< control function to set the filter strength for the arf */ + VP8E_SET_ARNR_TYPE , /**< control function to set the type of filter to use for the arf*/ + VP8E_SET_TUNING, /**< control function to set visual tuning */ + /*!\brief control function to set constrained quality level + * + * \attention For this value to be used vpx_codec_enc_cfg_t::g_usage must be + * set to #VPX_CQ. + * \note Valid range: 0..63 + */ + VP8E_SET_CQ_LEVEL, + + /*!\brief Max data rate for Intra frames + * + * This value controls additional clamping on the maximum size of a + * keyframe. It is expressed as a percentage of the average + * per-frame bitrate, with the special (and default) value 0 meaning + * unlimited, or no additional clamping beyond the codec's built-in + * algorithm. + * + * For example, to allocate no more than 4.5 frames worth of bitrate + * to a keyframe, set this to 450. + * + */ + VP8E_SET_MAX_INTRA_BITRATE_PCT, +}; + +/*!\brief vpx 1-D scaling mode + * + * This set of constants define 1-D vpx scaling modes + */ +typedef enum vpx_scaling_mode_1d +{ + VP8E_NORMAL = 0, + VP8E_FOURFIVE = 1, + VP8E_THREEFIVE = 2, + VP8E_ONETWO = 3 +} VPX_SCALING_MODE; + + +/*!\brief vpx region of interest map + * + * These defines the data structures for the region of interest map + * + */ + +typedef struct vpx_roi_map +{ + unsigned char *roi_map; /**< specify an id between 0 and 3 for each 16x16 region within a frame */ + unsigned int rows; /**< number of rows */ + unsigned int cols; /**< number of cols */ + int delta_q[4]; /**< quantizer delta [-64, 64] off baseline for regions with id between 0 and 3*/ + int delta_lf[4]; /**< loop filter strength delta [-32, 32] for regions with id between 0 and 3 */ + unsigned int static_threshold[4];/**< threshold for region to be treated as static */ +} vpx_roi_map_t; + +/*!\brief vpx active region map + * + * These defines the data structures for active region map + * + */ + + +typedef struct vpx_active_map +{ + unsigned char *active_map; /**< specify an on (1) or off (0) each 16x16 region within a frame */ + unsigned int rows; /**< number of rows */ + unsigned int cols; /**< number of cols */ +} vpx_active_map_t; + +/*!\brief vpx image scaling mode + * + * This defines the data structure for image scaling mode + * + */ +typedef struct vpx_scaling_mode +{ + VPX_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */ + VPX_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */ +} vpx_scaling_mode_t; + +/*!\brief VP8 encoding mode + * + * This defines VP8 encoding mode + * + */ +typedef enum +{ + VP8_BEST_QUALITY_ENCODING, + VP8_GOOD_QUALITY_ENCODING, + VP8_REAL_TIME_ENCODING +} vp8e_encoding_mode; + +/*!\brief VP8 token partition mode + * + * This defines VP8 partitioning mode for compressed data, i.e., the number of + * sub-streams in the bitstream. Used for parallelized decoding. + * + */ + +typedef enum +{ + VP8_ONE_TOKENPARTITION = 0, + VP8_TWO_TOKENPARTITION = 1, + VP8_FOUR_TOKENPARTITION = 2, + VP8_EIGHT_TOKENPARTITION = 3, +} vp8e_token_partitions; + + +/*!\brief VP8 model tuning parameters + * + * Changes the encoder to tune for certain types of input material. + * + */ +typedef enum +{ + VP8_TUNE_PSNR, + VP8_TUNE_SSIM +} vp8e_tuning; + + +/*!\brief VP8 encoder control function parameter type + * + * Defines the data types that VP8E control functions take. Note that + * additional common controls are defined in vp8.h + * + */ + + +/* These controls have been deprecated in favor of the flags parameter to + * vpx_codec_encode(). See the definition of VP8_EFLAG_* above. + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_ENTROPY, int) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_REFERENCE, int) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_USE_REFERENCE, int) + +VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *) +VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *) +VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *) + +VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int) +VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, vp8e_token_partitions) + +VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH , unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_TYPE , unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, vp8e_tuning) +VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL , unsigned int) + +VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *) +VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *) + +VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) + + +/*! @} - end defgroup vp8_encoder */ +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vp8dx.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8dx.h new file mode 100644 index 00000000..47760695 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8dx.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +#include "vp8.h" + +/*!\defgroup vp8_decoder WebM VP8 Decoder + * \ingroup vp8 + * + * @{ + */ +/*!\file + * \brief Provides definitions for using the VP8 algorithm within the vpx Decoder + * interface. + */ +#ifndef VP8DX_H +#define VP8DX_H +#include "vpx_codec_impl_top.h" + +/*!\name Algorithm interface for VP8 + * + * This interface provides the capability to decode raw VP8 streams, as would + * be found in AVI files and other non-Flash uses. + * @{ + */ +extern vpx_codec_iface_t vpx_codec_vp8_dx_algo; +extern vpx_codec_iface_t* vpx_codec_vp8_dx(void); +/*!@} - end algorithm interface member group*/ + +/* Include controls common to both the encoder and decoder */ +#include "vp8.h" + + +/*!\brief VP8 decoder control functions + * + * This set of macros define the control functions available for the VP8 + * decoder interface. + * + * \sa #vpx_codec_control + */ +enum vp8_dec_control_id +{ + /** control function to get info on which reference frames were updated + * by the last decode + */ + VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START, + + /** check if the indicated frame is corrupted */ + VP8D_GET_FRAME_CORRUPTED, + + VP8_DECODER_CTRL_ID_MAX +} ; + + +/*!\brief VP8 decoder control function parameter type + * + * Defines the data types that VP8D control functions take. Note that + * additional common controls are defined in vp8.h + * + */ + + +VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *) +VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *) + + +/*! @} - end defgroup vp8_decoder */ + + +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vp8e.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8e.h new file mode 100644 index 00000000..4273a682 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vp8e.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/* This file contains backwards compatibility stubs for applications using + * the VP8 version 1.0 API. + */ +#ifndef VP8E_H +#define VP8E_H +#include "vpx_codec_impl_top.h" + +#if defined(VPX_CODEC_DISABLE_COMPAT) && VPX_CODEC_DISABLE_COMPAT +#error "Backwards compatibility disabled: don't include vp8e.h" +#endif + +#include "vp8cx.h" +DECLSPEC_DEPRECATED extern vpx_codec_iface_t vpx_enc_vp8_algo DEPRECATED; + + +enum +{ + VP8E_SET_REFERENCE = VP8_SET_REFERENCE, + VP8E_COPY_REFERENCE = VP8_COPY_REFERENCE, + VP8E_SET_PREVIEWPP = VP8_SET_POSTPROC, + VP8E_SET_FLUSHFLAG = 4, + VP8E_SET_FRAMETYPE = 10, + VP8E_SET_ENCODING_MODE = 12 +}; + +#define NORMAL_FRAME (0) +#define KEY_FRAME (1) + +/* Change VP8E to VP8 to get the undeprecated version of these (defined in + * vp8.h) + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_COPY_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_PREVIEWPP, vp8_postproc_cfg_t *) + + +/* Flush is done by calling vpx_codec_encode with a NULL input image. */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_FLUSHFLAG, int) + + +/* Frame type is set with a flag to vpx_codec_control. See VPX_EFLAG_FORCE_KF + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_FRAMETYPE, int) + + +/* This control has been deprecated in favor of the duration parameter to + * vpx_codec_encode(). Use the #VPX_DL_REALTIME, #VPX_DL_GOOD_QUALITY, + * #VPX_DL_BEST_QUALITY constants to that parameter instead. + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ENCODING_MODE, vp8e_encoding_mode) +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec.h new file mode 100644 index 00000000..a9e2e761 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec.h @@ -0,0 +1,554 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup codec Common Algorithm Interface + * This abstraction allows applications to easily support multiple video + * formats with minimal code duplication. This section describes the interface + * common to all codecs (both encoders and decoders). + * @{ + */ + +/*!\file + * \brief Describes the codec algorithm interface to applications. + * + * This file describes the interface between an application and a + * video codec algorithm. + * + * An application instantiates a specific codec instance by using + * vpx_codec_init() and a pointer to the algorithm's interface structure: + *
+ *     my_app.c:
+ *       extern vpx_codec_iface_t my_codec;
+ *       {
+ *           vpx_codec_ctx_t algo;
+ *           res = vpx_codec_init(&algo, &my_codec);
+ *       }
+ *     
+ * + * Once initialized, the instance is manged using other functions from + * the vpx_codec_* family. + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_CODEC_H +#define VPX_CODEC_H +#include "vpx_integer.h" +#include "vpx_image.h" + + /*!\brief Decorator indicating a function is deprecated */ +#ifndef DEPRECATED +#if defined(__GNUC__) && __GNUC__ +#define DEPRECATED __attribute__ ((deprecated)) +#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */ +#elif defined(_MSC_VER) +#define DEPRECATED +#define DECLSPEC_DEPRECATED __declspec(deprecated) /**< \copydoc #DEPRECATED */ +#else +#define DEPRECATED +#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */ +#endif +#endif + + /*!\brief Decorator indicating a function is potentially unused */ +#ifdef UNUSED +#elif __GNUC__ +#define UNUSED __attribute__ ((unused)) +#else +#define UNUSED +#endif + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_CODEC_ABI_VERSION (2 + VPX_IMAGE_ABI_VERSION) /**<\hideinitializer*/ + + /*!\brief Algorithm return codes */ + typedef enum { + /*!\brief Operation completed without error */ + VPX_CODEC_OK, + + /*!\brief Unspecified error */ + VPX_CODEC_ERROR, + + /*!\brief Memory operation failed */ + VPX_CODEC_MEM_ERROR, + + /*!\brief ABI version mismatch */ + VPX_CODEC_ABI_MISMATCH, + + /*!\brief Algorithm does not have required capability */ + VPX_CODEC_INCAPABLE, + + /*!\brief The given bitstream is not supported. + * + * The bitstream was unable to be parsed at the highest level. The decoder + * is unable to proceed. This error \ref SHOULD be treated as fatal to the + * stream. */ + VPX_CODEC_UNSUP_BITSTREAM, + + /*!\brief Encoded bitstream uses an unsupported feature + * + * The decoder does not implement a feature required by the encoder. This + * return code should only be used for features that prevent future + * pictures from being properly decoded. This error \ref MAY be treated as + * fatal to the stream or \ref MAY be treated as fatal to the current GOP. + */ + VPX_CODEC_UNSUP_FEATURE, + + /*!\brief The coded data for this stream is corrupt or incomplete + * + * There was a problem decoding the current frame. This return code + * should only be used for failures that prevent future pictures from + * being properly decoded. This error \ref MAY be treated as fatal to the + * stream or \ref MAY be treated as fatal to the current GOP. If decoding + * is continued for the current GOP, artifacts may be present. + */ + VPX_CODEC_CORRUPT_FRAME, + + /*!\brief An application-supplied parameter is not valid. + * + */ + VPX_CODEC_INVALID_PARAM, + + /*!\brief An iterator reached the end of list. + * + */ + VPX_CODEC_LIST_END + + } + vpx_codec_err_t; + + + /*! \brief Codec capabilities bitfield + * + * Each codec advertises the capabilities it supports as part of its + * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces + * or functionality, and are not required to be supported. + * + * The available flags are specified by VPX_CODEC_CAP_* defines. + */ + typedef long vpx_codec_caps_t; +#define VPX_CODEC_CAP_DECODER 0x1 /**< Is a decoder */ +#define VPX_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */ +#define VPX_CODEC_CAP_XMA 0x4 /**< Supports eXternal Memory Allocation */ + + + /*! \brief Initialization-time Feature Enabling + * + * Certain codec features must be known at initialization time, to allow for + * proper memory allocation. + * + * The available flags are specified by VPX_CODEC_USE_* defines. + */ + typedef long vpx_codec_flags_t; +#define VPX_CODEC_USE_XMA 0x00000001 /**< Use eXternal Memory Allocation mode */ + + + /*!\brief Codec interface structure. + * + * Contains function pointers and other data private to the codec + * implementation. This structure is opaque to the application. + */ + typedef const struct vpx_codec_iface vpx_codec_iface_t; + + + /*!\brief Codec private data structure. + * + * Contains data private to the codec implementation. This structure is opaque + * to the application. + */ + typedef struct vpx_codec_priv vpx_codec_priv_t; + + + /*!\brief Iterator + * + * Opaque storage used for iterating over lists. + */ + typedef const void *vpx_codec_iter_t; + + + /*!\brief Codec context structure + * + * All codecs \ref MUST support this context structure fully. In general, + * this data should be considered private to the codec algorithm, and + * not be manipulated or examined by the calling application. Applications + * may reference the 'name' member to get a printable description of the + * algorithm. + */ + typedef struct vpx_codec_ctx + { + const char *name; /**< Printable interface name */ + vpx_codec_iface_t *iface; /**< Interface pointers */ + vpx_codec_err_t err; /**< Last returned error */ + const char *err_detail; /**< Detailed info, if available */ + vpx_codec_flags_t init_flags; /**< Flags passed at init time */ + union + { + struct vpx_codec_dec_cfg *dec; /**< Decoder Configuration Pointer */ + struct vpx_codec_enc_cfg *enc; /**< Encoder Configuration Pointer */ + void *raw; + } config; /**< Configuration pointer aliasing union */ + vpx_codec_priv_t *priv; /**< Algorithm private storage */ + } vpx_codec_ctx_t; + + + /* + * Library Version Number Interface + * + * For example, see the following sample return values: + * vpx_codec_version() (1<<16 | 2<<8 | 3) + * vpx_codec_version_str() "v1.2.3-rc1-16-gec6a1ba" + * vpx_codec_version_extra_str() "rc1-16-gec6a1ba" + */ + + /*!\brief Return the version information (as an integer) + * + * Returns a packed encoding of the library version number. This will only include + * the major.minor.patch component of the version number. Note that this encoded + * value should be accessed through the macros provided, as the encoding may change + * in the future. + * + */ + int vpx_codec_version(void); +#define VPX_VERSION_MAJOR(v) ((v>>16)&0xff) /**< extract major from packed version */ +#define VPX_VERSION_MINOR(v) ((v>>8)&0xff) /**< extract minor from packed version */ +#define VPX_VERSION_PATCH(v) ((v>>0)&0xff) /**< extract patch from packed version */ + + /*!\brief Return the version major number */ +#define vpx_codec_version_major() ((vpx_codec_version()>>16)&0xff) + + /*!\brief Return the version minor number */ +#define vpx_codec_version_minor() ((vpx_codec_version()>>8)&0xff) + + /*!\brief Return the version patch number */ +#define vpx_codec_version_patch() ((vpx_codec_version()>>0)&0xff) + + + /*!\brief Return the version information (as a string) + * + * Returns a printable string containing the full library version number. This may + * contain additional text following the three digit version number, as to indicate + * release candidates, prerelease versions, etc. + * + */ + const char *vpx_codec_version_str(void); + + + /*!\brief Return the version information (as a string) + * + * Returns a printable "extra string". This is the component of the string returned + * by vpx_codec_version_str() following the three digit version number. + * + */ + const char *vpx_codec_version_extra_str(void); + + + /*!\brief Return the build configuration + * + * Returns a printable string containing an encoded version of the build + * configuration. This may be useful to vpx support. + * + */ + const char *vpx_codec_build_config(void); + + + /*!\brief Return the name for a given interface + * + * Returns a human readable string for name of the given codec interface. + * + * \param[in] iface Interface pointer + * + */ + const char *vpx_codec_iface_name(vpx_codec_iface_t *iface); + + + /*!\brief Convert error number to printable string + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] err Error number. + * + */ + const char *vpx_codec_err_to_string(vpx_codec_err_t err); + + + /*!\brief Retrieve error synopsis for codec context + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] ctx Pointer to this instance's context. + * + */ + const char *vpx_codec_error(vpx_codec_ctx_t *ctx); + + + /*!\brief Retrieve detailed error information for codec context + * + * Returns a human readable string providing detailed information about + * the last error. + * + * \param[in] ctx Pointer to this instance's context. + * + * \retval NULL + * No detailed information is available. + */ + const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx); + + + /* REQUIRED FUNCTIONS + * + * The following functions are required to be implemented for all codecs. + * They represent the base case functionality expected of all codecs. + */ + + /*!\brief Destroy a codec instance + * + * Destroys a codec context, freeing any associated memory buffers. + * + * \param[in] ctx Pointer to this instance's context + * + * \retval #VPX_CODEC_OK + * The codec algorithm initialized. + * \retval #VPX_CODEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx); + + + /*!\brief Get the capabilities of an algorithm. + * + * Retrieves the capabilities bitfield from the algorithm's interface. + * + * \param[in] iface Pointer to the algorithm interface + * + */ + vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface); + + + /*!\brief Control algorithm + * + * This function is used to exchange algorithm specific data with the codec + * instance. This can be used to implement features specific to a particular + * algorithm. + * + * This wrapper function dispatches the request to the helper function + * associated with the given ctrl_id. It tries to call this function + * transparently, but will return #VPX_CODEC_ERROR if the request could not + * be dispatched. + * + * Note that this function should not be used directly. Call the + * #vpx_codec_control wrapper macro instead. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] ctrl_id Algorithm specific control identifier + * + * \retval #VPX_CODEC_OK + * The control request was processed. + * \retval #VPX_CODEC_ERROR + * The control request was not processed. + * \retval #VPX_CODEC_INVALID_PARAM + * The data was not valid. + */ + vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, + int ctrl_id, + ...); +#if defined(VPX_DISABLE_CTRL_TYPECHECKS) && VPX_DISABLE_CTRL_TYPECHECKS +# define vpx_codec_control(ctx,id,data) vpx_codec_control_(ctx,id,data) +# define VPX_CTRL_USE_TYPE(id, typ) +# define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) +# define VPX_CTRL_VOID(id, typ) + +#else + /*!\brief vpx_codec_control wrapper macro + * + * This macro allows for type safe conversions across the variadic parameter + * to vpx_codec_control_(). + * + * \internal + * It works by dispatching the call to the control function through a wrapper + * function named with the id parameter. + */ +# define vpx_codec_control(ctx,id,data) vpx_codec_control_##id(ctx,id,data)\ + /**<\hideinitializer*/ + + + /*!\brief vpx_codec_control type definition macro + * + * This macro allows for type safe conversions across the variadic parameter + * to vpx_codec_control_(). It defines the type of the argument for a given + * control identifier. + * + * \internal + * It defines a static function with + * the correctly typed arguments as a wrapper to the type-unsafe internal + * function. + */ +# define VPX_CTRL_USE_TYPE(id, typ) \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) UNUSED;\ + \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\ + return vpx_codec_control_(ctx, ctrl_id, data);\ + } /**<\hideinitializer*/ + + + /*!\brief vpx_codec_control deprecated type definition macro + * + * Like #VPX_CTRL_USE_TYPE, but indicates that the specified control is + * deprecated and should not be used. Consult the documentation for your + * codec for more information. + * + * \internal + * It defines a static function with the correctly typed arguments as a + * wrapper to the type-unsafe internal function. + */ +# define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \ + DECLSPEC_DEPRECATED static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) DEPRECATED UNUSED;\ + \ + DECLSPEC_DEPRECATED static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\ + return vpx_codec_control_(ctx, ctrl_id, data);\ + } /**<\hideinitializer*/ + + + /*!\brief vpx_codec_control void type definition macro + * + * This macro allows for type safe conversions across the variadic parameter + * to vpx_codec_control_(). It indicates that a given control identifier takes + * no argument. + * + * \internal + * It defines a static function without a data argument as a wrapper to the + * type-unsafe internal function. + */ +# define VPX_CTRL_VOID(id) \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t*, int) UNUSED;\ + \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id) {\ + return vpx_codec_control_(ctx, ctrl_id);\ + } /**<\hideinitializer*/ + + +#endif + + + /*!\defgroup cap_xma External Memory Allocation Functions + * + * The following functions are required to be implemented for all codecs + * that advertise the VPX_CODEC_CAP_XMA capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_CODEC_INCAPABLE + * @{ + */ + + + /*!\brief Memory Map Entry + * + * This structure is used to contain the properties of a memory segment. It + * is populated by the codec in the request phase, and by the calling + * application once the requested allocation has been performed. + */ + typedef struct vpx_codec_mmap + { + /* + * The following members are set by the codec when requesting a segment + */ + unsigned int id; /**< identifier for the segment's contents */ + unsigned long sz; /**< size of the segment, in bytes */ + unsigned int align; /**< required alignment of the segment, in bytes */ + unsigned int flags; /**< bitfield containing segment properties */ +#define VPX_CODEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */ +#define VPX_CODEC_MEM_WRONLY 0x2 /**< Segment need not be readable */ +#define VPX_CODEC_MEM_FAST 0x4 /**< Place in fast memory, if available */ + + /* The following members are to be filled in by the allocation function */ + void *base; /**< pointer to the allocated segment */ + void (*dtor)(struct vpx_codec_mmap *map); /**< destructor to call */ + void *priv; /**< allocator private storage */ + } vpx_codec_mmap_t; /**< alias for struct vpx_codec_mmap */ + + + /*!\brief Iterate over the list of segments to allocate. + * + * Iterates over a list of the segments to allocate. The iterator storage + * should be initialized to NULL to start the iteration. Iteration is complete + * when this function returns VPX_CODEC_LIST_END. The amount of memory needed to + * allocate is dependent upon the size of the encoded stream. In cases where the + * stream is not available at allocation time, a fixed size must be requested. + * The codec will not be able to operate on streams larger than the size used at + * allocation time. + * + * \param[in] ctx Pointer to this instance's context. + * \param[out] mmap Pointer to the memory map entry to populate. + * \param[in,out] iter Iterator storage, initialized to NULL + * + * \retval #VPX_CODEC_OK + * The memory map entry was populated. + * \retval #VPX_CODEC_ERROR + * Codec does not support XMA mode. + * \retval #VPX_CODEC_MEM_ERROR + * Unable to determine segment size from stream info. + */ + vpx_codec_err_t vpx_codec_get_mem_map(vpx_codec_ctx_t *ctx, + vpx_codec_mmap_t *mmap, + vpx_codec_iter_t *iter); + + + /*!\brief Identify allocated segments to codec instance + * + * Stores a list of allocated segments in the codec. Segments \ref MUST be + * passed in the order they are read from vpx_codec_get_mem_map(), but may be + * passed in groups of any size. Segments \ref MUST be set only once. The + * allocation function \ref MUST ensure that the vpx_codec_mmap_t::base member + * is non-NULL. If the segment requires cleanup handling (e.g., calling free() + * or close()) then the vpx_codec_mmap_t::dtor member \ref MUST be populated. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] mmaps Pointer to the first memory map entry in the list. + * \param[in] num_maps Number of entries being set at this time + * + * \retval #VPX_CODEC_OK + * The segment was stored in the codec context. + * \retval #VPX_CODEC_INCAPABLE + * Codec does not support XMA mode. + * \retval #VPX_CODEC_MEM_ERROR + * Segment base address was not set, or segment was already stored. + + */ + vpx_codec_err_t vpx_codec_set_mem_map(vpx_codec_ctx_t *ctx, + vpx_codec_mmap_t *mmaps, + unsigned int num_maps); + + /*!@} - end defgroup cap_xma*/ + /*!@} - end defgroup codec*/ + + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec_impl_bottom.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec_impl_bottom.h new file mode 100644 index 00000000..8348e1cb --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec_impl_bottom.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/* + * This file is to be included at the bottom of the header files defining the + * interface to individual codecs and contains matching blocks to those defined + * in vpx_codec_impl_top.h + */ +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec_impl_top.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec_impl_top.h new file mode 100644 index 00000000..ea1d1f3e --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_codec_impl_top.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/* + * This file is to be included at the top of the header files defining the + * interface to individual codecs and contains various workarounds common + * to all codec implementations. + */ +#ifdef __cplusplus +extern "C" { +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_decoder.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_decoder.h new file mode 100644 index 00000000..18bac4e0 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_decoder.h @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup decoder Decoder Algorithm Interface + * \ingroup codec + * This abstraction allows applications using this decoder to easily support + * multiple video formats with minimal code duplication. This section describes + * the interface common to all decoders. + * @{ + */ + +/*!\file + * \brief Describes the decoder algorithm interface to applications. + * + * This file describes the interface between an application and a + * video decoder algorithm. + * + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_DECODER_H +#define VPX_DECODER_H +#include "vpx_codec.h" + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/ + + /*! \brief Decoder capabilities bitfield + * + * Each decoder advertises the capabilities it supports as part of its + * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces + * or functionality, and are not required to be supported by a decoder. + * + * The available flags are specified by VPX_CODEC_CAP_* defines. + */ +#define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */ +#define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */ +#define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */ +#define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000 /**< Can conceal errors due to + packet loss */ +#define VPX_CODEC_CAP_INPUT_PARTITION 0x100000 /**< Can receive encoded frames + one partition at a time */ + + /*! \brief Initialization-time Feature Enabling + * + * Certain codec features must be known at initialization time, to allow for + * proper memory allocation. + * + * The available flags are specified by VPX_CODEC_USE_* defines. + */ +#define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */ +#define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 /**< Conceal errors in decoded + frames */ +#define VPX_CODEC_USE_INPUT_PARTITION 0x40000 /**< The input frame should be + passed to the decoder one + partition at a time */ + + /*!\brief Stream properties + * + * This structure is used to query or set properties of the decoded + * stream. Algorithms may extend this structure with data specific + * to their bitstream by setting the sz member appropriately. + */ + typedef struct vpx_codec_stream_info + { + unsigned int sz; /**< Size of this structure */ + unsigned int w; /**< Width (or 0 for unknown/default) */ + unsigned int h; /**< Height (or 0 for unknown/default) */ + unsigned int is_kf; /**< Current frame is a keyframe */ + } vpx_codec_stream_info_t; + + /* REQUIRED FUNCTIONS + * + * The following functions are required to be implemented for all decoders. + * They represent the base case functionality expected of all decoders. + */ + + + /*!\brief Initialization Configurations + * + * This structure is used to pass init time configuration options to the + * decoder. + */ + typedef struct vpx_codec_dec_cfg + { + unsigned int threads; /**< Maximum number of threads to use, default 1 */ + unsigned int w; /**< Width */ + unsigned int h; /**< Height */ + } vpx_codec_dec_cfg_t; /**< alias for struct vpx_codec_dec_cfg */ + + + /*!\brief Initialize a decoder instance + * + * Initializes a decoder context using the given interface. Applications + * should call the vpx_codec_dec_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * In XMA mode (activated by setting VPX_CODEC_USE_XMA in the flags + * parameter), the storage pointed to by the cfg parameter must be + * kept readable and stable until all memory maps have been set. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] cfg Configuration to use, if known. May be NULL. + * \param[in] flags Bitfield of VPX_CODEC_USE_* flags + * \param[in] ver ABI version number. Must be set to + * VPX_DECODER_ABI_VERSION + * \retval #VPX_CODEC_OK + * The decoder algorithm initialized. + * \retval #VPX_CODEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx, + vpx_codec_iface_t *iface, + vpx_codec_dec_cfg_t *cfg, + vpx_codec_flags_t flags, + int ver); + + /*!\brief Convenience macro for vpx_codec_dec_init_ver() + * + * Ensures the ABI version parameter is properly set. + */ +#define vpx_codec_dec_init(ctx, iface, cfg, flags) \ + vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION) + + + /*!\brief Parse stream info from a buffer + * + * Performs high level parsing of the bitstream. Construction of a decoder + * context is not necessary. Can be used to determine if the bitstream is + * of the proper format, and to extract information from the stream. + * + * \param[in] iface Pointer to the algorithm interface + * \param[in] data Pointer to a block of data to parse + * \param[in] data_sz Size of the data buffer + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_CODEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, + const uint8_t *data, + unsigned int data_sz, + vpx_codec_stream_info_t *si); + + + /*!\brief Return information about the current stream. + * + * Returns information about the stream that has been parsed during decoding. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_CODEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx, + vpx_codec_stream_info_t *si); + + + /*!\brief Decode data + * + * Processes a buffer of coded data. If the processing results in a new + * decoded frame becoming available, PUT_SLICE and PUT_FRAME events may be + * generated, as appropriate. Encoded data \ref MUST be passed in DTS (decode + * time stamp) order. Frames produced will always be in PTS (presentation + * time stamp) order. + * If the decoder is configured with VPX_CODEC_USE_INPUT_PARTITION enabled, + * data and data_sz must contain at most one encoded partition. When no more + * data is available, this function should be called with NULL as data and 0 + * as data_sz. The memory passed to this function must be available until + * the frame has been decoded. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] data Pointer to this block of new coded data. If + * NULL, a VPX_CODEC_CB_PUT_FRAME event is posted + * for the previously decoded frame. + * \param[in] data_sz Size of the coded data, in bytes. + * \param[in] user_priv Application specific data to associate with + * this frame. + * \param[in] deadline Soft deadline the decoder should attempt to meet, + * in us. Set to zero for unlimited. + * + * \return Returns #VPX_CODEC_OK if the coded data was processed completely + * and future pictures can be decoded without error. Otherwise, + * see the descriptions of the other error codes in ::vpx_codec_err_t + * for recoverability capabilities. + */ + vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, + const uint8_t *data, + unsigned int data_sz, + void *user_priv, + long deadline); + + + /*!\brief Decoded frames iterator + * + * Iterates over a list of the frames available for display. The iterator + * storage should be initialized to NULL to start the iteration. Iteration is + * complete when this function returns NULL. + * + * The list of available frames becomes valid upon completion of the + * vpx_codec_decode call, and remains valid until the next call to vpx_codec_decode. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] iter Iterator storage, initialized to NULL + * + * \return Returns a pointer to an image, if one is ready for display. Frames + * produced will always be in PTS (presentation time stamp) order. + */ + vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx, + vpx_codec_iter_t *iter); + + + /*!\defgroup cap_put_frame Frame-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_CODEC_CAP_PUT_FRAME capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_CODEC_ERROR + * @{ + */ + + /*!\brief put frame callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of decoded image data. + */ + typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv, + const vpx_image_t *img); + + + /*!\brief Register for notification of frame completion. + * + * Registers a given function to be called when a decoded frame is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_CODEC_OK + * Callback successfully registered. + * \retval #VPX_CODEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx, + vpx_codec_put_frame_cb_fn_t cb, + void *user_priv); + + + /*!@} - end defgroup cap_put_frame */ + + /*!\defgroup cap_put_slice Slice-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_CODEC_CAP_PUT_SLICE capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_CODEC_ERROR + * @{ + */ + + /*!\brief put slice callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of partially decoded image data. The + */ + typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv, + const vpx_image_t *img, + const vpx_image_rect_t *valid, + const vpx_image_rect_t *update); + + + /*!\brief Register for notification of slice completion. + * + * Registers a given function to be called when a decoded slice is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_CODEC_OK + * Callback successfully registered. + * \retval #VPX_CODEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx, + vpx_codec_put_slice_cb_fn_t cb, + void *user_priv); + + + /*!@} - end defgroup cap_put_slice*/ + + /*!@} - end defgroup decoder*/ + +#endif + +#ifdef __cplusplus +} +#endif + +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +#include "vpx_decoder_compat.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_decoder_compat.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_decoder_compat.h new file mode 100644 index 00000000..f5c501ac --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_decoder_compat.h @@ -0,0 +1,587 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup decoder Common Decoder Algorithm Interface + * This abstraction allows applications using this decoder to easily support + * multiple video formats with minimal code duplication. This section describes + * the interface common to all codecs. + * @{ + */ + +/*!\file + * \brief Provides a compatibility layer between version 1 and 2 of this API. + * + * This interface has been deprecated. Only existing code should make use + * of this interface, and therefore, it is only thinly documented. Existing + * code should be ported to the vpx_codec_* API. + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_DECODER_COMPAT_H +#define VPX_DECODER_COMPAT_H + + /*!\brief Decoder algorithm return codes */ + typedef enum { + /*!\brief Operation completed without error */ + VPX_DEC_OK = VPX_CODEC_OK, + + /*!\brief Unspecified error */ + VPX_DEC_ERROR = VPX_CODEC_ERROR, + + /*!\brief Memory operation failed */ + VPX_DEC_MEM_ERROR = VPX_CODEC_MEM_ERROR, + + /*!\brief ABI version mismatch */ + VPX_DEC_ABI_MISMATCH = VPX_CODEC_ABI_MISMATCH, + + /*!\brief The given bitstream is not supported. + * + * The bitstream was unable to be parsed at the highest level. The decoder + * is unable to proceed. This error \ref SHOULD be treated as fatal to the + * stream. */ + VPX_DEC_UNSUP_BITSTREAM = VPX_CODEC_UNSUP_BITSTREAM, + + /*!\brief Encoded bitstream uses an unsupported feature + * + * The decoder does not implement a feature required by the encoder. This + * return code should only be used for features that prevent future + * pictures from being properly decoded. This error \ref MAY be treated as + * fatal to the stream or \ref MAY be treated as fatal to the current GOP. + */ + VPX_DEC_UNSUP_FEATURE = VPX_CODEC_UNSUP_FEATURE, + + /*!\brief The coded data for this stream is corrupt or incomplete + * + * There was a problem decoding the current frame. This return code + * should only be used for failures that prevent future pictures from + * being properly decoded. This error \ref MAY be treated as fatal to the + * stream or \ref MAY be treated as fatal to the current GOP. If decoding + * is continued for the current GOP, artifacts may be present. + */ + VPX_DEC_CORRUPT_FRAME = VPX_CODEC_CORRUPT_FRAME, + + /*!\brief An application-supplied parameter is not valid. + * + */ + VPX_DEC_INVALID_PARAM = VPX_CODEC_INVALID_PARAM, + + /*!\brief An iterator reached the end of list. + * + */ + VPX_DEC_LIST_END = VPX_CODEC_LIST_END + + } + vpx_dec_err_t; + + /*! \brief Decoder capabilities bitfield + * + * Each decoder advertises the capabilities it supports as part of its + * ::vpx_dec_iface_t interface structure. Capabilities are extra interfaces + * or functionality, and are not required to be supported by a decoder. + * + * The available flags are specified by VPX_DEC_CAP_* defines. + */ + typedef int vpx_dec_caps_t; +#define VPX_DEC_CAP_PUT_SLICE 0x0001 /**< Will issue put_slice callbacks */ +#define VPX_DEC_CAP_PUT_FRAME 0x0002 /**< Will issue put_frame callbacks */ +#define VPX_DEC_CAP_XMA 0x0004 /**< Supports eXternal Memory Allocation */ + + /*!\brief Stream properties + * + * This structure is used to query or set properties of the decoded + * stream. Algorithms may extend this structure with data specific + * to their bitstream by setting the sz member appropriately. + */ +#if 1 + typedef vpx_codec_stream_info_t vpx_dec_stream_info_t; +#else + typedef struct + { + unsigned int sz; /**< Size of this structure */ + unsigned int w; /**< Width (or 0 for unknown/default) */ + unsigned int h; /**< Height (or 0 for unknown/default) */ + unsigned int is_kf; /**< Current frame is a keyframe */ + } vpx_dec_stream_info_t; +#endif + + + /*!\brief Decoder interface structure. + * + * Contains function pointers and other data private to the decoder + * implementation. This structure is opaque to the application. + */ + typedef const struct vpx_codec_iface vpx_dec_iface_t; + typedef struct vpx_codec_priv vpx_dec_priv_t; + + /*!\brief Iterator + * + * Opaque storage used for iterating over lists. + */ + typedef vpx_codec_iter_t vpx_dec_iter_t; + + /*!\brief Decoder context structure + * + * All decoders \ref MUST support this context structure fully. In general, + * this data should be considered private to the decoder algorithm, and + * not be manipulated or examined by the calling application. Applications + * may reference the 'name' member to get a printable description of the + * algorithm. + */ +#if 1 + typedef vpx_codec_ctx_t vpx_dec_ctx_t; +#else + typedef struct + { + const char *name; /**< Printable interface name */ + vpx_dec_iface_t *iface; /**< Interface pointers */ + vpx_dec_err_t err; /**< Last returned error */ + vpx_dec_priv_t *priv; /**< Algorithm private storage */ + } vpx_dec_ctx_t; +#endif + + + /*!\brief Return the build configuration + * + * Returns a printable string containing an encoded version of the build + * configuration. This may be useful to vpx support. + * + */ + const char *vpx_dec_build_config(void) DEPRECATED; + + /*!\brief Return the name for a given interface + * + * Returns a human readable string for name of the given decoder interface. + * + * \param[in] iface Interface pointer + * + */ + const char *vpx_dec_iface_name(vpx_dec_iface_t *iface) DEPRECATED; + + + /*!\brief Convert error number to printable string + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] err Error number. + * + */ + const char *vpx_dec_err_to_string(vpx_dec_err_t err) DEPRECATED; + + + /*!\brief Retrieve error synopsis for decoder context + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] ctx Pointer to this instance's context. + * + */ + const char *vpx_dec_error(vpx_dec_ctx_t *ctx) DEPRECATED; + + + /*!\brief Retrieve detailed error information for decoder context + * + * Returns a human readable string providing detailed information about + * the last error. + * + * \param[in] ctx Pointer to this instance's context. + * + * \retval NULL + * No detailed information is available. + */ + const char *vpx_dec_error_detail(vpx_dec_ctx_t *ctx) DEPRECATED; + + + /* REQUIRED FUNCTIONS + * + * The following functions are required to be implemented for all decoders. + * They represent the base case functionality expected of all decoders. + */ + + + /*!\brief Initialize a decoder instance + * + * Initializes a decoder context using the given interface. Applications + * should call the vpx_dec_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] ver ABI version number. Must be set to + * VPX_DECODER_ABI_VERSION + * \retval #VPX_DEC_OK + * The decoder algorithm initialized. + * \retval #VPX_DEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_dec_err_t vpx_dec_init_ver(vpx_dec_ctx_t *ctx, + vpx_dec_iface_t *iface, + int ver) DEPRECATED; +#define vpx_dec_init(ctx, iface) \ + vpx_dec_init_ver(ctx, iface, VPX_DECODER_ABI_VERSION) + + + /*!\brief Destroy a decoder instance + * + * Destroys a decoder context, freeing any associated memory buffers. + * + * \param[in] ctx Pointer to this instance's context + * + * \retval #VPX_DEC_OK + * The decoder algorithm initialized. + * \retval #VPX_DEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_dec_err_t vpx_dec_destroy(vpx_dec_ctx_t *ctx) DEPRECATED; + + + /*!\brief Get the capabilities of an algorithm. + * + * Retrieves the capabilities bitfield from the algorithm's interface. + * + * \param[in] iface Pointer to the algorithm interface + * + */ + vpx_dec_caps_t vpx_dec_get_caps(vpx_dec_iface_t *iface) DEPRECATED; + + + /*!\brief Parse stream info from a buffer + * + * Performs high level parsing of the bitstream. Construction of a decoder + * context is not necessary. Can be used to determine if the bitstream is + * of the proper format, and to extract information from the stream. + * + * \param[in] iface Pointer to the algorithm interface + * \param[in] data Pointer to a block of data to parse + * \param[in] data_sz Size of the data buffer + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_DEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_dec_err_t vpx_dec_peek_stream_info(vpx_dec_iface_t *iface, + const uint8_t *data, + unsigned int data_sz, + vpx_dec_stream_info_t *si) DEPRECATED; + + + /*!\brief Return information about the current stream. + * + * Returns information about the stream that has been parsed during decoding. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_DEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_dec_err_t vpx_dec_get_stream_info(vpx_dec_ctx_t *ctx, + vpx_dec_stream_info_t *si) DEPRECATED; + + + /*!\brief Control algorithm + * + * This function is used to exchange algorithm specific data with the decoder + * instance. This can be used to implement features specific to a particular + * algorithm. + * + * This wrapper function dispatches the request to the helper function + * associated with the given ctrl_id. It tries to call this function + * transparently, but will return #VPX_DEC_ERROR if the request could not + * be dispatched. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] ctrl_id Algorithm specific control identifier + * \param[in,out] data Data to exchange with algorithm instance. + * + * \retval #VPX_DEC_OK + * The control request was processed. + * \retval #VPX_DEC_ERROR + * The control request was not processed. + * \retval #VPX_DEC_INVALID_PARAM + * The data was not valid. + */ + vpx_dec_err_t vpx_dec_control(vpx_dec_ctx_t *ctx, + int ctrl_id, + void *data) DEPRECATED; + + /*!\brief Decode data + * + * Processes a buffer of coded data. If the processing results in a new + * decoded frame becoming available, #VPX_DEC_CB_PUT_SLICE and + * #VPX_DEC_CB_PUT_FRAME events may be generated, as appropriate. Encoded data + * \ref MUST be passed in DTS (decode time stamp) order. Frames produced will + * always be in PTS (presentation time stamp) order. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] data Pointer to this block of new coded data. If + * NULL, a VPX_DEC_CB_PUT_FRAME event is posted + * for the previously decoded frame. + * \param[in] data_sz Size of the coded data, in bytes. + * \param[in] user_priv Application specific data to associate with + * this frame. + * \param[in] rel_pts PTS relative to the previous frame, in us. If + * unknown or unavailable, set to zero. + * + * \return Returns #VPX_DEC_OK if the coded data was processed completely + * and future pictures can be decoded without error. Otherwise, + * see the descriptions of the other error codes in ::vpx_dec_err_t + * for recoverability capabilities. + */ + vpx_dec_err_t vpx_dec_decode(vpx_dec_ctx_t *ctx, + uint8_t *data, + unsigned int data_sz, + void *user_priv, + int rel_pts) DEPRECATED; + + + /*!\brief Decoded frames iterator + * + * Iterates over a list of the frames available for display. The iterator + * storage should be initialized to NULL to start the iteration. Iteration is + * complete when this function returns NULL. + * + * The list of available frames becomes valid upon completion of the + * vpx_dec_decode call, and remains valid until the next call to vpx_dec_decode. + * + * \param[in] ctx Pointer to this instance's context + * \param[in out] iter Iterator storage, initialized to NULL + * + * \return Returns a pointer to an image, if one is ready for display. Frames + * produced will always be in PTS (presentation time stamp) order. + */ + vpx_image_t *vpx_dec_get_frame(vpx_dec_ctx_t *ctx, + vpx_dec_iter_t *iter) DEPRECATED; + + + /*!\defgroup cap_put_frame Frame-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_DEC_CAP_PUT_FRAME capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_DEC_ERROR + * @{ + */ + + /*!\brief put frame callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of decoded image data. + */ + typedef void (*vpx_dec_put_frame_cb_fn_t)(void *user_priv, + const vpx_image_t *img); + + + /*!\brief Register for notification of frame completion. + * + * Registers a given function to be called when a decoded frame is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_DEC_OK + * Callback successfully registered. + * \retval #VPX_DEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_dec_err_t vpx_dec_register_put_frame_cb(vpx_dec_ctx_t *ctx, + vpx_dec_put_frame_cb_fn_t cb, + void *user_priv) DEPRECATED; + + + /*!@} - end defgroup cap_put_frame */ + + /*!\defgroup cap_put_slice Slice-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_DEC_CAP_PUT_SLICE capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_DEC_ERROR + * @{ + */ + + /*!\brief put slice callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of partially decoded image data. The + */ + typedef void (*vpx_dec_put_slice_cb_fn_t)(void *user_priv, + const vpx_image_t *img, + const vpx_image_rect_t *valid, + const vpx_image_rect_t *update); + + + /*!\brief Register for notification of slice completion. + * + * Registers a given function to be called when a decoded slice is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_DEC_OK + * Callback successfully registered. + * \retval #VPX_DEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_dec_err_t vpx_dec_register_put_slice_cb(vpx_dec_ctx_t *ctx, + vpx_dec_put_slice_cb_fn_t cb, + void *user_priv) DEPRECATED; + + + /*!@} - end defgroup cap_put_slice*/ + + /*!\defgroup cap_xma External Memory Allocation Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_DEC_CAP_XMA capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_DEC_ERROR + * @{ + */ + + /*!\brief Memory Map Entry + * + * This structure is used to contain the properties of a memory segment. It + * is populated by the decoder in the request phase, and by the calling + * application once the requested allocation has been performed. + */ +#if 1 +#define VPX_DEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */ +#define VPX_DEC_MEM_WRONLY 0x2 /**< Segment need not be readable */ +#define VPX_DEC_MEM_FAST 0x4 /**< Place in fast memory, if available */ + typedef struct vpx_codec_mmap vpx_dec_mmap_t; +#else + typedef struct vpx_dec_mmap + { + /* + * The following members are set by the codec when requesting a segment + */ + unsigned int id; /**< identifier for the segment's contents */ + unsigned long sz; /**< size of the segment, in bytes */ + unsigned int align; /**< required alignment of the segment, in bytes */ + unsigned int flags; /**< bitfield containing segment properties */ +#define VPX_DEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */ +#define VPX_DEC_MEM_WRONLY 0x2 /**< Segment need not be readable */ +#define VPX_DEC_MEM_FAST 0x4 /**< Place in fast memory, if available */ + + /* The following members are to be filled in by the allocation function */ + void *base; /**< pointer to the allocated segment */ + void (*dtor)(struct vpx_dec_mmap *map); /**< destructor to call */ + void *priv; /**< allocator private storage */ + } vpx_dec_mmap_t; +#endif + + /*!\brief Initialize a decoder instance in external allocation mode + * + * Initializes a decoder context using the given interface. Applications + * should call the vpx_dec_xma_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] ver ABI version number. Must be set to + * VPX_DECODER_ABI_VERSION + * \retval #VPX_DEC_OK + * The decoder algorithm initialized. + * \retval #VPX_DEC_ERROR + * Decoder does not support XMA mode. + */ + vpx_dec_err_t vpx_dec_xma_init_ver(vpx_dec_ctx_t *ctx, + vpx_dec_iface_t *iface, + int ver) DEPRECATED; +#define vpx_dec_xma_init(ctx, iface) \ + vpx_dec_xma_init_ver(ctx, iface, VPX_DECODER_ABI_VERSION) + + + /*!\brief Iterate over the list of segments to allocate. + * + * Iterates over a list of the segments to allocate. The iterator storage + * should be initialized to NULL to start the iteration. Iteration is complete + * when this function returns VPX_DEC_LIST_END. The amount of memory needed to + * allocate is dependent upon the size of the encoded stream. This means that + * the stream info structure must be known at allocation time. It can be + * populated with the vpx_dec_peek_stream_info() function. In cases where the + * stream to be decoded is not available at allocation time, a fixed size must + * be requested. The decoder will not be able to decode streams larger than + * the size used at allocation time. + * + * \param[in] ctx Pointer to this instance's context. + * \param[out] mmap Pointer to the memory map entry to populate. + * \param[in] si Pointer to the stream info. + * \param[in out] iter Iterator storage, initialized to NULL + * + * \retval #VPX_DEC_OK + * The memory map entry was populated. + * \retval #VPX_DEC_ERROR + * Decoder does not support XMA mode. + * \retval #VPX_DEC_MEM_ERROR + * Unable to determine segment size from stream info. + */ + vpx_dec_err_t vpx_dec_get_mem_map(vpx_dec_ctx_t *ctx, + vpx_dec_mmap_t *mmap, + const vpx_dec_stream_info_t *si, + vpx_dec_iter_t *iter) DEPRECATED; + + + /*!\brief Identify allocated segments to decoder instance + * + * Stores a list of allocated segments in the decoder. Segments \ref MUST be + * passed in the order they are read from vpx_dec_get_mem_map(), but may be + * passed in groups of any size. Segments \ref MUST be set only once. The + * allocation function \ref MUST ensure that the vpx_dec_mmap_t::base member + * is non-NULL. If the segment requires cleanup handling (e.g., calling free() + * or close()) then the vpx_dec_mmap_t::dtor member \ref MUST be populated. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] mmaps Pointer to the first memory map entry in the list. + * \param[in] num_maps Number of entries being set at this time + * + * \retval #VPX_DEC_OK + * The segment was stored in the decoder context. + * \retval #VPX_DEC_ERROR + * Decoder does not support XMA mode. + * \retval #VPX_DEC_MEM_ERROR + * Segment base address was not set, or segment was already stored. + + */ + vpx_dec_err_t vpx_dec_set_mem_map(vpx_dec_ctx_t *ctx, + vpx_dec_mmap_t *mmaps, + unsigned int num_maps) DEPRECATED; + + /*!@} - end defgroup cap_xma*/ + /*!@} - end defgroup decoder*/ + + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_encoder.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_encoder.h new file mode 100644 index 00000000..90f271f8 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_encoder.h @@ -0,0 +1,837 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup encoder Encoder Algorithm Interface + * \ingroup codec + * This abstraction allows applications using this encoder to easily support + * multiple video formats with minimal code duplication. This section describes + * the interface common to all encoders. + * @{ + */ + +/*!\file + * \brief Describes the encoder algorithm interface to applications. + * + * This file describes the interface between an application and a + * video encoder algorithm. + * + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_ENCODER_H +#define VPX_ENCODER_H +#include "vpx_codec.h" + + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_ENCODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/ + + + /*! \brief Encoder capabilities bitfield + * + * Each encoder advertises the capabilities it supports as part of its + * ::vpx_codec_iface_t interface structure. Capabilities are extra + * interfaces or functionality, and are not required to be supported + * by an encoder. + * + * The available flags are specified by VPX_CODEC_CAP_* defines. + */ +#define VPX_CODEC_CAP_PSNR 0x10000 /**< Can issue PSNR packets */ + + /*! Can output one partition at a time. Each partition is returned in its + * own VPX_CODEC_CX_FRAME_PKT, with the FRAME_IS_FRAGMENT flag set for + * every partition but the last. In this mode all frames are always + * returned partition by partition. + */ +#define VPX_CODEC_CAP_OUTPUT_PARTITION 0x20000 + + + /*! \brief Initialization-time Feature Enabling + * + * Certain codec features must be known at initialization time, to allow + * for proper memory allocation. + * + * The available flags are specified by VPX_CODEC_USE_* defines. + */ +#define VPX_CODEC_USE_PSNR 0x10000 /**< Calculate PSNR on each frame */ +#define VPX_CODEC_USE_OUTPUT_PARTITION 0x20000 /**< Make the encoder output one + partition at a time. */ + + + /*!\brief Generic fixed size buffer structure + * + * This structure is able to hold a reference to any fixed size buffer. + */ + typedef struct vpx_fixed_buf + { + void *buf; /**< Pointer to the data */ + size_t sz; /**< Length of the buffer, in chars */ + } vpx_fixed_buf_t; /**< alias for struct vpx_fixed_buf */ + + + /*!\brief Time Stamp Type + * + * An integer, which when multiplied by the stream's time base, provides + * the absolute time of a sample. + */ + typedef int64_t vpx_codec_pts_t; + + + /*!\brief Compressed Frame Flags + * + * This type represents a bitfield containing information about a compressed + * frame that may be useful to an application. The most significant 16 bits + * can be used by an algorithm to provide additional detail, for example to + * support frame types that are codec specific (MPEG-1 D-frames for example) + */ + typedef uint32_t vpx_codec_frame_flags_t; +#define VPX_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */ +#define VPX_FRAME_IS_DROPPABLE 0x2 /**< frame can be dropped without affecting + the stream (no future frame depends on + this one) */ +#define VPX_FRAME_IS_INVISIBLE 0x4 /**< frame should be decoded but will not + be shown */ +#define VPX_FRAME_IS_FRAGMENT 0x8 /**< this is a fragment of the encoded + frame */ + + /*!\brief Error Resilient flags + * + * These flags define which error resilient features to enable in the + * encoder. The flags are specified through the + * vpx_codec_enc_cfg::g_error_resilient variable. + */ + typedef uint32_t vpx_codec_er_flags_t; +#define VPX_ERROR_RESILIENT_DEFAULT 0x1 /**< Improve resiliency against + losses of whole frames */ +#define VPX_ERROR_RESILIENT_PARTITIONS 0x2 /**< The frame partitions are + independently decodable by the + bool decoder, meaning that + partitions can be decoded even + though earlier partitions have + been lost. Note that intra + predicition is still done over + the partition boundary. */ + + /*!\brief Encoder output packet variants + * + * This enumeration lists the different kinds of data packets that can be + * returned by calls to vpx_codec_get_cx_data(). Algorithms \ref MAY + * extend this list to provide additional functionality. + */ + enum vpx_codec_cx_pkt_kind + { + VPX_CODEC_CX_FRAME_PKT, /**< Compressed video frame */ + VPX_CODEC_STATS_PKT, /**< Two-pass statistics for this frame */ + VPX_CODEC_PSNR_PKT, /**< PSNR statistics for this frame */ + VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */ + }; + + + /*!\brief Encoder output packet + * + * This structure contains the different kinds of output data the encoder + * may produce while compressing a frame. + */ + typedef struct vpx_codec_cx_pkt + { + enum vpx_codec_cx_pkt_kind kind; /**< packet variant */ + union + { + struct + { + void *buf; /**< compressed data buffer */ + size_t sz; /**< length of compressed data */ + vpx_codec_pts_t pts; /**< time stamp to show frame + (in timebase units) */ + unsigned long duration; /**< duration to show frame + (in timebase units) */ + vpx_codec_frame_flags_t flags; /**< flags for this frame */ + int partition_id; /**< the partition id + defines the decoding order + of the partitions. Only + applicable when "output partition" + mode is enabled. First partition + has id 0.*/ + + } frame; /**< data for compressed frame packet */ + struct vpx_fixed_buf twopass_stats; /**< data for two-pass packet */ + struct vpx_psnr_pkt + { + unsigned int samples[4]; /**< Number of samples, total/y/u/v */ + uint64_t sse[4]; /**< sum squared error, total/y/u/v */ + double psnr[4]; /**< PSNR, total/y/u/v */ + } psnr; /**< data for PSNR packet */ + struct vpx_fixed_buf raw; /**< data for arbitrary packets */ + + /* This packet size is fixed to allow codecs to extend this + * interface without having to manage storage for raw packets, + * i.e., if it's smaller than 128 bytes, you can store in the + * packet list directly. + */ + char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */ + } data; /**< packet data */ + } vpx_codec_cx_pkt_t; /**< alias for struct vpx_codec_cx_pkt */ + + + /*!\brief Rational Number + * + * This structure holds a fractional value. + */ + typedef struct vpx_rational + { + int num; /**< fraction numerator */ + int den; /**< fraction denominator */ + } vpx_rational_t; /**< alias for struct vpx_rational */ + + + /*!\brief Multi-pass Encoding Pass */ + enum vpx_enc_pass + { + VPX_RC_ONE_PASS, /**< Single pass mode */ + VPX_RC_FIRST_PASS, /**< First pass of multi-pass mode */ + VPX_RC_LAST_PASS /**< Final pass of multi-pass mode */ + }; + + + /*!\brief Rate control mode */ + enum vpx_rc_mode + { + VPX_VBR, /**< Variable Bit Rate (VBR) mode */ + VPX_CBR, /**< Constant Bit Rate (CBR) mode */ + VPX_CQ /**< Constant Quality (CQ) mode */ + }; + + + /*!\brief Keyframe placement mode. + * + * This enumeration determines whether keyframes are placed automatically by + * the encoder or whether this behavior is disabled. Older releases of this + * SDK were implemented such that VPX_KF_FIXED meant keyframes were disabled. + * This name is confusing for this behavior, so the new symbols to be used + * are VPX_KF_AUTO and VPX_KF_DISABLED. + */ + enum vpx_kf_mode + { + VPX_KF_FIXED, /**< deprecated, implies VPX_KF_DISABLED */ + VPX_KF_AUTO, /**< Encoder determines optimal placement automatically */ + VPX_KF_DISABLED = 0 /**< Encoder does not place keyframes. */ + }; + + + /*!\brief Encoded Frame Flags + * + * This type indicates a bitfield to be passed to vpx_codec_encode(), defining + * per-frame boolean values. By convention, bits common to all codecs will be + * named VPX_EFLAG_*, and bits specific to an algorithm will be named + * /algo/_eflag_*. The lower order 16 bits are reserved for common use. + */ + typedef long vpx_enc_frame_flags_t; +#define VPX_EFLAG_FORCE_KF (1<<0) /**< Force this frame to be a keyframe */ + + + /*!\brief Encoder configuration structure + * + * This structure contains the encoder settings that have common representations + * across all codecs. This doesn't imply that all codecs support all features, + * however. + */ + typedef struct vpx_codec_enc_cfg + { + /* + * generic settings (g) + */ + + /*!\brief Algorithm specific "usage" value + * + * Algorithms may define multiple values for usage, which may convey the + * intent of how the application intends to use the stream. If this value + * is non-zero, consult the documentation for the codec to determine its + * meaning. + */ + unsigned int g_usage; + + + /*!\brief Maximum number of threads to use + * + * For multi-threaded implementations, use no more than this number of + * threads. The codec may use fewer threads than allowed. The value + * 0 is equivalent to the value 1. + */ + unsigned int g_threads; + + + /*!\brief Bitstream profile to use + * + * Some codecs support a notion of multiple bitstream profiles. Typically + * this maps to a set of features that are turned on or off. Often the + * profile to use is determined by the features of the intended decoder. + * Consult the documentation for the codec to determine the valid values + * for this parameter, or set to zero for a sane default. + */ + unsigned int g_profile; /**< profile of bitstream to use */ + + + + /*!\brief Width of the frame + * + * This value identifies the presentation resolution of the frame, + * in pixels. Note that the frames passed as input to the encoder must + * have this resolution. Frames will be presented by the decoder in this + * resolution, independent of any spatial resampling the encoder may do. + */ + unsigned int g_w; + + + /*!\brief Height of the frame + * + * This value identifies the presentation resolution of the frame, + * in pixels. Note that the frames passed as input to the encoder must + * have this resolution. Frames will be presented by the decoder in this + * resolution, independent of any spatial resampling the encoder may do. + */ + unsigned int g_h; + + + /*!\brief Stream timebase units + * + * Indicates the smallest interval of time, in seconds, used by the stream. + * For fixed frame rate material, or variable frame rate material where + * frames are timed at a multiple of a given clock (ex: video capture), + * the \ref RECOMMENDED method is to set the timebase to the reciprocal + * of the frame rate (ex: 1001/30000 for 29.970 Hz NTSC). This allows the + * pts to correspond to the frame number, which can be handy. For + * re-encoding video from containers with absolute time timestamps, the + * \ref RECOMMENDED method is to set the timebase to that of the parent + * container or multimedia framework (ex: 1/1000 for ms, as in FLV). + */ + struct vpx_rational g_timebase; + + + /*!\brief Enable error resilient modes. + * + * The error resilient bitfield indicates to the encoder which features + * it should enable to take measures for streaming over lossy or noisy + * links. + */ + vpx_codec_er_flags_t g_error_resilient; + + + /*!\brief Multi-pass Encoding Mode + * + * This value should be set to the current phase for multi-pass encoding. + * For single pass, set to #VPX_RC_ONE_PASS. + */ + enum vpx_enc_pass g_pass; + + + /*!\brief Allow lagged encoding + * + * If set, this value allows the encoder to consume a number of input + * frames before producing output frames. This allows the encoder to + * base decisions for the current frame on future frames. This does + * increase the latency of the encoding pipeline, so it is not appropriate + * in all situations (ex: realtime encoding). + * + * Note that this is a maximum value -- the encoder may produce frames + * sooner than the given limit. Set this value to 0 to disable this + * feature. + */ + unsigned int g_lag_in_frames; + + + /* + * rate control settings (rc) + */ + + /*!\brief Temporal resampling configuration, if supported by the codec. + * + * Temporal resampling allows the codec to "drop" frames as a strategy to + * meet its target data rate. This can cause temporal discontinuities in + * the encoded video, which may appear as stuttering during playback. This + * trade-off is often acceptable, but for many applications is not. It can + * be disabled in these cases. + * + * Note that not all codecs support this feature. All vpx VPx codecs do. + * For other codecs, consult the documentation for that algorithm. + * + * This threshold is described as a percentage of the target data buffer. + * When the data buffer falls below this percentage of fullness, a + * dropped frame is indicated. Set the threshold to zero (0) to disable + * this feature. + */ + unsigned int rc_dropframe_thresh; + + + /*!\brief Enable/disable spatial resampling, if supported by the codec. + * + * Spatial resampling allows the codec to compress a lower resolution + * version of the frame, which is then upscaled by the encoder to the + * correct presentation resolution. This increases visual quality at + * low data rates, at the expense of CPU time on the encoder/decoder. + */ + unsigned int rc_resize_allowed; + + + /*!\brief Spatial resampling up watermark. + * + * This threshold is described as a percentage of the target data buffer. + * When the data buffer rises above this percentage of fullness, the + * encoder will step up to a higher resolution version of the frame. + */ + unsigned int rc_resize_up_thresh; + + + /*!\brief Spatial resampling down watermark. + * + * This threshold is described as a percentage of the target data buffer. + * When the data buffer falls below this percentage of fullness, the + * encoder will step down to a lower resolution version of the frame. + */ + unsigned int rc_resize_down_thresh; + + + /*!\brief Rate control algorithm to use. + * + * Indicates whether the end usage of this stream is to be streamed over + * a bandwidth constrained link, indicating that Constant Bit Rate (CBR) + * mode should be used, or whether it will be played back on a high + * bandwidth link, as from a local disk, where higher variations in + * bitrate are acceptable. + */ + enum vpx_rc_mode rc_end_usage; + + + /*!\brief Two-pass stats buffer. + * + * A buffer containing all of the stats packets produced in the first + * pass, concatenated. + */ + struct vpx_fixed_buf rc_twopass_stats_in; + + + /*!\brief Target data rate + * + * Target bandwidth to use for this stream, in kilobits per second. + */ + unsigned int rc_target_bitrate; + + + /* + * quantizer settings + */ + + + /*!\brief Minimum (Best Quality) Quantizer + * + * The quantizer is the most direct control over the quality of the + * encoded image. The range of valid values for the quantizer is codec + * specific. Consult the documentation for the codec to determine the + * values to use. To determine the range programmatically, call + * vpx_codec_enc_config_default() with a usage value of 0. + */ + unsigned int rc_min_quantizer; + + + /*!\brief Maximum (Worst Quality) Quantizer + * + * The quantizer is the most direct control over the quality of the + * encoded image. The range of valid values for the quantizer is codec + * specific. Consult the documentation for the codec to determine the + * values to use. To determine the range programmatically, call + * vpx_codec_enc_config_default() with a usage value of 0. + */ + unsigned int rc_max_quantizer; + + + /* + * bitrate tolerance + */ + + + /*!\brief Rate control adaptation undershoot control + * + * This value, expressed as a percentage of the target bitrate, + * controls the maximum allowed adaptation speed of the codec. + * This factor controls the maximum amount of bits that can + * be subtracted from the target bitrate in order to compensate + * for prior overshoot. + * + * Valid values in the range 0-1000. + */ + unsigned int rc_undershoot_pct; + + + /*!\brief Rate control adaptation overshoot control + * + * This value, expressed as a percentage of the target bitrate, + * controls the maximum allowed adaptation speed of the codec. + * This factor controls the maximum amount of bits that can + * be added to the target bitrate in order to compensate for + * prior undershoot. + * + * Valid values in the range 0-1000. + */ + unsigned int rc_overshoot_pct; + + + /* + * decoder buffer model parameters + */ + + + /*!\brief Decoder Buffer Size + * + * This value indicates the amount of data that may be buffered by the + * decoding application. Note that this value is expressed in units of + * time (milliseconds). For example, a value of 5000 indicates that the + * client will buffer (at least) 5000ms worth of encoded data. Use the + * target bitrate (#rc_target_bitrate) to convert to bits/bytes, if + * necessary. + */ + unsigned int rc_buf_sz; + + + /*!\brief Decoder Buffer Initial Size + * + * This value indicates the amount of data that will be buffered by the + * decoding application prior to beginning playback. This value is + * expressed in units of time (milliseconds). Use the target bitrate + * (#rc_target_bitrate) to convert to bits/bytes, if necessary. + */ + unsigned int rc_buf_initial_sz; + + + /*!\brief Decoder Buffer Optimal Size + * + * This value indicates the amount of data that the encoder should try + * to maintain in the decoder's buffer. This value is expressed in units + * of time (milliseconds). Use the target bitrate (#rc_target_bitrate) + * to convert to bits/bytes, if necessary. + */ + unsigned int rc_buf_optimal_sz; + + + /* + * 2 pass rate control parameters + */ + + + /*!\brief Two-pass mode CBR/VBR bias + * + * Bias, expressed on a scale of 0 to 100, for determining target size + * for the current frame. The value 0 indicates the optimal CBR mode + * value should be used. The value 100 indicates the optimal VBR mode + * value should be used. Values in between indicate which way the + * encoder should "lean." + */ + unsigned int rc_2pass_vbr_bias_pct; /**< RC mode bias between CBR and VBR(0-100: 0->CBR, 100->VBR) */ + + + /*!\brief Two-pass mode per-GOP minimum bitrate + * + * This value, expressed as a percentage of the target bitrate, indicates + * the minimum bitrate to be used for a single GOP (aka "section") + */ + unsigned int rc_2pass_vbr_minsection_pct; + + + /*!\brief Two-pass mode per-GOP maximum bitrate + * + * This value, expressed as a percentage of the target bitrate, indicates + * the maximum bitrate to be used for a single GOP (aka "section") + */ + unsigned int rc_2pass_vbr_maxsection_pct; + + + /* + * keyframing settings (kf) + */ + + /*!\brief Keyframe placement mode + * + * This value indicates whether the encoder should place keyframes at a + * fixed interval, or determine the optimal placement automatically + * (as governed by the #kf_min_dist and #kf_max_dist parameters) + */ + enum vpx_kf_mode kf_mode; + + + /*!\brief Keyframe minimum interval + * + * This value, expressed as a number of frames, prevents the encoder from + * placing a keyframe nearer than kf_min_dist to the previous keyframe. At + * least kf_min_dist frames non-keyframes will be coded before the next + * keyframe. Set kf_min_dist equal to kf_max_dist for a fixed interval. + */ + unsigned int kf_min_dist; + + + /*!\brief Keyframe maximum interval + * + * This value, expressed as a number of frames, forces the encoder to code + * a keyframe if one has not been coded in the last kf_max_dist frames. + * A value of 0 implies all frames will be keyframes. Set kf_min_dist + * equal to kf_max_dist for a fixed interval. + */ + unsigned int kf_max_dist; + + } vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */ + + + /*!\brief Initialize an encoder instance + * + * Initializes a encoder context using the given interface. Applications + * should call the vpx_codec_enc_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * In XMA mode (activated by setting VPX_CODEC_USE_XMA in the flags + * parameter), the storage pointed to by the cfg parameter must be + * kept readable and stable until all memory maps have been set. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] cfg Configuration to use, if known. May be NULL. + * \param[in] flags Bitfield of VPX_CODEC_USE_* flags + * \param[in] ver ABI version number. Must be set to + * VPX_ENCODER_ABI_VERSION + * \retval #VPX_CODEC_OK + * The decoder algorithm initialized. + * \retval #VPX_CODEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, + vpx_codec_iface_t *iface, + vpx_codec_enc_cfg_t *cfg, + vpx_codec_flags_t flags, + int ver); + + + /*!\brief Convenience macro for vpx_codec_enc_init_ver() + * + * Ensures the ABI version parameter is properly set. + */ +#define vpx_codec_enc_init(ctx, iface, cfg, flags) \ + vpx_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION) + + + /*!\brief Get a default configuration + * + * Initializes a encoder configuration structure with default values. Supports + * the notion of "usages" so that an algorithm may offer different default + * settings depending on the user's intended goal. This function \ref SHOULD + * be called by all applications to initialize the configuration structure + * before specializing the configuration with application specific values. + * + * \param[in] iface Pointer to the algorithm interface to use. + * \param[out] cfg Configuration buffer to populate + * \param[in] usage End usage. Set to 0 or use codec specific values. + * + * \retval #VPX_CODEC_OK + * The configuration was populated. + * \retval #VPX_CODEC_INCAPABLE + * Interface is not an encoder interface. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, or the usage value was not recognized. + */ + vpx_codec_err_t vpx_codec_enc_config_default(vpx_codec_iface_t *iface, + vpx_codec_enc_cfg_t *cfg, + unsigned int usage); + + + /*!\brief Set or change configuration + * + * Reconfigures an encoder instance according to the given configuration. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cfg Configuration buffer to use + * + * \retval #VPX_CODEC_OK + * The configuration was populated. + * \retval #VPX_CODEC_INCAPABLE + * Interface is not an encoder interface. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, or the usage value was not recognized. + */ + vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx, + const vpx_codec_enc_cfg_t *cfg); + + + /*!\brief Get global stream headers + * + * Retrieves a stream level global header packet, if supported by the codec. + * + * \param[in] ctx Pointer to this instance's context + * + * \retval NULL + * Encoder does not support global header + * \retval Non-NULL + * Pointer to buffer containing global header packet + */ + vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx); + + +#define VPX_DL_REALTIME (1) /**< deadline parameter analogous to + * VPx REALTIME mode. */ +#define VPX_DL_GOOD_QUALITY (1000000) /**< deadline parameter analogous to + * VPx GOOD QUALITY mode. */ +#define VPX_DL_BEST_QUALITY (0) /**< deadline parameter analogous to + * VPx BEST QUALITY mode. */ + /*!\brief Encode a frame + * + * Encodes a video frame at the given "presentation time." The presentation + * time stamp (PTS) \ref MUST be strictly increasing. + * + * The encoder supports the notion of a soft real-time deadline. Given a + * non-zero value to the deadline parameter, the encoder will make a "best + * effort" guarantee to return before the given time slice expires. It is + * implicit that limiting the available time to encode will degrade the + * output quality. The encoder can be given an unlimited time to produce the + * best possible frame by specifying a deadline of '0'. This deadline + * supercedes the VPx notion of "best quality, good quality, realtime". + * Applications that wish to map these former settings to the new deadline + * based system can use the symbols #VPX_DL_REALTIME, #VPX_DL_GOOD_QUALITY, + * and #VPX_DL_BEST_QUALITY. + * + * When the last frame has been passed to the encoder, this function should + * continue to be called, with the img parameter set to NULL. This will + * signal the end-of-stream condition to the encoder and allow it to encode + * any held buffers. Encoding is complete when vpx_codec_encode() is called + * and vpx_codec_get_cx_data() returns no data. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] img Image data to encode, NULL to flush. + * \param[in] pts Presentation time stamp, in timebase units. + * \param[in] duration Duration to show frame, in timebase units. + * \param[in] flags Flags to use for encoding this frame. + * \param[in] deadline Time to spend encoding, in microseconds. (0=infinite) + * + * \retval #VPX_CODEC_OK + * The configuration was populated. + * \retval #VPX_CODEC_INCAPABLE + * Interface is not an encoder interface. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, the image format is unsupported, etc. + */ + vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, + const vpx_image_t *img, + vpx_codec_pts_t pts, + unsigned long duration, + vpx_enc_frame_flags_t flags, + unsigned long deadline); + + + /*!\brief Set compressed data output buffer + * + * Sets the buffer that the codec should output the compressed data + * into. This call effectively sets the buffer pointer returned in the + * next VPX_CODEC_CX_FRAME_PKT packet. Subsequent packets will be + * appended into this buffer. The buffer is preserved across frames, + * so applications must periodically call this function after flushing + * the accumulated compressed data to disk or to the network to reset + * the pointer to the buffer's head. + * + * `pad_before` bytes will be skipped before writing the compressed + * data, and `pad_after` bytes will be appended to the packet. The size + * of the packet will be the sum of the size of the actual compressed + * data, pad_before, and pad_after. The padding bytes will be preserved + * (not overwritten). + * + * Note that calling this function does not guarantee that the returned + * compressed data will be placed into the specified buffer. In the + * event that the encoded data will not fit into the buffer provided, + * the returned packet \ref MAY point to an internal buffer, as it would + * if this call were never used. In this event, the output packet will + * NOT have any padding, and the application must free space and copy it + * to the proper place. This is of particular note in configurations + * that may output multiple packets for a single encoded frame (e.g., lagged + * encoding) or if the application does not reset the buffer periodically. + * + * Applications may restore the default behavior of the codec providing + * the compressed data buffer by calling this function with a NULL + * buffer. + * + * Applications \ref MUSTNOT call this function during iteration of + * vpx_codec_get_cx_data(). + * + * \param[in] ctx Pointer to this instance's context + * \param[in] buf Buffer to store compressed data into + * \param[in] pad_before Bytes to skip before writing compressed data + * \param[in] pad_after Bytes to skip after writing compressed data + * + * \retval #VPX_CODEC_OK + * The buffer was set successfully. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, the image format is unsupported, etc. + */ + vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, + const vpx_fixed_buf_t *buf, + unsigned int pad_before, + unsigned int pad_after); + + + /*!\brief Encoded data iterator + * + * Iterates over a list of data packets to be passed from the encoder to the + * application. The different kinds of packets available are enumerated in + * #vpx_codec_cx_pkt_kind. + * + * #VPX_CODEC_CX_FRAME_PKT packets should be passed to the application's + * muxer. Multiple compressed frames may be in the list. + * #VPX_CODEC_STATS_PKT packets should be appended to a global buffer. + * + * The application \ref MUST silently ignore any packet kinds that it does + * not recognize or support. + * + * The data buffers returned from this function are only guaranteed to be + * valid until the application makes another call to any vpx_codec_* function. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] iter Iterator storage, initialized to NULL + * + * \return Returns a pointer to an output data packet (compressed frame data, + * two-pass statistics, etc.) or NULL to signal end-of-list. + * + */ + const vpx_codec_cx_pkt_t *vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, + vpx_codec_iter_t *iter); + + + /*!\brief Get Preview Frame + * + * Returns an image that can be used as a preview. Shows the image as it would + * exist at the decompressor. The application \ref MUST NOT write into this + * image buffer. + * + * \param[in] ctx Pointer to this instance's context + * + * \return Returns a pointer to a preview image, or NULL if no image is + * available. + * + */ + const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx); + + + /*!@} - end defgroup encoder*/ + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_image.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_image.h new file mode 100644 index 00000000..b77d37a2 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_image.h @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\file + * \brief Describes the vpx image descriptor and associated operations + * + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_IMAGE_H +#define VPX_IMAGE_H + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_IMAGE_ABI_VERSION (1) /**<\hideinitializer*/ + + +#define VPX_IMG_FMT_PLANAR 0x100 /**< Image is a planar format */ +#define VPX_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U plane in memory */ +#define VPX_IMG_FMT_HAS_ALPHA 0x400 /**< Image has an alpha channel component */ + + + /*!\brief List of supported image formats */ + typedef enum vpx_img_fmt { + VPX_IMG_FMT_NONE, + VPX_IMG_FMT_RGB24, /**< 24 bit per pixel packed RGB */ + VPX_IMG_FMT_RGB32, /**< 32 bit per pixel packed 0RGB */ + VPX_IMG_FMT_RGB565, /**< 16 bit per pixel, 565 */ + VPX_IMG_FMT_RGB555, /**< 16 bit per pixel, 555 */ + VPX_IMG_FMT_UYVY, /**< UYVY packed YUV */ + VPX_IMG_FMT_YUY2, /**< YUYV packed YUV */ + VPX_IMG_FMT_YVYU, /**< YVYU packed YUV */ + VPX_IMG_FMT_BGR24, /**< 24 bit per pixel packed BGR */ + VPX_IMG_FMT_RGB32_LE, /**< 32 bit packed BGR0 */ + VPX_IMG_FMT_ARGB, /**< 32 bit packed ARGB, alpha=255 */ + VPX_IMG_FMT_ARGB_LE, /**< 32 bit packed BGRA, alpha=255 */ + VPX_IMG_FMT_RGB565_LE, /**< 16 bit per pixel, gggbbbbb rrrrrggg */ + VPX_IMG_FMT_RGB555_LE, /**< 16 bit per pixel, gggbbbbb 0rrrrrgg */ + VPX_IMG_FMT_YV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 1, /**< planar YVU */ + VPX_IMG_FMT_I420 = VPX_IMG_FMT_PLANAR | 2, + VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 3, /** < planar 4:2:0 format with vpx color space */ + VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4 /** < planar 4:2:0 format with vpx color space */ + } + vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */ + +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +#define IMG_FMT_PLANAR VPX_IMG_FMT_PLANAR /**< \deprecated Use #VPX_IMG_FMT_PLANAR */ +#define IMG_FMT_UV_FLIP VPX_IMG_FMT_UV_FLIP /**< \deprecated Use #VPX_IMG_FMT_UV_FLIP */ +#define IMG_FMT_HAS_ALPHA VPX_IMG_FMT_HAS_ALPHA /**< \deprecated Use #VPX_IMG_FMT_HAS_ALPHA */ + + /*!\brief Deprecated list of supported image formats + * \deprecated New code should use #vpx_img_fmt + */ +#define img_fmt vpx_img_fmt + /*!\brief alias for enum img_fmt. + * \deprecated New code should use #vpx_img_fmt_t + */ +#define img_fmt_t vpx_img_fmt_t + +#define IMG_FMT_NONE VPX_IMG_FMT_NONE /**< \deprecated Use #VPX_IMG_FMT_NONE */ +#define IMG_FMT_RGB24 VPX_IMG_FMT_RGB24 /**< \deprecated Use #VPX_IMG_FMT_RGB24 */ +#define IMG_FMT_RGB32 VPX_IMG_FMT_RGB32 /**< \deprecated Use #VPX_IMG_FMT_RGB32 */ +#define IMG_FMT_RGB565 VPX_IMG_FMT_RGB565 /**< \deprecated Use #VPX_IMG_FMT_RGB565 */ +#define IMG_FMT_RGB555 VPX_IMG_FMT_RGB555 /**< \deprecated Use #VPX_IMG_FMT_RGB555 */ +#define IMG_FMT_UYVY VPX_IMG_FMT_UYVY /**< \deprecated Use #VPX_IMG_FMT_UYVY */ +#define IMG_FMT_YUY2 VPX_IMG_FMT_YUY2 /**< \deprecated Use #VPX_IMG_FMT_YUY2 */ +#define IMG_FMT_YVYU VPX_IMG_FMT_YVYU /**< \deprecated Use #VPX_IMG_FMT_YVYU */ +#define IMG_FMT_BGR24 VPX_IMG_FMT_BGR24 /**< \deprecated Use #VPX_IMG_FMT_BGR24 */ +#define IMG_FMT_RGB32_LE VPX_IMG_FMT_RGB32_LE /**< \deprecated Use #VPX_IMG_FMT_RGB32_LE */ +#define IMG_FMT_ARGB VPX_IMG_FMT_ARGB /**< \deprecated Use #VPX_IMG_FMT_ARGB */ +#define IMG_FMT_ARGB_LE VPX_IMG_FMT_ARGB_LE /**< \deprecated Use #VPX_IMG_FMT_ARGB_LE */ +#define IMG_FMT_RGB565_LE VPX_IMG_FMT_RGB565_LE /**< \deprecated Use #VPX_IMG_FMT_RGB565_LE */ +#define IMG_FMT_RGB555_LE VPX_IMG_FMT_RGB555_LE /**< \deprecated Use #VPX_IMG_FMT_RGB555_LE */ +#define IMG_FMT_YV12 VPX_IMG_FMT_YV12 /**< \deprecated Use #VPX_IMG_FMT_YV12 */ +#define IMG_FMT_I420 VPX_IMG_FMT_I420 /**< \deprecated Use #VPX_IMG_FMT_I420 */ +#define IMG_FMT_VPXYV12 VPX_IMG_FMT_VPXYV12 /**< \deprecated Use #VPX_IMG_FMT_VPXYV12 */ +#define IMG_FMT_VPXI420 VPX_IMG_FMT_VPXI420 /**< \deprecated Use #VPX_IMG_FMT_VPXI420 */ +#endif /* VPX_CODEC_DISABLE_COMPAT */ + + /**\brief Image Descriptor */ + typedef struct vpx_image + { + vpx_img_fmt_t fmt; /**< Image Format */ + + /* Image storage dimensions */ + unsigned int w; /**< Stored image width */ + unsigned int h; /**< Stored image height */ + + /* Image display dimensions */ + unsigned int d_w; /**< Displayed image width */ + unsigned int d_h; /**< Displayed image height */ + + /* Chroma subsampling info */ + unsigned int x_chroma_shift; /**< subsampling order, X */ + unsigned int y_chroma_shift; /**< subsampling order, Y */ + + /* Image data pointers. */ +#define VPX_PLANE_PACKED 0 /**< To be used for all packed formats */ +#define VPX_PLANE_Y 0 /**< Y (Luminance) plane */ +#define VPX_PLANE_U 1 /**< U (Chroma) plane */ +#define VPX_PLANE_V 2 /**< V (Chroma) plane */ +#define VPX_PLANE_ALPHA 3 /**< A (Transparency) plane */ +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +#define PLANE_PACKED VPX_PLANE_PACKED +#define PLANE_Y VPX_PLANE_Y +#define PLANE_U VPX_PLANE_U +#define PLANE_V VPX_PLANE_V +#define PLANE_ALPHA VPX_PLANE_ALPHA +#endif + unsigned char *planes[4]; /**< pointer to the top left pixel for each plane */ + int stride[4]; /**< stride between rows for each plane */ + + int bps; /**< bits per sample (for packed formats) */ + + /* The following member may be set by the application to associate data + * with this image. + */ + void *user_priv; /**< may be set by the application to associate data + * with this image. */ + + /* The following members should be treated as private. */ + unsigned char *img_data; /**< private */ + int img_data_owner; /**< private */ + int self_allocd; /**< private */ + } vpx_image_t; /**< alias for struct vpx_image */ + + /**\brief Representation of a rectangle on a surface */ + typedef struct vpx_image_rect + { + unsigned int x; /**< leftmost column */ + unsigned int y; /**< topmost row */ + unsigned int w; /**< width */ + unsigned int h; /**< height */ + } vpx_image_rect_t; /**< alias for struct vpx_image_rect */ + + /*!\brief Open a descriptor, allocating storage for the underlying image + * + * Returns a descriptor for storing an image of the given format. The + * storage for the descriptor is allocated on the heap. + * + * \param[in] img Pointer to storage for descriptor. If this parameter + * is NULL, the storage for the descriptor will be + * allocated on the heap. + * \param[in] fmt Format for the image + * \param[in] d_w Width of the image + * \param[in] d_h Height of the image + * \param[in] align Alignment, in bytes, of each row in the image. + * + * \return Returns a pointer to the initialized image descriptor. If the img + * parameter is non-null, the value of the img parameter will be + * returned. + */ + vpx_image_t *vpx_img_alloc(vpx_image_t *img, + vpx_img_fmt_t fmt, + unsigned int d_w, + unsigned int d_h, + unsigned int align); + + /*!\brief Open a descriptor, using existing storage for the underlying image + * + * Returns a descriptor for storing an image of the given format. The + * storage for descriptor has been allocated elsewhere, and a descriptor is + * desired to "wrap" that storage. + * + * \param[in] img Pointer to storage for descriptor. If this parameter + * is NULL, the storage for the descriptor will be + * allocated on the heap. + * \param[in] fmt Format for the image + * \param[in] d_w Width of the image + * \param[in] d_h Height of the image + * \param[in] align Alignment, in bytes, of each row in the image. + * \param[in] img_data Storage to use for the image + * + * \return Returns a pointer to the initialized image descriptor. If the img + * parameter is non-null, the value of the img parameter will be + * returned. + */ + vpx_image_t *vpx_img_wrap(vpx_image_t *img, + vpx_img_fmt_t fmt, + unsigned int d_w, + unsigned int d_h, + unsigned int align, + unsigned char *img_data); + + + /*!\brief Set the rectangle identifying the displayed portion of the image + * + * Updates the displayed rectangle (aka viewport) on the image surface to + * match the specified coordinates and size. + * + * \param[in] img Image descriptor + * \param[in] x leftmost column + * \param[in] y topmost row + * \param[in] w width + * \param[in] h height + * + * \return 0 if the requested rectangle is valid, nonzero otherwise. + */ + int vpx_img_set_rect(vpx_image_t *img, + unsigned int x, + unsigned int y, + unsigned int w, + unsigned int h); + + + /*!\brief Flip the image vertically (top for bottom) + * + * Adjusts the image descriptor's pointers and strides to make the image + * be referenced upside-down. + * + * \param[in] img Image descriptor + */ + void vpx_img_flip(vpx_image_t *img); + + /*!\brief Close an image descriptor + * + * Frees all allocated storage associated with an image descriptor. + * + * \param[in] img Image descriptor + */ + void vpx_img_free(vpx_image_t *img); + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_integer.h b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_integer.h new file mode 100644 index 00000000..a760fa6f --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/vpx/vpx_integer.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +#ifndef VPX_INTEGER_H +#define VPX_INTEGER_H + +/* get ptrdiff_t, size_t, wchar_t, NULL */ +#include + +#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES) +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed int int32_t; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; + +#if (defined(_MSC_VER) && (_MSC_VER < 1600)) +typedef signed __int64 int64_t; +typedef unsigned __int64 uint64_t; +#endif + +#ifdef HAVE_ARMV6 +typedef unsigned int int_fast16_t; +#else +typedef signed short int_fast16_t; +#endif +typedef signed char int_fast8_t; +typedef unsigned char uint_fast8_t; + +#ifndef _UINTPTR_T_DEFINED +typedef unsigned int uintptr_t; +#endif + +#else + +/* Most platforms have the C99 standard integer types. */ + +#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) +#define __STDC_FORMAT_MACROS +#endif +#include + +#endif + +/* VS2010 defines stdint.h, but not inttypes.h */ +#if defined(_MSC_VER) +#define PRId64 "I64d" +#else +#include +#endif + +#endif diff --git a/branches/2.0/doubango/thirdparties/android/include/webrtc/echo_control_mobile.h b/branches/2.0/doubango/thirdparties/android/include/webrtc/echo_control_mobile.h new file mode 100644 index 00000000..30bea7ab --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/webrtc/echo_control_mobile.h @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_MAIN_INTERFACE_ECHO_CONTROL_MOBILE_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_MAIN_INTERFACE_ECHO_CONTROL_MOBILE_H_ + +#include "typedefs.h" + +enum { + AecmFalse = 0, + AecmTrue +}; + +// Errors +#define AECM_UNSPECIFIED_ERROR 12000 +#define AECM_UNSUPPORTED_FUNCTION_ERROR 12001 +#define AECM_UNINITIALIZED_ERROR 12002 +#define AECM_NULL_POINTER_ERROR 12003 +#define AECM_BAD_PARAMETER_ERROR 12004 + +// Warnings +#define AECM_BAD_PARAMETER_WARNING 12100 + +typedef struct { + WebRtc_Word16 cngMode; // AECM_FALSE, AECM_TRUE (default) + WebRtc_Word16 echoMode; // 0, 1, 2, 3 (default), 4 +} AecmConfig; + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Allocates the memory needed by the AECM. The memory needs to be + * initialized separately using the WebRtcAecm_Init() function. + * + * Inputs Description + * ------------------------------------------------------------------- + * void **aecmInst Pointer to the AECM instance to be + * created and initialized + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_Create(void **aecmInst); + +/* + * This function releases the memory allocated by WebRtcAecm_Create() + * + * Inputs Description + * ------------------------------------------------------------------- + * void *aecmInst Pointer to the AECM instance + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_Free(void *aecmInst); + +/* + * Initializes an AECM instance. + * + * Inputs Description + * ------------------------------------------------------------------- + * void *aecmInst Pointer to the AECM instance + * WebRtc_Word32 sampFreq Sampling frequency of data + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_Init(void* aecmInst, + WebRtc_Word32 sampFreq); + +/* + * Inserts an 80 or 160 sample block of data into the farend buffer. + * + * Inputs Description + * ------------------------------------------------------------------- + * void *aecmInst Pointer to the AECM instance + * WebRtc_Word16 *farend In buffer containing one frame of + * farend signal + * WebRtc_Word16 nrOfSamples Number of samples in farend buffer + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_BufferFarend(void* aecmInst, + const WebRtc_Word16* farend, + WebRtc_Word16 nrOfSamples); + +/* + * Runs the AECM on an 80 or 160 sample blocks of data. + * + * Inputs Description + * ------------------------------------------------------------------- + * void *aecmInst Pointer to the AECM instance + * WebRtc_Word16 *nearendNoisy In buffer containing one frame of + * reference nearend+echo signal. If + * noise reduction is active, provide + * the noisy signal here. + * WebRtc_Word16 *nearendClean In buffer containing one frame of + * nearend+echo signal. If noise + * reduction is active, provide the + * clean signal here. Otherwise pass a + * NULL pointer. + * WebRtc_Word16 nrOfSamples Number of samples in nearend buffer + * WebRtc_Word16 msInSndCardBuf Delay estimate for sound card and + * system buffers + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word16 *out Out buffer, one frame of processed nearend + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_Process(void* aecmInst, + const WebRtc_Word16* nearendNoisy, + const WebRtc_Word16* nearendClean, + WebRtc_Word16* out, + WebRtc_Word16 nrOfSamples, + WebRtc_Word16 msInSndCardBuf); + +/* + * This function enables the user to set certain parameters on-the-fly + * + * Inputs Description + * ------------------------------------------------------------------- + * void *aecmInst Pointer to the AECM instance + * AecmConfig config Config instance that contains all + * properties to be set + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_set_config(void* aecmInst, + AecmConfig config); + +/* + * This function enables the user to set certain parameters on-the-fly + * + * Inputs Description + * ------------------------------------------------------------------- + * void *aecmInst Pointer to the AECM instance + * + * Outputs Description + * ------------------------------------------------------------------- + * AecmConfig *config Pointer to the config instance that + * all properties will be written to + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_get_config(void *aecmInst, + AecmConfig *config); + +/* + * This function enables the user to set the echo path on-the-fly. + * + * Inputs Description + * ------------------------------------------------------------------- + * void* aecmInst Pointer to the AECM instance + * void* echo_path Pointer to the echo path to be set + * size_t size_bytes Size in bytes of the echo path + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_InitEchoPath(void* aecmInst, + const void* echo_path, + size_t size_bytes); + +/* + * This function enables the user to get the currently used echo path + * on-the-fly + * + * Inputs Description + * ------------------------------------------------------------------- + * void* aecmInst Pointer to the AECM instance + * void* echo_path Pointer to echo path + * size_t size_bytes Size in bytes of the echo path + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_GetEchoPath(void* aecmInst, + void* echo_path, + size_t size_bytes); + +/* + * This function enables the user to get the echo path size in bytes + * + * Outputs Description + * ------------------------------------------------------------------- + * size_t return : size in bytes + */ +size_t WebRtcAecm_echo_path_size_bytes(); + +/* + * Gets the last error code. + * + * Inputs Description + * ------------------------------------------------------------------- + * void *aecmInst Pointer to the AECM instance + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word32 return 11000-11100: error code + */ +WebRtc_Word32 WebRtcAecm_get_error_code(void *aecmInst); + +/* + * Gets a version string + * + * Inputs Description + * ------------------------------------------------------------------- + * char *versionStr Pointer to a string array + * WebRtc_Word16 len The maximum length of the string + * + * Outputs Description + * ------------------------------------------------------------------- + * WebRtc_Word8 *versionStr Pointer to a string array + * WebRtc_Word32 return 0: OK + * -1: error + */ +WebRtc_Word32 WebRtcAecm_get_version(WebRtc_Word8 *versionStr, + WebRtc_Word16 len); + +#ifdef __cplusplus +} +#endif +#endif /* WEBRTC_MODULES_AUDIO_PROCESSING_AECM_MAIN_INTERFACE_ECHO_CONTROL_MOBILE_H_ */ diff --git a/branches/2.0/doubango/thirdparties/android/include/webrtc/noise_suppression.h b/branches/2.0/doubango/thirdparties/android/include/webrtc/noise_suppression.h index b8983b07..f28a10a5 100644 --- a/branches/2.0/doubango/thirdparties/android/include/webrtc/noise_suppression.h +++ b/branches/2.0/doubango/thirdparties/android/include/webrtc/noise_suppression.h @@ -98,7 +98,7 @@ int WebRtcNs_set_policy(NsHandle *NS_inst, int mode); * input and output signals should always be 10ms (80 or 160 samples). * * Input - * - NS_inst : VAD Instance. Needs to be initiated before call. + * - NS_inst : NS Instance. Needs to be initiated before call. * - spframe : Pointer to speech frame buffer for L band * - spframe_H : Pointer to speech frame buffer for H band * - fs : sampling frequency diff --git a/branches/2.0/doubango/thirdparties/android/include/webrtc/signal_processing_library.h b/branches/2.0/doubango/thirdparties/android/include/webrtc/signal_processing_library.h new file mode 100644 index 00000000..19721a53 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/webrtc/signal_processing_library.h @@ -0,0 +1,1678 @@ +/* + * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/* + * This header file includes all of the fix point signal processing library (SPL) function + * descriptions and declarations. + * For specific function calls, see bottom of file. + */ + +#ifndef WEBRTC_SPL_SIGNAL_PROCESSING_LIBRARY_H_ +#define WEBRTC_SPL_SIGNAL_PROCESSING_LIBRARY_H_ + +#include +#include "typedefs.h" + +#ifdef ARM_WINM +#include // intrinsic file for windows mobile +#endif + +// Macros specific for the fixed point implementation +#define WEBRTC_SPL_WORD16_MAX 32767 +#define WEBRTC_SPL_WORD16_MIN -32768 +#define WEBRTC_SPL_WORD32_MAX (WebRtc_Word32)0x7fffffff +#define WEBRTC_SPL_WORD32_MIN (WebRtc_Word32)0x80000000 +#define WEBRTC_SPL_MAX_LPC_ORDER 14 +#define WEBRTC_SPL_MAX_SEED_USED 0x80000000L +#define WEBRTC_SPL_MIN(A, B) (A < B ? A : B) // Get min value +#define WEBRTC_SPL_MAX(A, B) (A > B ? A : B) // Get max value +#define WEBRTC_SPL_ABS_W16(a)\ + (((WebRtc_Word16)a >= 0) ? ((WebRtc_Word16)a) : -((WebRtc_Word16)a)) +#define WEBRTC_SPL_ABS_W32(a)\ + (((WebRtc_Word32)a >= 0) ? ((WebRtc_Word32)a) : -((WebRtc_Word32)a)) + +#if (defined WEBRTC_TARGET_PC)||(defined __TARGET_XSCALE) +#define WEBRTC_SPL_GET_BYTE(a, nr) (((WebRtc_Word8 *)a)[nr]) +#define WEBRTC_SPL_SET_BYTE(d_ptr, val, index) \ + (((WebRtc_Word8 *)d_ptr)[index] = (val)) +#elif defined WEBRTC_BIG_ENDIAN +#define WEBRTC_SPL_GET_BYTE(a, nr)\ + ((((WebRtc_Word16 *)a)[nr >> 1]) >> (((nr + 1) & 0x1) * 8) & 0x00ff) +#define WEBRTC_SPL_SET_BYTE(d_ptr, val, index) \ + ((WebRtc_Word16 *)d_ptr)[index >> 1] = \ + ((((WebRtc_Word16 *)d_ptr)[index >> 1]) \ + & (0x00ff << (8 * ((index) & 0x1)))) | (val << (8 * ((index + 1) & 0x1))) +#else +#define WEBRTC_SPL_GET_BYTE(a,nr) \ + ((((WebRtc_Word16 *)(a))[(nr) >> 1]) >> (((nr) & 0x1) * 8) & 0x00ff) +#define WEBRTC_SPL_SET_BYTE(d_ptr, val, index) \ + ((WebRtc_Word16 *)(d_ptr))[(index) >> 1] = \ + ((((WebRtc_Word16 *)(d_ptr))[(index) >> 1]) \ + & (0x00ff << (8 * (((index) + 1) & 0x1)))) | \ + ((val) << (8 * ((index) & 0x1))) +#endif + +#define WEBRTC_SPL_UMUL(a, b) \ + ((WebRtc_UWord32) ((WebRtc_UWord32)(a) * (WebRtc_UWord32)(b))) +#define WEBRTC_SPL_UMUL_RSFT16(a, b)\ + ((WebRtc_UWord32) ((WebRtc_UWord32)(a) * (WebRtc_UWord32)(b)) >> 16) +#define WEBRTC_SPL_UMUL_16_16(a, b)\ + ((WebRtc_UWord32) (WebRtc_UWord16)(a) * (WebRtc_UWord16)(b)) +#define WEBRTC_SPL_UMUL_16_16_RSFT16(a, b)\ + (((WebRtc_UWord32) (WebRtc_UWord16)(a) * (WebRtc_UWord16)(b)) >> 16) +#define WEBRTC_SPL_UMUL_32_16(a, b)\ + ((WebRtc_UWord32) ((WebRtc_UWord32)(a) * (WebRtc_UWord16)(b))) +#define WEBRTC_SPL_UMUL_32_16_RSFT16(a, b)\ + ((WebRtc_UWord32) ((WebRtc_UWord32)(a) * (WebRtc_UWord16)(b)) >> 16) +#define WEBRTC_SPL_MUL_16_U16(a, b)\ + ((WebRtc_Word32)(WebRtc_Word16)(a) * (WebRtc_UWord16)(b)) +#define WEBRTC_SPL_DIV(a, b) \ + ((WebRtc_Word32) ((WebRtc_Word32)(a) / (WebRtc_Word32)(b))) +#define WEBRTC_SPL_UDIV(a, b) \ + ((WebRtc_UWord32) ((WebRtc_UWord32)(a) / (WebRtc_UWord32)(b))) + +#define WEBRTC_SPL_MUL_16_32_RSFT11(a, b)\ + ((WEBRTC_SPL_MUL_16_16(a, (b) >> 16) << 5) \ + + (((WEBRTC_SPL_MUL_16_U16(a, (WebRtc_UWord16)(b)) >> 1) + 0x0200) >> 10)) +#define WEBRTC_SPL_MUL_16_32_RSFT14(a, b)\ + ((WEBRTC_SPL_MUL_16_16(a, (b) >> 16) << 2) \ + + (((WEBRTC_SPL_MUL_16_U16(a, (WebRtc_UWord16)(b)) >> 1) + 0x1000) >> 13)) +#define WEBRTC_SPL_MUL_16_32_RSFT15(a, b) \ + ((WEBRTC_SPL_MUL_16_16(a, (b) >> 16) << 1) \ + + (((WEBRTC_SPL_MUL_16_U16(a, (WebRtc_UWord16)(b)) >> 1) + 0x2000) >> 14)) + +#ifdef ARM_WINM +#define WEBRTC_SPL_MUL_16_16(a, b) \ + _SmulLo_SW_SL((WebRtc_Word16)(a), (WebRtc_Word16)(b)) +#endif + +#define WEBRTC_SPL_MUL_16_16_RSFT(a, b, c) \ + (WEBRTC_SPL_MUL_16_16(a, b) >> (c)) + +#define WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, c) \ + ((WEBRTC_SPL_MUL_16_16(a, b) + ((WebRtc_Word32) \ + (((WebRtc_Word32)1) << ((c) - 1)))) >> (c)) +#define WEBRTC_SPL_MUL_16_16_RSFT_WITH_FIXROUND(a, b)\ + ((WEBRTC_SPL_MUL_16_16(a, b) + ((WebRtc_Word32) (1 << 14))) >> 15) + +// C + the 32 most significant bits of A * B +#define WEBRTC_SPL_SCALEDIFF32(A, B, C) \ + (C + (B >> 16) * A + (((WebRtc_UWord32)(0x0000FFFF & B) * A) >> 16)) + +#define WEBRTC_SPL_ADD_SAT_W32(a, b) WebRtcSpl_AddSatW32(a, b) +#define WEBRTC_SPL_SAT(a, b, c) (b > a ? a : b < c ? c : b) +#define WEBRTC_SPL_MUL_32_16(a, b) ((a) * (b)) + +#define WEBRTC_SPL_SUB_SAT_W32(a, b) WebRtcSpl_SubSatW32(a, b) +#define WEBRTC_SPL_ADD_SAT_W16(a, b) WebRtcSpl_AddSatW16(a, b) +#define WEBRTC_SPL_SUB_SAT_W16(a, b) WebRtcSpl_SubSatW16(a, b) + +// We cannot do casting here due to signed/unsigned problem +#define WEBRTC_SPL_IS_NEG(a) ((a) & 0x80000000) +// Shifting with negative numbers allowed +// Positive means left shift +#define WEBRTC_SPL_SHIFT_W16(x, c) \ + (((c) >= 0) ? ((x) << (c)) : ((x) >> (-(c)))) +#define WEBRTC_SPL_SHIFT_W32(x, c) \ + (((c) >= 0) ? ((x) << (c)) : ((x) >> (-(c)))) + +// Shifting with negative numbers not allowed +// We cannot do casting here due to signed/unsigned problem +#define WEBRTC_SPL_RSHIFT_W16(x, c) ((x) >> (c)) +#define WEBRTC_SPL_LSHIFT_W16(x, c) ((x) << (c)) +#define WEBRTC_SPL_RSHIFT_W32(x, c) ((x) >> (c)) +#define WEBRTC_SPL_LSHIFT_W32(x, c) ((x) << (c)) + +#define WEBRTC_SPL_RSHIFT_U16(x, c) ((WebRtc_UWord16)(x) >> (c)) +#define WEBRTC_SPL_LSHIFT_U16(x, c) ((WebRtc_UWord16)(x) << (c)) +#define WEBRTC_SPL_RSHIFT_U32(x, c) ((WebRtc_UWord32)(x) >> (c)) +#define WEBRTC_SPL_LSHIFT_U32(x, c) ((WebRtc_UWord32)(x) << (c)) + +#define WEBRTC_SPL_VNEW(t, n) (t *) malloc (sizeof (t) * (n)) +#define WEBRTC_SPL_FREE free + +#define WEBRTC_SPL_RAND(a)\ + ((WebRtc_Word16)(WEBRTC_SPL_MUL_16_16_RSFT((a), 18816, 7) & 0x00007fff)) + +#ifdef __cplusplus +extern "C" +{ +#endif + +#define WEBRTC_SPL_MEMCPY_W8(v1, v2, length) \ + memcpy(v1, v2, (length) * sizeof(char)) +#define WEBRTC_SPL_MEMCPY_W16(v1, v2, length) \ + memcpy(v1, v2, (length) * sizeof(WebRtc_Word16)) + +#define WEBRTC_SPL_MEMMOVE_W16(v1, v2, length) \ + memmove(v1, v2, (length) * sizeof(WebRtc_Word16)) + +// Trigonometric tables used for quick lookup +// default declarations +extern WebRtc_Word16 WebRtcSpl_kCosTable[]; +extern WebRtc_Word16 WebRtcSpl_kSinTable[]; +extern WebRtc_Word16 WebRtcSpl_kSinTable1024[]; +// Hanning table +extern WebRtc_Word16 WebRtcSpl_kHanningTable[]; +// Random table +extern WebRtc_Word16 WebRtcSpl_kRandNTable[]; + +#ifndef WEBRTC_ARM_INLINE_CALLS +WebRtc_Word16 WebRtcSpl_AddSatW16(WebRtc_Word16 var1, WebRtc_Word16 var2); +WebRtc_Word16 WebRtcSpl_SubSatW16(WebRtc_Word16 var1, WebRtc_Word16 var2); +WebRtc_Word32 WebRtcSpl_AddSatW32(WebRtc_Word32 var1, WebRtc_Word32 var2); +WebRtc_Word32 WebRtcSpl_SubSatW32(WebRtc_Word32 var1, WebRtc_Word32 var2); +WebRtc_Word16 WebRtcSpl_GetSizeInBits(WebRtc_UWord32 value); +int WebRtcSpl_NormW32(WebRtc_Word32 value); +int WebRtcSpl_NormW16(WebRtc_Word16 value); +int WebRtcSpl_NormU32(WebRtc_UWord32 value); +#define WEBRTC_SPL_MUL(a, b) \ + ((WebRtc_Word32) ((WebRtc_Word32)(a) * (WebRtc_Word32)(b))) +#define WEBRTC_SPL_MUL_16_16(a, b) \ + ((WebRtc_Word32) (((WebRtc_Word16)(a)) * ((WebRtc_Word16)(b)))) +#define WEBRTC_SPL_MUL_16_32_RSFT16(a, b) \ + (WEBRTC_SPL_MUL_16_16(a, b >> 16) \ + + ((WEBRTC_SPL_MUL_16_16(a, (b & 0xffff) >> 1) + 0x4000) >> 15)) +#define WEBRTC_SPL_MUL_32_32_RSFT32(a32a, a32b, b32) \ + ((WebRtc_Word32)(WEBRTC_SPL_MUL_16_32_RSFT16(a32a, b32) \ + + (WEBRTC_SPL_MUL_16_32_RSFT16(a32b, b32) >> 16))) +#define WEBRTC_SPL_MUL_32_32_RSFT32BI(a32, b32) \ + ((WebRtc_Word32)(WEBRTC_SPL_MUL_16_32_RSFT16(( \ + (WebRtc_Word16)(a32 >> 16)), b32) + \ + (WEBRTC_SPL_MUL_16_32_RSFT16(( \ + (WebRtc_Word16)((a32 & 0x0000FFFF) >> 1)), b32) >> 15))) +#else +#include "spl_inl.h" +#endif // WEBRTC_ARM_INLINE_CALLS + +// Get SPL Version +WebRtc_Word16 WebRtcSpl_get_version(char* version, + WebRtc_Word16 length_in_bytes); + +int WebRtcSpl_GetScalingSquare(WebRtc_Word16* in_vector, + int in_vector_length, + int times); + +// Copy and set operations. Implementation in copy_set_operations.c. +// Descriptions at bottom of file. +void WebRtcSpl_MemSetW16(WebRtc_Word16* vector, + WebRtc_Word16 set_value, + int vector_length); +void WebRtcSpl_MemSetW32(WebRtc_Word32* vector, + WebRtc_Word32 set_value, + int vector_length); +void WebRtcSpl_MemCpyReversedOrder(WebRtc_Word16* out_vector, + WebRtc_Word16* in_vector, + int vector_length); +WebRtc_Word16 WebRtcSpl_CopyFromEndW16(G_CONST WebRtc_Word16* in_vector, + WebRtc_Word16 in_vector_length, + WebRtc_Word16 samples, + WebRtc_Word16* out_vector); +WebRtc_Word16 WebRtcSpl_ZerosArrayW16(WebRtc_Word16* vector, + WebRtc_Word16 vector_length); +WebRtc_Word16 WebRtcSpl_ZerosArrayW32(WebRtc_Word32* vector, + WebRtc_Word16 vector_length); +WebRtc_Word16 WebRtcSpl_OnesArrayW16(WebRtc_Word16* vector, + WebRtc_Word16 vector_length); +WebRtc_Word16 WebRtcSpl_OnesArrayW32(WebRtc_Word32* vector, + WebRtc_Word16 vector_length); +// End: Copy and set operations. + +// Minimum and maximum operations. Implementation in min_max_operations.c. +// Descriptions at bottom of file. +WebRtc_Word16 WebRtcSpl_MaxAbsValueW16(G_CONST WebRtc_Word16* vector, + WebRtc_Word16 length); +WebRtc_Word32 WebRtcSpl_MaxAbsValueW32(G_CONST WebRtc_Word32* vector, + WebRtc_Word16 length); +WebRtc_Word16 WebRtcSpl_MinValueW16(G_CONST WebRtc_Word16* vector, + WebRtc_Word16 length); +WebRtc_Word32 WebRtcSpl_MinValueW32(G_CONST WebRtc_Word32* vector, + WebRtc_Word16 length); +WebRtc_Word16 WebRtcSpl_MaxValueW16(G_CONST WebRtc_Word16* vector, + WebRtc_Word16 length); + +WebRtc_Word16 WebRtcSpl_MaxAbsIndexW16(G_CONST WebRtc_Word16* vector, + WebRtc_Word16 length); +WebRtc_Word32 WebRtcSpl_MaxValueW32(G_CONST WebRtc_Word32* vector, + WebRtc_Word16 length); +WebRtc_Word16 WebRtcSpl_MinIndexW16(G_CONST WebRtc_Word16* vector, + WebRtc_Word16 length); +WebRtc_Word16 WebRtcSpl_MinIndexW32(G_CONST WebRtc_Word32* vector, + WebRtc_Word16 length); +WebRtc_Word16 WebRtcSpl_MaxIndexW16(G_CONST WebRtc_Word16* vector, + WebRtc_Word16 length); +WebRtc_Word16 WebRtcSpl_MaxIndexW32(G_CONST WebRtc_Word32* vector, + WebRtc_Word16 length); +// End: Minimum and maximum operations. + +// Vector scaling operations. Implementation in vector_scaling_operations.c. +// Description at bottom of file. +void WebRtcSpl_VectorBitShiftW16(WebRtc_Word16* out_vector, + WebRtc_Word16 vector_length, + G_CONST WebRtc_Word16* in_vector, + WebRtc_Word16 right_shifts); +void WebRtcSpl_VectorBitShiftW32(WebRtc_Word32* out_vector, + WebRtc_Word16 vector_length, + G_CONST WebRtc_Word32* in_vector, + WebRtc_Word16 right_shifts); +void WebRtcSpl_VectorBitShiftW32ToW16(WebRtc_Word16* out_vector, + WebRtc_Word16 vector_length, + G_CONST WebRtc_Word32* in_vector, + WebRtc_Word16 right_shifts); + +void WebRtcSpl_ScaleVector(G_CONST WebRtc_Word16* in_vector, + WebRtc_Word16* out_vector, + WebRtc_Word16 gain, + WebRtc_Word16 vector_length, + WebRtc_Word16 right_shifts); +void WebRtcSpl_ScaleVectorWithSat(G_CONST WebRtc_Word16* in_vector, + WebRtc_Word16* out_vector, + WebRtc_Word16 gain, + WebRtc_Word16 vector_length, + WebRtc_Word16 right_shifts); +void WebRtcSpl_ScaleAndAddVectors(G_CONST WebRtc_Word16* in_vector1, + WebRtc_Word16 gain1, int right_shifts1, + G_CONST WebRtc_Word16* in_vector2, + WebRtc_Word16 gain2, int right_shifts2, + WebRtc_Word16* out_vector, + int vector_length); +// End: Vector scaling operations. + +// iLBC specific functions. Implementations in ilbc_specific_functions.c. +// Description at bottom of file. +void WebRtcSpl_ScaleAndAddVectorsWithRound(WebRtc_Word16* in_vector1, + WebRtc_Word16 scale1, + WebRtc_Word16* in_vector2, + WebRtc_Word16 scale2, + WebRtc_Word16 right_shifts, + WebRtc_Word16* out_vector, + WebRtc_Word16 vector_length); +void WebRtcSpl_ReverseOrderMultArrayElements(WebRtc_Word16* out_vector, + G_CONST WebRtc_Word16* in_vector, + G_CONST WebRtc_Word16* window, + WebRtc_Word16 vector_length, + WebRtc_Word16 right_shifts); +void WebRtcSpl_ElementwiseVectorMult(WebRtc_Word16* out_vector, + G_CONST WebRtc_Word16* in_vector, + G_CONST WebRtc_Word16* window, + WebRtc_Word16 vector_length, + WebRtc_Word16 right_shifts); +void WebRtcSpl_AddVectorsAndShift(WebRtc_Word16* out_vector, + G_CONST WebRtc_Word16* in_vector1, + G_CONST WebRtc_Word16* in_vector2, + WebRtc_Word16 vector_length, + WebRtc_Word16 right_shifts); +void WebRtcSpl_AddAffineVectorToVector(WebRtc_Word16* out_vector, + WebRtc_Word16* in_vector, + WebRtc_Word16 gain, + WebRtc_Word32 add_constant, + WebRtc_Word16 right_shifts, + int vector_length); +void WebRtcSpl_AffineTransformVector(WebRtc_Word16* out_vector, + WebRtc_Word16* in_vector, + WebRtc_Word16 gain, + WebRtc_Word32 add_constant, + WebRtc_Word16 right_shifts, + int vector_length); +// End: iLBC specific functions. + +// Signal processing operations. Descriptions at bottom of this file. +int WebRtcSpl_AutoCorrelation(G_CONST WebRtc_Word16* vector, + int vector_length, int order, + WebRtc_Word32* result_vector, + int* scale); +WebRtc_Word16 WebRtcSpl_LevinsonDurbin(WebRtc_Word32* auto_corr, + WebRtc_Word16* lpc_coef, + WebRtc_Word16* refl_coef, + WebRtc_Word16 order); +void WebRtcSpl_ReflCoefToLpc(G_CONST WebRtc_Word16* refl_coef, + int use_order, + WebRtc_Word16* lpc_coef); +void WebRtcSpl_LpcToReflCoef(WebRtc_Word16* lpc_coef, + int use_order, + WebRtc_Word16* refl_coef); +void WebRtcSpl_AutoCorrToReflCoef(G_CONST WebRtc_Word32* auto_corr, + int use_order, + WebRtc_Word16* refl_coef); +void WebRtcSpl_CrossCorrelation(WebRtc_Word32* cross_corr, + WebRtc_Word16* vector1, + WebRtc_Word16* vector2, + WebRtc_Word16 dim_vector, + WebRtc_Word16 dim_cross_corr, + WebRtc_Word16 right_shifts, + WebRtc_Word16 step_vector2); +void WebRtcSpl_GetHanningWindow(WebRtc_Word16* window, WebRtc_Word16 size); +void WebRtcSpl_SqrtOfOneMinusXSquared(WebRtc_Word16* in_vector, + int vector_length, + WebRtc_Word16* out_vector); +// End: Signal processing operations. + +// Randomization functions. Implementations collected in randomization_functions.c and +// descriptions at bottom of this file. +WebRtc_UWord32 WebRtcSpl_IncreaseSeed(WebRtc_UWord32* seed); +WebRtc_Word16 WebRtcSpl_RandU(WebRtc_UWord32* seed); +WebRtc_Word16 WebRtcSpl_RandN(WebRtc_UWord32* seed); +WebRtc_Word16 WebRtcSpl_RandUArray(WebRtc_Word16* vector, + WebRtc_Word16 vector_length, + WebRtc_UWord32* seed); +// End: Randomization functions. + +// Math functions +WebRtc_Word32 WebRtcSpl_Sqrt(WebRtc_Word32 value); +WebRtc_Word32 WebRtcSpl_SqrtFloor(WebRtc_Word32 value); + +// Divisions. Implementations collected in division_operations.c and +// descriptions at bottom of this file. +WebRtc_UWord32 WebRtcSpl_DivU32U16(WebRtc_UWord32 num, WebRtc_UWord16 den); +WebRtc_Word32 WebRtcSpl_DivW32W16(WebRtc_Word32 num, WebRtc_Word16 den); +WebRtc_Word16 WebRtcSpl_DivW32W16ResW16(WebRtc_Word32 num, WebRtc_Word16 den); +WebRtc_Word32 WebRtcSpl_DivResultInQ31(WebRtc_Word32 num, WebRtc_Word32 den); +WebRtc_Word32 WebRtcSpl_DivW32HiLow(WebRtc_Word32 num, WebRtc_Word16 den_hi, + WebRtc_Word16 den_low); +// End: Divisions. + +WebRtc_Word32 WebRtcSpl_Energy(WebRtc_Word16* vector, + int vector_length, + int* scale_factor); + +WebRtc_Word32 WebRtcSpl_DotProductWithScale(WebRtc_Word16* vector1, + WebRtc_Word16* vector2, + int vector_length, + int scaling); + +// Filter operations. +int WebRtcSpl_FilterAR(G_CONST WebRtc_Word16* ar_coef, int ar_coef_length, + G_CONST WebRtc_Word16* in_vector, int in_vector_length, + WebRtc_Word16* filter_state, int filter_state_length, + WebRtc_Word16* filter_state_low, + int filter_state_low_length, WebRtc_Word16* out_vector, + WebRtc_Word16* out_vector_low, int out_vector_low_length); + +void WebRtcSpl_FilterMAFastQ12(WebRtc_Word16* in_vector, + WebRtc_Word16* out_vector, + WebRtc_Word16* ma_coef, + WebRtc_Word16 ma_coef_length, + WebRtc_Word16 vector_length); +void WebRtcSpl_FilterARFastQ12(WebRtc_Word16* in_vector, + WebRtc_Word16* out_vector, + WebRtc_Word16* ar_coef, + WebRtc_Word16 ar_coef_length, + WebRtc_Word16 vector_length); +int WebRtcSpl_DownsampleFast(WebRtc_Word16* in_vector, + WebRtc_Word16 in_vector_length, + WebRtc_Word16* out_vector, + WebRtc_Word16 out_vector_length, + WebRtc_Word16* ma_coef, + WebRtc_Word16 ma_coef_length, + WebRtc_Word16 factor, + WebRtc_Word16 delay); +// End: Filter operations. + +// FFT operations +int WebRtcSpl_ComplexFFT(WebRtc_Word16 vector[], int stages, int mode); +int WebRtcSpl_ComplexIFFT(WebRtc_Word16 vector[], int stages, int mode); +void WebRtcSpl_ComplexBitReverse(WebRtc_Word16 vector[], int stages); +// End: FFT operations + +/************************************************************ + * + * RESAMPLING FUNCTIONS AND THEIR STRUCTS ARE DEFINED BELOW + * + ************************************************************/ + +/******************************************************************* + * resample.c + * + * Includes the following resampling combinations + * 22 kHz -> 16 kHz + * 16 kHz -> 22 kHz + * 22 kHz -> 8 kHz + * 8 kHz -> 22 kHz + * + ******************************************************************/ + +// state structure for 22 -> 16 resampler +typedef struct +{ + WebRtc_Word32 S_22_44[8]; + WebRtc_Word32 S_44_32[8]; + WebRtc_Word32 S_32_16[8]; +} WebRtcSpl_State22khzTo16khz; + +void WebRtcSpl_Resample22khzTo16khz(const WebRtc_Word16* in, + WebRtc_Word16* out, + WebRtcSpl_State22khzTo16khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample22khzTo16khz(WebRtcSpl_State22khzTo16khz* state); + +// state structure for 16 -> 22 resampler +typedef struct +{ + WebRtc_Word32 S_16_32[8]; + WebRtc_Word32 S_32_22[8]; +} WebRtcSpl_State16khzTo22khz; + +void WebRtcSpl_Resample16khzTo22khz(const WebRtc_Word16* in, + WebRtc_Word16* out, + WebRtcSpl_State16khzTo22khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample16khzTo22khz(WebRtcSpl_State16khzTo22khz* state); + +// state structure for 22 -> 8 resampler +typedef struct +{ + WebRtc_Word32 S_22_22[16]; + WebRtc_Word32 S_22_16[8]; + WebRtc_Word32 S_16_8[8]; +} WebRtcSpl_State22khzTo8khz; + +void WebRtcSpl_Resample22khzTo8khz(const WebRtc_Word16* in, WebRtc_Word16* out, + WebRtcSpl_State22khzTo8khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample22khzTo8khz(WebRtcSpl_State22khzTo8khz* state); + +// state structure for 8 -> 22 resampler +typedef struct +{ + WebRtc_Word32 S_8_16[8]; + WebRtc_Word32 S_16_11[8]; + WebRtc_Word32 S_11_22[8]; +} WebRtcSpl_State8khzTo22khz; + +void WebRtcSpl_Resample8khzTo22khz(const WebRtc_Word16* in, WebRtc_Word16* out, + WebRtcSpl_State8khzTo22khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample8khzTo22khz(WebRtcSpl_State8khzTo22khz* state); + +/******************************************************************* + * resample_fractional.c + * Functions for internal use in the other resample functions + * + * Includes the following resampling combinations + * 48 kHz -> 32 kHz + * 32 kHz -> 24 kHz + * 44 kHz -> 32 kHz + * + ******************************************************************/ + +void WebRtcSpl_Resample48khzTo32khz(const WebRtc_Word32* In, WebRtc_Word32* Out, + const WebRtc_Word32 K); + +void WebRtcSpl_Resample32khzTo24khz(const WebRtc_Word32* In, WebRtc_Word32* Out, + const WebRtc_Word32 K); + +void WebRtcSpl_Resample44khzTo32khz(const WebRtc_Word32* In, WebRtc_Word32* Out, + const WebRtc_Word32 K); + +/******************************************************************* + * resample_48khz.c + * + * Includes the following resampling combinations + * 48 kHz -> 16 kHz + * 16 kHz -> 48 kHz + * 48 kHz -> 8 kHz + * 8 kHz -> 48 kHz + * + ******************************************************************/ + +typedef struct +{ + WebRtc_Word32 S_48_48[16]; + WebRtc_Word32 S_48_32[8]; + WebRtc_Word32 S_32_16[8]; +} WebRtcSpl_State48khzTo16khz; + +void WebRtcSpl_Resample48khzTo16khz(const WebRtc_Word16* in, WebRtc_Word16* out, + WebRtcSpl_State48khzTo16khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample48khzTo16khz(WebRtcSpl_State48khzTo16khz* state); + +typedef struct +{ + WebRtc_Word32 S_16_32[8]; + WebRtc_Word32 S_32_24[8]; + WebRtc_Word32 S_24_48[8]; +} WebRtcSpl_State16khzTo48khz; + +void WebRtcSpl_Resample16khzTo48khz(const WebRtc_Word16* in, WebRtc_Word16* out, + WebRtcSpl_State16khzTo48khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample16khzTo48khz(WebRtcSpl_State16khzTo48khz* state); + +typedef struct +{ + WebRtc_Word32 S_48_24[8]; + WebRtc_Word32 S_24_24[16]; + WebRtc_Word32 S_24_16[8]; + WebRtc_Word32 S_16_8[8]; +} WebRtcSpl_State48khzTo8khz; + +void WebRtcSpl_Resample48khzTo8khz(const WebRtc_Word16* in, WebRtc_Word16* out, + WebRtcSpl_State48khzTo8khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample48khzTo8khz(WebRtcSpl_State48khzTo8khz* state); + +typedef struct +{ + WebRtc_Word32 S_8_16[8]; + WebRtc_Word32 S_16_12[8]; + WebRtc_Word32 S_12_24[8]; + WebRtc_Word32 S_24_48[8]; +} WebRtcSpl_State8khzTo48khz; + +void WebRtcSpl_Resample8khzTo48khz(const WebRtc_Word16* in, WebRtc_Word16* out, + WebRtcSpl_State8khzTo48khz* state, + WebRtc_Word32* tmpmem); + +void WebRtcSpl_ResetResample8khzTo48khz(WebRtcSpl_State8khzTo48khz* state); + +/******************************************************************* + * resample_by_2.c + * + * Includes down and up sampling by a factor of two. + * + ******************************************************************/ + +void WebRtcSpl_DownsampleBy2(const WebRtc_Word16* in, const WebRtc_Word16 len, + WebRtc_Word16* out, WebRtc_Word32* filtState); + +void WebRtcSpl_UpsampleBy2(const WebRtc_Word16* in, WebRtc_Word16 len, WebRtc_Word16* out, + WebRtc_Word32* filtState); + +/************************************************************ + * END OF RESAMPLING FUNCTIONS + ************************************************************/ +void WebRtcSpl_AnalysisQMF(const WebRtc_Word16* in_data, + WebRtc_Word16* low_band, + WebRtc_Word16* high_band, + WebRtc_Word32* filter_state1, + WebRtc_Word32* filter_state2); +void WebRtcSpl_SynthesisQMF(const WebRtc_Word16* low_band, + const WebRtc_Word16* high_band, + WebRtc_Word16* out_data, + WebRtc_Word32* filter_state1, + WebRtc_Word32* filter_state2); + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // WEBRTC_SPL_SIGNAL_PROCESSING_LIBRARY_H_ + +// +// WebRtcSpl_AddSatW16(...) +// WebRtcSpl_AddSatW32(...) +// +// Returns the result of a saturated 16-bit, respectively 32-bit, addition of +// the numbers specified by the |var1| and |var2| parameters. +// +// Input: +// - var1 : Input variable 1 +// - var2 : Input variable 2 +// +// Return value : Added and saturated value +// + +// +// WebRtcSpl_SubSatW16(...) +// WebRtcSpl_SubSatW32(...) +// +// Returns the result of a saturated 16-bit, respectively 32-bit, subtraction +// of the numbers specified by the |var1| and |var2| parameters. +// +// Input: +// - var1 : Input variable 1 +// - var2 : Input variable 2 +// +// Returned value : Subtracted and saturated value +// + +// +// WebRtcSpl_GetSizeInBits(...) +// +// Returns the # of bits that are needed at the most to represent the number +// specified by the |value| parameter. +// +// Input: +// - value : Input value +// +// Return value : Number of bits needed to represent |value| +// + +// +// WebRtcSpl_NormW32(...) +// +// Norm returns the # of left shifts required to 32-bit normalize the 32-bit +// signed number specified by the |value| parameter. +// +// Input: +// - value : Input value +// +// Return value : Number of bit shifts needed to 32-bit normalize |value| +// + +// +// WebRtcSpl_NormW16(...) +// +// Norm returns the # of left shifts required to 16-bit normalize the 16-bit +// signed number specified by the |value| parameter. +// +// Input: +// - value : Input value +// +// Return value : Number of bit shifts needed to 32-bit normalize |value| +// + +// +// WebRtcSpl_NormU32(...) +// +// Norm returns the # of left shifts required to 32-bit normalize the unsigned +// 32-bit number specified by the |value| parameter. +// +// Input: +// - value : Input value +// +// Return value : Number of bit shifts needed to 32-bit normalize |value| +// + +// +// WebRtcSpl_GetScalingSquare(...) +// +// Returns the # of bits required to scale the samples specified in the +// |in_vector| parameter so that, if the squares of the samples are added the +// # of times specified by the |times| parameter, the 32-bit addition will not +// overflow (result in WebRtc_Word32). +// +// Input: +// - in_vector : Input vector to check scaling on +// - in_vector_length : Samples in |in_vector| +// - times : Number of additions to be performed +// +// Return value : Number of right bit shifts needed to avoid +// overflow in the addition calculation +// + +// +// WebRtcSpl_MemSetW16(...) +// +// Sets all the values in the WebRtc_Word16 vector |vector| of length +// |vector_length| to the specified value |set_value| +// +// Input: +// - vector : Pointer to the WebRtc_Word16 vector +// - set_value : Value specified +// - vector_length : Length of vector +// + +// +// WebRtcSpl_MemSetW32(...) +// +// Sets all the values in the WebRtc_Word32 vector |vector| of length +// |vector_length| to the specified value |set_value| +// +// Input: +// - vector : Pointer to the WebRtc_Word16 vector +// - set_value : Value specified +// - vector_length : Length of vector +// + +// +// WebRtcSpl_MemCpyReversedOrder(...) +// +// Copies all the values from the source WebRtc_Word16 vector |in_vector| to a +// destination WebRtc_Word16 vector |out_vector|. It is done in reversed order, +// meaning that the first sample of |in_vector| is copied to the last sample of +// the |out_vector|. The procedure continues until the last sample of +// |in_vector| has been copied to the first sample of |out_vector|. This +// creates a reversed vector. Used in e.g. prediction in iLBC. +// +// Input: +// - in_vector : Pointer to the first sample in a WebRtc_Word16 vector +// of length |length| +// - vector_length : Number of elements to copy +// +// Output: +// - out_vector : Pointer to the last sample in a WebRtc_Word16 vector +// of length |length| +// + +// +// WebRtcSpl_CopyFromEndW16(...) +// +// Copies the rightmost |samples| of |in_vector| (of length |in_vector_length|) +// to the vector |out_vector|. +// +// Input: +// - in_vector : Input vector +// - in_vector_length : Number of samples in |in_vector| +// - samples : Number of samples to extract (from right side) +// from |in_vector| +// +// Output: +// - out_vector : Vector with the requested samples +// +// Return value : Number of copied samples in |out_vector| +// + +// +// WebRtcSpl_ZerosArrayW16(...) +// WebRtcSpl_ZerosArrayW32(...) +// +// Inserts the value "zero" in all positions of a w16 and a w32 vector +// respectively. +// +// Input: +// - vector_length : Number of samples in vector +// +// Output: +// - vector : Vector containing all zeros +// +// Return value : Number of samples in vector +// + +// +// WebRtcSpl_OnesArrayW16(...) +// WebRtcSpl_OnesArrayW32(...) +// +// Inserts the value "one" in all positions of a w16 and a w32 vector +// respectively. +// +// Input: +// - vector_length : Number of samples in vector +// +// Output: +// - vector : Vector containing all ones +// +// Return value : Number of samples in vector +// + +// +// WebRtcSpl_MinValueW16(...) +// WebRtcSpl_MinValueW32(...) +// +// Returns the minimum value of a vector +// +// Input: +// - vector : Input vector +// - vector_length : Number of samples in vector +// +// Return value : Minimum sample value in vector +// + +// +// WebRtcSpl_MaxValueW16(...) +// WebRtcSpl_MaxValueW32(...) +// +// Returns the maximum value of a vector +// +// Input: +// - vector : Input vector +// - vector_length : Number of samples in vector +// +// Return value : Maximum sample value in vector +// + +// +// WebRtcSpl_MaxAbsValueW16(...) +// WebRtcSpl_MaxAbsValueW32(...) +// +// Returns the largest absolute value of a vector +// +// Input: +// - vector : Input vector +// - vector_length : Number of samples in vector +// +// Return value : Maximum absolute value in vector +// + +// +// WebRtcSpl_MaxAbsIndexW16(...) +// +// Returns the vector index to the largest absolute value of a vector +// +// Input: +// - vector : Input vector +// - vector_length : Number of samples in vector +// +// Return value : Index to maximum absolute value in vector +// + +// +// WebRtcSpl_MinIndexW16(...) +// WebRtcSpl_MinIndexW32(...) +// +// Returns the vector index to the minimum sample value of a vector +// +// Input: +// - vector : Input vector +// - vector_length : Number of samples in vector +// +// Return value : Index to minimum sample value in vector +// + +// +// WebRtcSpl_MaxIndexW16(...) +// WebRtcSpl_MaxIndexW32(...) +// +// Returns the vector index to the maximum sample value of a vector +// +// Input: +// - vector : Input vector +// - vector_length : Number of samples in vector +// +// Return value : Index to maximum sample value in vector +// + +// +// WebRtcSpl_VectorBitShiftW16(...) +// WebRtcSpl_VectorBitShiftW32(...) +// +// Bit shifts all the values in a vector up or downwards. Different calls for +// WebRtc_Word16 and WebRtc_Word32 vectors respectively. +// +// Input: +// - vector_length : Length of vector +// - in_vector : Pointer to the vector that should be bit shifted +// - right_shifts : Number of right bit shifts (negative value gives left +// shifts) +// +// Output: +// - out_vector : Pointer to the result vector (can be the same as +// |in_vector|) +// + +// +// WebRtcSpl_VectorBitShiftW32ToW16(...) +// +// Bit shifts all the values in a WebRtc_Word32 vector up or downwards and +// stores the result as a WebRtc_Word16 vector +// +// Input: +// - vector_length : Length of vector +// - in_vector : Pointer to the vector that should be bit shifted +// - right_shifts : Number of right bit shifts (negative value gives left +// shifts) +// +// Output: +// - out_vector : Pointer to the result vector (can be the same as +// |in_vector|) +// + +// +// WebRtcSpl_ScaleVector(...) +// +// Performs the vector operation: +// out_vector[k] = (gain*in_vector[k])>>right_shifts +// +// Input: +// - in_vector : Input vector +// - gain : Scaling gain +// - vector_length : Elements in the |in_vector| +// - right_shifts : Number of right bit shifts applied +// +// Output: +// - out_vector : Output vector (can be the same as |in_vector|) +// + +// +// WebRtcSpl_ScaleVectorWithSat(...) +// +// Performs the vector operation: +// out_vector[k] = SATURATE( (gain*in_vector[k])>>right_shifts ) +// +// Input: +// - in_vector : Input vector +// - gain : Scaling gain +// - vector_length : Elements in the |in_vector| +// - right_shifts : Number of right bit shifts applied +// +// Output: +// - out_vector : Output vector (can be the same as |in_vector|) +// + +// +// WebRtcSpl_ScaleAndAddVectors(...) +// +// Performs the vector operation: +// out_vector[k] = (gain1*in_vector1[k])>>right_shifts1 +// + (gain2*in_vector2[k])>>right_shifts2 +// +// Input: +// - in_vector1 : Input vector 1 +// - gain1 : Gain to be used for vector 1 +// - right_shifts1 : Right bit shift to be used for vector 1 +// - in_vector2 : Input vector 2 +// - gain2 : Gain to be used for vector 2 +// - right_shifts2 : Right bit shift to be used for vector 2 +// - vector_length : Elements in the input vectors +// +// Output: +// - out_vector : Output vector +// + +// +// WebRtcSpl_ScaleAndAddVectorsWithRound(...) +// +// Performs the vector operation: +// +// out_vector[k] = ((scale1*in_vector1[k]) + (scale2*in_vector2[k]) +// + round_value) >> right_shifts +// +// where: +// +// round_value = (1<>1 +// +// Input: +// - in_vector1 : Input vector 1 +// - scale1 : Gain to be used for vector 1 +// - in_vector2 : Input vector 2 +// - scale2 : Gain to be used for vector 2 +// - right_shifts : Number of right bit shifts to be applied +// - vector_length : Number of elements in the input vectors +// +// Output: +// - out_vector : Output vector +// + +// +// WebRtcSpl_ReverseOrderMultArrayElements(...) +// +// Performs the vector operation: +// out_vector[n] = (in_vector[n]*window[-n])>>right_shifts +// +// Input: +// - in_vector : Input vector +// - window : Window vector (should be reversed). The pointer +// should be set to the last value in the vector +// - right_shifts : Number of right bit shift to be applied after the +// multiplication +// - vector_length : Number of elements in |in_vector| +// +// Output: +// - out_vector : Output vector (can be same as |in_vector|) +// + +// +// WebRtcSpl_ElementwiseVectorMult(...) +// +// Performs the vector operation: +// out_vector[n] = (in_vector[n]*window[n])>>right_shifts +// +// Input: +// - in_vector : Input vector +// - window : Window vector. +// - right_shifts : Number of right bit shift to be applied after the +// multiplication +// - vector_length : Number of elements in |in_vector| +// +// Output: +// - out_vector : Output vector (can be same as |in_vector|) +// + +// +// WebRtcSpl_AddVectorsAndShift(...) +// +// Performs the vector operation: +// out_vector[k] = (in_vector1[k] + in_vector2[k])>>right_shifts +// +// Input: +// - in_vector1 : Input vector 1 +// - in_vector2 : Input vector 2 +// - right_shifts : Number of right bit shift to be applied after the +// multiplication +// - vector_length : Number of elements in |in_vector1| and |in_vector2| +// +// Output: +// - out_vector : Output vector (can be same as |in_vector1|) +// + +// +// WebRtcSpl_AddAffineVectorToVector(...) +// +// Adds an affine transformed vector to another vector |out_vector|, i.e, +// performs +// out_vector[k] += (in_vector[k]*gain+add_constant)>>right_shifts +// +// Input: +// - in_vector : Input vector +// - gain : Gain value, used to multiply the in vector with +// - add_constant : Constant value to add (usually 1<<(right_shifts-1), +// but others can be used as well +// - right_shifts : Number of right bit shifts (0-16) +// - vector_length : Number of samples in |in_vector| and |out_vector| +// +// Output: +// - out_vector : Vector with the output +// + +// +// WebRtcSpl_AffineTransformVector(...) +// +// Affine transforms a vector, i.e, performs +// out_vector[k] = (in_vector[k]*gain+add_constant)>>right_shifts +// +// Input: +// - in_vector : Input vector +// - gain : Gain value, used to multiply the in vector with +// - add_constant : Constant value to add (usually 1<<(right_shifts-1), +// but others can be used as well +// - right_shifts : Number of right bit shifts (0-16) +// - vector_length : Number of samples in |in_vector| and |out_vector| +// +// Output: +// - out_vector : Vector with the output +// + +// +// WebRtcSpl_AutoCorrelation(...) +// +// A 32-bit fix-point implementation of auto-correlation computation +// +// Input: +// - vector : Vector to calculate autocorrelation upon +// - vector_length : Length (in samples) of |vector| +// - order : The order up to which the autocorrelation should be +// calculated +// +// Output: +// - result_vector : auto-correlation values (values should be seen +// relative to each other since the absolute values +// might have been down shifted to avoid overflow) +// +// - scale : The number of left shifts required to obtain the +// auto-correlation in Q0 +// +// Return value : Number of samples in |result_vector|, i.e., (order+1) +// + +// +// WebRtcSpl_LevinsonDurbin(...) +// +// A 32-bit fix-point implementation of the Levinson-Durbin algorithm that +// does NOT use the 64 bit class +// +// Input: +// - auto_corr : Vector with autocorrelation values of length >= +// |use_order|+1 +// - use_order : The LPC filter order (support up to order 20) +// +// Output: +// - lpc_coef : lpc_coef[0..use_order] LPC coefficients in Q12 +// - refl_coef : refl_coef[0...use_order-1]| Reflection coefficients in +// Q15 +// +// Return value : 1 for stable 0 for unstable +// + +// +// WebRtcSpl_ReflCoefToLpc(...) +// +// Converts reflection coefficients |refl_coef| to LPC coefficients |lpc_coef|. +// This version is a 16 bit operation. +// +// NOTE: The 16 bit refl_coef -> lpc_coef conversion might result in a +// "slightly unstable" filter (i.e., a pole just outside the unit circle) in +// "rare" cases even if the reflection coefficients are stable. +// +// Input: +// - refl_coef : Reflection coefficients in Q15 that should be converted +// to LPC coefficients +// - use_order : Number of coefficients in |refl_coef| +// +// Output: +// - lpc_coef : LPC coefficients in Q12 +// + +// +// WebRtcSpl_LpcToReflCoef(...) +// +// Converts LPC coefficients |lpc_coef| to reflection coefficients |refl_coef|. +// This version is a 16 bit operation. +// The conversion is implemented by the step-down algorithm. +// +// Input: +// - lpc_coef : LPC coefficients in Q12, that should be converted to +// reflection coefficients +// - use_order : Number of coefficients in |lpc_coef| +// +// Output: +// - refl_coef : Reflection coefficients in Q15. +// + +// +// WebRtcSpl_AutoCorrToReflCoef(...) +// +// Calculates reflection coefficients (16 bit) from auto-correlation values +// +// Input: +// - auto_corr : Auto-correlation values +// - use_order : Number of coefficients wanted be calculated +// +// Output: +// - refl_coef : Reflection coefficients in Q15. +// + +// +// WebRtcSpl_CrossCorrelation(...) +// +// Calculates the cross-correlation between two sequences |vector1| and +// |vector2|. |vector1| is fixed and |vector2| slides as the pointer is +// increased with the amount |step_vector2| +// +// Input: +// - vector1 : First sequence (fixed throughout the correlation) +// - vector2 : Second sequence (slides |step_vector2| for each +// new correlation) +// - dim_vector : Number of samples to use in the cross-correlation +// - dim_cross_corr : Number of cross-correlations to calculate (the +// start position for |vector2| is updated for each +// new one) +// - right_shifts : Number of right bit shifts to use. This will +// become the output Q-domain. +// - step_vector2 : How many (positive or negative) steps the +// |vector2| pointer should be updated for each new +// cross-correlation value. +// +// Output: +// - cross_corr : The cross-correlation in Q(-right_shifts) +// + +// +// WebRtcSpl_GetHanningWindow(...) +// +// Creates (the first half of) a Hanning window. Size must be at least 1 and +// at most 512. +// +// Input: +// - size : Length of the requested Hanning window (1 to 512) +// +// Output: +// - window : Hanning vector in Q14. +// + +// +// WebRtcSpl_SqrtOfOneMinusXSquared(...) +// +// Calculates y[k] = sqrt(1 - x[k]^2) for each element of the input vector +// |in_vector|. Input and output values are in Q15. +// +// Inputs: +// - in_vector : Values to calculate sqrt(1 - x^2) of +// - vector_length : Length of vector |in_vector| +// +// Output: +// - out_vector : Output values in Q15 +// + +// +// WebRtcSpl_IncreaseSeed(...) +// +// Increases the seed (and returns the new value) +// +// Input: +// - seed : Seed for random calculation +// +// Output: +// - seed : Updated seed value +// +// Return value : The new seed value +// + +// +// WebRtcSpl_RandU(...) +// +// Produces a uniformly distributed value in the WebRtc_Word16 range +// +// Input: +// - seed : Seed for random calculation +// +// Output: +// - seed : Updated seed value +// +// Return value : Uniformly distributed value in the range +// [Word16_MIN...Word16_MAX] +// + +// +// WebRtcSpl_RandN(...) +// +// Produces a normal distributed value in the WebRtc_Word16 range +// +// Input: +// - seed : Seed for random calculation +// +// Output: +// - seed : Updated seed value +// +// Return value : N(0,1) value in the Q13 domain +// + +// +// WebRtcSpl_RandUArray(...) +// +// Produces a uniformly distributed vector with elements in the WebRtc_Word16 +// range +// +// Input: +// - vector_length : Samples wanted in the vector +// - seed : Seed for random calculation +// +// Output: +// - vector : Vector with the uniform values +// - seed : Updated seed value +// +// Return value : Number of samples in vector, i.e., |vector_length| +// + +// +// WebRtcSpl_Sqrt(...) +// +// Returns the square root of the input value |value|. The precision of this +// function is integer precision, i.e., sqrt(8) gives 2 as answer. +// If |value| is a negative number then 0 is returned. +// +// Algorithm: +// +// A sixth order Taylor Series expansion is used here to compute the square +// root of a number y^0.5 = (1+x)^0.5 +// where +// x = y-1 +// = 1+(x/2)-0.5*((x/2)^2+0.5*((x/2)^3-0.625*((x/2)^4+0.875*((x/2)^5) +// 0.5 <= x < 1 +// +// Input: +// - value : Value to calculate sqrt of +// +// Return value : Result of the sqrt calculation +// + +// +// WebRtcSpl_SqrtFloor(...) +// +// Returns the square root of the input value |value|. The precision of this +// function is rounding down integer precision, i.e., sqrt(8) gives 2 as answer. +// If |value| is a negative number then 0 is returned. +// +// Algorithm: +// +// An iterative 4 cylce/bit routine +// +// Input: +// - value : Value to calculate sqrt of +// +// Return value : Result of the sqrt calculation +// + +// +// WebRtcSpl_DivU32U16(...) +// +// Divides a WebRtc_UWord32 |num| by a WebRtc_UWord16 |den|. +// +// If |den|==0, (WebRtc_UWord32)0xFFFFFFFF is returned. +// +// Input: +// - num : Numerator +// - den : Denominator +// +// Return value : Result of the division (as a WebRtc_UWord32), i.e., the +// integer part of num/den. +// + +// +// WebRtcSpl_DivW32W16(...) +// +// Divides a WebRtc_Word32 |num| by a WebRtc_Word16 |den|. +// +// If |den|==0, (WebRtc_Word32)0x7FFFFFFF is returned. +// +// Input: +// - num : Numerator +// - den : Denominator +// +// Return value : Result of the division (as a WebRtc_Word32), i.e., the +// integer part of num/den. +// + +// +// WebRtcSpl_DivW32W16ResW16(...) +// +// Divides a WebRtc_Word32 |num| by a WebRtc_Word16 |den|, assuming that the +// result is less than 32768, otherwise an unpredictable result will occur. +// +// If |den|==0, (WebRtc_Word16)0x7FFF is returned. +// +// Input: +// - num : Numerator +// - den : Denominator +// +// Return value : Result of the division (as a WebRtc_Word16), i.e., the +// integer part of num/den. +// + +// +// WebRtcSpl_DivResultInQ31(...) +// +// Divides a WebRtc_Word32 |num| by a WebRtc_Word16 |den|, assuming that the +// absolute value of the denominator is larger than the numerator, otherwise +// an unpredictable result will occur. +// +// Input: +// - num : Numerator +// - den : Denominator +// +// Return value : Result of the division in Q31. +// + +// +// WebRtcSpl_DivW32HiLow(...) +// +// Divides a WebRtc_Word32 |num| by a denominator in hi, low format. The +// absolute value of the denominator has to be larger (or equal to) the +// numerator. +// +// Input: +// - num : Numerator +// - den_hi : High part of denominator +// - den_low : Low part of denominator +// +// Return value : Divided value in Q31 +// + +// +// WebRtcSpl_Energy(...) +// +// Calculates the energy of a vector +// +// Input: +// - vector : Vector which the energy should be calculated on +// - vector_length : Number of samples in vector +// +// Output: +// - scale_factor : Number of left bit shifts needed to get the physical +// energy value, i.e, to get the Q0 value +// +// Return value : Energy value in Q(-|scale_factor|) +// + +// +// WebRtcSpl_FilterAR(...) +// +// Performs a 32-bit AR filtering on a vector in Q12 +// +// Input: +// - ar_coef : AR-coefficient vector (values in Q12), +// ar_coef[0] must be 4096. +// - ar_coef_length : Number of coefficients in |ar_coef|. +// - in_vector : Vector to be filtered. +// - in_vector_length : Number of samples in |in_vector|. +// - filter_state : Current state (higher part) of the filter. +// - filter_state_length : Length (in samples) of |filter_state|. +// - filter_state_low : Current state (lower part) of the filter. +// - filter_state_low_length : Length (in samples) of |filter_state_low|. +// - out_vector_low_length : Maximum length (in samples) of +// |out_vector_low|. +// +// Output: +// - filter_state : Updated state (upper part) vector. +// - filter_state_low : Updated state (lower part) vector. +// - out_vector : Vector containing the upper part of the +// filtered values. +// - out_vector_low : Vector containing the lower part of the +// filtered values. +// +// Return value : Number of samples in the |out_vector|. +// + +// +// WebRtcSpl_FilterMAFastQ12(...) +// +// Performs a MA filtering on a vector in Q12 +// +// Input: +// - in_vector : Input samples (state in positions +// in_vector[-order] .. in_vector[-1]) +// - ma_coef : Filter coefficients (in Q12) +// - ma_coef_length : Number of B coefficients (order+1) +// - vector_length : Number of samples to be filtered +// +// Output: +// - out_vector : Filtered samples +// + +// +// WebRtcSpl_FilterARFastQ12(...) +// +// Performs a AR filtering on a vector in Q12 +// +// Input: +// - in_vector : Input samples +// - out_vector : State information in positions +// out_vector[-order] .. out_vector[-1] +// - ar_coef : Filter coefficients (in Q12) +// - ar_coef_length : Number of B coefficients (order+1) +// - vector_length : Number of samples to be filtered +// +// Output: +// - out_vector : Filtered samples +// + +// +// WebRtcSpl_DownsampleFast(...) +// +// Performs a MA down sampling filter on a vector +// +// Input: +// - in_vector : Input samples (state in positions +// in_vector[-order] .. in_vector[-1]) +// - in_vector_length : Number of samples in |in_vector| to be filtered. +// This must be at least +// |delay| + |factor|*(|out_vector_length|-1) + 1) +// - out_vector_length : Number of down sampled samples desired +// - ma_coef : Filter coefficients (in Q12) +// - ma_coef_length : Number of B coefficients (order+1) +// - factor : Decimation factor +// - delay : Delay of filter (compensated for in out_vector) +// +// Output: +// - out_vector : Filtered samples +// +// Return value : 0 if OK, -1 if |in_vector| is too short +// + +// +// WebRtcSpl_DotProductWithScale(...) +// +// Calculates the dot product between two (WebRtc_Word16) vectors +// +// Input: +// - vector1 : Vector 1 +// - vector2 : Vector 2 +// - vector_length : Number of samples used in the dot product +// - scaling : The number of right bit shifts to apply on each term +// during calculation to avoid overflow, i.e., the +// output will be in Q(-|scaling|) +// +// Return value : The dot product in Q(-scaling) +// + +// +// WebRtcSpl_ComplexIFFT(...) +// +// Complex Inverse FFT +// +// Computes an inverse complex 2^|stages|-point FFT on the input vector, which +// is in bit-reversed order. The original content of the vector is destroyed in +// the process, since the input is overwritten by the output, normal-ordered, +// FFT vector. With X as the input complex vector, y as the output complex +// vector and with M = 2^|stages|, the following is computed: +// +// M-1 +// y(k) = sum[X(i)*[cos(2*pi*i*k/M) + j*sin(2*pi*i*k/M)]] +// i=0 +// +// The implementations are optimized for speed, not for code size. It uses the +// decimation-in-time algorithm with radix-2 butterfly technique. +// +// Input: +// - vector : In pointer to complex vector containing 2^|stages| +// real elements interleaved with 2^|stages| imaginary +// elements. +// [ReImReImReIm....] +// The elements are in Q(-scale) domain, see more on Return +// Value below. +// +// - stages : Number of FFT stages. Must be at least 3 and at most 10, +// since the table WebRtcSpl_kSinTable1024[] is 1024 +// elements long. +// +// - mode : This parameter gives the user to choose how the FFT +// should work. +// mode==0: Low-complexity and Low-accuracy mode +// mode==1: High-complexity and High-accuracy mode +// +// Output: +// - vector : Out pointer to the FFT vector (the same as input). +// +// Return Value : The scale value that tells the number of left bit shifts +// that the elements in the |vector| should be shifted with +// in order to get Q0 values, i.e. the physically correct +// values. The scale parameter is always 0 or positive, +// except if N>1024 (|stages|>10), which returns a scale +// value of -1, indicating error. +// + +// +// WebRtcSpl_ComplexFFT(...) +// +// Complex FFT +// +// Computes a complex 2^|stages|-point FFT on the input vector, which is in +// bit-reversed order. The original content of the vector is destroyed in +// the process, since the input is overwritten by the output, normal-ordered, +// FFT vector. With x as the input complex vector, Y as the output complex +// vector and with M = 2^|stages|, the following is computed: +// +// M-1 +// Y(k) = 1/M * sum[x(i)*[cos(2*pi*i*k/M) + j*sin(2*pi*i*k/M)]] +// i=0 +// +// The implementations are optimized for speed, not for code size. It uses the +// decimation-in-time algorithm with radix-2 butterfly technique. +// +// This routine prevents overflow by scaling by 2 before each FFT stage. This is +// a fixed scaling, for proper normalization - there will be log2(n) passes, so +// this results in an overall factor of 1/n, distributed to maximize arithmetic +// accuracy. +// +// Input: +// - vector : In pointer to complex vector containing 2^|stages| real +// elements interleaved with 2^|stages| imaginary elements. +// [ReImReImReIm....] +// The output is in the Q0 domain. +// +// - stages : Number of FFT stages. Must be at least 3 and at most 10, +// since the table WebRtcSpl_kSinTable1024[] is 1024 +// elements long. +// +// - mode : This parameter gives the user to choose how the FFT +// should work. +// mode==0: Low-complexity and Low-accuracy mode +// mode==1: High-complexity and High-accuracy mode +// +// Output: +// - vector : The output FFT vector is in the Q0 domain. +// +// Return value : The scale parameter is always 0, except if N>1024, +// which returns a scale value of -1, indicating error. +// + +// +// WebRtcSpl_ComplexBitReverse(...) +// +// Complex Bit Reverse +// +// This function bit-reverses the position of elements in the complex input +// vector into the output vector. +// +// If you bit-reverse a linear-order array, you obtain a bit-reversed order +// array. If you bit-reverse a bit-reversed order array, you obtain a +// linear-order array. +// +// Input: +// - vector : In pointer to complex vector containing 2^|stages| real +// elements interleaved with 2^|stages| imaginary elements. +// [ReImReImReIm....] +// - stages : Number of FFT stages. Must be at least 3 and at most 10, +// since the table WebRtcSpl_kSinTable1024[] is 1024 +// elements long. +// +// Output: +// - vector : Out pointer to complex vector in bit-reversed order. +// The input vector is over written. +// + +// +// WebRtcSpl_AnalysisQMF(...) +// +// Splits a 0-2*F Hz signal into two sub bands: 0-F Hz and F-2*F Hz. The +// current version has F = 8000, therefore, a super-wideband audio signal is +// split to lower-band 0-8 kHz and upper-band 8-16 kHz. +// +// Input: +// - in_data : Wide band speech signal, 320 samples (10 ms) +// +// Input & Output: +// - filter_state1 : Filter state for first All-pass filter +// - filter_state2 : Filter state for second All-pass filter +// +// Output: +// - low_band : Lower-band signal 0-8 kHz band, 160 samples (10 ms) +// - high_band : Upper-band signal 8-16 kHz band (flipped in frequency +// domain), 160 samples (10 ms) +// + +// +// WebRtcSpl_SynthesisQMF(...) +// +// Combines the two sub bands (0-F and F-2*F Hz) into a signal of 0-2*F +// Hz, (current version has F = 8000 Hz). So the filter combines lower-band +// (0-8 kHz) and upper-band (8-16 kHz) channels to obtain super-wideband 0-16 +// kHz audio. +// +// Input: +// - low_band : The signal with the 0-8 kHz band, 160 samples (10 ms) +// - high_band : The signal with the 8-16 kHz band, 160 samples (10 ms) +// +// Input & Output: +// - filter_state1 : Filter state for first All-pass filter +// - filter_state2 : Filter state for second All-pass filter +// +// Output: +// - out_data : Super-wideband speech signal, 0-16 kHz +// + +// WebRtc_Word16 WebRtcSpl_get_version(...) +// +// This function gives the version string of the Signal Processing Library. +// +// Input: +// - length_in_bytes : The size of Allocated space (in Bytes) where +// the version number is written to (in string format). +// +// Output: +// - version : Pointer to a buffer where the version number is written to. +// diff --git a/branches/2.0/doubango/thirdparties/android/include/webrtc/spl_inl.h b/branches/2.0/doubango/thirdparties/android/include/webrtc/spl_inl.h new file mode 100644 index 00000000..c7031eba --- /dev/null +++ b/branches/2.0/doubango/thirdparties/android/include/webrtc/spl_inl.h @@ -0,0 +1,289 @@ +/* + * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +// This header file includes the inline functions in +// the fix point signal processing library. + +#ifndef WEBRTC_SPL_SPL_INL_H_ +#define WEBRTC_SPL_SPL_INL_H_ + +#ifdef WEBRTC_ARM_INLINE_CALLS + +WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL(WebRtc_Word32 a, WebRtc_Word32 b) +{ + WebRtc_Word32 tmp; + __asm__("mul %0, %1, %2":"=r"(tmp):"r"(a), "r"(b)); + return tmp; +} + +WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_16_32_RSFT16(WebRtc_Word16 a, + WebRtc_Word32 b) +{ + WebRtc_Word32 tmp; + __asm__("smulwb %0, %1, %2":"=r"(tmp):"r"(b), "r"(a)); + return tmp; +} + +WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_32_32_RSFT32(WebRtc_Word16 a, + WebRtc_Word16 b, + WebRtc_Word32 c) +{ + WebRtc_Word32 tmp; + __asm__("pkhbt %0, %1, %2, lsl #16" : "=r"(tmp) : "r"(b), "r"(a)); + __asm__("smmul %0, %1, %2":"=r"(tmp):"r"(tmp), "r"(c)); + return tmp; +} + +WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_32_32_RSFT32BI(WebRtc_Word32 a, + WebRtc_Word32 b) +{ + WebRtc_Word32 tmp; + __asm__("smmul %0, %1, %2":"=r"(tmp):"r"(a), "r"(b)); + return tmp; +} + +WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_16_16(WebRtc_Word16 a, + WebRtc_Word16 b) +{ + WebRtc_Word32 tmp; + __asm__("smulbb %0, %1, %2":"=r"(tmp):"r"(a), "r"(b)); + return tmp; +} + +WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_AddSatW16(WebRtc_Word16 a, + WebRtc_Word16 b) +{ + WebRtc_Word32 s_sum; + + __asm__("qadd16 %0, %1, %2":"=r"(s_sum):"r"(a), "r"(b)); + + return (WebRtc_Word16) s_sum; +} + +WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_AddSatW32(WebRtc_Word32 l_var1, + WebRtc_Word32 l_var2) +{ + WebRtc_Word32 l_sum; + + __asm__("qadd %0, %1, %2":"=r"(l_sum):"r"(l_var1), "r"(l_var2)); + + return l_sum; +} + +WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_SubSatW16(WebRtc_Word16 var1, + WebRtc_Word16 var2) +{ + WebRtc_Word32 s_sub; + + __asm__("qsub16 %0, %1, %2":"=r"(s_sub):"r"(var1), "r"(var2)); + + return (WebRtc_Word16)s_sub; +} + +WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_SubSatW32(WebRtc_Word32 l_var1, + WebRtc_Word32 l_var2) +{ + WebRtc_Word32 l_sub; + + __asm__("qsub %0, %1, %2":"=r"(l_sub):"r"(l_var1), "r"(l_var2)); + + return l_sub; +} + +WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_GetSizeInBits(WebRtc_UWord32 n) +{ + WebRtc_Word32 tmp; + + __asm__("clz %0, %1":"=r"(tmp):"r"(n)); + + return (WebRtc_Word16)(32 - tmp); +} + +WEBRTC_INLINE int WebRtcSpl_NormW32(WebRtc_Word32 a) +{ + WebRtc_Word32 tmp; + + if (a <= 0) a ^= 0xFFFFFFFF; + + __asm__("clz %0, %1":"=r"(tmp):"r"(a)); + + return tmp - 1; +} + +WEBRTC_INLINE int WebRtcSpl_NormW16(WebRtc_Word16 a) +{ + int zeros; + + if (a <= 0) a ^= 0xFFFF; + + if (!(0xFF80 & a)) zeros = 8; else zeros = 0; + if (!(0xF800 & (a << zeros))) zeros += 4; + if (!(0xE000 & (a << zeros))) zeros += 2; + if (!(0xC000 & (a << zeros))) zeros += 1; + + return zeros; +} + +WEBRTC_INLINE int WebRtcSpl_NormU32(WebRtc_UWord32 a) +{ + int tmp; + + if (a == 0) return 0; + + __asm__("clz %0, %1":"=r"(tmp):"r"(a)); + + return tmp; +} + +#else + +WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_AddSatW16(WebRtc_Word16 a, + WebRtc_Word16 b) +{ + WebRtc_Word32 s_sum = (WebRtc_Word32) a + (WebRtc_Word32) b; + + if (s_sum > WEBRTC_SPL_WORD16_MAX) + s_sum = WEBRTC_SPL_WORD16_MAX; + else if (s_sum < WEBRTC_SPL_WORD16_MIN) + s_sum = WEBRTC_SPL_WORD16_MIN; + + return (WebRtc_Word16)s_sum; +} + +WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_AddSatW32(WebRtc_Word32 l_var1, + WebRtc_Word32 l_var2) +{ + WebRtc_Word32 l_sum; + + // perform long addition + l_sum = l_var1 + l_var2; + + // check for under or overflow + if (WEBRTC_SPL_IS_NEG (l_var1)) + { + if (WEBRTC_SPL_IS_NEG (l_var2) && !WEBRTC_SPL_IS_NEG (l_sum)) + { + l_sum = (WebRtc_Word32)0x80000000; + } + } + else + { + if (!WEBRTC_SPL_IS_NEG (l_var2) && WEBRTC_SPL_IS_NEG (l_sum)) + { + l_sum = (WebRtc_Word32)0x7FFFFFFF; + } + } + + return l_sum; +} + +WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_SubSatW16( WebRtc_Word16 var1, + WebRtc_Word16 var2) +{ + WebRtc_Word32 l_diff; + WebRtc_Word16 s_diff; + + // perform subtraction + l_diff = (WebRtc_Word32)var1 - (WebRtc_Word32)var2; + + // default setting + s_diff = (WebRtc_Word16) l_diff; + + // check for overflow + if (l_diff > (WebRtc_Word32)32767) + s_diff = (WebRtc_Word16)32767; + + // check for underflow + if (l_diff < (WebRtc_Word32)-32768) + s_diff = (WebRtc_Word16)-32768; + + return s_diff; +} + +WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_SubSatW32(WebRtc_Word32 l_var1, + WebRtc_Word32 l_var2) +{ + WebRtc_Word32 l_diff; + + // perform subtraction + l_diff = l_var1 - l_var2; + + // check for underflow + if ((l_var1 < 0) && (l_var2 > 0) && (l_diff > 0)) + l_diff = (WebRtc_Word32)0x80000000; + // check for overflow + if ((l_var1 > 0) && (l_var2 < 0) && (l_diff < 0)) + l_diff = (WebRtc_Word32)0x7FFFFFFF; + + return l_diff; +} + +WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_GetSizeInBits(WebRtc_UWord32 n) +{ + + int bits; + + if ((0xFFFF0000 & n)) bits = 16; else bits = 0; + if ((0x0000FF00 & (n >> bits))) bits += 8; + if ((0x000000F0 & (n >> bits))) bits += 4; + if ((0x0000000C & (n >> bits))) bits += 2; + if ((0x00000002 & (n >> bits))) bits += 1; + if ((0x00000001 & (n >> bits))) bits += 1; + + return bits; +} + +WEBRTC_INLINE int WebRtcSpl_NormW32(WebRtc_Word32 a) +{ + int zeros; + + if (a <= 0) a ^= 0xFFFFFFFF; + + if (!(0xFFFF8000 & a)) zeros = 16; else zeros = 0; + if (!(0xFF800000 & (a << zeros))) zeros += 8; + if (!(0xF8000000 & (a << zeros))) zeros += 4; + if (!(0xE0000000 & (a << zeros))) zeros += 2; + if (!(0xC0000000 & (a << zeros))) zeros += 1; + + return zeros; +} + +WEBRTC_INLINE int WebRtcSpl_NormW16(WebRtc_Word16 a) +{ + int zeros; + + if (a <= 0) a ^= 0xFFFF; + + if (!(0xFF80 & a)) zeros = 8; else zeros = 0; + if (!(0xF800 & (a << zeros))) zeros += 4; + if (!(0xE000 & (a << zeros))) zeros += 2; + if (!(0xC000 & (a << zeros))) zeros += 1; + + return zeros; +} + +WEBRTC_INLINE int WebRtcSpl_NormU32(WebRtc_UWord32 a) +{ + int zeros; + + if (a == 0) return 0; + + if (!(0xFFFF0000 & a)) zeros = 16; else zeros = 0; + if (!(0xFF000000 & (a << zeros))) zeros += 8; + if (!(0xF0000000 & (a << zeros))) zeros += 4; + if (!(0xC0000000 & (a << zeros))) zeros += 2; + if (!(0x80000000 & (a << zeros))) zeros += 1; + + return zeros; +} + +#endif // WEBRTC_ARM_INLINE_CALLS +#endif // WEBRTC_SPL_SPL_INL_H_ diff --git a/branches/2.0/doubango/thirdparties/android/include/webrtc/typedefs.h b/branches/2.0/doubango/thirdparties/android/include/webrtc/typedefs.h index ae71690f..66205507 100644 --- a/branches/2.0/doubango/thirdparties/android/include/webrtc/typedefs.h +++ b/branches/2.0/doubango/thirdparties/android/include/webrtc/typedefs.h @@ -8,21 +8,23 @@ * be found in the AUTHORS file in the root of the source tree. */ -/* - * - * This file contains type definitions used in all WebRtc APIs. - * - */ +// This file contains platform-specific typedefs and defines. -/* Reserved words definitions */ +#ifndef WEBRTC_TYPEDEFS_H_ +#define WEBRTC_TYPEDEFS_H_ + +// Reserved words definitions #define WEBRTC_EXTERN extern #define G_CONST const #define WEBRTC_INLINE extern __inline -#ifndef WEBRTC_TYPEDEFS_H -#define WEBRTC_TYPEDEFS_H - -/* Define WebRtc preprocessor identifiers based on the current build platform */ +// Define WebRTC preprocessor identifiers based on the current build platform. +// TODO(ajm): Clean these up. We can probably remove everything in this block. +// - TARGET_MAC_INTEL and TARGET_MAC aren't used anywhere. +// - In the few places where TARGET_PC is used, it should be replaced by +// something more specific. +// - Do we really support PowerPC? Probably not. Remove WEBRTC_MAC_INTEL +// from build/common.gypi as well. #if defined(WIN32) // Windows & Windows Mobile #if !defined(WEBRTC_TARGET_PC) @@ -33,11 +35,11 @@ #if defined(__LITTLE_ENDIAN__ ) //TODO: is this used? #if !defined(WEBRTC_TARGET_MAC_INTEL) #define WEBRTC_TARGET_MAC_INTEL - #endif + #endif #else #if !defined(WEBRTC_TARGET_MAC) #define WEBRTC_TARGET_MAC - #endif + #endif #endif #else // Linux etc. @@ -46,6 +48,40 @@ #endif #endif +// Derived from Chromium's build/build_config.h +// Processor architecture detection. For more info on what's defined, see: +// http://msdn.microsoft.com/en-us/library/b0084kay.aspx +// http://www.agner.org/optimize/calling_conventions.pdf +// or with gcc, run: "echo | gcc -E -dM -" +// TODO(ajm): replace WEBRTC_LITTLE_ENDIAN with WEBRTC_ARCH_LITTLE_ENDIAN? +#if defined(_M_X64) || defined(__x86_64__) +#define WEBRTC_ARCH_X86_FAMILY +#define WEBRTC_ARCH_X86_64 +#define WEBRTC_ARCH_64_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#elif defined(_M_IX86) || defined(__i386__) +#define WEBRTC_ARCH_X86_FAMILY +#define WEBRTC_ARCH_X86 +#define WEBRTC_ARCH_32_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#elif defined(__ARMEL__) +// TODO(ajm): Chromium uses the two commented defines. Should we switch? +#define WEBRTC_ARCH_ARM +//#define WEBRTC_ARCH_ARM_FAMILY +//#define WEBRTC_ARCH_ARMEL +#define WEBRTC_ARCH_32_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#else +#error Please add support for your architecture in typedefs.h +#endif + +// TODO(ajm): SSE2 is disabled on Windows for the moment, because AEC +// optimization is broken. Enable it as soon as AEC is fixed. +//#if defined(__SSE2__) || defined(_MSC_VER) +#if defined(__SSE2__) +#define WEBRTC_USE_SSE2 +#endif + #if defined(WEBRTC_TARGET_PC) #if !defined(_MSC_VER) @@ -79,7 +115,7 @@ typedef char WebRtc_Word8; typedef uint8_t WebRtc_UWord8; - /* Define endian for the platform */ + // Define endian for the platform #define WEBRTC_LITTLE_ENDIAN #elif defined(WEBRTC_TARGET_MAC_INTEL) @@ -94,14 +130,11 @@ typedef uint16_t WebRtc_UWord16; typedef uint8_t WebRtc_UWord8; - /* Define endian for the platform */ + // Define endian for the platform #define WEBRTC_LITTLE_ENDIAN #else - - #error "No platform defined for WebRtc type definitions (webrtc_typedefs.h)" - + #error "No platform defined for WebRTC type definitions (typedefs.h)" #endif - -#endif // WEBRTC_TYPEDEFS_H +#endif // WEBRTC_TYPEDEFS_H_ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libvpx_armv5te.a b/branches/2.0/doubango/thirdparties/android/lib/libvpx_armv5te.a new file mode 100644 index 00000000..4bbc6974 Binary files /dev/null and b/branches/2.0/doubango/thirdparties/android/lib/libvpx_armv5te.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libvpx_armv7-a.a b/branches/2.0/doubango/thirdparties/android/lib/libvpx_armv7-a.a new file mode 100644 index 00000000..f66e7a10 Binary files /dev/null and b/branches/2.0/doubango/thirdparties/android/lib/libvpx_armv7-a.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv5te.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv5te.a index d0edb451..da2c96df 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv5te.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv5te.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv7-a.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv7-a.a index 5ae96bf3..88d92105 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv7-a.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aec_armv7-a.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aecm_armv5te.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aecm_armv5te.a new file mode 100644 index 00000000..4aa6fcdb Binary files /dev/null and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aecm_armv5te.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aecm_armv7-a.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aecm_armv7-a.a new file mode 100644 index 00000000..af028ce2 Binary files /dev/null and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_aecm_armv7-a.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv5te.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv5te.a index 75eaf811..565d07de 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv5te.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv5te.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv7-a.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv7-a.a index 620eade1..17108590 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv7-a.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_apm_utility_armv7-a.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv5te.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv5te.a index 5463f992..76d3ae56 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv5te.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv5te.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv7-a.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv7-a.a index d96b0c1f..7e53151e 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv7-a.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_ns_armv7-a.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_spl_armv5te.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_spl_armv5te.a new file mode 100644 index 00000000..857b3d25 Binary files /dev/null and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_spl_armv5te.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_spl_armv7-a.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_spl_armv7-a.a new file mode 100644 index 00000000..daf1603a Binary files /dev/null and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_spl_armv7-a.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv5te.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv5te.a index 4c5c7ba5..e8e43c9f 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv5te.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv5te.a differ diff --git a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv7-a.a b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv7-a.a index f95321e7..21d50b46 100644 Binary files a/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv7-a.a and b/branches/2.0/doubango/thirdparties/android/lib/libwebrtc_system_wrappers_armv7-a.a differ diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8.h new file mode 100644 index 00000000..983cc4ad --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8.h @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup vp8 VP8 + * \ingroup codecs + * VP8 is vpx's newest video compression algorithm that uses motion + * compensated prediction, Discrete Cosine Transform (DCT) coding of the + * prediction error signal and context dependent entropy coding techniques + * based on arithmetic principles. It features: + * - YUV 4:2:0 image format + * - Macro-block based coding (16x16 luma plus two 8x8 chroma) + * - 1/4 (1/8) pixel accuracy motion compensated prediction + * - 4x4 DCT transform + * - 128 level linear quantizer + * - In loop deblocking filter + * - Context-based entropy coding + * + * @{ + */ +/*!\file + * \brief Provides controls common to both the VP8 encoder and decoder. + */ +#ifndef VP8_H +#define VP8_H +#include "vpx_codec_impl_top.h" + +/*!\brief Control functions + * + * The set of macros define the control functions of VP8 interface + */ +enum vp8_com_control_id +{ + VP8_SET_REFERENCE = 1, /**< pass in an external frame into decoder to be used as reference frame */ + VP8_COPY_REFERENCE = 2, /**< get a copy of reference frame from the decoder */ + VP8_SET_POSTPROC = 3, /**< set the decoder's post processing settings */ + VP8_SET_DBG_COLOR_REF_FRAME = 4, /**< set the reference frames to color for each macroblock */ + VP8_SET_DBG_COLOR_MB_MODES = 5, /**< set which macro block modes to color */ + VP8_SET_DBG_COLOR_B_MODES = 6, /**< set which blocks modes to color */ + VP8_SET_DBG_DISPLAY_MV = 7, /**< set which motion vector modes to draw */ + VP8_COMMON_CTRL_ID_MAX, + VP8_DECODER_CTRL_ID_START = 256, +}; + +/*!\brief post process flags + * + * The set of macros define VP8 decoder post processing flags + */ +enum vp8_postproc_level +{ + VP8_NOFILTERING = 0, + VP8_DEBLOCK = 1<<0, + VP8_DEMACROBLOCK = 1<<1, + VP8_ADDNOISE = 1<<2, + VP8_DEBUG_TXT_FRAME_INFO = 1<<3, /**< print frame information */ + VP8_DEBUG_TXT_MBLK_MODES = 1<<4, /**< print macro block modes over each macro block */ + VP8_DEBUG_TXT_DC_DIFF = 1<<5, /**< print dc diff for each macro block */ + VP8_DEBUG_TXT_RATE_INFO = 1<<6, /**< print video rate info (encoder only) */ +}; + +/*!\brief post process flags + * + * This define a structure that describe the post processing settings. For + * the best objective measure (using the PSNR metric) set post_proc_flag + * to VP8_DEBLOCK and deblocking_level to 1. + */ + +typedef struct vp8_postproc_cfg +{ + int post_proc_flag; /**< the types of post processing to be done, should be combination of "vp8_postproc_level" */ + int deblocking_level; /**< the strength of deblocking, valid range [0, 16] */ + int noise_level; /**< the strength of additive noise, valid range [0, 16] */ +} vp8_postproc_cfg_t; + +/*!\brief reference frame type + * + * The set of macros define the type of VP8 reference frames + */ +typedef enum vpx_ref_frame_type +{ + VP8_LAST_FRAME = 1, + VP8_GOLD_FRAME = 2, + VP8_ALTR_FRAME = 4 +} vpx_ref_frame_type_t; + +/*!\brief reference frame data struct + * + * define the data struct to access vp8 reference frames + */ + +typedef struct vpx_ref_frame +{ + vpx_ref_frame_type_t frame_type; /**< which reference frame */ + vpx_image_t img; /**< reference frame data in image format */ +} vpx_ref_frame_t; + + +/*!\brief vp8 decoder control function parameter type + * + * defines the data type for each of VP8 decoder control function requires + */ + +VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int) +VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int) + + +/*! @} - end defgroup vp8 */ + +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +/* The following definitions are provided for backward compatibility with + * the VP8 1.0.x SDK. USE IN PRODUCTION CODE IS NOT RECOMMENDED. + */ + +DECLSPEC_DEPRECATED extern vpx_codec_iface_t vpx_codec_vp8_algo DEPRECATED; +#endif + +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8cx.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8cx.h new file mode 100644 index 00000000..52752832 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8cx.h @@ -0,0 +1,317 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup vp8_encoder WebM VP8 Encoder + * \ingroup vp8 + * + * @{ + */ +#include "vp8.h" + +/*!\file + * \brief Provides definitions for using the VP8 encoder algorithm within the + * vpx Codec Interface. + */ +#ifndef VP8CX_H +#define VP8CX_H +#include "vpx_codec_impl_top.h" + +/*!\name Algorithm interface for VP8 + * + * This interface provides the capability to encode raw VP8 streams, as would + * be found in AVI files. + * @{ + */ +extern vpx_codec_iface_t vpx_codec_vp8_cx_algo; +extern vpx_codec_iface_t* vpx_codec_vp8_cx(void); +/*!@} - end algorithm interface member group*/ + + +/* + * Algorithm Flags + */ + +/*!\brief Don't reference the last frame + * + * When this flag is set, the encoder will not use the last frame as a + * predictor. When not set, the encoder will choose whether to use the + * last frame or not automatically. + */ +#define VP8_EFLAG_NO_REF_LAST (1<<16) + + +/*!\brief Don't reference the golden frame + * + * When this flag is set, the encoder will not use the golden frame as a + * predictor. When not set, the encoder will choose whether to use the + * golden frame or not automatically. + */ +#define VP8_EFLAG_NO_REF_GF (1<<17) + + +/*!\brief Don't reference the alternate reference frame + * + * When this flag is set, the encoder will not use the alt ref frame as a + * predictor. When not set, the encoder will choose whether to use the + * alt ref frame or not automatically. + */ +#define VP8_EFLAG_NO_REF_ARF (1<<21) + + +/*!\brief Don't update the last frame + * + * When this flag is set, the encoder will not update the last frame with + * the contents of the current frame. + */ +#define VP8_EFLAG_NO_UPD_LAST (1<<18) + + +/*!\brief Don't update the golden frame + * + * When this flag is set, the encoder will not update the golden frame with + * the contents of the current frame. + */ +#define VP8_EFLAG_NO_UPD_GF (1<<22) + + +/*!\brief Don't update the alternate reference frame + * + * When this flag is set, the encoder will not update the alt ref frame with + * the contents of the current frame. + */ +#define VP8_EFLAG_NO_UPD_ARF (1<<23) + + +/*!\brief Force golden frame update + * + * When this flag is set, the encoder copy the contents of the current frame + * to the golden frame buffer. + */ +#define VP8_EFLAG_FORCE_GF (1<<19) + + +/*!\brief Force alternate reference frame update + * + * When this flag is set, the encoder copy the contents of the current frame + * to the alternate reference frame buffer. + */ +#define VP8_EFLAG_FORCE_ARF (1<<24) + + +/*!\brief Disable entropy update + * + * When this flag is set, the encoder will not update its internal entropy + * model based on the entropy of this frame. + */ +#define VP8_EFLAG_NO_UPD_ENTROPY (1<<20) + + +/*!\brief VP8 encoder control functions + * + * This set of macros define the control functions available for the VP8 + * encoder interface. + * + * \sa #vpx_codec_control + */ +enum vp8e_enc_control_id +{ + VP8E_UPD_ENTROPY = 5, /**< control function to set mode of entropy update in encoder */ + VP8E_UPD_REFERENCE, /**< control function to set reference update mode in encoder */ + VP8E_USE_REFERENCE, /**< control function to set which reference frame encoder can use */ + VP8E_SET_ROI_MAP, /**< control function to pass an ROI map to encoder */ + VP8E_SET_ACTIVEMAP, /**< control function to pass an Active map to encoder */ + VP8E_SET_SCALEMODE = 11, /**< control function to set encoder scaling mode */ + /*!\brief control function to set vp8 encoder cpuused + * + * Changes in this value influences, among others, the encoder's selection + * of motion estimation methods. Values greater than 0 will increase encoder + * speed at the expense of quality. + * The full set of adjustments can be found in + * onyx_if.c:vp8_set_speed_features(). + * \todo List highlights of the changes at various levels. + * + * \note Valid range: -16..16 + */ + VP8E_SET_CPUUSED = 13, + VP8E_SET_ENABLEAUTOALTREF, /**< control function to enable vp8 to automatic set and use altref frame */ + VP8E_SET_NOISE_SENSITIVITY, /**< control function to set noise sensitivity */ + VP8E_SET_SHARPNESS, /**< control function to set sharpness */ + VP8E_SET_STATIC_THRESHOLD, /**< control function to set the threshold for macroblocks treated static */ + VP8E_SET_TOKEN_PARTITIONS, /**< control function to set the number of token partitions */ + VP8E_GET_LAST_QUANTIZER, /**< return the quantizer chosen by the + encoder for the last frame using the internal + scale */ + VP8E_GET_LAST_QUANTIZER_64, /**< return the quantizer chosen by the + encoder for the last frame, using the 0..63 + scale as used by the rc_*_quantizer config + parameters */ + VP8E_SET_ARNR_MAXFRAMES, /**< control function to set the max number of frames blurred creating arf*/ + VP8E_SET_ARNR_STRENGTH , /**< control function to set the filter strength for the arf */ + VP8E_SET_ARNR_TYPE , /**< control function to set the type of filter to use for the arf*/ + VP8E_SET_TUNING, /**< control function to set visual tuning */ + /*!\brief control function to set constrained quality level + * + * \attention For this value to be used vpx_codec_enc_cfg_t::g_usage must be + * set to #VPX_CQ. + * \note Valid range: 0..63 + */ + VP8E_SET_CQ_LEVEL, + + /*!\brief Max data rate for Intra frames + * + * This value controls additional clamping on the maximum size of a + * keyframe. It is expressed as a percentage of the average + * per-frame bitrate, with the special (and default) value 0 meaning + * unlimited, or no additional clamping beyond the codec's built-in + * algorithm. + * + * For example, to allocate no more than 4.5 frames worth of bitrate + * to a keyframe, set this to 450. + * + */ + VP8E_SET_MAX_INTRA_BITRATE_PCT, +}; + +/*!\brief vpx 1-D scaling mode + * + * This set of constants define 1-D vpx scaling modes + */ +typedef enum vpx_scaling_mode_1d +{ + VP8E_NORMAL = 0, + VP8E_FOURFIVE = 1, + VP8E_THREEFIVE = 2, + VP8E_ONETWO = 3 +} VPX_SCALING_MODE; + + +/*!\brief vpx region of interest map + * + * These defines the data structures for the region of interest map + * + */ + +typedef struct vpx_roi_map +{ + unsigned char *roi_map; /**< specify an id between 0 and 3 for each 16x16 region within a frame */ + unsigned int rows; /**< number of rows */ + unsigned int cols; /**< number of cols */ + int delta_q[4]; /**< quantizer delta [-64, 64] off baseline for regions with id between 0 and 3*/ + int delta_lf[4]; /**< loop filter strength delta [-32, 32] for regions with id between 0 and 3 */ + unsigned int static_threshold[4];/**< threshold for region to be treated as static */ +} vpx_roi_map_t; + +/*!\brief vpx active region map + * + * These defines the data structures for active region map + * + */ + + +typedef struct vpx_active_map +{ + unsigned char *active_map; /**< specify an on (1) or off (0) each 16x16 region within a frame */ + unsigned int rows; /**< number of rows */ + unsigned int cols; /**< number of cols */ +} vpx_active_map_t; + +/*!\brief vpx image scaling mode + * + * This defines the data structure for image scaling mode + * + */ +typedef struct vpx_scaling_mode +{ + VPX_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */ + VPX_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */ +} vpx_scaling_mode_t; + +/*!\brief VP8 encoding mode + * + * This defines VP8 encoding mode + * + */ +typedef enum +{ + VP8_BEST_QUALITY_ENCODING, + VP8_GOOD_QUALITY_ENCODING, + VP8_REAL_TIME_ENCODING +} vp8e_encoding_mode; + +/*!\brief VP8 token partition mode + * + * This defines VP8 partitioning mode for compressed data, i.e., the number of + * sub-streams in the bitstream. Used for parallelized decoding. + * + */ + +typedef enum +{ + VP8_ONE_TOKENPARTITION = 0, + VP8_TWO_TOKENPARTITION = 1, + VP8_FOUR_TOKENPARTITION = 2, + VP8_EIGHT_TOKENPARTITION = 3, +} vp8e_token_partitions; + + +/*!\brief VP8 model tuning parameters + * + * Changes the encoder to tune for certain types of input material. + * + */ +typedef enum +{ + VP8_TUNE_PSNR, + VP8_TUNE_SSIM +} vp8e_tuning; + + +/*!\brief VP8 encoder control function parameter type + * + * Defines the data types that VP8E control functions take. Note that + * additional common controls are defined in vp8.h + * + */ + + +/* These controls have been deprecated in favor of the flags parameter to + * vpx_codec_encode(). See the definition of VP8_EFLAG_* above. + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_ENTROPY, int) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_UPD_REFERENCE, int) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_USE_REFERENCE, int) + +VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *) +VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *) +VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *) + +VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int) +VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, vp8e_token_partitions) + +VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH , unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_TYPE , unsigned int) +VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, vp8e_tuning) +VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL , unsigned int) + +VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *) +VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *) + +VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) + + +/*! @} - end defgroup vp8_encoder */ +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8dx.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8dx.h new file mode 100644 index 00000000..1d9d5316 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8dx.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +#include "vp8.h" + +/*!\defgroup vp8_decoder WebM VP8 Decoder + * \ingroup vp8 + * + * @{ + */ +/*!\file + * \brief Provides definitions for using the VP8 algorithm within the vpx Decoder + * interface. + */ +#ifndef VP8DX_H +#define VP8DX_H +#include "vpx_codec_impl_top.h" + +/*!\name Algorithm interface for VP8 + * + * This interface provides the capability to decode raw VP8 streams, as would + * be found in AVI files and other non-Flash uses. + * @{ + */ +extern vpx_codec_iface_t vpx_codec_vp8_dx_algo; +extern vpx_codec_iface_t* vpx_codec_vp8_dx(void); +/*!@} - end algorithm interface member group*/ + +/* Include controls common to both the encoder and decoder */ +#include "vp8.h" + + +/*!\brief VP8 decoder control functions + * + * This set of macros define the control functions available for the VP8 + * decoder interface. + * + * \sa #vpx_codec_control + */ +enum vp8_dec_control_id +{ + /** control function to get info on which reference frames were updated + * by the last decode + */ + VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START, + + /** check if the indicated frame is corrupted */ + VP8D_GET_FRAME_CORRUPTED, + + VP8_DECODER_CTRL_ID_MAX +} ; + + +/*!\brief VP8 decoder control function parameter type + * + * Defines the data types that VP8D control functions take. Note that + * additional common controls are defined in vp8.h + * + */ + + +VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *) +VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *) + + +/*! @} - end defgroup vp8_decoder */ + + +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8e.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8e.h new file mode 100644 index 00000000..ca907c96 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vp8e.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/* This file contains backwards compatibility stubs for applications using + * the VP8 version 1.0 API. + */ +#ifndef VP8E_H +#define VP8E_H +#include "vpx_codec_impl_top.h" + +#if defined(VPX_CODEC_DISABLE_COMPAT) && VPX_CODEC_DISABLE_COMPAT +#error "Backwards compatibility disabled: don't include vp8e.h" +#endif + +#include "vp8cx.h" +DECLSPEC_DEPRECATED extern vpx_codec_iface_t vpx_enc_vp8_algo DEPRECATED; + + +enum +{ + VP8E_SET_REFERENCE = VP8_SET_REFERENCE, + VP8E_COPY_REFERENCE = VP8_COPY_REFERENCE, + VP8E_SET_PREVIEWPP = VP8_SET_POSTPROC, + VP8E_SET_FLUSHFLAG = 4, + VP8E_SET_FRAMETYPE = 10, + VP8E_SET_ENCODING_MODE = 12 +}; + +#define NORMAL_FRAME (0) +#define KEY_FRAME (1) + +/* Change VP8E to VP8 to get the undeprecated version of these (defined in + * vp8.h) + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_COPY_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_PREVIEWPP, vp8_postproc_cfg_t *) + + +/* Flush is done by calling vpx_codec_encode with a NULL input image. */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_FLUSHFLAG, int) + + +/* Frame type is set with a flag to vpx_codec_control. See VPX_EFLAG_FORCE_KF + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_FRAMETYPE, int) + + +/* This control has been deprecated in favor of the duration parameter to + * vpx_codec_encode(). Use the #VPX_DL_REALTIME, #VPX_DL_GOOD_QUALITY, + * #VPX_DL_BEST_QUALITY constants to that parameter instead. + */ +VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ENCODING_MODE, vp8e_encoding_mode) +#include "vpx_codec_impl_bottom.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec.h new file mode 100644 index 00000000..d92e165f --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec.h @@ -0,0 +1,554 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup codec Common Algorithm Interface + * This abstraction allows applications to easily support multiple video + * formats with minimal code duplication. This section describes the interface + * common to all codecs (both encoders and decoders). + * @{ + */ + +/*!\file + * \brief Describes the codec algorithm interface to applications. + * + * This file describes the interface between an application and a + * video codec algorithm. + * + * An application instantiates a specific codec instance by using + * vpx_codec_init() and a pointer to the algorithm's interface structure: + *
+ *     my_app.c:
+ *       extern vpx_codec_iface_t my_codec;
+ *       {
+ *           vpx_codec_ctx_t algo;
+ *           res = vpx_codec_init(&algo, &my_codec);
+ *       }
+ *     
+ * + * Once initialized, the instance is manged using other functions from + * the vpx_codec_* family. + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_CODEC_H +#define VPX_CODEC_H +#include "vpx_integer.h" +#include "vpx_image.h" + + /*!\brief Decorator indicating a function is deprecated */ +#ifndef DEPRECATED +#if defined(__GNUC__) && __GNUC__ +#define DEPRECATED __attribute__ ((deprecated)) +#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */ +#elif defined(_MSC_VER) +#define DEPRECATED +#define DECLSPEC_DEPRECATED __declspec(deprecated) /**< \copydoc #DEPRECATED */ +#else +#define DEPRECATED +#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */ +#endif +#endif + + /*!\brief Decorator indicating a function is potentially unused */ +#ifdef UNUSED +#elif __GNUC__ +#define UNUSED __attribute__ ((unused)) +#else +#define UNUSED +#endif + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_CODEC_ABI_VERSION (2 + VPX_IMAGE_ABI_VERSION) /**<\hideinitializer*/ + + /*!\brief Algorithm return codes */ + typedef enum { + /*!\brief Operation completed without error */ + VPX_CODEC_OK, + + /*!\brief Unspecified error */ + VPX_CODEC_ERROR, + + /*!\brief Memory operation failed */ + VPX_CODEC_MEM_ERROR, + + /*!\brief ABI version mismatch */ + VPX_CODEC_ABI_MISMATCH, + + /*!\brief Algorithm does not have required capability */ + VPX_CODEC_INCAPABLE, + + /*!\brief The given bitstream is not supported. + * + * The bitstream was unable to be parsed at the highest level. The decoder + * is unable to proceed. This error \ref SHOULD be treated as fatal to the + * stream. */ + VPX_CODEC_UNSUP_BITSTREAM, + + /*!\brief Encoded bitstream uses an unsupported feature + * + * The decoder does not implement a feature required by the encoder. This + * return code should only be used for features that prevent future + * pictures from being properly decoded. This error \ref MAY be treated as + * fatal to the stream or \ref MAY be treated as fatal to the current GOP. + */ + VPX_CODEC_UNSUP_FEATURE, + + /*!\brief The coded data for this stream is corrupt or incomplete + * + * There was a problem decoding the current frame. This return code + * should only be used for failures that prevent future pictures from + * being properly decoded. This error \ref MAY be treated as fatal to the + * stream or \ref MAY be treated as fatal to the current GOP. If decoding + * is continued for the current GOP, artifacts may be present. + */ + VPX_CODEC_CORRUPT_FRAME, + + /*!\brief An application-supplied parameter is not valid. + * + */ + VPX_CODEC_INVALID_PARAM, + + /*!\brief An iterator reached the end of list. + * + */ + VPX_CODEC_LIST_END + + } + vpx_codec_err_t; + + + /*! \brief Codec capabilities bitfield + * + * Each codec advertises the capabilities it supports as part of its + * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces + * or functionality, and are not required to be supported. + * + * The available flags are specified by VPX_CODEC_CAP_* defines. + */ + typedef long vpx_codec_caps_t; +#define VPX_CODEC_CAP_DECODER 0x1 /**< Is a decoder */ +#define VPX_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */ +#define VPX_CODEC_CAP_XMA 0x4 /**< Supports eXternal Memory Allocation */ + + + /*! \brief Initialization-time Feature Enabling + * + * Certain codec features must be known at initialization time, to allow for + * proper memory allocation. + * + * The available flags are specified by VPX_CODEC_USE_* defines. + */ + typedef long vpx_codec_flags_t; +#define VPX_CODEC_USE_XMA 0x00000001 /**< Use eXternal Memory Allocation mode */ + + + /*!\brief Codec interface structure. + * + * Contains function pointers and other data private to the codec + * implementation. This structure is opaque to the application. + */ + typedef const struct vpx_codec_iface vpx_codec_iface_t; + + + /*!\brief Codec private data structure. + * + * Contains data private to the codec implementation. This structure is opaque + * to the application. + */ + typedef struct vpx_codec_priv vpx_codec_priv_t; + + + /*!\brief Iterator + * + * Opaque storage used for iterating over lists. + */ + typedef const void *vpx_codec_iter_t; + + + /*!\brief Codec context structure + * + * All codecs \ref MUST support this context structure fully. In general, + * this data should be considered private to the codec algorithm, and + * not be manipulated or examined by the calling application. Applications + * may reference the 'name' member to get a printable description of the + * algorithm. + */ + typedef struct vpx_codec_ctx + { + const char *name; /**< Printable interface name */ + vpx_codec_iface_t *iface; /**< Interface pointers */ + vpx_codec_err_t err; /**< Last returned error */ + const char *err_detail; /**< Detailed info, if available */ + vpx_codec_flags_t init_flags; /**< Flags passed at init time */ + union + { + struct vpx_codec_dec_cfg *dec; /**< Decoder Configuration Pointer */ + struct vpx_codec_enc_cfg *enc; /**< Encoder Configuration Pointer */ + void *raw; + } config; /**< Configuration pointer aliasing union */ + vpx_codec_priv_t *priv; /**< Algorithm private storage */ + } vpx_codec_ctx_t; + + + /* + * Library Version Number Interface + * + * For example, see the following sample return values: + * vpx_codec_version() (1<<16 | 2<<8 | 3) + * vpx_codec_version_str() "v1.2.3-rc1-16-gec6a1ba" + * vpx_codec_version_extra_str() "rc1-16-gec6a1ba" + */ + + /*!\brief Return the version information (as an integer) + * + * Returns a packed encoding of the library version number. This will only include + * the major.minor.patch component of the version number. Note that this encoded + * value should be accessed through the macros provided, as the encoding may change + * in the future. + * + */ + int vpx_codec_version(void); +#define VPX_VERSION_MAJOR(v) ((v>>16)&0xff) /**< extract major from packed version */ +#define VPX_VERSION_MINOR(v) ((v>>8)&0xff) /**< extract minor from packed version */ +#define VPX_VERSION_PATCH(v) ((v>>0)&0xff) /**< extract patch from packed version */ + + /*!\brief Return the version major number */ +#define vpx_codec_version_major() ((vpx_codec_version()>>16)&0xff) + + /*!\brief Return the version minor number */ +#define vpx_codec_version_minor() ((vpx_codec_version()>>8)&0xff) + + /*!\brief Return the version patch number */ +#define vpx_codec_version_patch() ((vpx_codec_version()>>0)&0xff) + + + /*!\brief Return the version information (as a string) + * + * Returns a printable string containing the full library version number. This may + * contain additional text following the three digit version number, as to indicate + * release candidates, prerelease versions, etc. + * + */ + const char *vpx_codec_version_str(void); + + + /*!\brief Return the version information (as a string) + * + * Returns a printable "extra string". This is the component of the string returned + * by vpx_codec_version_str() following the three digit version number. + * + */ + const char *vpx_codec_version_extra_str(void); + + + /*!\brief Return the build configuration + * + * Returns a printable string containing an encoded version of the build + * configuration. This may be useful to vpx support. + * + */ + const char *vpx_codec_build_config(void); + + + /*!\brief Return the name for a given interface + * + * Returns a human readable string for name of the given codec interface. + * + * \param[in] iface Interface pointer + * + */ + const char *vpx_codec_iface_name(vpx_codec_iface_t *iface); + + + /*!\brief Convert error number to printable string + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] err Error number. + * + */ + const char *vpx_codec_err_to_string(vpx_codec_err_t err); + + + /*!\brief Retrieve error synopsis for codec context + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] ctx Pointer to this instance's context. + * + */ + const char *vpx_codec_error(vpx_codec_ctx_t *ctx); + + + /*!\brief Retrieve detailed error information for codec context + * + * Returns a human readable string providing detailed information about + * the last error. + * + * \param[in] ctx Pointer to this instance's context. + * + * \retval NULL + * No detailed information is available. + */ + const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx); + + + /* REQUIRED FUNCTIONS + * + * The following functions are required to be implemented for all codecs. + * They represent the base case functionality expected of all codecs. + */ + + /*!\brief Destroy a codec instance + * + * Destroys a codec context, freeing any associated memory buffers. + * + * \param[in] ctx Pointer to this instance's context + * + * \retval #VPX_CODEC_OK + * The codec algorithm initialized. + * \retval #VPX_CODEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx); + + + /*!\brief Get the capabilities of an algorithm. + * + * Retrieves the capabilities bitfield from the algorithm's interface. + * + * \param[in] iface Pointer to the algorithm interface + * + */ + vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface); + + + /*!\brief Control algorithm + * + * This function is used to exchange algorithm specific data with the codec + * instance. This can be used to implement features specific to a particular + * algorithm. + * + * This wrapper function dispatches the request to the helper function + * associated with the given ctrl_id. It tries to call this function + * transparently, but will return #VPX_CODEC_ERROR if the request could not + * be dispatched. + * + * Note that this function should not be used directly. Call the + * #vpx_codec_control wrapper macro instead. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] ctrl_id Algorithm specific control identifier + * + * \retval #VPX_CODEC_OK + * The control request was processed. + * \retval #VPX_CODEC_ERROR + * The control request was not processed. + * \retval #VPX_CODEC_INVALID_PARAM + * The data was not valid. + */ + vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, + int ctrl_id, + ...); +#if defined(VPX_DISABLE_CTRL_TYPECHECKS) && VPX_DISABLE_CTRL_TYPECHECKS +# define vpx_codec_control(ctx,id,data) vpx_codec_control_(ctx,id,data) +# define VPX_CTRL_USE_TYPE(id, typ) +# define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) +# define VPX_CTRL_VOID(id, typ) + +#else + /*!\brief vpx_codec_control wrapper macro + * + * This macro allows for type safe conversions across the variadic parameter + * to vpx_codec_control_(). + * + * \internal + * It works by dispatching the call to the control function through a wrapper + * function named with the id parameter. + */ +# define vpx_codec_control(ctx,id,data) vpx_codec_control_##id(ctx,id,data)\ + /**<\hideinitializer*/ + + + /*!\brief vpx_codec_control type definition macro + * + * This macro allows for type safe conversions across the variadic parameter + * to vpx_codec_control_(). It defines the type of the argument for a given + * control identifier. + * + * \internal + * It defines a static function with + * the correctly typed arguments as a wrapper to the type-unsafe internal + * function. + */ +# define VPX_CTRL_USE_TYPE(id, typ) \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) UNUSED;\ + \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\ + return vpx_codec_control_(ctx, ctrl_id, data);\ + } /**<\hideinitializer*/ + + + /*!\brief vpx_codec_control deprecated type definition macro + * + * Like #VPX_CTRL_USE_TYPE, but indicates that the specified control is + * deprecated and should not be used. Consult the documentation for your + * codec for more information. + * + * \internal + * It defines a static function with the correctly typed arguments as a + * wrapper to the type-unsafe internal function. + */ +# define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \ + DECLSPEC_DEPRECATED static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t*, int, typ) DEPRECATED UNUSED;\ + \ + DECLSPEC_DEPRECATED static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id, typ data) {\ + return vpx_codec_control_(ctx, ctrl_id, data);\ + } /**<\hideinitializer*/ + + + /*!\brief vpx_codec_control void type definition macro + * + * This macro allows for type safe conversions across the variadic parameter + * to vpx_codec_control_(). It indicates that a given control identifier takes + * no argument. + * + * \internal + * It defines a static function without a data argument as a wrapper to the + * type-unsafe internal function. + */ +# define VPX_CTRL_VOID(id) \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t*, int) UNUSED;\ + \ + static vpx_codec_err_t \ + vpx_codec_control_##id(vpx_codec_ctx_t *ctx, int ctrl_id) {\ + return vpx_codec_control_(ctx, ctrl_id);\ + } /**<\hideinitializer*/ + + +#endif + + + /*!\defgroup cap_xma External Memory Allocation Functions + * + * The following functions are required to be implemented for all codecs + * that advertise the VPX_CODEC_CAP_XMA capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_CODEC_INCAPABLE + * @{ + */ + + + /*!\brief Memory Map Entry + * + * This structure is used to contain the properties of a memory segment. It + * is populated by the codec in the request phase, and by the calling + * application once the requested allocation has been performed. + */ + typedef struct vpx_codec_mmap + { + /* + * The following members are set by the codec when requesting a segment + */ + unsigned int id; /**< identifier for the segment's contents */ + unsigned long sz; /**< size of the segment, in bytes */ + unsigned int align; /**< required alignment of the segment, in bytes */ + unsigned int flags; /**< bitfield containing segment properties */ +#define VPX_CODEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */ +#define VPX_CODEC_MEM_WRONLY 0x2 /**< Segment need not be readable */ +#define VPX_CODEC_MEM_FAST 0x4 /**< Place in fast memory, if available */ + + /* The following members are to be filled in by the allocation function */ + void *base; /**< pointer to the allocated segment */ + void (*dtor)(struct vpx_codec_mmap *map); /**< destructor to call */ + void *priv; /**< allocator private storage */ + } vpx_codec_mmap_t; /**< alias for struct vpx_codec_mmap */ + + + /*!\brief Iterate over the list of segments to allocate. + * + * Iterates over a list of the segments to allocate. The iterator storage + * should be initialized to NULL to start the iteration. Iteration is complete + * when this function returns VPX_CODEC_LIST_END. The amount of memory needed to + * allocate is dependent upon the size of the encoded stream. In cases where the + * stream is not available at allocation time, a fixed size must be requested. + * The codec will not be able to operate on streams larger than the size used at + * allocation time. + * + * \param[in] ctx Pointer to this instance's context. + * \param[out] mmap Pointer to the memory map entry to populate. + * \param[in,out] iter Iterator storage, initialized to NULL + * + * \retval #VPX_CODEC_OK + * The memory map entry was populated. + * \retval #VPX_CODEC_ERROR + * Codec does not support XMA mode. + * \retval #VPX_CODEC_MEM_ERROR + * Unable to determine segment size from stream info. + */ + vpx_codec_err_t vpx_codec_get_mem_map(vpx_codec_ctx_t *ctx, + vpx_codec_mmap_t *mmap, + vpx_codec_iter_t *iter); + + + /*!\brief Identify allocated segments to codec instance + * + * Stores a list of allocated segments in the codec. Segments \ref MUST be + * passed in the order they are read from vpx_codec_get_mem_map(), but may be + * passed in groups of any size. Segments \ref MUST be set only once. The + * allocation function \ref MUST ensure that the vpx_codec_mmap_t::base member + * is non-NULL. If the segment requires cleanup handling (e.g., calling free() + * or close()) then the vpx_codec_mmap_t::dtor member \ref MUST be populated. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] mmaps Pointer to the first memory map entry in the list. + * \param[in] num_maps Number of entries being set at this time + * + * \retval #VPX_CODEC_OK + * The segment was stored in the codec context. + * \retval #VPX_CODEC_INCAPABLE + * Codec does not support XMA mode. + * \retval #VPX_CODEC_MEM_ERROR + * Segment base address was not set, or segment was already stored. + + */ + vpx_codec_err_t vpx_codec_set_mem_map(vpx_codec_ctx_t *ctx, + vpx_codec_mmap_t *mmaps, + unsigned int num_maps); + + /*!@} - end defgroup cap_xma*/ + /*!@} - end defgroup codec*/ + + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec_impl_bottom.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec_impl_bottom.h new file mode 100644 index 00000000..6eb79a88 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec_impl_bottom.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/* + * This file is to be included at the bottom of the header files defining the + * interface to individual codecs and contains matching blocks to those defined + * in vpx_codec_impl_top.h + */ +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec_impl_top.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec_impl_top.h new file mode 100644 index 00000000..c9b8cfab --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_codec_impl_top.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/* + * This file is to be included at the top of the header files defining the + * interface to individual codecs and contains various workarounds common + * to all codec implementations. + */ +#ifdef __cplusplus +extern "C" { +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_decoder.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_decoder.h new file mode 100644 index 00000000..0fc38c69 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_decoder.h @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup decoder Decoder Algorithm Interface + * \ingroup codec + * This abstraction allows applications using this decoder to easily support + * multiple video formats with minimal code duplication. This section describes + * the interface common to all decoders. + * @{ + */ + +/*!\file + * \brief Describes the decoder algorithm interface to applications. + * + * This file describes the interface between an application and a + * video decoder algorithm. + * + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_DECODER_H +#define VPX_DECODER_H +#include "vpx_codec.h" + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_DECODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/ + + /*! \brief Decoder capabilities bitfield + * + * Each decoder advertises the capabilities it supports as part of its + * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces + * or functionality, and are not required to be supported by a decoder. + * + * The available flags are specified by VPX_CODEC_CAP_* defines. + */ +#define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */ +#define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */ +#define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */ +#define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000 /**< Can conceal errors due to + packet loss */ +#define VPX_CODEC_CAP_INPUT_PARTITION 0x100000 /**< Can receive encoded frames + one partition at a time */ + + /*! \brief Initialization-time Feature Enabling + * + * Certain codec features must be known at initialization time, to allow for + * proper memory allocation. + * + * The available flags are specified by VPX_CODEC_USE_* defines. + */ +#define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */ +#define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000 /**< Conceal errors in decoded + frames */ +#define VPX_CODEC_USE_INPUT_PARTITION 0x40000 /**< The input frame should be + passed to the decoder one + partition at a time */ + + /*!\brief Stream properties + * + * This structure is used to query or set properties of the decoded + * stream. Algorithms may extend this structure with data specific + * to their bitstream by setting the sz member appropriately. + */ + typedef struct vpx_codec_stream_info + { + unsigned int sz; /**< Size of this structure */ + unsigned int w; /**< Width (or 0 for unknown/default) */ + unsigned int h; /**< Height (or 0 for unknown/default) */ + unsigned int is_kf; /**< Current frame is a keyframe */ + } vpx_codec_stream_info_t; + + /* REQUIRED FUNCTIONS + * + * The following functions are required to be implemented for all decoders. + * They represent the base case functionality expected of all decoders. + */ + + + /*!\brief Initialization Configurations + * + * This structure is used to pass init time configuration options to the + * decoder. + */ + typedef struct vpx_codec_dec_cfg + { + unsigned int threads; /**< Maximum number of threads to use, default 1 */ + unsigned int w; /**< Width */ + unsigned int h; /**< Height */ + } vpx_codec_dec_cfg_t; /**< alias for struct vpx_codec_dec_cfg */ + + + /*!\brief Initialize a decoder instance + * + * Initializes a decoder context using the given interface. Applications + * should call the vpx_codec_dec_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * In XMA mode (activated by setting VPX_CODEC_USE_XMA in the flags + * parameter), the storage pointed to by the cfg parameter must be + * kept readable and stable until all memory maps have been set. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] cfg Configuration to use, if known. May be NULL. + * \param[in] flags Bitfield of VPX_CODEC_USE_* flags + * \param[in] ver ABI version number. Must be set to + * VPX_DECODER_ABI_VERSION + * \retval #VPX_CODEC_OK + * The decoder algorithm initialized. + * \retval #VPX_CODEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx, + vpx_codec_iface_t *iface, + vpx_codec_dec_cfg_t *cfg, + vpx_codec_flags_t flags, + int ver); + + /*!\brief Convenience macro for vpx_codec_dec_init_ver() + * + * Ensures the ABI version parameter is properly set. + */ +#define vpx_codec_dec_init(ctx, iface, cfg, flags) \ + vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION) + + + /*!\brief Parse stream info from a buffer + * + * Performs high level parsing of the bitstream. Construction of a decoder + * context is not necessary. Can be used to determine if the bitstream is + * of the proper format, and to extract information from the stream. + * + * \param[in] iface Pointer to the algorithm interface + * \param[in] data Pointer to a block of data to parse + * \param[in] data_sz Size of the data buffer + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_CODEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, + const uint8_t *data, + unsigned int data_sz, + vpx_codec_stream_info_t *si); + + + /*!\brief Return information about the current stream. + * + * Returns information about the stream that has been parsed during decoding. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_CODEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx, + vpx_codec_stream_info_t *si); + + + /*!\brief Decode data + * + * Processes a buffer of coded data. If the processing results in a new + * decoded frame becoming available, PUT_SLICE and PUT_FRAME events may be + * generated, as appropriate. Encoded data \ref MUST be passed in DTS (decode + * time stamp) order. Frames produced will always be in PTS (presentation + * time stamp) order. + * If the decoder is configured with VPX_CODEC_USE_INPUT_PARTITION enabled, + * data and data_sz must contain at most one encoded partition. When no more + * data is available, this function should be called with NULL as data and 0 + * as data_sz. The memory passed to this function must be available until + * the frame has been decoded. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] data Pointer to this block of new coded data. If + * NULL, a VPX_CODEC_CB_PUT_FRAME event is posted + * for the previously decoded frame. + * \param[in] data_sz Size of the coded data, in bytes. + * \param[in] user_priv Application specific data to associate with + * this frame. + * \param[in] deadline Soft deadline the decoder should attempt to meet, + * in us. Set to zero for unlimited. + * + * \return Returns #VPX_CODEC_OK if the coded data was processed completely + * and future pictures can be decoded without error. Otherwise, + * see the descriptions of the other error codes in ::vpx_codec_err_t + * for recoverability capabilities. + */ + vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, + const uint8_t *data, + unsigned int data_sz, + void *user_priv, + long deadline); + + + /*!\brief Decoded frames iterator + * + * Iterates over a list of the frames available for display. The iterator + * storage should be initialized to NULL to start the iteration. Iteration is + * complete when this function returns NULL. + * + * The list of available frames becomes valid upon completion of the + * vpx_codec_decode call, and remains valid until the next call to vpx_codec_decode. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] iter Iterator storage, initialized to NULL + * + * \return Returns a pointer to an image, if one is ready for display. Frames + * produced will always be in PTS (presentation time stamp) order. + */ + vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx, + vpx_codec_iter_t *iter); + + + /*!\defgroup cap_put_frame Frame-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_CODEC_CAP_PUT_FRAME capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_CODEC_ERROR + * @{ + */ + + /*!\brief put frame callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of decoded image data. + */ + typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv, + const vpx_image_t *img); + + + /*!\brief Register for notification of frame completion. + * + * Registers a given function to be called when a decoded frame is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_CODEC_OK + * Callback successfully registered. + * \retval #VPX_CODEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx, + vpx_codec_put_frame_cb_fn_t cb, + void *user_priv); + + + /*!@} - end defgroup cap_put_frame */ + + /*!\defgroup cap_put_slice Slice-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_CODEC_CAP_PUT_SLICE capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_CODEC_ERROR + * @{ + */ + + /*!\brief put slice callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of partially decoded image data. The + */ + typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv, + const vpx_image_t *img, + const vpx_image_rect_t *valid, + const vpx_image_rect_t *update); + + + /*!\brief Register for notification of slice completion. + * + * Registers a given function to be called when a decoded slice is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_CODEC_OK + * Callback successfully registered. + * \retval #VPX_CODEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx, + vpx_codec_put_slice_cb_fn_t cb, + void *user_priv); + + + /*!@} - end defgroup cap_put_slice*/ + + /*!@} - end defgroup decoder*/ + +#endif + +#ifdef __cplusplus +} +#endif + +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +#include "vpx_decoder_compat.h" +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_decoder_compat.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_decoder_compat.h new file mode 100644 index 00000000..8adc1b99 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_decoder_compat.h @@ -0,0 +1,587 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup decoder Common Decoder Algorithm Interface + * This abstraction allows applications using this decoder to easily support + * multiple video formats with minimal code duplication. This section describes + * the interface common to all codecs. + * @{ + */ + +/*!\file + * \brief Provides a compatibility layer between version 1 and 2 of this API. + * + * This interface has been deprecated. Only existing code should make use + * of this interface, and therefore, it is only thinly documented. Existing + * code should be ported to the vpx_codec_* API. + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_DECODER_COMPAT_H +#define VPX_DECODER_COMPAT_H + + /*!\brief Decoder algorithm return codes */ + typedef enum { + /*!\brief Operation completed without error */ + VPX_DEC_OK = VPX_CODEC_OK, + + /*!\brief Unspecified error */ + VPX_DEC_ERROR = VPX_CODEC_ERROR, + + /*!\brief Memory operation failed */ + VPX_DEC_MEM_ERROR = VPX_CODEC_MEM_ERROR, + + /*!\brief ABI version mismatch */ + VPX_DEC_ABI_MISMATCH = VPX_CODEC_ABI_MISMATCH, + + /*!\brief The given bitstream is not supported. + * + * The bitstream was unable to be parsed at the highest level. The decoder + * is unable to proceed. This error \ref SHOULD be treated as fatal to the + * stream. */ + VPX_DEC_UNSUP_BITSTREAM = VPX_CODEC_UNSUP_BITSTREAM, + + /*!\brief Encoded bitstream uses an unsupported feature + * + * The decoder does not implement a feature required by the encoder. This + * return code should only be used for features that prevent future + * pictures from being properly decoded. This error \ref MAY be treated as + * fatal to the stream or \ref MAY be treated as fatal to the current GOP. + */ + VPX_DEC_UNSUP_FEATURE = VPX_CODEC_UNSUP_FEATURE, + + /*!\brief The coded data for this stream is corrupt or incomplete + * + * There was a problem decoding the current frame. This return code + * should only be used for failures that prevent future pictures from + * being properly decoded. This error \ref MAY be treated as fatal to the + * stream or \ref MAY be treated as fatal to the current GOP. If decoding + * is continued for the current GOP, artifacts may be present. + */ + VPX_DEC_CORRUPT_FRAME = VPX_CODEC_CORRUPT_FRAME, + + /*!\brief An application-supplied parameter is not valid. + * + */ + VPX_DEC_INVALID_PARAM = VPX_CODEC_INVALID_PARAM, + + /*!\brief An iterator reached the end of list. + * + */ + VPX_DEC_LIST_END = VPX_CODEC_LIST_END + + } + vpx_dec_err_t; + + /*! \brief Decoder capabilities bitfield + * + * Each decoder advertises the capabilities it supports as part of its + * ::vpx_dec_iface_t interface structure. Capabilities are extra interfaces + * or functionality, and are not required to be supported by a decoder. + * + * The available flags are specified by VPX_DEC_CAP_* defines. + */ + typedef int vpx_dec_caps_t; +#define VPX_DEC_CAP_PUT_SLICE 0x0001 /**< Will issue put_slice callbacks */ +#define VPX_DEC_CAP_PUT_FRAME 0x0002 /**< Will issue put_frame callbacks */ +#define VPX_DEC_CAP_XMA 0x0004 /**< Supports eXternal Memory Allocation */ + + /*!\brief Stream properties + * + * This structure is used to query or set properties of the decoded + * stream. Algorithms may extend this structure with data specific + * to their bitstream by setting the sz member appropriately. + */ +#if 1 + typedef vpx_codec_stream_info_t vpx_dec_stream_info_t; +#else + typedef struct + { + unsigned int sz; /**< Size of this structure */ + unsigned int w; /**< Width (or 0 for unknown/default) */ + unsigned int h; /**< Height (or 0 for unknown/default) */ + unsigned int is_kf; /**< Current frame is a keyframe */ + } vpx_dec_stream_info_t; +#endif + + + /*!\brief Decoder interface structure. + * + * Contains function pointers and other data private to the decoder + * implementation. This structure is opaque to the application. + */ + typedef const struct vpx_codec_iface vpx_dec_iface_t; + typedef struct vpx_codec_priv vpx_dec_priv_t; + + /*!\brief Iterator + * + * Opaque storage used for iterating over lists. + */ + typedef vpx_codec_iter_t vpx_dec_iter_t; + + /*!\brief Decoder context structure + * + * All decoders \ref MUST support this context structure fully. In general, + * this data should be considered private to the decoder algorithm, and + * not be manipulated or examined by the calling application. Applications + * may reference the 'name' member to get a printable description of the + * algorithm. + */ +#if 1 + typedef vpx_codec_ctx_t vpx_dec_ctx_t; +#else + typedef struct + { + const char *name; /**< Printable interface name */ + vpx_dec_iface_t *iface; /**< Interface pointers */ + vpx_dec_err_t err; /**< Last returned error */ + vpx_dec_priv_t *priv; /**< Algorithm private storage */ + } vpx_dec_ctx_t; +#endif + + + /*!\brief Return the build configuration + * + * Returns a printable string containing an encoded version of the build + * configuration. This may be useful to vpx support. + * + */ + const char *vpx_dec_build_config(void) DEPRECATED; + + /*!\brief Return the name for a given interface + * + * Returns a human readable string for name of the given decoder interface. + * + * \param[in] iface Interface pointer + * + */ + const char *vpx_dec_iface_name(vpx_dec_iface_t *iface) DEPRECATED; + + + /*!\brief Convert error number to printable string + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] err Error number. + * + */ + const char *vpx_dec_err_to_string(vpx_dec_err_t err) DEPRECATED; + + + /*!\brief Retrieve error synopsis for decoder context + * + * Returns a human readable string for the last error returned by the + * algorithm. The returned error will be one line and will not contain + * any newline characters. + * + * + * \param[in] ctx Pointer to this instance's context. + * + */ + const char *vpx_dec_error(vpx_dec_ctx_t *ctx) DEPRECATED; + + + /*!\brief Retrieve detailed error information for decoder context + * + * Returns a human readable string providing detailed information about + * the last error. + * + * \param[in] ctx Pointer to this instance's context. + * + * \retval NULL + * No detailed information is available. + */ + const char *vpx_dec_error_detail(vpx_dec_ctx_t *ctx) DEPRECATED; + + + /* REQUIRED FUNCTIONS + * + * The following functions are required to be implemented for all decoders. + * They represent the base case functionality expected of all decoders. + */ + + + /*!\brief Initialize a decoder instance + * + * Initializes a decoder context using the given interface. Applications + * should call the vpx_dec_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] ver ABI version number. Must be set to + * VPX_DECODER_ABI_VERSION + * \retval #VPX_DEC_OK + * The decoder algorithm initialized. + * \retval #VPX_DEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_dec_err_t vpx_dec_init_ver(vpx_dec_ctx_t *ctx, + vpx_dec_iface_t *iface, + int ver) DEPRECATED; +#define vpx_dec_init(ctx, iface) \ + vpx_dec_init_ver(ctx, iface, VPX_DECODER_ABI_VERSION) + + + /*!\brief Destroy a decoder instance + * + * Destroys a decoder context, freeing any associated memory buffers. + * + * \param[in] ctx Pointer to this instance's context + * + * \retval #VPX_DEC_OK + * The decoder algorithm initialized. + * \retval #VPX_DEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_dec_err_t vpx_dec_destroy(vpx_dec_ctx_t *ctx) DEPRECATED; + + + /*!\brief Get the capabilities of an algorithm. + * + * Retrieves the capabilities bitfield from the algorithm's interface. + * + * \param[in] iface Pointer to the algorithm interface + * + */ + vpx_dec_caps_t vpx_dec_get_caps(vpx_dec_iface_t *iface) DEPRECATED; + + + /*!\brief Parse stream info from a buffer + * + * Performs high level parsing of the bitstream. Construction of a decoder + * context is not necessary. Can be used to determine if the bitstream is + * of the proper format, and to extract information from the stream. + * + * \param[in] iface Pointer to the algorithm interface + * \param[in] data Pointer to a block of data to parse + * \param[in] data_sz Size of the data buffer + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_DEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_dec_err_t vpx_dec_peek_stream_info(vpx_dec_iface_t *iface, + const uint8_t *data, + unsigned int data_sz, + vpx_dec_stream_info_t *si) DEPRECATED; + + + /*!\brief Return information about the current stream. + * + * Returns information about the stream that has been parsed during decoding. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] si Pointer to stream info to update. The size member + * \ref MUST be properly initialized, but \ref MAY be + * clobbered by the algorithm. This parameter \ref MAY + * be NULL. + * + * \retval #VPX_DEC_OK + * Bitstream is parsable and stream information updated + */ + vpx_dec_err_t vpx_dec_get_stream_info(vpx_dec_ctx_t *ctx, + vpx_dec_stream_info_t *si) DEPRECATED; + + + /*!\brief Control algorithm + * + * This function is used to exchange algorithm specific data with the decoder + * instance. This can be used to implement features specific to a particular + * algorithm. + * + * This wrapper function dispatches the request to the helper function + * associated with the given ctrl_id. It tries to call this function + * transparently, but will return #VPX_DEC_ERROR if the request could not + * be dispatched. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] ctrl_id Algorithm specific control identifier + * \param[in,out] data Data to exchange with algorithm instance. + * + * \retval #VPX_DEC_OK + * The control request was processed. + * \retval #VPX_DEC_ERROR + * The control request was not processed. + * \retval #VPX_DEC_INVALID_PARAM + * The data was not valid. + */ + vpx_dec_err_t vpx_dec_control(vpx_dec_ctx_t *ctx, + int ctrl_id, + void *data) DEPRECATED; + + /*!\brief Decode data + * + * Processes a buffer of coded data. If the processing results in a new + * decoded frame becoming available, #VPX_DEC_CB_PUT_SLICE and + * #VPX_DEC_CB_PUT_FRAME events may be generated, as appropriate. Encoded data + * \ref MUST be passed in DTS (decode time stamp) order. Frames produced will + * always be in PTS (presentation time stamp) order. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] data Pointer to this block of new coded data. If + * NULL, a VPX_DEC_CB_PUT_FRAME event is posted + * for the previously decoded frame. + * \param[in] data_sz Size of the coded data, in bytes. + * \param[in] user_priv Application specific data to associate with + * this frame. + * \param[in] rel_pts PTS relative to the previous frame, in us. If + * unknown or unavailable, set to zero. + * + * \return Returns #VPX_DEC_OK if the coded data was processed completely + * and future pictures can be decoded without error. Otherwise, + * see the descriptions of the other error codes in ::vpx_dec_err_t + * for recoverability capabilities. + */ + vpx_dec_err_t vpx_dec_decode(vpx_dec_ctx_t *ctx, + uint8_t *data, + unsigned int data_sz, + void *user_priv, + int rel_pts) DEPRECATED; + + + /*!\brief Decoded frames iterator + * + * Iterates over a list of the frames available for display. The iterator + * storage should be initialized to NULL to start the iteration. Iteration is + * complete when this function returns NULL. + * + * The list of available frames becomes valid upon completion of the + * vpx_dec_decode call, and remains valid until the next call to vpx_dec_decode. + * + * \param[in] ctx Pointer to this instance's context + * \param[in out] iter Iterator storage, initialized to NULL + * + * \return Returns a pointer to an image, if one is ready for display. Frames + * produced will always be in PTS (presentation time stamp) order. + */ + vpx_image_t *vpx_dec_get_frame(vpx_dec_ctx_t *ctx, + vpx_dec_iter_t *iter) DEPRECATED; + + + /*!\defgroup cap_put_frame Frame-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_DEC_CAP_PUT_FRAME capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_DEC_ERROR + * @{ + */ + + /*!\brief put frame callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of decoded image data. + */ + typedef void (*vpx_dec_put_frame_cb_fn_t)(void *user_priv, + const vpx_image_t *img); + + + /*!\brief Register for notification of frame completion. + * + * Registers a given function to be called when a decoded frame is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_DEC_OK + * Callback successfully registered. + * \retval #VPX_DEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_dec_err_t vpx_dec_register_put_frame_cb(vpx_dec_ctx_t *ctx, + vpx_dec_put_frame_cb_fn_t cb, + void *user_priv) DEPRECATED; + + + /*!@} - end defgroup cap_put_frame */ + + /*!\defgroup cap_put_slice Slice-Based Decoding Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_DEC_CAP_PUT_SLICE capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_DEC_ERROR + * @{ + */ + + /*!\brief put slice callback prototype + * + * This callback is invoked by the decoder to notify the application of + * the availability of partially decoded image data. The + */ + typedef void (*vpx_dec_put_slice_cb_fn_t)(void *user_priv, + const vpx_image_t *img, + const vpx_image_rect_t *valid, + const vpx_image_rect_t *update); + + + /*!\brief Register for notification of slice completion. + * + * Registers a given function to be called when a decoded slice is + * available. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cb Pointer to the callback function + * \param[in] user_priv User's private data + * + * \retval #VPX_DEC_OK + * Callback successfully registered. + * \retval #VPX_DEC_ERROR + * Decoder context not initialized, or algorithm not capable of + * posting slice completion. + */ + vpx_dec_err_t vpx_dec_register_put_slice_cb(vpx_dec_ctx_t *ctx, + vpx_dec_put_slice_cb_fn_t cb, + void *user_priv) DEPRECATED; + + + /*!@} - end defgroup cap_put_slice*/ + + /*!\defgroup cap_xma External Memory Allocation Functions + * + * The following functions are required to be implemented for all decoders + * that advertise the VPX_DEC_CAP_XMA capability. Calling these functions + * for codecs that don't advertise this capability will result in an error + * code being returned, usually VPX_DEC_ERROR + * @{ + */ + + /*!\brief Memory Map Entry + * + * This structure is used to contain the properties of a memory segment. It + * is populated by the decoder in the request phase, and by the calling + * application once the requested allocation has been performed. + */ +#if 1 +#define VPX_DEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */ +#define VPX_DEC_MEM_WRONLY 0x2 /**< Segment need not be readable */ +#define VPX_DEC_MEM_FAST 0x4 /**< Place in fast memory, if available */ + typedef struct vpx_codec_mmap vpx_dec_mmap_t; +#else + typedef struct vpx_dec_mmap + { + /* + * The following members are set by the codec when requesting a segment + */ + unsigned int id; /**< identifier for the segment's contents */ + unsigned long sz; /**< size of the segment, in bytes */ + unsigned int align; /**< required alignment of the segment, in bytes */ + unsigned int flags; /**< bitfield containing segment properties */ +#define VPX_DEC_MEM_ZERO 0x1 /**< Segment must be zeroed by allocation */ +#define VPX_DEC_MEM_WRONLY 0x2 /**< Segment need not be readable */ +#define VPX_DEC_MEM_FAST 0x4 /**< Place in fast memory, if available */ + + /* The following members are to be filled in by the allocation function */ + void *base; /**< pointer to the allocated segment */ + void (*dtor)(struct vpx_dec_mmap *map); /**< destructor to call */ + void *priv; /**< allocator private storage */ + } vpx_dec_mmap_t; +#endif + + /*!\brief Initialize a decoder instance in external allocation mode + * + * Initializes a decoder context using the given interface. Applications + * should call the vpx_dec_xma_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] ver ABI version number. Must be set to + * VPX_DECODER_ABI_VERSION + * \retval #VPX_DEC_OK + * The decoder algorithm initialized. + * \retval #VPX_DEC_ERROR + * Decoder does not support XMA mode. + */ + vpx_dec_err_t vpx_dec_xma_init_ver(vpx_dec_ctx_t *ctx, + vpx_dec_iface_t *iface, + int ver) DEPRECATED; +#define vpx_dec_xma_init(ctx, iface) \ + vpx_dec_xma_init_ver(ctx, iface, VPX_DECODER_ABI_VERSION) + + + /*!\brief Iterate over the list of segments to allocate. + * + * Iterates over a list of the segments to allocate. The iterator storage + * should be initialized to NULL to start the iteration. Iteration is complete + * when this function returns VPX_DEC_LIST_END. The amount of memory needed to + * allocate is dependent upon the size of the encoded stream. This means that + * the stream info structure must be known at allocation time. It can be + * populated with the vpx_dec_peek_stream_info() function. In cases where the + * stream to be decoded is not available at allocation time, a fixed size must + * be requested. The decoder will not be able to decode streams larger than + * the size used at allocation time. + * + * \param[in] ctx Pointer to this instance's context. + * \param[out] mmap Pointer to the memory map entry to populate. + * \param[in] si Pointer to the stream info. + * \param[in out] iter Iterator storage, initialized to NULL + * + * \retval #VPX_DEC_OK + * The memory map entry was populated. + * \retval #VPX_DEC_ERROR + * Decoder does not support XMA mode. + * \retval #VPX_DEC_MEM_ERROR + * Unable to determine segment size from stream info. + */ + vpx_dec_err_t vpx_dec_get_mem_map(vpx_dec_ctx_t *ctx, + vpx_dec_mmap_t *mmap, + const vpx_dec_stream_info_t *si, + vpx_dec_iter_t *iter) DEPRECATED; + + + /*!\brief Identify allocated segments to decoder instance + * + * Stores a list of allocated segments in the decoder. Segments \ref MUST be + * passed in the order they are read from vpx_dec_get_mem_map(), but may be + * passed in groups of any size. Segments \ref MUST be set only once. The + * allocation function \ref MUST ensure that the vpx_dec_mmap_t::base member + * is non-NULL. If the segment requires cleanup handling (e.g., calling free() + * or close()) then the vpx_dec_mmap_t::dtor member \ref MUST be populated. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] mmaps Pointer to the first memory map entry in the list. + * \param[in] num_maps Number of entries being set at this time + * + * \retval #VPX_DEC_OK + * The segment was stored in the decoder context. + * \retval #VPX_DEC_ERROR + * Decoder does not support XMA mode. + * \retval #VPX_DEC_MEM_ERROR + * Segment base address was not set, or segment was already stored. + + */ + vpx_dec_err_t vpx_dec_set_mem_map(vpx_dec_ctx_t *ctx, + vpx_dec_mmap_t *mmaps, + unsigned int num_maps) DEPRECATED; + + /*!@} - end defgroup cap_xma*/ + /*!@} - end defgroup decoder*/ + + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_encoder.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_encoder.h new file mode 100644 index 00000000..4863dcd1 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_encoder.h @@ -0,0 +1,837 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\defgroup encoder Encoder Algorithm Interface + * \ingroup codec + * This abstraction allows applications using this encoder to easily support + * multiple video formats with minimal code duplication. This section describes + * the interface common to all encoders. + * @{ + */ + +/*!\file + * \brief Describes the encoder algorithm interface to applications. + * + * This file describes the interface between an application and a + * video encoder algorithm. + * + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_ENCODER_H +#define VPX_ENCODER_H +#include "vpx_codec.h" + + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_ENCODER_ABI_VERSION (2 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/ + + + /*! \brief Encoder capabilities bitfield + * + * Each encoder advertises the capabilities it supports as part of its + * ::vpx_codec_iface_t interface structure. Capabilities are extra + * interfaces or functionality, and are not required to be supported + * by an encoder. + * + * The available flags are specified by VPX_CODEC_CAP_* defines. + */ +#define VPX_CODEC_CAP_PSNR 0x10000 /**< Can issue PSNR packets */ + + /*! Can output one partition at a time. Each partition is returned in its + * own VPX_CODEC_CX_FRAME_PKT, with the FRAME_IS_FRAGMENT flag set for + * every partition but the last. In this mode all frames are always + * returned partition by partition. + */ +#define VPX_CODEC_CAP_OUTPUT_PARTITION 0x20000 + + + /*! \brief Initialization-time Feature Enabling + * + * Certain codec features must be known at initialization time, to allow + * for proper memory allocation. + * + * The available flags are specified by VPX_CODEC_USE_* defines. + */ +#define VPX_CODEC_USE_PSNR 0x10000 /**< Calculate PSNR on each frame */ +#define VPX_CODEC_USE_OUTPUT_PARTITION 0x20000 /**< Make the encoder output one + partition at a time. */ + + + /*!\brief Generic fixed size buffer structure + * + * This structure is able to hold a reference to any fixed size buffer. + */ + typedef struct vpx_fixed_buf + { + void *buf; /**< Pointer to the data */ + size_t sz; /**< Length of the buffer, in chars */ + } vpx_fixed_buf_t; /**< alias for struct vpx_fixed_buf */ + + + /*!\brief Time Stamp Type + * + * An integer, which when multiplied by the stream's time base, provides + * the absolute time of a sample. + */ + typedef int64_t vpx_codec_pts_t; + + + /*!\brief Compressed Frame Flags + * + * This type represents a bitfield containing information about a compressed + * frame that may be useful to an application. The most significant 16 bits + * can be used by an algorithm to provide additional detail, for example to + * support frame types that are codec specific (MPEG-1 D-frames for example) + */ + typedef uint32_t vpx_codec_frame_flags_t; +#define VPX_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */ +#define VPX_FRAME_IS_DROPPABLE 0x2 /**< frame can be dropped without affecting + the stream (no future frame depends on + this one) */ +#define VPX_FRAME_IS_INVISIBLE 0x4 /**< frame should be decoded but will not + be shown */ +#define VPX_FRAME_IS_FRAGMENT 0x8 /**< this is a fragment of the encoded + frame */ + + /*!\brief Error Resilient flags + * + * These flags define which error resilient features to enable in the + * encoder. The flags are specified through the + * vpx_codec_enc_cfg::g_error_resilient variable. + */ + typedef uint32_t vpx_codec_er_flags_t; +#define VPX_ERROR_RESILIENT_DEFAULT 0x1 /**< Improve resiliency against + losses of whole frames */ +#define VPX_ERROR_RESILIENT_PARTITIONS 0x2 /**< The frame partitions are + independently decodable by the + bool decoder, meaning that + partitions can be decoded even + though earlier partitions have + been lost. Note that intra + predicition is still done over + the partition boundary. */ + + /*!\brief Encoder output packet variants + * + * This enumeration lists the different kinds of data packets that can be + * returned by calls to vpx_codec_get_cx_data(). Algorithms \ref MAY + * extend this list to provide additional functionality. + */ + enum vpx_codec_cx_pkt_kind + { + VPX_CODEC_CX_FRAME_PKT, /**< Compressed video frame */ + VPX_CODEC_STATS_PKT, /**< Two-pass statistics for this frame */ + VPX_CODEC_PSNR_PKT, /**< PSNR statistics for this frame */ + VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */ + }; + + + /*!\brief Encoder output packet + * + * This structure contains the different kinds of output data the encoder + * may produce while compressing a frame. + */ + typedef struct vpx_codec_cx_pkt + { + enum vpx_codec_cx_pkt_kind kind; /**< packet variant */ + union + { + struct + { + void *buf; /**< compressed data buffer */ + size_t sz; /**< length of compressed data */ + vpx_codec_pts_t pts; /**< time stamp to show frame + (in timebase units) */ + unsigned long duration; /**< duration to show frame + (in timebase units) */ + vpx_codec_frame_flags_t flags; /**< flags for this frame */ + int partition_id; /**< the partition id + defines the decoding order + of the partitions. Only + applicable when "output partition" + mode is enabled. First partition + has id 0.*/ + + } frame; /**< data for compressed frame packet */ + struct vpx_fixed_buf twopass_stats; /**< data for two-pass packet */ + struct vpx_psnr_pkt + { + unsigned int samples[4]; /**< Number of samples, total/y/u/v */ + uint64_t sse[4]; /**< sum squared error, total/y/u/v */ + double psnr[4]; /**< PSNR, total/y/u/v */ + } psnr; /**< data for PSNR packet */ + struct vpx_fixed_buf raw; /**< data for arbitrary packets */ + + /* This packet size is fixed to allow codecs to extend this + * interface without having to manage storage for raw packets, + * i.e., if it's smaller than 128 bytes, you can store in the + * packet list directly. + */ + char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */ + } data; /**< packet data */ + } vpx_codec_cx_pkt_t; /**< alias for struct vpx_codec_cx_pkt */ + + + /*!\brief Rational Number + * + * This structure holds a fractional value. + */ + typedef struct vpx_rational + { + int num; /**< fraction numerator */ + int den; /**< fraction denominator */ + } vpx_rational_t; /**< alias for struct vpx_rational */ + + + /*!\brief Multi-pass Encoding Pass */ + enum vpx_enc_pass + { + VPX_RC_ONE_PASS, /**< Single pass mode */ + VPX_RC_FIRST_PASS, /**< First pass of multi-pass mode */ + VPX_RC_LAST_PASS /**< Final pass of multi-pass mode */ + }; + + + /*!\brief Rate control mode */ + enum vpx_rc_mode + { + VPX_VBR, /**< Variable Bit Rate (VBR) mode */ + VPX_CBR, /**< Constant Bit Rate (CBR) mode */ + VPX_CQ /**< Constant Quality (CQ) mode */ + }; + + + /*!\brief Keyframe placement mode. + * + * This enumeration determines whether keyframes are placed automatically by + * the encoder or whether this behavior is disabled. Older releases of this + * SDK were implemented such that VPX_KF_FIXED meant keyframes were disabled. + * This name is confusing for this behavior, so the new symbols to be used + * are VPX_KF_AUTO and VPX_KF_DISABLED. + */ + enum vpx_kf_mode + { + VPX_KF_FIXED, /**< deprecated, implies VPX_KF_DISABLED */ + VPX_KF_AUTO, /**< Encoder determines optimal placement automatically */ + VPX_KF_DISABLED = 0 /**< Encoder does not place keyframes. */ + }; + + + /*!\brief Encoded Frame Flags + * + * This type indicates a bitfield to be passed to vpx_codec_encode(), defining + * per-frame boolean values. By convention, bits common to all codecs will be + * named VPX_EFLAG_*, and bits specific to an algorithm will be named + * /algo/_eflag_*. The lower order 16 bits are reserved for common use. + */ + typedef long vpx_enc_frame_flags_t; +#define VPX_EFLAG_FORCE_KF (1<<0) /**< Force this frame to be a keyframe */ + + + /*!\brief Encoder configuration structure + * + * This structure contains the encoder settings that have common representations + * across all codecs. This doesn't imply that all codecs support all features, + * however. + */ + typedef struct vpx_codec_enc_cfg + { + /* + * generic settings (g) + */ + + /*!\brief Algorithm specific "usage" value + * + * Algorithms may define multiple values for usage, which may convey the + * intent of how the application intends to use the stream. If this value + * is non-zero, consult the documentation for the codec to determine its + * meaning. + */ + unsigned int g_usage; + + + /*!\brief Maximum number of threads to use + * + * For multi-threaded implementations, use no more than this number of + * threads. The codec may use fewer threads than allowed. The value + * 0 is equivalent to the value 1. + */ + unsigned int g_threads; + + + /*!\brief Bitstream profile to use + * + * Some codecs support a notion of multiple bitstream profiles. Typically + * this maps to a set of features that are turned on or off. Often the + * profile to use is determined by the features of the intended decoder. + * Consult the documentation for the codec to determine the valid values + * for this parameter, or set to zero for a sane default. + */ + unsigned int g_profile; /**< profile of bitstream to use */ + + + + /*!\brief Width of the frame + * + * This value identifies the presentation resolution of the frame, + * in pixels. Note that the frames passed as input to the encoder must + * have this resolution. Frames will be presented by the decoder in this + * resolution, independent of any spatial resampling the encoder may do. + */ + unsigned int g_w; + + + /*!\brief Height of the frame + * + * This value identifies the presentation resolution of the frame, + * in pixels. Note that the frames passed as input to the encoder must + * have this resolution. Frames will be presented by the decoder in this + * resolution, independent of any spatial resampling the encoder may do. + */ + unsigned int g_h; + + + /*!\brief Stream timebase units + * + * Indicates the smallest interval of time, in seconds, used by the stream. + * For fixed frame rate material, or variable frame rate material where + * frames are timed at a multiple of a given clock (ex: video capture), + * the \ref RECOMMENDED method is to set the timebase to the reciprocal + * of the frame rate (ex: 1001/30000 for 29.970 Hz NTSC). This allows the + * pts to correspond to the frame number, which can be handy. For + * re-encoding video from containers with absolute time timestamps, the + * \ref RECOMMENDED method is to set the timebase to that of the parent + * container or multimedia framework (ex: 1/1000 for ms, as in FLV). + */ + struct vpx_rational g_timebase; + + + /*!\brief Enable error resilient modes. + * + * The error resilient bitfield indicates to the encoder which features + * it should enable to take measures for streaming over lossy or noisy + * links. + */ + vpx_codec_er_flags_t g_error_resilient; + + + /*!\brief Multi-pass Encoding Mode + * + * This value should be set to the current phase for multi-pass encoding. + * For single pass, set to #VPX_RC_ONE_PASS. + */ + enum vpx_enc_pass g_pass; + + + /*!\brief Allow lagged encoding + * + * If set, this value allows the encoder to consume a number of input + * frames before producing output frames. This allows the encoder to + * base decisions for the current frame on future frames. This does + * increase the latency of the encoding pipeline, so it is not appropriate + * in all situations (ex: realtime encoding). + * + * Note that this is a maximum value -- the encoder may produce frames + * sooner than the given limit. Set this value to 0 to disable this + * feature. + */ + unsigned int g_lag_in_frames; + + + /* + * rate control settings (rc) + */ + + /*!\brief Temporal resampling configuration, if supported by the codec. + * + * Temporal resampling allows the codec to "drop" frames as a strategy to + * meet its target data rate. This can cause temporal discontinuities in + * the encoded video, which may appear as stuttering during playback. This + * trade-off is often acceptable, but for many applications is not. It can + * be disabled in these cases. + * + * Note that not all codecs support this feature. All vpx VPx codecs do. + * For other codecs, consult the documentation for that algorithm. + * + * This threshold is described as a percentage of the target data buffer. + * When the data buffer falls below this percentage of fullness, a + * dropped frame is indicated. Set the threshold to zero (0) to disable + * this feature. + */ + unsigned int rc_dropframe_thresh; + + + /*!\brief Enable/disable spatial resampling, if supported by the codec. + * + * Spatial resampling allows the codec to compress a lower resolution + * version of the frame, which is then upscaled by the encoder to the + * correct presentation resolution. This increases visual quality at + * low data rates, at the expense of CPU time on the encoder/decoder. + */ + unsigned int rc_resize_allowed; + + + /*!\brief Spatial resampling up watermark. + * + * This threshold is described as a percentage of the target data buffer. + * When the data buffer rises above this percentage of fullness, the + * encoder will step up to a higher resolution version of the frame. + */ + unsigned int rc_resize_up_thresh; + + + /*!\brief Spatial resampling down watermark. + * + * This threshold is described as a percentage of the target data buffer. + * When the data buffer falls below this percentage of fullness, the + * encoder will step down to a lower resolution version of the frame. + */ + unsigned int rc_resize_down_thresh; + + + /*!\brief Rate control algorithm to use. + * + * Indicates whether the end usage of this stream is to be streamed over + * a bandwidth constrained link, indicating that Constant Bit Rate (CBR) + * mode should be used, or whether it will be played back on a high + * bandwidth link, as from a local disk, where higher variations in + * bitrate are acceptable. + */ + enum vpx_rc_mode rc_end_usage; + + + /*!\brief Two-pass stats buffer. + * + * A buffer containing all of the stats packets produced in the first + * pass, concatenated. + */ + struct vpx_fixed_buf rc_twopass_stats_in; + + + /*!\brief Target data rate + * + * Target bandwidth to use for this stream, in kilobits per second. + */ + unsigned int rc_target_bitrate; + + + /* + * quantizer settings + */ + + + /*!\brief Minimum (Best Quality) Quantizer + * + * The quantizer is the most direct control over the quality of the + * encoded image. The range of valid values for the quantizer is codec + * specific. Consult the documentation for the codec to determine the + * values to use. To determine the range programmatically, call + * vpx_codec_enc_config_default() with a usage value of 0. + */ + unsigned int rc_min_quantizer; + + + /*!\brief Maximum (Worst Quality) Quantizer + * + * The quantizer is the most direct control over the quality of the + * encoded image. The range of valid values for the quantizer is codec + * specific. Consult the documentation for the codec to determine the + * values to use. To determine the range programmatically, call + * vpx_codec_enc_config_default() with a usage value of 0. + */ + unsigned int rc_max_quantizer; + + + /* + * bitrate tolerance + */ + + + /*!\brief Rate control adaptation undershoot control + * + * This value, expressed as a percentage of the target bitrate, + * controls the maximum allowed adaptation speed of the codec. + * This factor controls the maximum amount of bits that can + * be subtracted from the target bitrate in order to compensate + * for prior overshoot. + * + * Valid values in the range 0-1000. + */ + unsigned int rc_undershoot_pct; + + + /*!\brief Rate control adaptation overshoot control + * + * This value, expressed as a percentage of the target bitrate, + * controls the maximum allowed adaptation speed of the codec. + * This factor controls the maximum amount of bits that can + * be added to the target bitrate in order to compensate for + * prior undershoot. + * + * Valid values in the range 0-1000. + */ + unsigned int rc_overshoot_pct; + + + /* + * decoder buffer model parameters + */ + + + /*!\brief Decoder Buffer Size + * + * This value indicates the amount of data that may be buffered by the + * decoding application. Note that this value is expressed in units of + * time (milliseconds). For example, a value of 5000 indicates that the + * client will buffer (at least) 5000ms worth of encoded data. Use the + * target bitrate (#rc_target_bitrate) to convert to bits/bytes, if + * necessary. + */ + unsigned int rc_buf_sz; + + + /*!\brief Decoder Buffer Initial Size + * + * This value indicates the amount of data that will be buffered by the + * decoding application prior to beginning playback. This value is + * expressed in units of time (milliseconds). Use the target bitrate + * (#rc_target_bitrate) to convert to bits/bytes, if necessary. + */ + unsigned int rc_buf_initial_sz; + + + /*!\brief Decoder Buffer Optimal Size + * + * This value indicates the amount of data that the encoder should try + * to maintain in the decoder's buffer. This value is expressed in units + * of time (milliseconds). Use the target bitrate (#rc_target_bitrate) + * to convert to bits/bytes, if necessary. + */ + unsigned int rc_buf_optimal_sz; + + + /* + * 2 pass rate control parameters + */ + + + /*!\brief Two-pass mode CBR/VBR bias + * + * Bias, expressed on a scale of 0 to 100, for determining target size + * for the current frame. The value 0 indicates the optimal CBR mode + * value should be used. The value 100 indicates the optimal VBR mode + * value should be used. Values in between indicate which way the + * encoder should "lean." + */ + unsigned int rc_2pass_vbr_bias_pct; /**< RC mode bias between CBR and VBR(0-100: 0->CBR, 100->VBR) */ + + + /*!\brief Two-pass mode per-GOP minimum bitrate + * + * This value, expressed as a percentage of the target bitrate, indicates + * the minimum bitrate to be used for a single GOP (aka "section") + */ + unsigned int rc_2pass_vbr_minsection_pct; + + + /*!\brief Two-pass mode per-GOP maximum bitrate + * + * This value, expressed as a percentage of the target bitrate, indicates + * the maximum bitrate to be used for a single GOP (aka "section") + */ + unsigned int rc_2pass_vbr_maxsection_pct; + + + /* + * keyframing settings (kf) + */ + + /*!\brief Keyframe placement mode + * + * This value indicates whether the encoder should place keyframes at a + * fixed interval, or determine the optimal placement automatically + * (as governed by the #kf_min_dist and #kf_max_dist parameters) + */ + enum vpx_kf_mode kf_mode; + + + /*!\brief Keyframe minimum interval + * + * This value, expressed as a number of frames, prevents the encoder from + * placing a keyframe nearer than kf_min_dist to the previous keyframe. At + * least kf_min_dist frames non-keyframes will be coded before the next + * keyframe. Set kf_min_dist equal to kf_max_dist for a fixed interval. + */ + unsigned int kf_min_dist; + + + /*!\brief Keyframe maximum interval + * + * This value, expressed as a number of frames, forces the encoder to code + * a keyframe if one has not been coded in the last kf_max_dist frames. + * A value of 0 implies all frames will be keyframes. Set kf_min_dist + * equal to kf_max_dist for a fixed interval. + */ + unsigned int kf_max_dist; + + } vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */ + + + /*!\brief Initialize an encoder instance + * + * Initializes a encoder context using the given interface. Applications + * should call the vpx_codec_enc_init convenience macro instead of this + * function directly, to ensure that the ABI version number parameter + * is properly initialized. + * + * In XMA mode (activated by setting VPX_CODEC_USE_XMA in the flags + * parameter), the storage pointed to by the cfg parameter must be + * kept readable and stable until all memory maps have been set. + * + * \param[in] ctx Pointer to this instance's context. + * \param[in] iface Pointer to the algorithm interface to use. + * \param[in] cfg Configuration to use, if known. May be NULL. + * \param[in] flags Bitfield of VPX_CODEC_USE_* flags + * \param[in] ver ABI version number. Must be set to + * VPX_ENCODER_ABI_VERSION + * \retval #VPX_CODEC_OK + * The decoder algorithm initialized. + * \retval #VPX_CODEC_MEM_ERROR + * Memory allocation failed. + */ + vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, + vpx_codec_iface_t *iface, + vpx_codec_enc_cfg_t *cfg, + vpx_codec_flags_t flags, + int ver); + + + /*!\brief Convenience macro for vpx_codec_enc_init_ver() + * + * Ensures the ABI version parameter is properly set. + */ +#define vpx_codec_enc_init(ctx, iface, cfg, flags) \ + vpx_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION) + + + /*!\brief Get a default configuration + * + * Initializes a encoder configuration structure with default values. Supports + * the notion of "usages" so that an algorithm may offer different default + * settings depending on the user's intended goal. This function \ref SHOULD + * be called by all applications to initialize the configuration structure + * before specializing the configuration with application specific values. + * + * \param[in] iface Pointer to the algorithm interface to use. + * \param[out] cfg Configuration buffer to populate + * \param[in] usage End usage. Set to 0 or use codec specific values. + * + * \retval #VPX_CODEC_OK + * The configuration was populated. + * \retval #VPX_CODEC_INCAPABLE + * Interface is not an encoder interface. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, or the usage value was not recognized. + */ + vpx_codec_err_t vpx_codec_enc_config_default(vpx_codec_iface_t *iface, + vpx_codec_enc_cfg_t *cfg, + unsigned int usage); + + + /*!\brief Set or change configuration + * + * Reconfigures an encoder instance according to the given configuration. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] cfg Configuration buffer to use + * + * \retval #VPX_CODEC_OK + * The configuration was populated. + * \retval #VPX_CODEC_INCAPABLE + * Interface is not an encoder interface. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, or the usage value was not recognized. + */ + vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx, + const vpx_codec_enc_cfg_t *cfg); + + + /*!\brief Get global stream headers + * + * Retrieves a stream level global header packet, if supported by the codec. + * + * \param[in] ctx Pointer to this instance's context + * + * \retval NULL + * Encoder does not support global header + * \retval Non-NULL + * Pointer to buffer containing global header packet + */ + vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx); + + +#define VPX_DL_REALTIME (1) /**< deadline parameter analogous to + * VPx REALTIME mode. */ +#define VPX_DL_GOOD_QUALITY (1000000) /**< deadline parameter analogous to + * VPx GOOD QUALITY mode. */ +#define VPX_DL_BEST_QUALITY (0) /**< deadline parameter analogous to + * VPx BEST QUALITY mode. */ + /*!\brief Encode a frame + * + * Encodes a video frame at the given "presentation time." The presentation + * time stamp (PTS) \ref MUST be strictly increasing. + * + * The encoder supports the notion of a soft real-time deadline. Given a + * non-zero value to the deadline parameter, the encoder will make a "best + * effort" guarantee to return before the given time slice expires. It is + * implicit that limiting the available time to encode will degrade the + * output quality. The encoder can be given an unlimited time to produce the + * best possible frame by specifying a deadline of '0'. This deadline + * supercedes the VPx notion of "best quality, good quality, realtime". + * Applications that wish to map these former settings to the new deadline + * based system can use the symbols #VPX_DL_REALTIME, #VPX_DL_GOOD_QUALITY, + * and #VPX_DL_BEST_QUALITY. + * + * When the last frame has been passed to the encoder, this function should + * continue to be called, with the img parameter set to NULL. This will + * signal the end-of-stream condition to the encoder and allow it to encode + * any held buffers. Encoding is complete when vpx_codec_encode() is called + * and vpx_codec_get_cx_data() returns no data. + * + * \param[in] ctx Pointer to this instance's context + * \param[in] img Image data to encode, NULL to flush. + * \param[in] pts Presentation time stamp, in timebase units. + * \param[in] duration Duration to show frame, in timebase units. + * \param[in] flags Flags to use for encoding this frame. + * \param[in] deadline Time to spend encoding, in microseconds. (0=infinite) + * + * \retval #VPX_CODEC_OK + * The configuration was populated. + * \retval #VPX_CODEC_INCAPABLE + * Interface is not an encoder interface. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, the image format is unsupported, etc. + */ + vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, + const vpx_image_t *img, + vpx_codec_pts_t pts, + unsigned long duration, + vpx_enc_frame_flags_t flags, + unsigned long deadline); + + + /*!\brief Set compressed data output buffer + * + * Sets the buffer that the codec should output the compressed data + * into. This call effectively sets the buffer pointer returned in the + * next VPX_CODEC_CX_FRAME_PKT packet. Subsequent packets will be + * appended into this buffer. The buffer is preserved across frames, + * so applications must periodically call this function after flushing + * the accumulated compressed data to disk or to the network to reset + * the pointer to the buffer's head. + * + * `pad_before` bytes will be skipped before writing the compressed + * data, and `pad_after` bytes will be appended to the packet. The size + * of the packet will be the sum of the size of the actual compressed + * data, pad_before, and pad_after. The padding bytes will be preserved + * (not overwritten). + * + * Note that calling this function does not guarantee that the returned + * compressed data will be placed into the specified buffer. In the + * event that the encoded data will not fit into the buffer provided, + * the returned packet \ref MAY point to an internal buffer, as it would + * if this call were never used. In this event, the output packet will + * NOT have any padding, and the application must free space and copy it + * to the proper place. This is of particular note in configurations + * that may output multiple packets for a single encoded frame (e.g., lagged + * encoding) or if the application does not reset the buffer periodically. + * + * Applications may restore the default behavior of the codec providing + * the compressed data buffer by calling this function with a NULL + * buffer. + * + * Applications \ref MUSTNOT call this function during iteration of + * vpx_codec_get_cx_data(). + * + * \param[in] ctx Pointer to this instance's context + * \param[in] buf Buffer to store compressed data into + * \param[in] pad_before Bytes to skip before writing compressed data + * \param[in] pad_after Bytes to skip after writing compressed data + * + * \retval #VPX_CODEC_OK + * The buffer was set successfully. + * \retval #VPX_CODEC_INVALID_PARAM + * A parameter was NULL, the image format is unsupported, etc. + */ + vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, + const vpx_fixed_buf_t *buf, + unsigned int pad_before, + unsigned int pad_after); + + + /*!\brief Encoded data iterator + * + * Iterates over a list of data packets to be passed from the encoder to the + * application. The different kinds of packets available are enumerated in + * #vpx_codec_cx_pkt_kind. + * + * #VPX_CODEC_CX_FRAME_PKT packets should be passed to the application's + * muxer. Multiple compressed frames may be in the list. + * #VPX_CODEC_STATS_PKT packets should be appended to a global buffer. + * + * The application \ref MUST silently ignore any packet kinds that it does + * not recognize or support. + * + * The data buffers returned from this function are only guaranteed to be + * valid until the application makes another call to any vpx_codec_* function. + * + * \param[in] ctx Pointer to this instance's context + * \param[in,out] iter Iterator storage, initialized to NULL + * + * \return Returns a pointer to an output data packet (compressed frame data, + * two-pass statistics, etc.) or NULL to signal end-of-list. + * + */ + const vpx_codec_cx_pkt_t *vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, + vpx_codec_iter_t *iter); + + + /*!\brief Get Preview Frame + * + * Returns an image that can be used as a preview. Shows the image as it would + * exist at the decompressor. The application \ref MUST NOT write into this + * image buffer. + * + * \param[in] ctx Pointer to this instance's context + * + * \return Returns a pointer to a preview image, or NULL if no image is + * available. + * + */ + const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx); + + + /*!@} - end defgroup encoder*/ + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_image.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_image.h new file mode 100644 index 00000000..8e08b364 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_image.h @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +/*!\file + * \brief Describes the vpx image descriptor and associated operations + * + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef VPX_IMAGE_H +#define VPX_IMAGE_H + + /*!\brief Current ABI version number + * + * \internal + * If this file is altered in any way that changes the ABI, this value + * must be bumped. Examples include, but are not limited to, changing + * types, removing or reassigning enums, adding/removing/rearranging + * fields to structures + */ +#define VPX_IMAGE_ABI_VERSION (1) /**<\hideinitializer*/ + + +#define VPX_IMG_FMT_PLANAR 0x100 /**< Image is a planar format */ +#define VPX_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U plane in memory */ +#define VPX_IMG_FMT_HAS_ALPHA 0x400 /**< Image has an alpha channel component */ + + + /*!\brief List of supported image formats */ + typedef enum vpx_img_fmt { + VPX_IMG_FMT_NONE, + VPX_IMG_FMT_RGB24, /**< 24 bit per pixel packed RGB */ + VPX_IMG_FMT_RGB32, /**< 32 bit per pixel packed 0RGB */ + VPX_IMG_FMT_RGB565, /**< 16 bit per pixel, 565 */ + VPX_IMG_FMT_RGB555, /**< 16 bit per pixel, 555 */ + VPX_IMG_FMT_UYVY, /**< UYVY packed YUV */ + VPX_IMG_FMT_YUY2, /**< YUYV packed YUV */ + VPX_IMG_FMT_YVYU, /**< YVYU packed YUV */ + VPX_IMG_FMT_BGR24, /**< 24 bit per pixel packed BGR */ + VPX_IMG_FMT_RGB32_LE, /**< 32 bit packed BGR0 */ + VPX_IMG_FMT_ARGB, /**< 32 bit packed ARGB, alpha=255 */ + VPX_IMG_FMT_ARGB_LE, /**< 32 bit packed BGRA, alpha=255 */ + VPX_IMG_FMT_RGB565_LE, /**< 16 bit per pixel, gggbbbbb rrrrrggg */ + VPX_IMG_FMT_RGB555_LE, /**< 16 bit per pixel, gggbbbbb 0rrrrrgg */ + VPX_IMG_FMT_YV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 1, /**< planar YVU */ + VPX_IMG_FMT_I420 = VPX_IMG_FMT_PLANAR | 2, + VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 3, /** < planar 4:2:0 format with vpx color space */ + VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4 /** < planar 4:2:0 format with vpx color space */ + } + vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */ + +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +#define IMG_FMT_PLANAR VPX_IMG_FMT_PLANAR /**< \deprecated Use #VPX_IMG_FMT_PLANAR */ +#define IMG_FMT_UV_FLIP VPX_IMG_FMT_UV_FLIP /**< \deprecated Use #VPX_IMG_FMT_UV_FLIP */ +#define IMG_FMT_HAS_ALPHA VPX_IMG_FMT_HAS_ALPHA /**< \deprecated Use #VPX_IMG_FMT_HAS_ALPHA */ + + /*!\brief Deprecated list of supported image formats + * \deprecated New code should use #vpx_img_fmt + */ +#define img_fmt vpx_img_fmt + /*!\brief alias for enum img_fmt. + * \deprecated New code should use #vpx_img_fmt_t + */ +#define img_fmt_t vpx_img_fmt_t + +#define IMG_FMT_NONE VPX_IMG_FMT_NONE /**< \deprecated Use #VPX_IMG_FMT_NONE */ +#define IMG_FMT_RGB24 VPX_IMG_FMT_RGB24 /**< \deprecated Use #VPX_IMG_FMT_RGB24 */ +#define IMG_FMT_RGB32 VPX_IMG_FMT_RGB32 /**< \deprecated Use #VPX_IMG_FMT_RGB32 */ +#define IMG_FMT_RGB565 VPX_IMG_FMT_RGB565 /**< \deprecated Use #VPX_IMG_FMT_RGB565 */ +#define IMG_FMT_RGB555 VPX_IMG_FMT_RGB555 /**< \deprecated Use #VPX_IMG_FMT_RGB555 */ +#define IMG_FMT_UYVY VPX_IMG_FMT_UYVY /**< \deprecated Use #VPX_IMG_FMT_UYVY */ +#define IMG_FMT_YUY2 VPX_IMG_FMT_YUY2 /**< \deprecated Use #VPX_IMG_FMT_YUY2 */ +#define IMG_FMT_YVYU VPX_IMG_FMT_YVYU /**< \deprecated Use #VPX_IMG_FMT_YVYU */ +#define IMG_FMT_BGR24 VPX_IMG_FMT_BGR24 /**< \deprecated Use #VPX_IMG_FMT_BGR24 */ +#define IMG_FMT_RGB32_LE VPX_IMG_FMT_RGB32_LE /**< \deprecated Use #VPX_IMG_FMT_RGB32_LE */ +#define IMG_FMT_ARGB VPX_IMG_FMT_ARGB /**< \deprecated Use #VPX_IMG_FMT_ARGB */ +#define IMG_FMT_ARGB_LE VPX_IMG_FMT_ARGB_LE /**< \deprecated Use #VPX_IMG_FMT_ARGB_LE */ +#define IMG_FMT_RGB565_LE VPX_IMG_FMT_RGB565_LE /**< \deprecated Use #VPX_IMG_FMT_RGB565_LE */ +#define IMG_FMT_RGB555_LE VPX_IMG_FMT_RGB555_LE /**< \deprecated Use #VPX_IMG_FMT_RGB555_LE */ +#define IMG_FMT_YV12 VPX_IMG_FMT_YV12 /**< \deprecated Use #VPX_IMG_FMT_YV12 */ +#define IMG_FMT_I420 VPX_IMG_FMT_I420 /**< \deprecated Use #VPX_IMG_FMT_I420 */ +#define IMG_FMT_VPXYV12 VPX_IMG_FMT_VPXYV12 /**< \deprecated Use #VPX_IMG_FMT_VPXYV12 */ +#define IMG_FMT_VPXI420 VPX_IMG_FMT_VPXI420 /**< \deprecated Use #VPX_IMG_FMT_VPXI420 */ +#endif /* VPX_CODEC_DISABLE_COMPAT */ + + /**\brief Image Descriptor */ + typedef struct vpx_image + { + vpx_img_fmt_t fmt; /**< Image Format */ + + /* Image storage dimensions */ + unsigned int w; /**< Stored image width */ + unsigned int h; /**< Stored image height */ + + /* Image display dimensions */ + unsigned int d_w; /**< Displayed image width */ + unsigned int d_h; /**< Displayed image height */ + + /* Chroma subsampling info */ + unsigned int x_chroma_shift; /**< subsampling order, X */ + unsigned int y_chroma_shift; /**< subsampling order, Y */ + + /* Image data pointers. */ +#define VPX_PLANE_PACKED 0 /**< To be used for all packed formats */ +#define VPX_PLANE_Y 0 /**< Y (Luminance) plane */ +#define VPX_PLANE_U 1 /**< U (Chroma) plane */ +#define VPX_PLANE_V 2 /**< V (Chroma) plane */ +#define VPX_PLANE_ALPHA 3 /**< A (Transparency) plane */ +#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT +#define PLANE_PACKED VPX_PLANE_PACKED +#define PLANE_Y VPX_PLANE_Y +#define PLANE_U VPX_PLANE_U +#define PLANE_V VPX_PLANE_V +#define PLANE_ALPHA VPX_PLANE_ALPHA +#endif + unsigned char *planes[4]; /**< pointer to the top left pixel for each plane */ + int stride[4]; /**< stride between rows for each plane */ + + int bps; /**< bits per sample (for packed formats) */ + + /* The following member may be set by the application to associate data + * with this image. + */ + void *user_priv; /**< may be set by the application to associate data + * with this image. */ + + /* The following members should be treated as private. */ + unsigned char *img_data; /**< private */ + int img_data_owner; /**< private */ + int self_allocd; /**< private */ + } vpx_image_t; /**< alias for struct vpx_image */ + + /**\brief Representation of a rectangle on a surface */ + typedef struct vpx_image_rect + { + unsigned int x; /**< leftmost column */ + unsigned int y; /**< topmost row */ + unsigned int w; /**< width */ + unsigned int h; /**< height */ + } vpx_image_rect_t; /**< alias for struct vpx_image_rect */ + + /*!\brief Open a descriptor, allocating storage for the underlying image + * + * Returns a descriptor for storing an image of the given format. The + * storage for the descriptor is allocated on the heap. + * + * \param[in] img Pointer to storage for descriptor. If this parameter + * is NULL, the storage for the descriptor will be + * allocated on the heap. + * \param[in] fmt Format for the image + * \param[in] d_w Width of the image + * \param[in] d_h Height of the image + * \param[in] align Alignment, in bytes, of each row in the image. + * + * \return Returns a pointer to the initialized image descriptor. If the img + * parameter is non-null, the value of the img parameter will be + * returned. + */ + vpx_image_t *vpx_img_alloc(vpx_image_t *img, + vpx_img_fmt_t fmt, + unsigned int d_w, + unsigned int d_h, + unsigned int align); + + /*!\brief Open a descriptor, using existing storage for the underlying image + * + * Returns a descriptor for storing an image of the given format. The + * storage for descriptor has been allocated elsewhere, and a descriptor is + * desired to "wrap" that storage. + * + * \param[in] img Pointer to storage for descriptor. If this parameter + * is NULL, the storage for the descriptor will be + * allocated on the heap. + * \param[in] fmt Format for the image + * \param[in] d_w Width of the image + * \param[in] d_h Height of the image + * \param[in] align Alignment, in bytes, of each row in the image. + * \param[in] img_data Storage to use for the image + * + * \return Returns a pointer to the initialized image descriptor. If the img + * parameter is non-null, the value of the img parameter will be + * returned. + */ + vpx_image_t *vpx_img_wrap(vpx_image_t *img, + vpx_img_fmt_t fmt, + unsigned int d_w, + unsigned int d_h, + unsigned int align, + unsigned char *img_data); + + + /*!\brief Set the rectangle identifying the displayed portion of the image + * + * Updates the displayed rectangle (aka viewport) on the image surface to + * match the specified coordinates and size. + * + * \param[in] img Image descriptor + * \param[in] x leftmost column + * \param[in] y topmost row + * \param[in] w width + * \param[in] h height + * + * \return 0 if the requested rectangle is valid, nonzero otherwise. + */ + int vpx_img_set_rect(vpx_image_t *img, + unsigned int x, + unsigned int y, + unsigned int w, + unsigned int h); + + + /*!\brief Flip the image vertically (top for bottom) + * + * Adjusts the image descriptor's pointers and strides to make the image + * be referenced upside-down. + * + * \param[in] img Image descriptor + */ + void vpx_img_flip(vpx_image_t *img); + + /*!\brief Close an image descriptor + * + * Frees all allocated storage associated with an image descriptor. + * + * \param[in] img Image descriptor + */ + void vpx_img_free(vpx_image_t *img); + +#endif +#ifdef __cplusplus +} +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_integer.h b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_integer.h new file mode 100644 index 00000000..608760f8 --- /dev/null +++ b/branches/2.0/doubango/thirdparties/win32/include/vpx/vpx_integer.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + + +#ifndef VPX_INTEGER_H +#define VPX_INTEGER_H + +/* get ptrdiff_t, size_t, wchar_t, NULL */ +#include + +#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES) +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed int int32_t; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; + +#if (defined(_MSC_VER) && (_MSC_VER < 1600)) +typedef signed __int64 int64_t; +typedef unsigned __int64 uint64_t; +#endif + +#ifdef HAVE_ARMV6 +typedef unsigned int int_fast16_t; +#else +typedef signed short int_fast16_t; +#endif +typedef signed char int_fast8_t; +typedef unsigned char uint_fast8_t; + +#ifndef _UINTPTR_T_DEFINED +typedef unsigned int uintptr_t; +#endif + +#else + +/* Most platforms have the C99 standard integer types. */ + +#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) +#define __STDC_FORMAT_MACROS +#endif +#include + +#endif + +/* VS2010 defines stdint.h, but not inttypes.h */ +#if defined(_MSC_VER) +#define PRId64 "I64d" +#else +#include +#endif + +#endif diff --git a/branches/2.0/doubango/thirdparties/win32/lib/vpx/vpxmd.lib b/branches/2.0/doubango/thirdparties/win32/lib/vpx/vpxmd.lib new file mode 100644 index 00000000..25898826 Binary files /dev/null and b/branches/2.0/doubango/thirdparties/win32/lib/vpx/vpxmd.lib differ diff --git a/branches/2.0/doubango/tinyDAV/droid-makefile b/branches/2.0/doubango/tinyDAV/droid-makefile index 44c01957..2d61af54 100644 --- a/branches/2.0/doubango/tinyDAV/droid-makefile +++ b/branches/2.0/doubango/tinyDAV/droid-makefile @@ -39,6 +39,14 @@ else FFMPEG_CFLAGS := $(FFMPEG_CFLAGS) -DHAVE_THEORA=1 FFMPEG_LDFLAGS := $(FFMPEG_LDFLAGS) -ltheora -logg endif +# VP8 (Default: disbled because of NEON) +ifeq ($(VPX),yes) + VPX_CFLAGS := -DHAVE_LIBVPX=1 + VPX_LDFLAGS := -lvpx_$(MARCH) + +else + VPX_CFLAGS := -DHAVE_LIBVPX=0 +endif # AMR (Default: enabled) ifeq ($(OPENCORE_AMR), no) @@ -85,7 +93,7 @@ endif # Google WebRTC (Default: enabled) ifeq ($(HAVE_WEBRTC), yes) WEBRTC_CFLAGS := -DHAVE_WEBRTC=1 - WEBRTC_LDFLAGS := -lwebrtc_aec_$(MARCH) -lwebrtc_apm_utility_$(MARCH) -lwebrtc_ns_$(MARCH) -lwebrtc_system_wrappers_$(MARCH) + WEBRTC_LDFLAGS := -lwebrtc_aecm_$(MARCH) -lwebrtc_aec_$(MARCH) -lwebrtc_spl_$(MARCH) -lwebrtc_apm_utility_$(MARCH) -lwebrtc_ns_$(MARCH) -lwebrtc_system_wrappers_$(MARCH) else WEBRTC_CFLAGS := -DHAVE_WEBRTC=0 endif @@ -97,18 +105,18 @@ endif # ILBC (Default: disabled) ifeq ($(ILBC), yes) -ILBC_CFLAGS := -DHAVE_ILBC=1 -ILBC_LDFLAGS := -liLBC + ILBC_CFLAGS := -DHAVE_ILBC=1 + ILBC_LDFLAGS := -liLBC else -ILBC_CFLAGS := -DHAVE_ILBC=0 + ILBC_CFLAGS := -DHAVE_ILBC=0 endif # GSM (Default: enabled) ifeq ($(LIBGSM),no) -LIBGSM_CFLAGS := -DHAVE_LIBGSM=0 + LIBGSM_CFLAGS := -DHAVE_LIBGSM=0 else -LIBGSM_CFLAGS := -DHAVE_LIBGSM=1 -LIBGSM_LDFLAGS := -lgsm + LIBGSM_CFLAGS := -DHAVE_LIBGSM=1 + LIBGSM_LDFLAGS := -lgsm endif # BV16 (Always disabled) @@ -134,12 +142,12 @@ endif ################################ CFLAGS := $(CFLAGS_LIB) -I$(THIRDPARTIES_INC) $(ILBC_CFLAGS) $(LIBGSM_CFLAGS) \ - $(FFMPEG_CFLAGS) $(SPEEX_CFLAGS) $(SPEEX_DSP_CFLAGS) $(WEBRTC_CFLAGS) $(OPENCORE_AMR_CFLAGS) $(BV16_CFLAGS) $(G729_CFLAGS) \ + $(FFMPEG_CFLAGS) $(VPX_CFLAGS) $(SPEEX_CFLAGS) $(SPEEX_DSP_CFLAGS) $(WEBRTC_CFLAGS) $(OPENCORE_AMR_CFLAGS) $(BV16_CFLAGS) $(G729_CFLAGS) \ -I../tinySAK/src -I../tinyNET/src -I../tinySDP/include -I../tinyRTP/include -I../tinyMEDIA/include -I../tinyMSRP/include -I./include \ -DJB_HISTORY_SIZE=500 LDFLAGS := $(LDFLAGS_LIB) -L$(THIRDPARTIES_LIB) -L$(THIRDPARTIES_MARCH_LIB) \ - $(FFMPEG_LDFLAGS) $(SPEEX_LDFLAGS) $(SPEEX_DSP_LDFLAGS) $(WEBRTC_LDFLAGS) $(OPENCORE_AMR_LDFLAGS) $(ILBC_LDFLAGS) $(LIBGSM_LDFLAGS) $(BV16_LDFLAGS) $(G729_LDFLAGS)\ + $(FFMPEG_LDFLAGS) $(VPX_LDFLAGS) $(SPEEX_LDFLAGS) $(SPEEX_DSP_LDFLAGS) $(WEBRTC_LDFLAGS) $(OPENCORE_AMR_LDFLAGS) $(ILBC_LDFLAGS) $(LIBGSM_LDFLAGS) $(BV16_LDFLAGS) $(G729_LDFLAGS)\ -ltinySAK_$(MARCH) -ltinyNET_$(MARCH) -ltinySDP_$(MARCH) -ltinyRTP_$(MARCH) -ltinyMEDIA_$(MARCH) -ltinyMSRP_$(MARCH) -lm -lgcc all: $(APP) @@ -208,6 +216,9 @@ OBJS += src/codecs/h264/tdav_codec_h264.o \ ### codecs (Theora) OBJS += src/codecs/theora/tdav_codec_theora.o + ### codecs (VPX) +OBJS += src/codecs/vpx/tdav_codec_vp8.o + ### codecs (MP4V-ES) OBJS += src/codecs/mp4ves/tdav_codec_mp4ves.o diff --git a/branches/2.0/doubango/tinyDAV/include/tinydav/audio/tdav_webrtc_denoise.h b/branches/2.0/doubango/tinyDAV/include/tinydav/audio/tdav_webrtc_denoise.h index 0bc1e570..2992d759 100644 --- a/branches/2.0/doubango/tinyDAV/include/tinydav/audio/tdav_webrtc_denoise.h +++ b/branches/2.0/doubango/tinyDAV/include/tinydav/audio/tdav_webrtc_denoise.h @@ -36,11 +36,26 @@ #include "tinymedia/tmedia_denoise.h" -#include +#if TDAV_UNDER_MOBILE && !defined(ANDROID) // Not working on Android +# include +# define TDAV_WebRtcAec_Create(aecInst) WebRtcAecm_Create(aecInst) +# define TDAV_WebRtcAec_Free(aecInst) WebRtcAecm_Free(aecInst) +# define TDAV_WebRtcAec_Init(aecInst, sampFreq, scSampFreq) WebRtcAecm_Init(aecInst, sampFreq) +# define TDAV_WebRtcAec_BufferFarend(aecInst, farend, nrOfSamples) WebRtcAecm_BufferFarend(aecInst, farend, nrOfSamples) +# define TDAV_WebRtcAec_Process(aecInst, nearend, nearendH, out, outH, nrOfSamples, msInSndCardBuf, skew) WebRtcAecm_Process(aecInst, nearend, nearend, out, nrOfSamples, msInSndCardBuf) +#else +# include +# define TDAV_WebRtcAec_Create(aecInst) WebRtcAec_Create(aecInst) +# define TDAV_WebRtcAec_Free(aecInst) WebRtcAec_Free(aecInst) +# define TDAV_WebRtcAec_Init(aecInst, sampFreq, scSampFreq) WebRtcAec_Init(aecInst, sampFreq, scSampFreq) +# define TDAV_WebRtcAec_BufferFarend(aecInst, farend, nrOfSamples) WebRtcAec_BufferFarend(aecInst, farend, nrOfSamples) +# define TDAV_WebRtcAec_Process(aecInst, nearend, nearendH, out, outH, nrOfSamples, msInSndCardBuf, skew) WebRtcAec_Process(aecInst, nearend, nearendH, out, outH, nrOfSamples, msInSndCardBuf, skew) +#endif + #include #if !defined(PREFER_SPEEX_DENOISER) -# if ANDROID +# if defined(ANDROID) # define PREFER_SPEEX_DENOISER 1 // WebRTC denoise produce robotic voice on Android (tested on Galaxy S) # else # define PREFER_SPEEX_DENOISER 0 diff --git a/branches/2.0/doubango/tinyDAV/include/tinydav/codecs/vpx/tdav_codec_vp8.h b/branches/2.0/doubango/tinyDAV/include/tinydav/codecs/vpx/tdav_codec_vp8.h new file mode 100644 index 00000000..7fdb6fa5 --- /dev/null +++ b/branches/2.0/doubango/tinyDAV/include/tinydav/codecs/vpx/tdav_codec_vp8.h @@ -0,0 +1,88 @@ +/* +* Copyright (C) 2011 Doubango Telecom +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO 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 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO 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 DOUBANGO. +* +*/ + +/**@file tdav_codec_vp8.h + * @brief Google's VP8 (http://www.webmproject.org/) encoder/decoder + * The RTP packetizer/depacketizer follows draft-ietf-payload-vp8 and draft-bankoski-vp8-bitstream-05 + * @author Mamadou Diop + * + */ +#ifndef TINYDAV_CODEC_VP8_H +#define TINYDAV_CODEC_VP8_H + +#include "tinydav_config.h" + +#if HAVE_LIBVPX + +#include "tinymedia/tmedia_codec.h" + +#define VPX_CODEC_DISABLE_COMPAT 1 /* strict compliance with the latest SDK by disabling some backwards compatibility */ +#include +#include +#include +#include + +TDAV_BEGIN_DECLS + +/* VP8 codec */ +typedef struct tdav_codec_vp8_s +{ + TMEDIA_DECLARE_CODEC_VIDEO; + + // Encoder + struct{ + unsigned initialized:1; + vpx_codec_pts_t pts; + vpx_codec_ctx_t context; + uint16_t pic_id; + uint16_t gop_size; + uint64_t frame_count; + + struct{ + uint8_t* ptr; + tsk_size_t size; + } rtp; + } encoder; + + // decoder + struct{ + unsigned initialized:1; + vpx_codec_ctx_t context; + void* accumulator; + tsk_size_t accumulator_pos; + tsk_size_t accumulator_size; + uint16_t last_seq; + unsigned last_PartID:4; + unsigned last_S:1; + unsigned last_N:1; + } decoder; +} +tdav_codec_vp8_t; + +TINYDAV_GEXTERN const tmedia_codec_plugin_def_t *tdav_codec_vp8_plugin_def_t; + +TDAV_END_DECLS + +#endif /* HAVE_LIBVPX */ + + +#endif /* TINYDAV_CODEC_VP8_H */ \ No newline at end of file diff --git a/branches/2.0/doubango/tinyDAV/include/tinydav/tdav.h b/branches/2.0/doubango/tinyDAV/include/tinydav/tdav.h index 783fe548..89353247 100644 --- a/branches/2.0/doubango/tinyDAV/include/tinydav/tdav.h +++ b/branches/2.0/doubango/tinyDAV/include/tinydav/tdav.h @@ -66,7 +66,7 @@ typedef enum tdav_codec_id_e tdav_codec_id_h264_bp30 = 0x00010000<<6, tdav_codec_id_theora = 0x00010000<<7, tdav_codec_id_mp4ves_es = 0x00010000<<8, - + tdav_codec_id_vp8 = 0x00010000<<9, } tdav_codec_id_t; diff --git a/branches/2.0/doubango/tinyDAV/include/tinydav_config.h b/branches/2.0/doubango/tinyDAV/include/tinydav_config.h index 472ad5a1..77a9f78c 100644 --- a/branches/2.0/doubango/tinyDAV/include/tinydav_config.h +++ b/branches/2.0/doubango/tinyDAV/include/tinydav_config.h @@ -27,16 +27,21 @@ #undef _WIN32 /* Because of WINSCW */ #endif -/* Windows (XP/Vista/7/CE and Windows Mobile) macro definition. */ +// Windows (XP/Vista/7/CE and Windows Mobile) macro definition #if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE) # define TDAV_UNDER_WINDOWS 1 #endif -/* OS X or iOS */ +// OS X or iOS #if defined(__APPLE__) # define TDAV_UNDER_APPLE 1 #endif +// Mobile +#if defined(_WIN32_WCE) || defined(ANDROID) // iOS (not true)=> || defined(IOS) +# define TDAV_UNDER_MOBILE 1 +#endif + #if (TDAV_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(TINYDAV_EXPORTS) # define TINYDAV_API __declspec(dllexport) # define TINYDAV_GEXTERN __declspec(dllexport) diff --git a/branches/2.0/doubango/tinyDAV/src/audio/tdav_webrtc_denoise.c b/branches/2.0/doubango/tinyDAV/src/audio/tdav_webrtc_denoise.c index 7fa09ad6..0594b9fb 100644 --- a/branches/2.0/doubango/tinyDAV/src/audio/tdav_webrtc_denoise.c +++ b/branches/2.0/doubango/tinyDAV/src/audio/tdav_webrtc_denoise.c @@ -40,41 +40,6 @@ #define WEBRTC_MAX_ECHO_TAIL 500 -#if !defined(WEBRTC_HAVE_SPL) -# define WEBRTC_HAVE_SPL 0 // To avoid linking against libspl -#endif - -#if !WEBRTC_HAVE_SPL - -#define WEBRTC_SPL_MAX_SEED_USED 0x80000000L - -static WebRtc_UWord32 WebRtcSpl_IncreaseSeed(WebRtc_UWord32 *seed) -{ - seed[0] = (seed[0] * ((WebRtc_Word32)69069) + 1) & (WEBRTC_SPL_MAX_SEED_USED - 1); - return seed[0]; -} - -static WebRtc_Word16 WebRtcSpl_RandU(WebRtc_UWord32 *seed) -{ - return (WebRtc_Word16)(WebRtcSpl_IncreaseSeed(seed) >> 16); -} - -// Creates an array of uniformly distributed variables -WebRtc_Word16 WebRtcSpl_RandUArray(WebRtc_Word16* vector, - WebRtc_Word16 vector_length, - WebRtc_UWord32* seed) -{ - int i; - for (i = 0; i < vector_length; i++) - { - vector[i] = WebRtcSpl_RandU(seed); - } - return vector_length; -} - -#endif /* WEBRTC_HAVE_SPL */ - - static int tdav_webrtc_denoise_set(tmedia_denoise_t* self, const tmedia_param_t* param) { /* tdav_webrtc_denoise_t *denoiser = (tdav_webrtc_denoise_t *)self; */ @@ -110,11 +75,11 @@ static int tdav_webrtc_denoise_open(tmedia_denoise_t* self, uint32_t frame_size, // // AEC instance // - if((ret = WebRtcAec_Create(&denoiser->AEC_inst))){ + if((ret = TDAV_WebRtcAec_Create(&denoiser->AEC_inst))){ TSK_DEBUG_ERROR("WebRtcAec_Create failed with error code = %d", ret); return ret; } - if((ret = WebRtcAec_Init(denoiser->AEC_inst, denoiser->sampling_rate, denoiser->sampling_rate))){ + if((ret = TDAV_WebRtcAec_Init(denoiser->AEC_inst, denoiser->sampling_rate, denoiser->sampling_rate))){ TSK_DEBUG_ERROR("WebRtcAec_Init failed with error code = %d", ret); return ret; } @@ -162,7 +127,7 @@ static int tdav_webrtc_denoise_echo_playback(tmedia_denoise_t* self, const void* switch(denoiser->sampling_rate){ case 8000: { - if((ret = WebRtcAec_BufferFarend(denoiser->AEC_inst, pEchoFrame, denoiser->frame_size))){ + if((ret = TDAV_WebRtcAec_BufferFarend(denoiser->AEC_inst, pEchoFrame, denoiser->frame_size))){ TSK_DEBUG_ERROR("WebRtcAec_BufferFarend failed with error code = %d", ret); return ret; } @@ -174,7 +139,7 @@ static int tdav_webrtc_denoise_echo_playback(tmedia_denoise_t* self, const void* { uint32_t i; for(i = 0; iframe_size; i+=denoiser->frame_size/2){ - if((ret = WebRtcAec_BufferFarend(denoiser->AEC_inst, &pEchoFrame[i], denoiser->frame_size/2))){ + if((ret = TDAV_WebRtcAec_BufferFarend(denoiser->AEC_inst, &pEchoFrame[i], denoiser->frame_size/2))){ TSK_DEBUG_ERROR("WebRtcAec_BufferFarend failed with error code = %d", ret); return ret; } @@ -229,7 +194,7 @@ static int tdav_webrtc_denoise_process_record(tmedia_denoise_t* self, void* audi switch(denoiser->sampling_rate){ case 8000: { - if((ret = WebRtcAec_Process(denoiser->AEC_inst, denoiser->temp_rec_out, tsk_null, pAudioFrame, tsk_null, denoiser->frame_size, denoiser->sound_card_buffer_len, denoiser->echo_skew))){ + if((ret = TDAV_WebRtcAec_Process(denoiser->AEC_inst, denoiser->temp_rec_out, tsk_null, pAudioFrame, tsk_null, denoiser->frame_size, denoiser->sound_card_buffer_len, denoiser->echo_skew))){ TSK_DEBUG_ERROR("WebRtcAec_Process with error code = %d", ret); return ret; } @@ -241,7 +206,7 @@ static int tdav_webrtc_denoise_process_record(tmedia_denoise_t* self, void* audi { uint32_t i; for(i = 0; iframe_size; i+=denoiser->frame_size/2){ - if((ret = WebRtcAec_Process(denoiser->AEC_inst, &denoiser->temp_rec_out[i], tsk_null, &pAudioFrame[i], tsk_null, denoiser->frame_size/2, denoiser->sound_card_buffer_len, denoiser->echo_skew))){ + if((ret = TDAV_WebRtcAec_Process(denoiser->AEC_inst, &denoiser->temp_rec_out[i], tsk_null, &pAudioFrame[i], tsk_null, denoiser->frame_size/2, denoiser->sound_card_buffer_len, denoiser->echo_skew))){ TSK_DEBUG_ERROR("WebRtcAec_Process with error code = %d", ret); return ret; } @@ -274,7 +239,7 @@ static int tdav_webrtc_denoise_close(tmedia_denoise_t* self) tdav_webrtc_denoise_t *denoiser = (tdav_webrtc_denoise_t *)self; if(denoiser->AEC_inst){ - WebRtcAec_Free(denoiser->AEC_inst); + TDAV_WebRtcAec_Free(denoiser->AEC_inst); denoiser->AEC_inst = tsk_null; } #if HAVE_SPEEX_DSP && PREFER_SPEEX_DENOISER @@ -318,7 +283,7 @@ static tsk_object_t* tdav_webrtc_denoise_dtor(tsk_object_t * self) tmedia_denoise_deinit(TMEDIA_DENOISE(denoise)); /* deinit self */ if(denoise->AEC_inst){ - WebRtcAec_Free(denoise->AEC_inst); + TDAV_WebRtcAec_Free(denoise->AEC_inst); denoise->AEC_inst = tsk_null; } diff --git a/branches/2.0/doubango/tinyDAV/src/codecs/h263/tdav_codec_h263.c b/branches/2.0/doubango/tinyDAV/src/codecs/h263/tdav_codec_h263.c index cf283c47..1e5479e4 100644 --- a/branches/2.0/doubango/tinyDAV/src/codecs/h263/tdav_codec_h263.c +++ b/branches/2.0/doubango/tinyDAV/src/codecs/h263/tdav_codec_h263.c @@ -108,7 +108,7 @@ int tdav_codec_h263_deinit(tdav_codec_h263_t* self) // // H.263-1996 object definition // -int tdav_codec_h263_open(tmedia_codec_t* self) +static int tdav_codec_h263_open(tmedia_codec_t* self) { int ret; int size; @@ -226,7 +226,7 @@ int tdav_codec_h263_open(tmedia_codec_t* self) return 0; } -int tdav_codec_h263_close(tmedia_codec_t* self) +static int tdav_codec_h263_close(tmedia_codec_t* self) { tdav_codec_h263_t* h263 = (tdav_codec_h263_t*)self; @@ -269,7 +269,7 @@ int tdav_codec_h263_close(tmedia_codec_t* self) return 0; } -tsk_size_t tdav_codec_h263_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size) +static tsk_size_t tdav_codec_h263_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size) { int ret; int size; @@ -304,7 +304,7 @@ tsk_size_t tdav_codec_h263_encode(tmedia_codec_t* self, const void* in_data, tsk return 0; } -tsk_size_t tdav_codec_h263_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr) +static tsk_size_t tdav_codec_h263_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr) { uint8_t F, P, sbit, ebit; const uint8_t* pdata = in_data; @@ -457,7 +457,7 @@ tsk_size_t tdav_codec_h263_decode(tmedia_codec_t* self, const void* in_data, tsk return retsize; } -tsk_bool_t tdav_codec_h263_fmtp_match(const tmedia_codec_t* codec, const char* fmtp) +static tsk_bool_t tdav_codec_h263_fmtp_match(const tmedia_codec_t* codec, const char* fmtp) { tsk_bool_t ret = tsk_false; tmedia_codec_video_t* h263 = (tmedia_codec_video_t*)codec; @@ -468,11 +468,11 @@ tsk_bool_t tdav_codec_h263_fmtp_match(const tmedia_codec_t* codec, const char* f case tmedia_bl_low: default: if(tsk_params_have_param(params, "QCIF")){ - h263->in.width = h263->out.width = 176, h263->in.height = h263->out.height = 144; + h263->in.width = h263->out.width = 176; h263->in.height = h263->out.height = 144; ret = tsk_true; } else if(tsk_params_have_param(params, "SQCIF")){ - h263->in.width = h263->out.width = 128, h263->in.height = h263->out.height = 96; + h263->in.width = h263->out.width = 128; h263->in.height = h263->out.height = 96; ret = tsk_true; } break; @@ -481,19 +481,19 @@ tsk_bool_t tdav_codec_h263_fmtp_match(const tmedia_codec_t* codec, const char* f case tmedia_bl_hight: case tmedia_bl_unrestricted: if(tsk_params_have_param(params, "CIF")){ - h263->in.width = h263->out.width = 352, h263->in.height = h263->out.height = 288; + h263->in.width = h263->out.width = 352; h263->in.height = h263->out.height = 288; ret = tsk_true; } else if(tsk_params_have_param(params, "QCIF")){ - h263->in.width = h263->out.width = 176, h263->in.height = h263->out.height = 144; + h263->in.width = h263->out.width = 176; h263->in.height = h263->out.height = 144; ret = tsk_true; } else if(tsk_params_have_param(params, "SQCIF")){ - h263->in.width = h263->out.width = 128, h263->in.height = h263->out.height = 96; + h263->in.width = h263->out.width = 128; h263->in.height = h263->out.height = 96; ret = tsk_true; } else { // Default: to be fixed - h263->in.width = h263->out.width = 352, h263->in.height = h263->out.height = 288; + h263->in.width = h263->out.width = 352; h263->in.height = h263->out.height = 288; ret = tsk_true; } @@ -505,7 +505,7 @@ tsk_bool_t tdav_codec_h263_fmtp_match(const tmedia_codec_t* codec, const char* f return ret; } -char* tdav_codec_h263_fmtp_get(const tmedia_codec_t* self) +static char* tdav_codec_h263_fmtp_get(const tmedia_codec_t* self) { switch(self->bl){ case tmedia_bl_low: @@ -520,7 +520,7 @@ char* tdav_codec_h263_fmtp_get(const tmedia_codec_t* self) } } -int tdav_codec_h263_fmtp_set(tmedia_codec_t* self, const char* fmtp) +static int tdav_codec_h263_fmtp_set(tmedia_codec_t* self, const char* fmtp) { TSK_DEBUG_INFO("remote fmtp=%s", fmtp); return 0; @@ -615,22 +615,22 @@ const tmedia_codec_plugin_def_t *tdav_codec_h263_plugin_def_t = &tdav_codec_h263 // H.263-1998 object definition // -int tdav_codec_h263p_open(tmedia_codec_t* self) +static int tdav_codec_h263p_open(tmedia_codec_t* self) { return tdav_codec_h263_open(self); } -int tdav_codec_h263p_close(tmedia_codec_t* self) +static int tdav_codec_h263p_close(tmedia_codec_t* self) { return tdav_codec_h263_close(self); } -tsk_size_t tdav_codec_h263p_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size) +static tsk_size_t tdav_codec_h263p_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size) { return tdav_codec_h263_encode(self, in_data, in_size, out_data, out_max_size); } -tsk_size_t tdav_codec_h263p_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr) +static tsk_size_t tdav_codec_h263p_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr) { uint8_t P, V, PLEN, PEBIT; uint8_t* pdata = (uint8_t*)in_data; diff --git a/branches/2.0/doubango/tinyDAV/src/codecs/mp4ves/tdav_codec_mp4ves.c b/branches/2.0/doubango/tinyDAV/src/codecs/mp4ves/tdav_codec_mp4ves.c index 0da13bc7..2f86d2a9 100644 --- a/branches/2.0/doubango/tinyDAV/src/codecs/mp4ves/tdav_codec_mp4ves.c +++ b/branches/2.0/doubango/tinyDAV/src/codecs/mp4ves/tdav_codec_mp4ves.c @@ -405,12 +405,12 @@ tsk_bool_t tdav_codec_mp4ves_fmtp_match(const tmedia_codec_t* codec, const char* switch (mp4v->profile ) { case Simple_Profile_Level_1: - TMEDIA_CODEC_VIDEO(mp4v)->out.width = TMEDIA_CODEC_VIDEO(mp4v)->in.width = 176, TMEDIA_CODEC_VIDEO(mp4v)->in.height = TMEDIA_CODEC_VIDEO(mp4v)->out.height = 144; + TMEDIA_CODEC_VIDEO(mp4v)->out.width = TMEDIA_CODEC_VIDEO(mp4v)->in.width = 176; TMEDIA_CODEC_VIDEO(mp4v)->in.height = TMEDIA_CODEC_VIDEO(mp4v)->out.height = 144; break; case Simple_Profile_Level_2: case Simple_Profile_Level_3: default: - TMEDIA_CODEC_VIDEO(mp4v)->out.width = TMEDIA_CODEC_VIDEO(mp4v)->in.width = 352, TMEDIA_CODEC_VIDEO(mp4v)->in.height = TMEDIA_CODEC_VIDEO(mp4v)->out.height = 288; + TMEDIA_CODEC_VIDEO(mp4v)->out.width = TMEDIA_CODEC_VIDEO(mp4v)->in.width = 352; TMEDIA_CODEC_VIDEO(mp4v)->in.height = TMEDIA_CODEC_VIDEO(mp4v)->out.height = 288; break; } diff --git a/branches/2.0/doubango/tinyDAV/src/codecs/theora/tdav_codec_theora.c b/branches/2.0/doubango/tinyDAV/src/codecs/theora/tdav_codec_theora.c index bd6595c0..85fab078 100644 --- a/branches/2.0/doubango/tinyDAV/src/codecs/theora/tdav_codec_theora.c +++ b/branches/2.0/doubango/tinyDAV/src/codecs/theora/tdav_codec_theora.c @@ -500,10 +500,10 @@ tsk_bool_t tdav_codec_theora_fmtp_match(const tmedia_codec_t* codec, const char* case tmedia_bl_low: default: if(width<=176 && height<=144){ - theora->in.width = theora->out.width = width, theora->in.height = theora->out.height = height; + theora->in.width = theora->out.width = width; theora->in.height = theora->out.height = height; } else{ - theora->in.width = theora->out.width = 176, theora->in.height = theora->out.height = 144; + theora->in.width = theora->out.width = 176; theora->in.height = theora->out.height = 144; } break; @@ -511,10 +511,10 @@ tsk_bool_t tdav_codec_theora_fmtp_match(const tmedia_codec_t* codec, const char* case tmedia_bl_hight: case tmedia_bl_unrestricted: if(width<=352 && height<=288){ - theora->in.width = theora->out.width = width, theora->in.height = theora->out.height = height; + theora->in.width = theora->out.width = width; theora->in.height = theora->out.height = height; } else{ - theora->in.width = theora->out.width = 352, theora->in.height = theora->out.height = 288; + theora->in.width = theora->out.width = 352; theora->in.height = theora->out.height = 288; } break; } diff --git a/branches/2.0/doubango/tinyDAV/src/codecs/vpx/tdav_codec_vp8.c b/branches/2.0/doubango/tinyDAV/src/codecs/vpx/tdav_codec_vp8.c new file mode 100644 index 00000000..c8769b7b --- /dev/null +++ b/branches/2.0/doubango/tinyDAV/src/codecs/vpx/tdav_codec_vp8.c @@ -0,0 +1,601 @@ +/* +* Copyright (C) 2011 Doubango Telecom +* +* Contact: Mamadou Diop +* +* This file is part of Open Source Doubango Framework. +* +* DOUBANGO 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 3 of the License, or +* (at your option) any later version. +* +* DOUBANGO 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 DOUBANGO. +* +*/ + +/**@file tdav_codec_vp8.c + * @brief VP8 codec + * The RTP packetizer/depacketizer follows draft-ietf-payload-vp8 and draft-bankoski-vp8-bitstream-05 + * Google's VP8 (http://www.webmproject.org/) encoder/decoder + * + * @author Mamadou Diop + * + */ +#include "tinydav/codecs/vpx/tdav_codec_vp8.h" + +#if HAVE_LIBVPX + +#include "tinyrtp/rtp/trtp_rtp_packet.h" + +#include "tsk_memory.h" +#include "tsk_time.h" +#include "tsk_debug.h" + +#define TDAV_VP8_PAY_DESC_SIZE 1 /* |X|R|N|S|PartID| */ +#define TDAV_SYSTEM_CORES_COUNT 1 +#define TDAV_VP8_GOP_SIZE_IN_SECONDS 2 +#define TDAV_VP8_RTP_PAYLOAD_MAX_SIZE 950 + +#define vp8_interface_enc (vpx_codec_vp8_cx()) +#define vp8_interface_dec (vpx_codec_vp8_dx()) + +static void tdav_codec_vp8_encap(tdav_codec_vp8_t* self, const vpx_codec_cx_pkt_t *pkt); +static void tdav_codec_vp8_rtp_callback(tdav_codec_vp8_t *self, const void *data, tsk_size_t size, uint32_t partID, tsk_bool_t part_start, tsk_bool_t non_ref, tsk_bool_t last); + +/* ============ VP8 Plugin interface ================= */ + +static int tdav_codec_vp8_open(tmedia_codec_t* self) +{ + tdav_codec_vp8_t* vp8 = (tdav_codec_vp8_t*)self; + + vpx_codec_enc_cfg_t enc_cfg; + vpx_codec_dec_cfg_t dec_cfg; + vpx_enc_frame_flags_t enc_flags; + vpx_codec_flags_t dec_flags = 0; + vpx_codec_err_t vpx_ret; + + if(!vp8){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } + + /* the caller (base class) already checked that the codec is not opened */ + + // + // Encoder + // + if((vpx_ret = vpx_codec_enc_config_default(vp8_interface_enc, &enc_cfg, 0)) != VPX_CODEC_OK){ + TSK_DEBUG_ERROR("vpx_codec_enc_config_default failed with error =%s", vpx_codec_err_to_string(vpx_ret)); + return -2; + } + enc_cfg.g_timebase.num = 1; + enc_cfg.g_timebase.den = TMEDIA_CODEC_VIDEO(vp8)->out.fps; + enc_cfg.rc_target_bitrate = TMEDIA_CODEC_VIDEO(vp8)->out.width * TMEDIA_CODEC_VIDEO(vp8)->out.height * enc_cfg.rc_target_bitrate + / enc_cfg.g_w / enc_cfg.g_h; + enc_cfg.g_w = TMEDIA_CODEC_VIDEO(vp8)->out.width; + enc_cfg.g_h = TMEDIA_CODEC_VIDEO(vp8)->out.height; + enc_cfg.g_error_resilient = VPX_ERROR_RESILIENT_DEFAULT; + enc_cfg.g_lag_in_frames = 0; + enc_cfg.g_threads = TDAV_SYSTEM_CORES_COUNT; + + enc_flags = 0; //VPX_EFLAG_XXX + + if((vpx_ret = vpx_codec_enc_init(&vp8->encoder.context, vp8_interface_enc, &enc_cfg, enc_flags)) != VPX_CODEC_OK){ + TSK_DEBUG_ERROR("vpx_codec_enc_init failed with error =%s", vpx_codec_err_to_string(vpx_ret)); + return -3; + } + vp8->encoder.pic_id = (rand() ^ rand()) % 0x7FFF; + vp8->encoder.gop_size = TDAV_VP8_GOP_SIZE_IN_SECONDS * TMEDIA_CODEC_VIDEO(vp8)->out.fps; + vp8->encoder.initialized = tsk_true; + + // + // Decoder + // + dec_cfg.w = TMEDIA_CODEC_VIDEO(vp8)->out.width; + dec_cfg.h = TMEDIA_CODEC_VIDEO(vp8)->out.height; + dec_cfg.threads = TDAV_SYSTEM_CORES_COUNT; + if((vpx_ret = vpx_codec_dec_init(&vp8->decoder.context, vp8_interface_dec, &dec_cfg, dec_flags)) != VPX_CODEC_OK){ + TSK_DEBUG_ERROR("vpx_codec_dec_init failed with error =%s", vpx_codec_err_to_string(vpx_ret)); + return -4; + } + vp8->decoder.initialized = tsk_true; + + + + + return 0; +} + +static int tdav_codec_vp8_close(tmedia_codec_t* self) +{ + tdav_codec_vp8_t* vp8 = (tdav_codec_vp8_t*)self; + + if(!vp8){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } + + if(vp8->encoder.initialized){ + vpx_codec_destroy(&vp8->encoder.context); + vp8->encoder.initialized = tsk_false; + } + if(vp8->decoder.initialized){ + vpx_codec_destroy(&vp8->decoder.context); + vp8->decoder.initialized = tsk_false; + } + return 0; +} + +static tsk_size_t tdav_codec_vp8_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size) +{ + tdav_codec_vp8_t* vp8 = (tdav_codec_vp8_t*)self; + vpx_enc_frame_flags_t flags = 0; + vpx_codec_err_t vpx_ret; + const vpx_codec_cx_pkt_t *pkt; + vpx_codec_iter_t iter = tsk_null; + vpx_image_t image; + + if(!vp8 || !in_data || !in_size || !out_data){ + TSK_DEBUG_ERROR("Invalid parameter"); + return 0; + } + + if(in_size != (vp8->encoder.context.config.enc->g_w * vp8->encoder.context.config.enc->g_h * 3)>>1){ + TSK_DEBUG_ERROR("Invalid size"); + return 0; + } + + // wrap yuv420 buffer + if(!vpx_img_wrap(&image, VPX_IMG_FMT_I420, vp8->encoder.context.config.enc->g_w, vp8->encoder.context.config.enc->g_h, 1, (unsigned char*)in_data)){ + TSK_DEBUG_ERROR("vpx_img_wrap failed"); + return 0; + } + + // flip + if(self->video.flip.encoded){ + vpx_img_flip(&image); + } + + // encode data + ++vp8->encoder.pts; + if(vp8->encoder.frame_count == 0 || (vp8->encoder.frame_count % vp8->encoder.gop_size) == 0){ + flags |= VPX_EFLAG_FORCE_KF; + } + if((vpx_ret = vpx_codec_encode(&vp8->encoder.context, &image, vp8->encoder.pts, 1, flags, VPX_DL_REALTIME)) != VPX_CODEC_OK){ + TSK_DEBUG_ERROR("vpx_codec_encode failed with error =%s", vpx_codec_err_to_string(vpx_ret)); + vpx_img_free(&image); + return 0; + } + + ++vp8->encoder.frame_count; + + while((pkt = vpx_codec_get_cx_data(&vp8->encoder.context, &iter))){ + switch(pkt->kind){ + case VPX_CODEC_CX_FRAME_PKT: + { + tdav_codec_vp8_encap(vp8, pkt); + break; + } + default: + case VPX_CODEC_STATS_PKT: /**< Two-pass statistics for this frame */ + case VPX_CODEC_PSNR_PKT: /**< PSNR statistics for this frame */ + case VPX_CODEC_CUSTOM_PKT: /**< Algorithm extensions */ + { + TSK_DEBUG_INFO("pkt->kind=%d not supported", (int)pkt->kind); + break; + } + } + } + + vpx_img_free(&image); + + return 0; +} + +static tsk_size_t tdav_codec_vp8_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data, tsk_size_t* out_max_size, const tsk_object_t* proto_hdr) +{ + tdav_codec_vp8_t* vp8 = (tdav_codec_vp8_t*)self; + const trtp_rtp_header_t* rtp_hdr = proto_hdr; + const uint8_t* pdata = in_data; + tsk_size_t xmax_size, ret = 0; + uint8_t X, R, N, S, PartID; // |X|R|N|S|PartID| + + if(!self || !in_data || in_size<1 || !out_data || !vp8->decoder.initialized){ + TSK_DEBUG_ERROR("Invalid parameter"); + return 0; + } + + X = (*pdata & 0x80)>>7; + R = (*pdata & 0x40)>>6; + if(R){ + TSK_DEBUG_ERROR("R<>0"); + return 0; + } + N = (*pdata & 0x20)>>5; + S = (*pdata & 0x10)>>4; + PartID = (*pdata & 0x0F); + // skip "REQUIRED" header + ++pdata, --in_size; + // check "OPTIONAL" headers + if(X){ + tsk_size_t size_to_skip = 0; + // X: |I|L|T| RSV-A | + if(*pdata & 0x80){//I + ++size_to_skip;// PictureID, not used yet + } + if(*pdata & 0x40){//L + ++size_to_skip;//TL0PICIDX, not used yet + } + if(*pdata & 0x20){//T + ++size_to_skip;//TID and RSV-B, not used yet + } + if(in_size<=size_to_skip){ + TSK_DEBUG_ERROR("Too short"); + goto bail; + } + } + + // Packet lost? + if(vp8->decoder.last_seq != (rtp_hdr->seq_num - 1) && vp8->decoder.last_seq){ + if(vp8->decoder.last_seq == rtp_hdr->seq_num){ + // Could happen on some stupid emulators + TSK_DEBUG_INFO("Packet duplicated, seq_num=%d", rtp_hdr->seq_num); + goto bail; + } + TSK_DEBUG_INFO("Packet lost, seq_num=%d", rtp_hdr->seq_num); + } + vp8->decoder.last_seq = rtp_hdr->seq_num; + + xmax_size = (TMEDIA_CODEC_VIDEO(vp8)->in.width * TMEDIA_CODEC_VIDEO(vp8)->in.height * 3) >> 1; + + // start-accumulator + if(!vp8->decoder.accumulator){ + if(in_size > xmax_size){ + TSK_DEBUG_ERROR("%u too big to contain valid encoded data. xmax_size=%u", in_size, xmax_size); + goto bail; + } + if(!(vp8->decoder.accumulator = tsk_calloc(in_size, sizeof(uint8_t)))){ + TSK_DEBUG_ERROR("Failed to allocated new buffer"); + goto bail; + } + vp8->decoder.accumulator_size = in_size; + } + if((vp8->decoder.accumulator_pos + in_size) >= xmax_size){ + TSK_DEBUG_ERROR("BufferOverflow"); + vp8->decoder.accumulator_pos = 0; + goto bail; + } + if((vp8->decoder.accumulator_pos + in_size) > vp8->decoder.accumulator_size){ + if(!(vp8->decoder.accumulator = tsk_realloc(vp8->decoder.accumulator, (vp8->decoder.accumulator_pos + in_size)))){ + TSK_DEBUG_ERROR("Failed to reallocated new buffer"); + vp8->decoder.accumulator_pos = 0; + vp8->decoder.accumulator_size = 0; + goto bail; + } + vp8->decoder.accumulator_size = (vp8->decoder.accumulator_pos + in_size); + } + + memcpy(&((uint8_t*)vp8->decoder.accumulator)[vp8->decoder.accumulator_pos], pdata, in_size); + vp8->decoder.accumulator_pos += in_size; + // end-accumulator + + // FIXME: First partition is decodable + // for better error handling we should decode it + // (vp8->decoder.last_PartID == 0 && vp8->decoder.last_S && S) => previous was "first decodable" and current is new one + if(rtp_hdr->marker /*|| (vp8->decoder.last_PartID == 0 && vp8->decoder.last_S)*/){ + vpx_image_t *img; + vpx_codec_iter_t iter = tsk_null; + vpx_codec_err_t vpx_ret = vpx_codec_decode(&vp8->decoder.context, vp8->decoder.accumulator, vp8->decoder.accumulator_pos, tsk_null, 0); + // in all cases: reset accumulator + vp8->decoder.accumulator_pos = 0; + if(vpx_ret != VPX_CODEC_OK){ + TSK_DEBUG_ERROR("vpx_codec_decode failed with error =%s", vpx_codec_err_to_string(vpx_ret)); + goto bail; + } + // update sizes + TMEDIA_CODEC_VIDEO(vp8)->in.width = vp8->decoder.context.config.dec->w; + TMEDIA_CODEC_VIDEO(vp8)->in.height = vp8->decoder.context.config.dec->h; + xmax_size = (TMEDIA_CODEC_VIDEO(vp8)->in.width * TMEDIA_CODEC_VIDEO(vp8)->in.height * 3) >> 1; + // allocate destination buffer + if(*out_max_size decoder.accumulator_pos = 0; + *out_max_size = 0; + goto bail; + } + *out_max_size = xmax_size; + } + // copy decoded data + ret = 0; + while((img = vpx_codec_get_frame(&vp8->decoder.context, &iter))){ + unsigned int plane, y; + // flip + if(self->video.flip.decoded){ + vpx_img_flip(img); + } + for(plane=0; plane < 3; plane++) { + unsigned char *buf =img->planes[plane]; + for(y=0; yd_h >> (plane ? 1 : 0); y++) { + unsigned int w_count = img->d_w >> (plane ? 1 : 0); + if((ret + w_count) > *out_max_size){ + TSK_DEBUG_ERROR("BufferOverflow"); + ret = 0; + goto bail; + } + memcpy(((uint8_t*)*out_data) + ret, buf, w_count); + ret += w_count; + buf += img->stride[plane]; + } + } + } + } + +bail: + + vp8->decoder.last_PartID = PartID; + vp8->decoder.last_S = S; + vp8->decoder.last_N = N; + return ret; +} + +static tsk_bool_t tdav_codec_vp8_fmtp_match(const tmedia_codec_t* codec, const char* fmtp) +{ + unsigned width, height, fps; + + if(tmedia_parse_video_fmtp(fmtp, codec->bl, &width, &height, &fps)){ + TSK_DEBUG_ERROR("Failed to match fmtp=%s", fmtp); + return tsk_false; + } + + TMEDIA_CODEC_VIDEO(codec)->in.width = TMEDIA_CODEC_VIDEO(codec)->out.width = width; + TMEDIA_CODEC_VIDEO(codec)->in.height = TMEDIA_CODEC_VIDEO(codec)->out.height = height; + TMEDIA_CODEC_VIDEO(codec)->in.fps = TMEDIA_CODEC_VIDEO(codec)->out.fps = fps; + + return tsk_true; +} + +static char* tdav_codec_vp8_fmtp_get(const tmedia_codec_t* self) +{ + switch(self->bl){ + case tmedia_bl_low: + default: + return tsk_strdup("QCIF=2;SQCIF=2"); + break; + case tmedia_bl_medium: + case tmedia_bl_hight: + case tmedia_bl_unrestricted: + return tsk_strdup("CIF=2;QCIF=2;SQCIF=2"); + break; + } +} + +static int tdav_codec_vp8_fmtp_set(tmedia_codec_t* self, const char* fmtp) +{ + TSK_DEBUG_INFO("remote fmtp=%s", fmtp); + return 0; +} + +/* ============ VP8 object definition ================= */ + +/* constructor */ +static tsk_object_t* tdav_codec_vp8_ctor(tsk_object_t * self, va_list * app) +{ + tdav_codec_vp8_t *vp8 = self; + if(vp8){ + /* init base: called by tmedia_codec_create() */ + /* init self */ + + } + return self; +} +/* destructor */ +static tsk_object_t* tdav_codec_vp8_dtor(tsk_object_t * self) +{ + tdav_codec_vp8_t *vp8 = self; + if(vp8){ + /* deinit base */ + tmedia_codec_video_deinit(vp8); + /* deinit self */ + if(vp8->encoder.rtp.ptr){ + TSK_FREE(vp8->encoder.rtp.ptr); + vp8->encoder.rtp.size = 0; + } + if(vp8->encoder.initialized){ + vpx_codec_destroy(&vp8->encoder.context); + vp8->encoder.initialized = tsk_false; + } + if(vp8->decoder.initialized){ + vpx_codec_destroy(&vp8->decoder.context); + vp8->decoder.initialized = tsk_false; + } + if(vp8->decoder.accumulator){ + TSK_FREE(vp8->decoder.accumulator); + vp8->decoder.accumulator_pos = 0; + } + } + + return self; +} +/* object definition */ +static const tsk_object_def_t tdav_codec_vp8_def_s = +{ + sizeof(tdav_codec_vp8_t), + tdav_codec_vp8_ctor, + tdav_codec_vp8_dtor, + tmedia_codec_cmp, +}; +/* plugin definition*/ +static const tmedia_codec_plugin_def_t tdav_codec_vp8_plugin_def_s = +{ + &tdav_codec_vp8_def_s, + + tmedia_video, + "VP8", + "VP8 codec", + TMEDIA_CODEC_FORMAT_VP8, + tsk_false, + 90000, // rate + + /* audio */ + { 0 }, + + /* video (defaul width,height,fps) */ + {176, 144, 15}, + + tdav_codec_vp8_open, + tdav_codec_vp8_close, + tdav_codec_vp8_encode, + tdav_codec_vp8_decode, + tdav_codec_vp8_fmtp_match, + tdav_codec_vp8_fmtp_get, + tdav_codec_vp8_fmtp_set +}; +const tmedia_codec_plugin_def_t *tdav_codec_vp8_plugin_def_t = &tdav_codec_vp8_plugin_def_s; + +/* ============ VP8 RTP packetizer/depacketizer ================= */ + +static void tdav_codec_vp8_encap(tdav_codec_vp8_t* self, const vpx_codec_cx_pkt_t *pkt) +{ + tsk_bool_t non_ref, is_keyframe, part_start; + uint8_t *frame_ptr; + uint32_t part_size, part_ID, pkt_size, index; + + if(!self || !pkt || !pkt->data.frame.buf || !pkt->data.frame.sz){ + TSK_DEBUG_ERROR("Invalid parameter"); + return; + } + + index = 0; + frame_ptr = pkt->data.frame.buf ; + pkt_size = pkt->data.frame.sz; + non_ref = (pkt->data.frame.flags & VPX_FRAME_IS_DROPPABLE); + is_keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY); + + // check P bit validity + if((is_keyframe && (*frame_ptr & 0x01)) || (!is_keyframe && !(*frame_ptr & 0x01))){// 4.2. VP8 Payload Header + TSK_DEBUG_ERROR("Invalid payload header"); + return; + } + + // first partition (contains modes and motion vectors) + part_ID = 0; // The first VP8 partition(containing modes and motion vectors) MUST be labeled with PartID = 0 + part_start = tsk_true; + part_size = (frame_ptr[2] << 16) | (frame_ptr[1] << 8) | frame_ptr[0]; + part_size = (part_size >> 5) & 0x7FFFF; + if(part_size > pkt_size){ + TSK_DEBUG_ERROR("part_size is > pkt_size(%u,%u)", part_size, pkt_size); + return; + } + tdav_codec_vp8_rtp_callback(self, &frame_ptr[index], part_size, part_ID, part_start, non_ref, (index + part_size)==pkt_size); + index += part_size; + + // second,third,... partitions (or fragment if part_size > TDAV_VP8_RTP_PAYLOAD_MAX_SIZE) + while(indexencoder.rtp.size < (size + paydesc_and_hdr_size)){ + if(!(self->encoder.rtp.ptr = tsk_realloc(self->encoder.rtp.ptr, (size + paydesc_and_hdr_size)))){ + TSK_DEBUG_ERROR("Failed to allocate new buffer"); + return; + } + self->encoder.rtp.size = (size + paydesc_and_hdr_size); + } + memcpy((self->encoder.rtp.ptr + paydesc_and_hdr_size), data, size); + + /* VP8 Payload Descriptor */ + // |X|R|N|S|PartID| + // X and R are equal to zero + self->encoder.rtp.ptr[0] = (partID & 0x0F) // PartID + | (non_ref << 5) & 0x20 // N + | (part_start << 4) &0x10 // S + ; + + /* 4.2. VP8 Payload Header */ + if(has_hdr){ + // already part of the encoded stream + } + + // Send data over the network + if(TMEDIA_CODEC_VIDEO(self)->callback){ + TMEDIA_CODEC_VIDEO(self)->callback(TMEDIA_CODEC_VIDEO(self)->callback_data, self->encoder.rtp.ptr, (size + TDAV_VP8_PAY_DESC_SIZE), (3003* (30/TMEDIA_CODEC_VIDEO(self)->out.fps)), last); + } +} + +#endif /* HAVE_LIBVPX */ diff --git a/branches/2.0/doubango/tinyDAV/src/tdav.c b/branches/2.0/doubango/tinyDAV/src/tdav.c index 95c0c65b..4d747517 100644 --- a/branches/2.0/doubango/tinyDAV/src/tdav.c +++ b/branches/2.0/doubango/tinyDAV/src/tdav.c @@ -58,6 +58,7 @@ #include "tinydav/codecs/h264/tdav_codec_h264.h" #include "tinydav/codecs/theora/tdav_codec_theora.h" #include "tinydav/codecs/mp4ves/tdav_codec_mp4ves.h" +#include "tinydav/codecs/vpx/tdav_codec_vp8.h" // Consumers #include "tinydav/audio/waveapi/tdav_consumer_waveapi.h" @@ -126,7 +127,7 @@ int tdav_init() tmedia_content_plugin_register("text/plain", tmedia_content_dummy_plugin_def_t); tmedia_content_plugin_register("application/octet-stream", tmedia_content_dummy_plugin_def_t); tmedia_content_plugin_register("message/CPIM", tmedia_content_cpim_plugin_def_t); - /* + /* To be implemented tmedia_content_plugin_register("message/sipfrag", tmedia_content_sipfrag_plugin_def_t); tmedia_content_plugin_register("multipart/digest", tmedia_content_multipart_plugin_def_t); tmedia_content_plugin_register("multipart/mixed", tmedia_content_multipart_plugin_def_t); @@ -175,6 +176,9 @@ int tdav_init() // last: dtmf tmedia_codec_plugin_register(tdav_codec_dtmf_plugin_def_t); +#if HAVE_LIBVPX + tmedia_codec_plugin_register(tdav_codec_vp8_plugin_def_t); +#endif #if HAVE_FFMPEG tmedia_codec_plugin_register(tdav_codec_mp4ves_plugin_def_t); # if !defined(HAVE_H264) || HAVE_H264 @@ -281,6 +285,10 @@ static tdav_codec_decl_t __codecs[] = { { tdav_codec_id_g729ab, &tdav_codec_g729ab_plugin_def_t }, #endif +#if HAVE_LIBVPX + { tdav_codec_id_vp8, &tdav_codec_vp8_plugin_def_t }, +#endif + #if HAVE_FFMPEG # if !defined(HAVE_H264) || HAVE_H264 { tdav_codec_id_h264_bp30, &tdav_codec_h264_bp30_plugin_def_t }, @@ -395,6 +403,13 @@ tsk_bool_t tdav_codec_is_supported(tdav_codec_id_t codec) return tsk_false; #endif + case tdav_codec_id_vp8: +#if HAVE_LIBVPX + return tsk_true; +#else + return tsk_false; +#endif + case tdav_codec_id_h261: case tdav_codec_id_h263: case tdav_codec_id_h263p: @@ -481,6 +496,10 @@ int tdav_deinit() #if HAVE_G729 tmedia_codec_plugin_unregister(tdav_codec_g729ab_plugin_def_t); #endif + +#if HAVE_LIBVPX + tmedia_codec_plugin_unregister(tdav_codec_vp8_plugin_def_t); +#endif #if HAVE_FFMPEG tmedia_codec_plugin_unregister(tdav_codec_mp4ves_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h261_plugin_def_t); diff --git a/branches/2.0/doubango/tinyDAV/test/test_sessions.h b/branches/2.0/doubango/tinyDAV/test/test_sessions.h index c94361a1..d87e6af1 100644 --- a/branches/2.0/doubango/tinyDAV/test/test_sessions.h +++ b/branches/2.0/doubango/tinyDAV/test/test_sessions.h @@ -54,10 +54,12 @@ "a=rtpmap:115 BV16/8000\r\n" \ "a=fmtp:102 octet-align=0; mode-set=0,1,2,3,4,5,6,7; mode-change-period=1; mode-change-capability=2; mode-change-neighbor=0\r\n" \ "a=fmtp:103 octet-align=1; mode-set=0,1,2,3,4,5,6,7; mode-change-period=1; mode-change-capability=2; mode-change-neighbor=0\r\n" \ - "m=video 6061 RTP/AVP 111 121 98 31 126 34 32\r\n" \ + "m=video 6060 RTP/AVP 125 111 98 121 31 126 34 32\r\n" \ "i=Video line\r\n" \ "b=A-YZ:92\r\n" \ "b=B-YZ:256\r\n" \ + "a=rtpmap:125 VP8/90000\r\n" \ + "a=fmtp:125 QCIF=2;CIF=2 MaxBR=4520\r\n" \ "a=rtpmap:121 MP4V-ES/90000\r\n" \ "a=fmtp:121 profile-level-id=1\r\n" \ "a=rtpmap:126 theora/90000\r\n" \ @@ -67,7 +69,7 @@ "a=rtpmap:31 H261/90000\r\n" \ "a=rtpmap:32 MPV/90000\r\n" \ "a=rtpmap:98 H264/90000\r\n" \ - "a=fmtp:98 profile-level-id=42e00a; packetization-mode=1; max-br=452; max-mbps=11880\r\n" \ + "a=fmtp:98 profile-level-id=42e01e; packetization-mode=1; max-br=452; max-mbps=11880\r\n" \ "a=recvonly\r\n" \ "m=toto 51372 RTP/AVP 31 32\r\n" \ "i=Video line\r\n" \ @@ -94,6 +96,8 @@ void test_sessions_client() char* temp; tmedia_type_t type = tmedia_video/*tmedia_msrp | tmedia_audio*//*| tmedia_video tmedia_msrp*/; + tdav_codec_set_priority(tdav_codec_id_vp8, 0); + mgr = tmedia_session_mgr_create(type, "192.168.0.13", tsk_false, tsk_true/* offerer */); diff --git a/branches/2.0/doubango/tinyDAV/tinyDAV.vcproj b/branches/2.0/doubango/tinyDAV/tinyDAV.vcproj index 4d0a3ecf..bf9c153d 100644 --- a/branches/2.0/doubango/tinyDAV/tinyDAV.vcproj +++ b/branches/2.0/doubango/tinyDAV/tinyDAV.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(PSDK_DIR)include";"$(DXSDK_DIR)include";..\thirdparties\win32\include;include;..\tinyMSRP\include;..\tinyRTP\include;..\tinyMEDIA\include;..\tinySDP\include;..\tinyNET\src;..\tinyDSHOW\include;..\tinySAK\src;..\thirdparties\win32\include\BroadVoice16\bvcommon;..\thirdparties\win32\include\BroadVoice16\bv16" - PreprocessorDefinitions="HAVE_G729=0;HAVE_BV16=0;HAVE_OPENCORE_AMR=1;HAVE_ILBC=0;HAVE_LIBGSM=1;HAVE_TINYDSHOW=1;HAVE_DSOUND_H=1;HAVE_WAVE_API=0;HAVE_FFMPEG=1;HAVE_SPEEX_DSP=1;HAVE_WEBRTC=1;HAVE_SPEEX_JB=1;HAVE_LIB_SPEEX=1;G192BITSTREAM=0;DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_WINDOWS;_USRDLL;_WIN32_WINNT=0x0501;TINYDAV_EXPORTS" + PreprocessorDefinitions="HAVE_G729=0;HAVE_BV16=0;HAVE_OPENCORE_AMR=1;HAVE_ILBC=0;HAVE_LIBGSM=1;HAVE_TINYDSHOW=1;HAVE_DSOUND_H=1;HAVE_WAVE_API=0;HAVE_FFMPEG=1;HAVE_SPEEX_DSP=1;HAVE_WEBRTC=1;HAVE_SPEEX_JB=1;HAVE_LIB_SPEEX=1;HAVE_LIBVPX=1;G192BITSTREAM=0;DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_WINDOWS;_USRDLL;_WIN32_WINNT=0x0501;TINYDAV_EXPORTS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -64,7 +64,7 @@ /> + + + + + + + + captureFormat->isRGB()) { #if _WIN32_WCE - hr = ConnectFilters(this->graphBuilder, this->sourceFilter, this->colorConvertor565) ; if(FAILED(hr))return hr; - hr = ConnectFilters(this->graphBuilder, this->colorConvertor565, this->sampleGrabberFilter) ; if(FAILED(hr))return hr; - hr = ConnectFilters(this->graphBuilder, this->sampleGrabberFilter, this->nullRendererFilter); if(FAILED(hr))return hr; + hr = ConnectFilters(this->graphBuilder, this->sourceFilter, this->colorConvertor565) ; if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } + hr = ConnectFilters(this->graphBuilder, this->colorConvertor565, this->sampleGrabberFilter) ; if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } + hr = ConnectFilters(this->graphBuilder, this->sampleGrabberFilter, this->nullRendererFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } #else - hr = ConnectFilters(this->graphBuilder, this->sourceFilter, this->frameRateFilter); if(FAILED(hr))return hr; - hr = ConnectFilters(this->graphBuilder, this->frameRateFilter, this->sampleGrabberFilter); if(FAILED(hr))return hr; - hr = ConnectFilters(this->graphBuilder, this->sampleGrabberFilter, this->nullRendererFilter); if(FAILED(hr))return hr; + hr = ConnectFilters(this->graphBuilder, this->sourceFilter, this->frameRateFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } + hr = ConnectFilters(this->graphBuilder, this->frameRateFilter, this->sampleGrabberFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } + hr = ConnectFilters(this->graphBuilder, this->sampleGrabberFilter, this->nullRendererFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } #endif } else @@ -212,10 +212,10 @@ HRESULT DSCaptureGraph::connect() hr = ConnectFilters(this->graphBuilder, this->colorConvertor565, this->sampleGrabberFilter) ; if(FAILED(hr))return hr; hr = ConnectFilters(this->graphBuilder, this->sampleGrabberFilter, this->nullRendererFilter); if(FAILED(hr))return hr; #else - hr = ConnectFilters(this->graphBuilder, this->sourceFilter, this->decompressorFilter); if(FAILED(hr))return hr; - hr = ConnectFilters(this->graphBuilder, this->decompressorFilter, this->frameRateFilter); if(FAILED(hr))return hr; - hr = ConnectFilters(this->graphBuilder, this->frameRateFilter, this->sampleGrabberFilter); if(FAILED(hr))return hr; - hr = ConnectFilters(this->graphBuilder, this->sampleGrabberFilter, this->nullRendererFilter); if(FAILED(hr))return hr; + hr = ConnectFilters(this->graphBuilder, this->sourceFilter, this->decompressorFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } + hr = ConnectFilters(this->graphBuilder, this->decompressorFilter, this->frameRateFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } + hr = ConnectFilters(this->graphBuilder, this->frameRateFilter, this->sampleGrabberFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } + hr = ConnectFilters(this->graphBuilder, this->sampleGrabberFilter, this->nullRendererFilter); if(FAILED(hr)) { TSK_DEBUG_ERROR("ConnectFilters failed"); return hr; } #endif } diff --git a/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_codec.h b/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_codec.h index 5988a48c..5391a4f2 100644 --- a/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_codec.h +++ b/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_codec.h @@ -105,7 +105,8 @@ TMEDIA_BEGIN_DECLS #define TMEDIA_CODEC_FORMAT_FFV1 "122" #define TMEDIA_CODEC_FORMAT_FFVHUFF "123" #define TMEDIA_CODEC_FORMAT_HUFFYUV "124" -//--> ONE MORE + +#define TMEDIA_CODEC_FORMAT_VP8 "125" #define TMEDIA_CODEC_FORMAT_THEORA "126" diff --git a/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_common.h b/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_common.h index 76d09b0a..75606b25 100644 --- a/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_common.h +++ b/branches/2.0/doubango/tinyMEDIA/include/tinymedia/tmedia_common.h @@ -103,6 +103,7 @@ typedef enum tmedia_chroma_e tmedia_chroma_t; // used by tinyWRAP +// keep order (low->unrestricted) typedef enum tmedia_bandwidth_level_e { tmedia_bl_low, @@ -114,6 +115,7 @@ tmedia_bandwidth_level_t; TINYMEDIA_API tmedia_type_t tmedia_type_from_sdp(const tsdp_message_t* sdp); TINYMEDIA_API int tmedia_parse_rtpmap(const char* rtpmap, char** name, int32_t* rate, int32_t* channels); +TINYMEDIA_API int tmedia_parse_video_fmtp(const char* fmtp, tmedia_bandwidth_level_t bl, unsigned* width, unsigned* height, unsigned* fps); TINYMEDIA_API const tmedia_video_size_t* tmedia_get_video_size(tmedia_chroma_t chroma, tsk_size_t size); TINYMEDIA_API int tmedia_get_video_quality(tmedia_bandwidth_level_t bl); #define tmedia_get_video_qscale tmedia_get_video_quality diff --git a/branches/2.0/doubango/tinyMEDIA/src/tmedia_common.c b/branches/2.0/doubango/tinyMEDIA/src/tmedia_common.c index d4d9cdd0..0bd967d1 100644 --- a/branches/2.0/doubango/tinyMEDIA/src/tmedia_common.c +++ b/branches/2.0/doubango/tinyMEDIA/src/tmedia_common.c @@ -31,6 +31,7 @@ #include "tinymedia/tmedia_session.h" +#include "tsk_params.h" #include "tsk_debug.h" #include /* atoi() */ @@ -122,6 +123,77 @@ int tmedia_parse_rtpmap(const char* rtpmap, char** name, int32_t* rate, int32_t* //} } + +int tmedia_parse_video_fmtp(const char* fmtp, tmedia_bandwidth_level_t bl, unsigned* width, unsigned* height, unsigned* fps) +{ + int ret = -2; + tsk_params_L_t* params = tsk_null; + const tsk_param_t* param = tsk_null; + const tsk_list_item_t* item; + int i; + + struct fmtp_size{ + const char* name; + tmedia_bandwidth_level_t min_bl; + unsigned width; + unsigned height; + }; + static const struct fmtp_size fmtp_sizes[] = + { + // from best to worst + {"CIF", tmedia_bl_medium, 352, 288}, + {"QCIF", tmedia_bl_low, 176, 144}, + {"SQCIF", tmedia_bl_low, 128, 96}, + }; + + if(!fmtp || !width || !height || !fps){ + TSK_DEBUG_ERROR("Invalid parameter"); + return -1; + } + + // set default values + *fps = 15; + switch(bl){ + case tmedia_bl_low: + default: + { + *width= 176; + *height = 144; + break; + } + case tmedia_bl_medium: + case tmedia_bl_hight: + case tmedia_bl_unrestricted: + { + *width= 352; + *height = 288; + break; + } + } + if((params = tsk_params_fromstring(fmtp, ";", tsk_true))){ + // set real values + tsk_list_foreach(item, params){ + if(!(param = TSK_PARAM(item->data)) || !param->name || !param->value){ + continue; + } + for(i=0;i= (int)fmtp_sizes[i].min_bl && tsk_striequals(fmtp_sizes[i].name, param->name)){ + *width= fmtp_sizes[i].width; + *height = fmtp_sizes[i].height; + *fps = atoi(param->value); + *fps = *fps ? 30/(*fps) : 15; + ret = 0; + goto done; + } + } + } +done: + TSK_OBJECT_SAFE_FREE(params); + } + + return ret; +} + static const tmedia_video_size_t tmedia_video_sizes[] = { {tmedia_vst_none , 176, 144},