Skip to main content
Skip table of contents

Capability

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
{
  "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" 
  ]
}

Defines how a capability is used:

  • Which action is performed.

  • What input parameters are expected (parameter name, which type and optional or required).

  • Which output is generated (parameter name, which type).

  • Device properties relevant for this capability (property name, type and kind (fix or dynamic)).

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

JSON
{
  "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
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.