aja-widget-io.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  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, int32_t datastream, WidgetInputSocket &inp);
  13. static bool GetWidgetInputSocketByXpt(InputXpt id, WidgetInputSocket &inp);
  14. static int32_t InputXptDatastreamIndex(InputXpt xpt);
  15. static NTV2Channel InputXptChannel(InputXpt xpt);
  16. static const char *InputXptName(InputXpt xpt);
  17. };
  18. // Firmware widget output socket connector
  19. struct WidgetOutputSocket {
  20. OutputXpt id;
  21. NTV2WidgetID widget_id;
  22. const char *name;
  23. int32_t datastream_index;
  24. static bool Find(const std::string &route, NTV2Channel channel, int32_t datastream, WidgetOutputSocket &out);
  25. static bool GetWidgetOutputSocketByXpt(OutputXpt id, WidgetOutputSocket &out);
  26. static int32_t OutputXptDatastreamIndex(OutputXpt xpt);
  27. static NTV2Channel OutputXptChannel(OutputXpt xpt);
  28. static const char *OutputXptName(OutputXpt xpt);
  29. };