videohubctrl can be used to control Blackmagic Design Videohub SDI router device over the network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmd.h 989B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * === Commands processing ===
  3. *
  4. * Blackmagic Design Videohub control application
  5. * Copyright (C) 2014 Unix Solutions Ltd.
  6. * Written by Georgi Chorbadzhiyski
  7. *
  8. * Released under MIT license.
  9. * See LICENSE-MIT.txt for license terms.
  10. *
  11. */
  12. #ifndef CMD_H
  13. #define CMD_H
  14. #include <stdbool.h>
  15. enum vcmd {
  16. CMD_PROTOCOL_PREAMBLE,
  17. CMD_VIDEOHUB_DEVICE,
  18. CMD_INPUT_LABELS,
  19. CMD_OUTPUT_LABELS,
  20. CMD_VIDEO_OUTPUT_LOCKS,
  21. CMD_VIDEO_OUTPUT_ROUTING,
  22. CMD_PING,
  23. CMD_ACK,
  24. CMD_NAK,
  25. };
  26. bool parse_command(struct videohub_data *d, char *cmd);
  27. int parse_text_buffer(struct videohub_data *data, char *cmd_buffer);
  28. struct vcmd_entry {
  29. enum vcmd cmd;
  30. char *param1;
  31. char *param2;
  32. unsigned int port_no1;
  33. unsigned int port_no2;
  34. bool do_lock;
  35. bool locked_other;
  36. };
  37. void prepare_cmd_entry(struct videohub_data *d, struct vcmd_entry *e);
  38. void format_cmd_text(struct vcmd_entry *e, char *buf, unsigned int bufsz);
  39. void show_cmd(struct videohub_data *d, struct vcmd_entry *e);
  40. #endif