BlenderBase.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /****************************************************************************
  2. * Copyright 2019 Nreal Techonology Limited. All rights reserved.
  3. *
  4. * This file is part of NRSDK.
  5. *
  6. * https://www.nreal.ai/
  7. *
  8. *****************************************************************************/
  9. namespace NRKernal.Record
  10. {
  11. using UnityEngine;
  12. public abstract class BlenderBase : IFrameConsumer
  13. {
  14. public virtual RenderTexture BlendTexture { get; protected set; }
  15. /// <summary> Gets or sets the width. </summary>
  16. /// <value> The width. </value>
  17. public int Width
  18. {
  19. get;
  20. protected set;
  21. }
  22. /// <summary> Gets or sets the height. </summary>
  23. /// <value> The height. </value>
  24. public int Height
  25. {
  26. get;
  27. protected set;
  28. }
  29. /// <summary> Gets the blend mode. </summary>
  30. /// <value> The blend mode. </value>
  31. public BlendMode BlendMode
  32. {
  33. get;
  34. protected set;
  35. }
  36. /// <summary> Gets or sets the number of frames. </summary>
  37. /// <value> The number of frames. </value>
  38. public int FrameCount
  39. {
  40. get;
  41. protected set;
  42. }
  43. public virtual void Init(Camera camera, IEncoder encoder, CameraParameters param) { }
  44. public virtual void OnFrame(UniversalTextureFrame frame) { }
  45. public virtual void Dispose() { }
  46. }
  47. }