|
@@ -404,3 +404,43 @@ void format_cmd_text(struct vcmd_entry *e, char *buf, unsigned int bufsz) {
|
404
|
404
|
break;
|
405
|
405
|
}
|
406
|
406
|
}
|
|
407
|
+
|
|
408
|
+void show_cmd(struct videohub_data *d, struct vcmd_entry *e) {
|
|
409
|
+ const char *prefix = "videohub: ";
|
|
410
|
+ switch (e->cmd) {
|
|
411
|
+ case CMD_INPUT_LABELS:
|
|
412
|
+ printf("%srename video input %d - \"%s\" to \"%s\"\n",
|
|
413
|
+ prefix,
|
|
414
|
+ e->port_no1, d->inputs[e->port_no1 - 1].name,
|
|
415
|
+ e->param2
|
|
416
|
+ );
|
|
417
|
+ break;
|
|
418
|
+ case CMD_OUTPUT_LABELS:
|
|
419
|
+ printf("%srename video output %d - \"%s\" to \"%s\"\n",
|
|
420
|
+ prefix,
|
|
421
|
+ e->port_no1, d->outputs[e->port_no1 - 1].name,
|
|
422
|
+ e->param2
|
|
423
|
+ );
|
|
424
|
+ break;
|
|
425
|
+ case CMD_VIDEO_OUTPUT_LOCKS:
|
|
426
|
+ printf("%s%s video output %d - \"%s\"\n",
|
|
427
|
+ prefix,
|
|
428
|
+ e->do_lock ? "lock" : (e->locked_other ? "force unlock" : "unlock"),
|
|
429
|
+ e->port_no1, d->outputs[e->port_no1 - 1].name
|
|
430
|
+ );
|
|
431
|
+ break;
|
|
432
|
+ case CMD_VIDEO_OUTPUT_ROUTING:
|
|
433
|
+ printf("%sset video output %d \"%s\" to read from input %d \"%s\"\n",
|
|
434
|
+ prefix,
|
|
435
|
+ e->port_no1, d->outputs[e->port_no1 - 1].name,
|
|
436
|
+ e->port_no2, d->inputs [e->port_no2 - 1].name
|
|
437
|
+ );
|
|
438
|
+ break;
|
|
439
|
+ case CMD_PROTOCOL_PREAMBLE:
|
|
440
|
+ case CMD_VIDEOHUB_DEVICE:
|
|
441
|
+ case CMD_PING:
|
|
442
|
+ case CMD_ACK:
|
|
443
|
+ case CMD_NAK:
|
|
444
|
+ break;
|
|
445
|
+ }
|
|
446
|
+}
|