AI-generated Key Takeaways
-
The Open Spherical Camera (OSC) API Specification starts with image support in API level 1 and adds video support in API level 2.
-
Camera manufacturers can define custom commands and parameters, called Vendor Commands and Vendor Parameters, by prefixing them with an underscore (_).
-
Vendor-specific functionality can be implemented within the output of /osc/info and /osc/state APIs, as well as within OSC API commands and parameters.
-
Vendor Commands and Parameters must have alphanumeric names.
API level 1 of the OSC API Specification focuses on image type, and video support is added in API level 2. Camera manufacturers are encouraged to define custom commands and/or extend the parameter set of standard commands if needed. These are known as Vendor Commands and Vendor Parameters.
The name of the Vendor-specific commands and parameters must be alphanumeric and prefixed with an underscore ( _ ).
Vendor-specific functionality can happen in four places as follows:
- Output of /osc/info API
- Output of /osc/state API
- OSC API Specification, commands for /osc/commands/execute
- OSC API Specification, command parameters; for example, parameters for the
setOptions
andgetOptions
commands.
Example | |
---|---|
Request (API 1) | POST /osc/commands/execute HTTP/1.1 Host: [camera ip address]:[httpPort] Content-Type: application/json;charset=utf-8 Accept: application/json Content-Length: {CONTENT_LENGTH} X-XSRF-Protected: 1 { "name": "camera.setOptions", "parameters": { "sessionId": "12ABC3", "iso": 200, "exposureCompensation": -2, "captureMode": "_video" } } |
Response | HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 Content-Length: {CONTENT_LENGTH} X-Content-Type-Options: nosniff { "name": "camera.setOptions", "state": "done" } |
Request | POST /osc/commands/execute HTTP/1.1 Host: [camera ip address]:[httpPort] Content-Type: application/json;charset=utf-8 Accept: application/json Content-Length: {CONTENT_LENGTH} X-XSRF-Protected: 1 { "name": "camera._startRecording", "parameters": { "sessionId": "12ABC3", ... } } |
Response | HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 Content-Length: {CONTENT_LENGTH} X-Content-Type-Options: nosniff { "name": "camera._startRecording", "state": "done" } |