ProxyVideoProducerCallback.cs 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.9
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace org.doubango.tinyWRAP {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class ProxyVideoProducerCallback : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal ProxyVideoProducerCallback(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(ProxyVideoProducerCallback obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~ProxyVideoProducerCallback() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. tinyWRAPPINVOKE.delete_ProxyVideoProducerCallback(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public ProxyVideoProducerCallback() : this(tinyWRAPPINVOKE.new_ProxyVideoProducerCallback(), true) {
  37. SwigDirectorConnect();
  38. }
  39. public virtual int prepare(int width, int height, int fps) {
  40. int ret = (SwigDerivedClassHasMethod("prepare", swigMethodTypes0) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_prepareSwigExplicitProxyVideoProducerCallback(swigCPtr, width, height, fps) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_prepare(swigCPtr, width, height, fps));
  41. return ret;
  42. }
  43. public virtual int start() {
  44. int ret = (SwigDerivedClassHasMethod("start", swigMethodTypes1) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_startSwigExplicitProxyVideoProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_start(swigCPtr));
  45. return ret;
  46. }
  47. public virtual int pause() {
  48. int ret = (SwigDerivedClassHasMethod("pause", swigMethodTypes2) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_pauseSwigExplicitProxyVideoProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_pause(swigCPtr));
  49. return ret;
  50. }
  51. public virtual int stop() {
  52. int ret = (SwigDerivedClassHasMethod("stop", swigMethodTypes3) ? tinyWRAPPINVOKE.ProxyVideoProducerCallback_stopSwigExplicitProxyVideoProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducerCallback_stop(swigCPtr));
  53. return ret;
  54. }
  55. private void SwigDirectorConnect() {
  56. if (SwigDerivedClassHasMethod("prepare", swigMethodTypes0))
  57. swigDelegate0 = new SwigDelegateProxyVideoProducerCallback_0(SwigDirectorprepare);
  58. if (SwigDerivedClassHasMethod("start", swigMethodTypes1))
  59. swigDelegate1 = new SwigDelegateProxyVideoProducerCallback_1(SwigDirectorstart);
  60. if (SwigDerivedClassHasMethod("pause", swigMethodTypes2))
  61. swigDelegate2 = new SwigDelegateProxyVideoProducerCallback_2(SwigDirectorpause);
  62. if (SwigDerivedClassHasMethod("stop", swigMethodTypes3))
  63. swigDelegate3 = new SwigDelegateProxyVideoProducerCallback_3(SwigDirectorstop);
  64. tinyWRAPPINVOKE.ProxyVideoProducerCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3);
  65. }
  66. private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
  67. System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
  68. bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ProxyVideoProducerCallback));
  69. return hasDerivedMethod;
  70. }
  71. private int SwigDirectorprepare(int width, int height, int fps) {
  72. return prepare(width, height, fps);
  73. }
  74. private int SwigDirectorstart() {
  75. return start();
  76. }
  77. private int SwigDirectorpause() {
  78. return pause();
  79. }
  80. private int SwigDirectorstop() {
  81. return stop();
  82. }
  83. public delegate int SwigDelegateProxyVideoProducerCallback_0(int width, int height, int fps);
  84. public delegate int SwigDelegateProxyVideoProducerCallback_1();
  85. public delegate int SwigDelegateProxyVideoProducerCallback_2();
  86. public delegate int SwigDelegateProxyVideoProducerCallback_3();
  87. private SwigDelegateProxyVideoProducerCallback_0 swigDelegate0;
  88. private SwigDelegateProxyVideoProducerCallback_1 swigDelegate1;
  89. private SwigDelegateProxyVideoProducerCallback_2 swigDelegate2;
  90. private SwigDelegateProxyVideoProducerCallback_3 swigDelegate3;
  91. private static Type[] swigMethodTypes0 = new Type[] { typeof(int), typeof(int), typeof(int) };
  92. private static Type[] swigMethodTypes1 = new Type[] { };
  93. private static Type[] swigMethodTypes2 = new Type[] { };
  94. private static Type[] swigMethodTypes3 = new Type[] { };
  95. }
  96. }