Capability [VCon IG]
A capability describes what can be done with a device.
For example, a recorder device of type A may have a capability record. An recorder device of type B may have the capabilities record, looprecord and streamrecord. And a router may have the capability to switch.
Capabilities are provided by the adapter modules that connect VidiControl to specific recorders. In their content field it is then defined, which action should be taken, which input parameters are available and whether they are mandatory or optional. It also holds the events that may be thrown by the recorder adapter module and properties for the capability.
Capabilities and Devices are connected via a DeviceCapability object which also holds the values for the capability properties.
Apart from Capabilities for recording streams, there may also be capabilities for switching routers, controlling source devices etc.
Properties
Property | Possible Values | Example | Description |
---|---|---|---|
id | string | 0B | External ID of the capability. |
content | string (JSON) |
JSON
| Defines how a capability is used:
|
capabilityType | string (“Record”, “LoopRecord”, “Switch”, “LockSwitch”, “Storage”, “Turn”) | LoopRecord | Type of the capability. Basically which action can be performed with this capability. |
needsStopCommand | bool | true | For some devices special capabilities like “Record” cannot be started with a duration as parameter. Instead the recording has to be started and stopped. If this is the case, needsStopCommand is true. |
Example JSON Snippet
{
"id": "0B",
"content": "{\"action\":\"Record\",\"input\":{\"targetPath\":{\"type\":\"string\",\"optional\":\"true\"},\"profileName\":{\"type\":\"string\",\"optional\":\"true\"}},\"output\":{\"pathToFile\":{\"type\":\"string\"}},\"properties\":{\"preroll\":{\"type\":\"integer\",\"kind\":\"fix\"}}, \"events\": [ \"RecorderMock.fileCreated\", \"RecorderMock.recordingFailed\", \"RecorderMock.recordingStarted\", \"RecorderMock.recordingFinished\" ]}",
"capabilityType": "Record",
"needsStopCommand": true
}