IUVCDrawer.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2014 - 2022 t_saki@serenegiant.com
  3. */
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using UnityEngine;
  7. namespace Serenegiant.UVC
  8. {
  9. /**
  10. * 与UVC相关的事件处理接口
  11. */
  12. public interface IUVCDrawer
  13. {
  14. /**
  15. * UVC设备已连接
  16. * @param manager 调用方UVCmanager
  17. * @param device 连接的UVC设备信息
  18. * @return true: 使用UVC机器, false: 不使用UVC机器
  19. */
  20. bool OnUVCAttachEvent(UVCManager manager, UVCDevice device);
  21. /**
  22. * UVC设备已拆除
  23. * @param manager 调用方UVCmanager
  24. * @param device 连接的UVC设备信息
  25. */
  26. void OnUVCDetachEvent(UVCManager manager, UVCDevice device);
  27. /**
  28. * IUVCDrawer获得是否能够描绘指定的UVC设备的影像
  29. * @param manager 调用方UVCmanager
  30. * @param device 连接的UVC设备信息
  31. */
  32. bool CanDraw(UVCManager manager, UVCDevice device);
  33. /**
  34. * 已开始从UVC设备获取视频
  35. * @param manager 调用方UVCmanager
  36. * @param device 连接的UVC设备信息
  37. * @param tex 从UVC设备接收视频的纹理对象
  38. */
  39. void OnUVCStartEvent(UVCManager manager, UVCDevice device, Texture tex);
  40. /**
  41. * 从UVC机器的影像取得结束
  42. * @param manager 调用方UVCmanager
  43. * @param device 连接的UVC设备信息
  44. */
  45. void OnUVCStopEvent(UVCManager manager, UVCDevice device);
  46. } // interface IUVCDrawer
  47. } // namespace Serenegiant.UVC