aja-widget-io.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #include <ajantv2/includes/ntv2enums.h>
  3. #include <string>
  4. using OutputXpt = NTV2OutputCrosspointID; // src
  5. using InputXpt = NTV2InputCrosspointID; // dest
  6. // Firmware widget input socket connector
  7. struct WidgetInputSocket {
  8. InputXpt id;
  9. NTV2WidgetID widget_id;
  10. const char *name;
  11. int32_t datastream_index;
  12. static bool Find(const std::string &route, NTV2Channel channel,
  13. int32_t datastream, WidgetInputSocket &inp);
  14. static bool GetWidgetInputSocketByXpt(InputXpt id,
  15. WidgetInputSocket &inp);
  16. static int32_t InputXptDatastreamIndex(InputXpt xpt);
  17. static NTV2Channel InputXptChannel(InputXpt xpt);
  18. static const char *InputXptName(InputXpt xpt);
  19. };
  20. // Firmware widget output socket connector
  21. struct WidgetOutputSocket {
  22. OutputXpt id;
  23. NTV2WidgetID widget_id;
  24. const char *name;
  25. int32_t datastream_index;
  26. static bool Find(const std::string &route, NTV2Channel channel,
  27. int32_t datastream, WidgetOutputSocket &out);
  28. static bool GetWidgetOutputSocketByXpt(OutputXpt id,
  29. WidgetOutputSocket &out);
  30. static int32_t OutputXptDatastreamIndex(OutputXpt xpt);
  31. static NTV2Channel OutputXptChannel(OutputXpt xpt);
  32. static const char *OutputXptName(OutputXpt xpt);
  33. };