ספציפי לספק
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
רמת API 1 של מפרט OSC API מתמקדת בסוג התמונה, ותמיכה בסרטונים נוספה ברמת API 2. אנחנו ממליצים ליצרני המצלמות להגדיר פקודות בהתאמה אישית או להרחיב את קבוצת הפרמטרים של הפקודות הסטנדרטיות לפי הצורך. הפרמטרים האלה מכונים פקודות ספק ופרמטרים של ספקים.
השמות של הפקודות והפרמטרים הספציפיים לספק חייבים להיות אלפאנומריים ולהיות עם קידומת של קו תחתון ( _ ).
פונקציונליות ספציפית לספק יכולה להתרחש בארבעה מקומות:
דוגמה |
בקשה (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"
}
} |
תגובה |
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"
} |
שליחת בקשה |
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",
...
}
} |
תגובה |
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"
} |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["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."]]],["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"]]