Browse Source

Display the undocumented "Friendly name" device setting.

Georgi Chorbadzhiyski 9 years ago
parent
commit
c87a7538b9
5 changed files with 7 additions and 2 deletions
  1. 1
    0
      ChangeLog
  2. 2
    0
      cmd.c
  3. 1
    0
      data.h
  4. 2
    0
      display.c
  5. 1
    2
      test/test-17.ok

+ 1
- 0
ChangeLog View File

5
     --se-name, --se-connect, --se-clear, --se-lock, --se-unlock,
5
     --se-name, --se-connect, --se-clear, --se-lock, --se-unlock,
6
     --se-dir and --list-serial.
6
     --se-dir and --list-serial.
7
  * Add support for undocumented "Thunderbolt" port status/type.
7
  * Add support for undocumented "Thunderbolt" port status/type.
8
+ * Display the undocumented "Friendly name" device setting.
8
 
9
 
9
 2014-11-30 : Version 0.4
10
 2014-11-30 : Version 0.4
10
  * Add videohubctrl(1) man page.
11
  * Add videohubctrl(1) man page.

+ 2
- 0
cmd.c View File

266
 			}
266
 			}
267
 			else if ((p = parse_text(line, "Model name: ")))
267
 			else if ((p = parse_text(line, "Model name: ")))
268
 				snprintf(d->device.model_name, sizeof(d->device.model_name), "%s", p);
268
 				snprintf(d->device.model_name, sizeof(d->device.model_name), "%s", p);
269
+			else if ((p = parse_text(line, "Friendly name: ")))
270
+				snprintf(d->device.friendly_name, sizeof(d->device.friendly_name), "%s", p);
269
 			else if ((p = parse_text(line, "Unique ID: ")))
271
 			else if ((p = parse_text(line, "Unique ID: ")))
270
 				snprintf(d->device.unique_id, sizeof(d->device.unique_id) , "%s", p);
272
 				snprintf(d->device.unique_id, sizeof(d->device.unique_id) , "%s", p);
271
 			else if ((p = parse_text(line, "Video inputs: ")))
273
 			else if ((p = parse_text(line, "Video inputs: ")))

+ 1
- 0
data.h View File

25
 	bool			needs_fw_update;
25
 	bool			needs_fw_update;
26
 	char			protocol_ver[16];
26
 	char			protocol_ver[16];
27
 	char			model_name[MAX_NAME_LEN];
27
 	char			model_name[MAX_NAME_LEN];
28
+	char			friendly_name[MAX_NAME_LEN];
28
 	char			unique_id[MAX_NAME_LEN];
29
 	char			unique_id[MAX_NAME_LEN];
29
 	unsigned int	num_video_processing_units;
30
 	unsigned int	num_video_processing_units;
30
 };
31
 };

+ 2
- 0
display.c View File

45
 	printf("  | %-26s | %-34s |\n", "Device address", d->dev_host);
45
 	printf("  | %-26s | %-34s |\n", "Device address", d->dev_host);
46
 	printf("  | %-26s | %-34s |\n", "Device port", d->dev_port);
46
 	printf("  | %-26s | %-34s |\n", "Device port", d->dev_port);
47
 	printf("  | %-26s | %-34s |\n", "Model name", d->device.model_name);
47
 	printf("  | %-26s | %-34s |\n", "Model name", d->device.model_name);
48
+	if (d->device.friendly_name[0])
49
+		printf("  | %-26s | %-34s |\n", "Friendly name", d->device.friendly_name);
48
 	printf("  | %-26s | %-34s |\n", "Unique ID", d->device.unique_id);
50
 	printf("  | %-26s | %-34s |\n", "Unique ID", d->device.unique_id);
49
 	printf("  | %-26s | %-34s |\n", "Protocol", d->device.protocol_ver);
51
 	printf("  | %-26s | %-34s |\n", "Protocol", d->device.protocol_ver);
50
 	printf("  | %-26s | %-34u |\n", "Video inputs", d->inputs.num);
52
 	printf("  | %-26s | %-34u |\n", "Video inputs", d->inputs.num);

+ 1
- 2
test/test-17.ok View File

1
-WARNING: VIDEOHUB DEVICE command sent unknown line: 'Friendly name: SDI router on the 5th floor'
2
-Please report this line to author's email: georgi@unixsol.org
3
 WARNING: VIDEOHUB DEVICE command sent unknown line: 'Debug mode: true'
1
 WARNING: VIDEOHUB DEVICE command sent unknown line: 'Debug mode: true'
4
 Please report this line to author's email: georgi@unixsol.org
2
 Please report this line to author's email: georgi@unixsol.org
5
 WARNING: VIDEOHUB DEVICE command sent unknown line: 'Debug mode: yes'
3
 WARNING: VIDEOHUB DEVICE command sent unknown line: 'Debug mode: yes'
96
   | Device address             | sdi-matrix                         |
94
   | Device address             | sdi-matrix                         |
97
   | Device port                | 9990                               |
95
   | Device port                | 9990                               |
98
   | Model name                 | Blackmagic Workgroup Videohub      |
96
   | Model name                 | Blackmagic Workgroup Videohub      |
97
+  | Friendly name              | SDI router on the 5th floor        |
99
   | Unique ID                  | 465647757584                       |
98
   | Unique ID                  | 465647757584                       |
100
   | Protocol                   | 2.4                                |
99
   | Protocol                   | 2.4                                |
101
   | Video inputs               | 16                                 |
100
   | Video inputs               | 16                                 |

Loading…
Cancel
Save