Vendor-Specific
Stay organized with collections
Save and categorize content based on your preferences.
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:
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"
} |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[null,null,["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eThe Open Spherical Camera (OSC) API Specification starts with image support in API level 1 and adds video support in API level 2.\u003c/p\u003e\n"],["\u003cp\u003eCamera manufacturers can define custom commands and parameters, called Vendor Commands and Vendor Parameters, by prefixing them with an underscore (_).\u003c/p\u003e\n"],["\u003cp\u003eVendor-specific functionality can be implemented within the output of /osc/info and /osc/state APIs, as well as within OSC API commands and parameters.\u003c/p\u003e\n"],["\u003cp\u003eVendor Commands and Parameters must have alphanumeric names.\u003c/p\u003e\n"]]],["OSC API level 1 supports images, while level 2 adds video. Manufacturers can define custom commands and parameters (Vendor Commands/Parameters), which must be alphanumeric and prefixed with an underscore. Vendor-specific functionality can be found in the output of /osc/info and /osc/state APIs, in the commands for /osc/commands/execute, and in command parameters. Examples demonstrate `setOptions` with vendor-specific parameter `_video`, and a vendor-specific command, `_startRecording`.\n"],null,["# Vendor-Specific\n\nAPI 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*.\n\nThe name of the Vendor-specific commands and parameters must be alphanumeric and prefixed with an underscore ( _ ).\n\nVendor-specific functionality can happen in four places as follows:\n\n- [Output](/streetview/open-spherical-camera/guides/osc/info#output) of /osc/info API\n- [Output](/streetview/open-spherical-camera/guides/osc/state#output) of /osc/state API\n- [OSC API Specification](/streetview/open-spherical-camera/reference/camera), commands for /osc/commands/execute\n- [OSC API Specification](/streetview/open-spherical-camera/reference/camera), command parameters; for example, parameters for the `setOptions` and `getOptions` commands.\n\n| Example ------- ||\n|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Request (API 1)** | ```http 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\" } } ``` |\n| **Response** | ```http 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\" } ``` |\n| **Request** | ```http 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\", ... } } ``` |\n| **Response** | ```http 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\" } ``` |"]]