ProxyVideoConsumerCallback.java 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. package org.doubango.tinyWRAP;
  9. public class ProxyVideoConsumerCallback {
  10. private long swigCPtr;
  11. protected boolean swigCMemOwn;
  12. protected ProxyVideoConsumerCallback(long cPtr, boolean cMemoryOwn) {
  13. swigCMemOwn = cMemoryOwn;
  14. swigCPtr = cPtr;
  15. }
  16. protected static long getCPtr(ProxyVideoConsumerCallback obj) {
  17. return (obj == null) ? 0 : obj.swigCPtr;
  18. }
  19. protected void finalize() {
  20. delete();
  21. }
  22. public synchronized void delete() {
  23. if (swigCPtr != 0) {
  24. if (swigCMemOwn) {
  25. swigCMemOwn = false;
  26. tinyWRAPJNI.delete_ProxyVideoConsumerCallback(swigCPtr);
  27. }
  28. swigCPtr = 0;
  29. }
  30. }
  31. protected void swigDirectorDisconnect() {
  32. swigCMemOwn = false;
  33. delete();
  34. }
  35. public void swigReleaseOwnership() {
  36. swigCMemOwn = false;
  37. tinyWRAPJNI.ProxyVideoConsumerCallback_change_ownership(this, swigCPtr, false);
  38. }
  39. public void swigTakeOwnership() {
  40. swigCMemOwn = true;
  41. tinyWRAPJNI.ProxyVideoConsumerCallback_change_ownership(this, swigCPtr, true);
  42. }
  43. public ProxyVideoConsumerCallback() {
  44. this(tinyWRAPJNI.new_ProxyVideoConsumerCallback(), true);
  45. tinyWRAPJNI.ProxyVideoConsumerCallback_director_connect(this, swigCPtr, swigCMemOwn, true);
  46. }
  47. public int prepare(int nWidth, int nHeight, int nFps) {
  48. return (getClass() == ProxyVideoConsumerCallback.class) ? tinyWRAPJNI.ProxyVideoConsumerCallback_prepare(swigCPtr, this, nWidth, nHeight, nFps) : tinyWRAPJNI.ProxyVideoConsumerCallback_prepareSwigExplicitProxyVideoConsumerCallback(swigCPtr, this, nWidth, nHeight, nFps);
  49. }
  50. public int consume(ProxyVideoFrame frame) {
  51. return (getClass() == ProxyVideoConsumerCallback.class) ? tinyWRAPJNI.ProxyVideoConsumerCallback_consume(swigCPtr, this, ProxyVideoFrame.getCPtr(frame), frame) : tinyWRAPJNI.ProxyVideoConsumerCallback_consumeSwigExplicitProxyVideoConsumerCallback(swigCPtr, this, ProxyVideoFrame.getCPtr(frame), frame);
  52. }
  53. public int bufferCopied(long nCopiedSize, long nAvailableSize) {
  54. return (getClass() == ProxyVideoConsumerCallback.class) ? tinyWRAPJNI.ProxyVideoConsumerCallback_bufferCopied(swigCPtr, this, nCopiedSize, nAvailableSize) : tinyWRAPJNI.ProxyVideoConsumerCallback_bufferCopiedSwigExplicitProxyVideoConsumerCallback(swigCPtr, this, nCopiedSize, nAvailableSize);
  55. }
  56. public int start() {
  57. return (getClass() == ProxyVideoConsumerCallback.class) ? tinyWRAPJNI.ProxyVideoConsumerCallback_start(swigCPtr, this) : tinyWRAPJNI.ProxyVideoConsumerCallback_startSwigExplicitProxyVideoConsumerCallback(swigCPtr, this);
  58. }
  59. public int pause() {
  60. return (getClass() == ProxyVideoConsumerCallback.class) ? tinyWRAPJNI.ProxyVideoConsumerCallback_pause(swigCPtr, this) : tinyWRAPJNI.ProxyVideoConsumerCallback_pauseSwigExplicitProxyVideoConsumerCallback(swigCPtr, this);
  61. }
  62. public int stop() {
  63. return (getClass() == ProxyVideoConsumerCallback.class) ? tinyWRAPJNI.ProxyVideoConsumerCallback_stop(swigCPtr, this) : tinyWRAPJNI.ProxyVideoConsumerCallback_stopSwigExplicitProxyVideoConsumerCallback(swigCPtr, this);
  64. }
  65. }