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 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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_VIDEO_INPUT_STATUS,
  23. CMD_VIDEO_OUTPUT_STATUS,
  24. CMD_PING,
  25. CMD_ACK,
  26. CMD_NAK,
  27. };
  28. bool parse_command(struct videohub_data *d, char *cmd);
  29. int parse_text_buffer(struct videohub_data *data, char *cmd_buffer);
  30. struct vcmd_entry {
  31. enum vcmd cmd;
  32. char *param1;
  33. char *param2;
  34. unsigned int port_no1;
  35. unsigned int port_no2;
  36. bool do_lock;
  37. bool locked_other;
  38. };
  39. void prepare_cmd_entry(struct videohub_data *d, struct vcmd_entry *e);
  40. void format_cmd_text(struct vcmd_entry *e, char *buf, unsigned int bufsz);
  41. void show_cmd(struct videohub_data *d, struct vcmd_entry *e);
  42. #endif