Sunteți pe pagina 1din 76

OPENSPHERICALCAMERA

v1.1.2

20/07/2016

SUMMARY

MANUFACTURERGUIDE
Introduction&Feedback
Overview
Discovery
OSCProtocol
a.info
b.state
c.commands
ErrorHandling
APISPECIFICATION
Overview
Commands
I.System&Connection
a.camera.startSession
b.camera.closeSession
c.camera.updateSession
d.camera.wifiMode
II.Recording&Shooting
a.camera.takePicture
b.camera._startRecording
c.camera._stopRecording
d.paramState
III.Navigate&GetInformation
a.camera._getAttributes
b.camera._listDirectory
c.camera._getStreamUrl
IV.Read,Edit&Delete
a.camera._readFile
b.camera._writeFile(unactive)
c.camera.delete
V.MetadataCommands
a.camera.getMetadata
b.camera._setMetadata
c.camera._patchMetadata
VI.ImageCommands
a.camera.getImage
b.camera._getImagePreview
c.camera.listImages
VII.Get&SetOptions
a.camera.getOptions
Giroptic360camOSC1

b.camera.setOptions
c.Options
d.Appendix
RevisionHistory

Giroptic360camOSC2

MANUFACTURERGUIDE

Giroptic360camOSC3

Introduction&Feedback

Welcome to the Giroptic Open Spherical Camera API. Your feedback helps us shape the
development of the API. This preview includes the Manufacturer Guide and API Specification.
DownloadPDFsofthelatestrevisionofbothdocumentsatthelinksbelow:
http://dev.360.tv/

We look forward to hearing your feedback on how we can improve the OSCAPI Specification and
Manufacturer Guide. Whetheryou'veencounteredengineeringpainpoints,confusingdocumentation,
or unexpected behavior, please let us know. Send any questions or comments you may have to
contact@giroptic.com

Overview

This guideprovidessphericalcameraAPIimplementationguidancetomanufacturersofcameraswith
built
inwifi.PleaserefertoOSCAPISpecificationforthefullsetofcommands.

Giroptic360camOSC4

Discovery

Discovery flow works as follows:the camera bringsupapassword protectedWiFinetworkto signal


its existence, the client can scan for suchnetworks, display themtothe user,and allowthe user to
connecttotherightonebyenteringthecorrectpasswordatleastonce.

Itconsistsof two parts for thecameraimplementation:definingaspecificSSIDtoallowclients tofind


andconnecttotherightpasswordprotectednetwork,andusingdefaultport80forHTTP.

SSIDandpasswordSSIDformat:
[Cameraname].OSC
ThewifiSSID shall start with a human
readablename (up to 20 characters),followingbydelimiter.
and OSC (OSC stands for Open Spherical Camera, the protocol used for communications
between clientsandcameras).Thecameranamecontainsmanufacturerselecteduserfriendlyname.
It is HIGHLY RECOMMENDED
to add some entropy to the end of the name to prevent name
collisions. For example, VendorCamera123.OSC, where 123is usedto differentiatebetween the
sametypeofcamerasnearby.

ThewifiMUST
beprotected with WPA2
PSK.The wifi password MUST
be at least 8characterslong
anditcancontainletters,numbers,symbols,butnospaces.Itcanbechangedonlywhenthecamera
is connected to the phone. Once it is changed, the camera will be disconnected and needs to be
reconnectedusingthenewpassword.

ThecameraMUST
provideareset mechanism in case the password isforgotten,e.g.aresetbutton
inthecameratorestorethedefaultpassword.

IPaddressandport:
ThecamerasIPaddress canbeobtained from thewificonnectionontheclientside.Forport,please
usedefaultport80forHTTP(portforupdatecanbeobtainedfromendpointsin/osc/info).

Giroptic360camOSC5

OSCProtocol

Afterthe camera has beendiscovered,communication betweenthe client and the cameraisdirectly


over the local network. All the following APIs are HTTP 1.1 based. API requests may be GET or
POSTrequests.Basically,thecameraneedstoimplementaHTTPserverforOSCprotocol.

Giroptic360camOSC6

a.info
Description
The/osc/infoAPIreturnsbasicinformationaboutthecameraandfunctionalityitsupports.

Input
Noinput.

Output
Name

Type

Description

manufacturer

String

Thecameramanufacturer.

model

String

Thecameramodel.

description

String

Descriptionofthecameramodel.

serialNumber

String

Serialnumber.

firmwareVersion

String

Currentfirmwareversion.

hardwareVersion

String

Currenthardwareversion.

supportUrl

String

URLforthecamerassupportwebpage.

gps

Boolean

TrueifthecamerahasGPS.

gyro

Boolean

Trueifthecamerahasgyroscope.

uptime

Integer

Numberofsecondssincethecameraboot.

api

StringArray ListofsupportedAPIs.

endpoints

Object

_vendorSpecific

[type]
(optional)

Detailsaboutthecamerasendpointsdescribedbelow.
Vendorspecificadditionalinfoaboutthecamera.

endpoints
:
isaJSONobjectcontaininginformationaboutthecamerasendpoints.

Name

Type

Description

httpPort

Integer

PortforHTTPserver.(Default80)

httpUpdatesPort

Integer

PorttoreceiveupdatesoverHTTP.

httpsPort
(Optional)

Integer

PortforHTTPsserver.(Default443)

Giroptic360camOSC7

httpsUpdatesPort
(Optional)

Integer

PorttoreceiveupdatesoverHTTPs.

Errors
Noerrors

Input&OutputExample
RequestInput

OutputResponse
{
"
manufacturer
":"XXXX",

"
model
":"XXXX",

"
description
":"XXXX",
"
serialNumber
":"XXXX",

"
firmwareVersion
":"XXXX",

"
hardwareVersion
":"XXXX",
"
supportUrl
":"XXXX",

"
gps
":XXXX,

"
gyro
":XXXX,

"
uptime
":XX,

"
api
":[

"/osc/info",
"/osc/state",
"/osc/checkForUpdates",
"/osc/commands/execute",
"/osc/commands/status"
],
"
endpoints
":{

"
httpPort
":XX,

"
httpUpdatesPort
":XX,

},
}

cURLExample
curlXGETH"contenttype:application/json"http://192.168.1.168/osc/info

Giroptic360camOSC8

b.state
Description
The /osc/state API returns state ofthecamera.The differencebetween this andtheinfoAPI is that
the state contains mutable parameters that wed like to be notified about the camera, (e.g. battery
level),while the info onlycontains static attributes ofthecamera (e.g. manufacturer orattributesthat
dontchangeoftenlikefirmwareversion).

Input
Noinput.

Output
Name

Type

Description

fingerprint

String

Fingerprint(uniqueidentifier)ofthecurrentcamerastate.

state

Object

State description of the camera according to the state


specificationbelow.

state:

isaJSONobjectcontaininginformationaboutthecamerastate.

Name

Type

Description

sessionId

String

IDofthecurrentsession.Onlyavailableifasessionisstart.

sessionTimeout

Integer

Remainingtimeofthecurrentsession.

_cameraState

String

Current state of the camera e.g.


"recording
"

"idle
"

"busy
"

"setting"or
"error

".

batteryLevel

Number

Expressed as an integer pointvalue of thebatteryremaining,


e.g.75(outof100).

storageChanged

Boolean

Trueifanew type ofstorage (e.g. a SD card ora USB drive)


is inserted/removed. (needed for Google OSC, always flase
forus)

TotalSpace

Integer

TotalavailablespaceinbytesonSDcard

remainingSpace

Integer

RemainingspaceinbytesonSDcard

remainingPictures

Integer

Remainingpicturescountavailabletocapturefor
image/burst/timelapsemodes

remainingVideo

Integer

Remainingrecordtimeavailableinsecondsforvideomode
Giroptic360camOSC9

_vendorSpecific

[type]
(optional)

Vendorspecificadditionalstateaboutthecamera.

Errors
Noerrors

Example
InputRequest

OutputResponse
{
"
fingerprint
":"XXXXXX",

"
state
":{

"
sessionId
":"XXXXXX",

"

sessionTimeout
":XX,

"

sessionExclusive
":XXXX,

"

_cameraState
":

"XXXX

",

"
batteryLevel
":XX,

"

totalSpace
":XX,

"

remaining
Space
":XX,
...
}
}

cURLExample
curlXGETH"contenttype:application/json"http://192.168.1.168/osc/state

Giroptic360camOSC10

c.commands
Description
ThecommandsAPIexecutesspecifiedcommandsonthecameraandchecksthestatus(in
progress,
doneetc.)of executed commands.Allcommandsneedtobeimplementedbasedonthespecification
intheOSCAPISpecification.

Note:
Afteracommandreturnsstatedoneandresults,orerrorstate,
thecameramayforgetaboutcommandID.
Responsetocommandcamera.getImage
needstobeContent
Type:
image/jpeg
whenthestateisdone.

Execute
The /osc/commands/execute API executes specified commands on the camera. The output is a
commandobject.

Input
Name

Type

Description

name

String

Nameofthecommandtobeexecuted.

parameters

Object

Command input parameters according to the command


definitionsspecification.
PleaserefertoOSCAPISpecificationforexamples.

Name

Type

Description

name

String

Nameofthecommand(sameasininput).

state

String

Stateofthecommand.Couldbeoneofthefollowing:
"
done
"
commandiscomplete,resultshasbeen
returnedinthisresponse
"
inProgress
"
commandexecutionisstillinprogress
"
error
"
commandhasfailed,seeerrorintheresponse

id
(Optional)

String

Command ID. This value is required forcommandsreturning


states inProgress. For example, the takePicture command
takesafewsecondsduetotheneedforstitching.

Output

Giroptic360camOSC11

results
(Optional)

Object

Command results. This value is required for commands


returning statedone if thecommandis expectedtoreturnany
results,e.g.

results
:
{

AAA
:BBB,
...
}.
PleaserefertoOSCAPISpecificationforexamples.

error
(Optional)

Object

Command error description. This value is required for


commandsreturningstateerror,e.g.

error
:
{

code
:badSessionId
}

progress
(Optional)

Object

Command progress description. This value is required for


commandsreturningstateinProgress,e.g.
progress:
{

completion
:X.X
}

Errors
ErrorCode
unknownCommand
cameraInExclusiveUse
missingParameter

Description
Commandexecutedisunknown.
Cameraisalreadyinexclusiveuse,newsessioncantbestarted.
Anyrequiredparameterisnotspecified.

invalidParameterName

Anyinputparameteroroptionnameisunrecognizedorsupported.

invalidParameterValue

Any input parameter or option name is recognized, but its value is


invalid for various reasons, for example, the sessionId doesn't exist
or it is not active any more or its type is incorrect or the
continuationTokenisoutofrangeortheoptionvalueisincorrect.

Giroptic360camOSC12

Input&OutputExample
InputRequest
{
"
parameters
":{

"
sessionId
":
"XXXXXX",

"
timeout
":XX
}
}

OutputResponse
{
"
results
":{

"
sessionId
":"XXXXXX",

"
timeout
":XX
}
}

ErrorOutput
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
":"parameter
sessionIdismissing"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.updateSession","parameters":{"sessionId":"XXXXXXXXXX","timeout":XX}}'

Giroptic360camOSC13

ErrorHandling

Pleaseusethe"200OK"statuscode forallerrorsdefinedinthisspecification.Forallothererrors,the
choice ofstatus code (e.g. 400or500) is atthe discretionofthemanufacturer.Theresponseshould
alwaysincludeaJSONbodyinthefollowingformatfor
ANY
errorcase:

{
"
name
":"camera.info",
"
state
":"error",
"
error
":{
"
code
":"serverError",
"
message
":"cannotgetcamerainfo."
}
}

name can be any of camera.info, camera.state, camera.checkForUpdates,


camera.commands.statusandcamera.commandName.

code should be serverError for5XXstatuscode,clientError for 4XX statuscodeand any of the


three(missingParameter,invalidParameterNameandinvalidParameterValue)for200statuscode.

messageisdefinedbymanufacturersandisnotexpectedtobealocalizedmessage.

Giroptic360camOSC14

APISPECIFICATION

Giroptic360camOSC15

Overview

This document describes a proposed set of commands for a variety ofoneclicksphericalcameras


(with builtin wifi). The goal is to allow any app on any camera (currenttarget is Android) tocontrol
anyconnectedsphericalcamerawhichimplementsthisAPI.

Commands

Commandsinput/output arein JSONformat andpartofHTTPrequest/responserespectively.Please


referto
OpenSphericalCameraAPIManufacturerGuide
formorecompleteexamples.

Giroptic360camOSC16

I.System&Connection

Giroptic360camOSC17

a.camera.startSession
Description
Startsasession thattimesout after a fixedinterval.Locksthecameratotherequestingclient,
andmakessurethecamerastayawake.

CommandParameters
Parameters
timeout
(optional)

Type
int

Description

PossibleInput

Requestedsessiontimeoutinseconds.
Ifnot omitted, the serverisresponsible
fordeterminingareasonabletimeout.

[0+

Results
Results

Errors

sessionId
:Unique identifierto beusedforthis cameraInExclusiveUse

: camera is alreadyin

session.
exclusiveuse,newsessioncantbestarted.

timeout
:Responded

session timeout in invalidParameterName


: any input parameter
seconds.
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, e.g. it is out of range or its type is
incorrect.

Input&Output
CommandInput
{
"
parameters
":{

"
timeout
":XX
}
}

CommandOutput
{
"
results
":{

"
sessionId
":"XXXXX",

"
timeout
":XX
}
}

OutputError
{
"
error
":{

"
code
":
"cameraInExclusiveUse",

"
message
":"camera
alreadyinexclusiveuse"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.startSession","parameters":{"timeout":XX}}'
Giroptic360camOSC18

b.camera.closeSession
Description
Disconnectsfromcamera
.

CommandParameters
Parameters
sessionId

Type

Description

String

PossibleInput

Uniquesession identifierobtainedfrom
thecamera.startSessioncommand.

Composedby10
characters.

Results
Results

Errors

Thiscommandreturnsnoresult.

missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXXX"
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
":
"parameter
sessionIdisincorrecttype"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.closeSession","parameters":{"sessionId":"XXXXXXXXXX"}}'

Giroptic360camOSC19

c.camera.updateSession
Description
Refreshesthesessiontimeout.

CommandParameters
Parameters

Type

sessionId

String

timeout
(optional)

int

Description

PossibleInput

Uniquesessionidentifier.

Composedby10
characters.

Requestedsessiontimeoutinseconds.
If it is omitted (HTTP request has no
body), the server is responsible for
determiningareasonabletimeout.

[0+

Results
Results

Errors

sessionId
:Unique identifierto beusedforthis missingParameter

: any required parameter is

session.
notspecified,e.g.sessionIdisnotspecified.

timeout
:Responded

session timeout in invalidParameterName


: any input parameter
seconds.
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXXX",

"
timeout
":XX
}
}

CommandOutput
{
"
results
":{

"
sessionId
":"XXXXXX",

"
timeout
":XX
}
}

OutputError
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
":
"parameter
sessionIdismissing"
}
}
Giroptic360camOSC20


cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.updateSession","parameters":{"sessionId":"XXXXXXXXXX","timeout":XX}}'

Giroptic360camOSC21

d.camera.wifiMode
Description
Sets the wifi mode of the camera. Options are APP mode, LAN mode, or OFF. Before
changing the mode, current session is closed. If the requested mode correspond to the wifi mode
configuredonthecamera,nothinghappen.

CommandParameters
Parameters

Type

Description

PossibleInput

sessionId

String

Unique session indentifier obtained


from
the
camera.startSession
command.

mode

String

Requestedwifimode

Composedby10
characters
LAN:Stationmode
direct:AccessPoint
mode
OFF:wifioff

Results
Results

Errors

Thiscommandreturnnoresult.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, e.g. it is out of range or its type is
incorrect.

invalidOperation
: wifiMode command isnt
availablewhencameraisonPoEmode

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXX",

"
mode
":XXXXX
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
":
"parameter
sessionIdismissing"
}
}
Giroptic360camOSC22


cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.wifiMode","parameters":{"sessionId":"XXXXXXXXXX","mode":"LAN"}}'

Giroptic360camOSC23

II.Recording&Shooting

Giroptic360camOSC24

a.camera.takePicture
Description
Captures equirectangular images when the captureMode option is specified as image or
_burst,savinglat/longcoordinatestoEXIF(ifyourcameraGPSisenabled).

CommandParameters
Parameters
sessionId

Type
String

Description

PossibleInput

Uniquesession identifierobtainedfrom
thecamera.startSessioncommand.

Composedby10
characters.

Results
Results

Errors

fileUri:
URLofthepicturetaken.

missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXXX"
}
}

CommandOutput
{
"
results
":{

"
fileUri
":"fileURI"
}
}

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
": "not available
onthiscaptureMode"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.takePicture","parameters":{"sessionId":"XXXXXXXXXX"}}'
Giroptic360camOSC25

b.camera._startRecording
Description
Starts recording video when the captureMode option is specified as _video. When the
cameracaptureModehasbeensetto_timelapse,beginscapturingpictures.

CommandParameters
Parameters
sessionId

Type

Description

String

PossibleInput

Uniquesession identifierobtainedfrom
thecamera.startSessioncommand.

Composedby10
characters.

Results
Results

Errors

Thiscommandreturnsnoresult.

missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXXX"
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
": "sessionIdtype
isinvalid"
}
}

Giroptic360camOSC26

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._startRecording","parameters":{"sessionId":"XXXXXXXXXX"}}'

Giroptic360camOSC27

c.camera._stopRecording
Description
Ends recording video whenthecaptureModeoptionisspecifiedas _video.Whenthecamera
captureModehasbeensetto_timelapse,endscapturingpictures.

CommandParameters
Parameters
sessionId

Type

Description

String

PossibleInput

Uniquesession identifierobtainedfrom
thecamera.startSessioncommand.

Composedby10
characters.

Results
Results

Errors

fileUri: URI of recorded video or the picture missingParameter


: any required parameter is

taken.
notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXXX"
}
}

CommandOutput
{
"
results
":{

}
}

"
fileUri
":"fileURI"

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
": "Camera is
busy"
}
}

Giroptic360camOSC28

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._stopRecording","parameters":{"sessionId":"XXXXXXXXXX"}}'

Giroptic360camOSC29

d.paramState
Description
This isthe camera serverpushcommand. Using thistechniquetheconnectionisheldopened
and new pieces of information can be pushed over that existing connection, from server to client,
withoutthe connection being closedand reopened as it iswith HTTP LongPolling. Theclientcan
thenrefreshinformationwheneverthereisachangeontheserver.

Input
Noinput

Output

Name

Type

Description

recordStatus

boolean

Indicatesifthecameraisinrecording/takepicturestate.

timelapseRecorded
Pictures

number

On timelapse mode, the camera returns the number of


recordedpictures.

convStatus

boolean

Indicates if the camera AE/AWB convergence flag is done


andthenreadytorecordpicture.

alertBatteryLevel

boolean

Indicatesthatthecameraisinlowbatterylevel(level<10%)

changingMode

object

powerDownStatus

boolean

Indicates when camera is in changing mode status. It has


twoentries:
changingFlag
: A boolean that becomes true when
thecameraischangingmode.

switchToCaptureMode
: A string representing the
new capturemodeto which the camerachanges.List
of capture mode: [_video, image, _burst,
_timelapse, _setting, _live] . Not available when
changingFlagisfalse.

Indicatesifthecameraisshuttingdown

Errors
Noerrors
Giroptic360camOSC30

Example
InputRequest

OutputResponse
{
"
recordStatus
":false,
"
timelapseRecordedPictures
":0,
"
convStatus
":false

cURLExample
curlXGETH"contenttype:application/json"http://192.168.1.168/osc/paramState

III.Navigate&GetInformation

Giroptic360camOSC31

a.camera._getAttributes
Description
Fetchesattributes/metadataoftheentityinthefilesystem
.

CommandParameters
Parameters
fileUri

Type
String

Description

PossibleInput

Pathofafileentrytogetattributesfor

"
mnt/mmc/DCIM/360C
AM01/
"

Results
Results

Errors

entry
:filesystementryobjectwhichcontentis: missingParameter
: any required parameter is

name
:nameoftheentryobject
notspecified,e.g.sessionIdisnotspecified.

kind
:fileordirectory

isLink
:istheentryobjectasymboliclinkornot

modificationTimeMs :timestampof entrymodification
time

sizeBytes
:sizeinbytes

videoDuration : if entry is a video file, duration in
seconds

videoWidth
:ifentryisavideofile,widthinpixels

videoHeight
:ifentryisavideofile,heightinpixels

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Input&Output
CommandInput
{
"
parameters
":{

"
fileUri
":"fileURI"
}
}

CommandOutput
{
"
results
":{

"
entry
":{
"
name
":
"360_XXXX.JPG",
"
kind
":"file",
"
isLink
":false,
"
modificatioTimeMs
"
:XXXXXXX,
"
sizeBytes
":XXX
}
}
}

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
":
"permissionDeniedorbadUri"
}
}

Giroptic360camOSC32


cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._getAttributes","parameters":{"fileUri
":"/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG"}}'

Giroptic360camOSC33

b.camera._listDirectory
Description
Lists content of a single directory. Thecontent are returned in theorder of modificationtime,
newestfirst.

CommandParameters
Parameters

Type

Description

PossibleInput

fileUri

String

Absolutepathofthedirectorytolist.

entryCount

int

Desirednumberofentriestoreturn.

continuationToken

String

Anopaque continuation tokenreturned


by previous
"
_listDirectory
" command,
can be used to retrieve next part of a
hugedirectory.

"
mnt/mmc/DCIM/360C
AM01/
"
[0+

]
Composedby10
characters.

Results
Results
entries
:listofentrieswhichcontentis:

name
:nameoftheentryobject

kind
:fileordirectory

isLink
:istheentryobjectasymboliclinkornot

modificationTimeMs :timestampof entrymodification
time

sizeBytes
:sizeinbytes

videoDuration : if entry is a video file, duration in
seconds

videoWidth
:ifentryisavideofile,widthinpixels

videoHeight
:ifentryisavideofile,heightinpixels

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

totalEntries
:totalnumberofentriestoreturn.

continuationToken
: it is set only if result is
complete. If the clientwishesto fetchremaining
entries, it should do another
"
_listDirectory
"
commandwithtokenset.

Giroptic360camOSC34

Giroptic360camOSC35

Input&Output
CommandInput

CommandOutput

{
{
"
parameters
":{
"
results
":{

"
fileUri
":"fileURI",
"
entries
":[

"
entryCount
":XX,
{

"
continuationToken
":
"
name
":
"XXXXXX"
"360_XXXX.JPG",
}
"
kind
":"file",
}
"
isLink
":false,
"
modificatioTimeMs
":
XXXXXX,
"
sizeBytes
":XXX
},
{
"
name
":"subdir",
"kind":"
directory
",
"
isLink
":true,
"
modificationTimeMs
"
:XXXXXX,
}
]

"
totalEntries
":XX,

"
continuationToken
":
"XXXXXX"
}
}

OutputError31
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
": "entryCount
parameterisunrecognized"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._listDirectory","parameters":{"fileUri":"/mnt/mmc/DCIM/360CAM01","entryCount":XX}}'

Giroptic360camOSC36

c.camera._getStreamUrl
Description
Gets network streaming (rtsp) URL from camera. This stream can be the main or preview
streamifsupported.

CommandParameters
Parameters

Type

Description

PossibleInput

sessionId

String

Uniquesession identifierobtainedfrom
thecamera.startSessioncommand.

type

String

Streamtype.

protocol

String

Streamprotocol

userName

String

UserIDforlivestreamauthentication

password

String

Userpasswordforlivestream
authentication

Composedby10
characters.
"
main
"
or
"
preview
"
"
rtsp
"
or
"
rtmp
"
"360camxxx"
"giroptic"

Note: userName and password options are needed(if defined)onPoEor BulBextension mode.
Theymustbedefinedwiththecommand:
camera.setLiveStreamAuthentication
Formoreinformation,refertothisdoc:
https://docs.google.com/document/d/1ws9hNFCmY9AO59pByQnyFbUevyrl4TrZ9HGgBGElAk/edit

Results
Results
url
:networkstreamURL.

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC37

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXXX",

"
type
":"streamtype",
"
protocol
":"streamprotocol"
}
}

CommandOutput
{
"
results
":{

"
url
":"streamURL"
}
}

OutputError
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
":
"input
parameterisunrecognized"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._getStreamUrl", "parameters": {"sessionId": "XXXXXXXXXX", "type": "XXXX", "protocol":
"XXXX"}}'

Giroptic360camOSC38

IV.Read,Edit&Delete

Giroptic360camOSC39

a.camera._readFile
Description
Reads content of a file, by default it reads the wholecontent,but user might chooseto read
onlyaparticularrange.

CommandParameters
Parameters

Type

Description

PossibleInput

fileUri

String

Pathofthefiletoread.

"
mnt/mmc/DCIM/360C
AM01/
"

range
(Optional)

Object

Range of the file to read, if not


provided content of the whole file is
returned.
Contains2parameters:
firstByte:
number
lastByte:
number

range
:{

firstByte
:XX,

lastByte
:XX
}

format
(Optional)

String

Content format of the file returned,


base64 or blob, if not provided, the
contentofthefileis
"
base64
"
encoded.

"
base64"or"blob
"

Results
Results

Errors

content
:content of thefilereturnedasbase64 missingParameter
: any required parameter is

encoded string orblobbinarydatadependingon notspecified,e.g.sessionIdisnotspecified.


the
format
parameter. If blob formatis chosen,
invalidParameterName
: any input parameter
httpbodyscontentisjustrequestedbinarydata.
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC40

Input&Output
CommandInput
{
"
parameters
":{

"
fileUri
":"fileURI",

"
range
":{
"firstByte":XX,
"lastByte":XX
},
"
format
":"XXXX"
}
}

CommandOutput
{
"
results
":{

"
content
":
content"
}
}

OutputError

{
"
error
":{
"format
"
code
":
"invalidParameterValue",

"
message
": "range input
parametersareincorrecttype"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._readFile","parameters":{"fileUri":"/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG"}}'

Giroptic360camOSC41

b.camera._writeFile(unactive)
Description
Writescontentintoafile,italsocancreatethefileifitdoesntexistyet.

CommandParameters
Parameters

Type

Description

PossibleInput

fileUri

String

Absolutepathofthefiletobewritten.

writeMode

String

Writecanhavethefollowingvalue:
"append"or"overwrite"
"append"
: the given content is
appendedtheendofthefile
"overwrite"
: given content
replace the current content of
thefile

mustNotExist
(optional)

content

Boolean Used to guarantee that existing file is


not overridden by this operation. Ifset
to true, thecommandwillfailincaseof
conflict, if unset or set to false an
existingfilewillbesilentlyoverridden.
String

"
mnt/mmc/DCIM/360C
AM01/
"

'
true
'
or
'
false
'

ContenttobewritteninBase64format.

Note
:
TherequestContentLength(fromrequestheader)
mustnotexceed1500Kbytessize.

Results
Results

Commanddoesnthaveanyresult.

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC42

Input&Output
CommandInput
{

"
parameters
":{

"
fileUri
":
"/mnt/mmc/file.txt",

"
content
":"AABBCC",

"
writeMode
":"overwrite",

"
mustNotExist
":false
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
": "internalserver
error"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._writeFile", "parameters": {"fileUri": "/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG", "writeMode":
"overwrite","content":"AABBCCDDEEaabbccdd1234"}}'

Giroptic360camOSC43

c.camera.delete
Description
Deletesasinglefileordirectory.

CommandParameters
Parameters
fileUri
recursive

Type
String

Description

PossibleInput

Path of the file or directory to be "


mnt/mmc/DCIM/360C
deleted.
AM01/
"

Boolean Whether to delete recursively, only


applied
for directory deletion.
Command fails when this parameter is
set to false, but the directory is not
empty.

'
true
'
or
'
false
'

Results
Results

Commanddoesnthaveanyresult.

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

unauthorizedCommand

Giroptic360camOSC44

Input&Output
CommandInput
{
"
parameters
":{

"
fileUri
":"fileURI"
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
": "needrecursive
flagfordirectory"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.delete", "parameters": {"fileUri": "/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG", "recursive":
XXXX}}'

Giroptic360camOSC45

V.MetadataCommands

Giroptic360camOSC46

a.camera.getMetadata
Description
GetsmetadataofafilegivenitsURI.ThefieldsofExifandXMParelistedinImageheader.

CommandParameters
Parameters
fileUri

Type
String

Description

PossibleInput

URIofthe fileto get metadatafor. Itis "


mnt/mmc/DCIM/360C
upto manufacturers todecidewhether
AM01/
"
to use absolute or relative URIs.
Clients may treat this as an opaque
identifier.

Results
Results

Errors

exif
: JSON object containing JPEG exif missingParameter
: any required parameter is

metadata(including GPS information).Does not notspecified,e.g.sessionIdisnotspecified.

includeimageorthumbnail.
invalidParameterName
: any input parameter

xmp
: JSON object containing Photosphere isunrecognized.

XMP.
invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC47

Input&Output
CommandInput
{
"
parameters
":{

"
fileUri
":"fileURI"
}
}

CommandOutput
{
"
results
":{

"
exif
":{

"
ImageWidth
":XX,

"
ImageLength
":XX,

.},
"
xmp
":{

"
ProjectionType
":

"XXXX",
"
UsePanoramaViewer
":
XXXX,
}
}
}

OutputError
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
": "parameter
fileUriismissing"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.getMetadata","parameters":{"fileUri":"/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG"}}'

Giroptic360camOSC48

b.camera._setMetadata
Description
When setting image metadata, the JSONdictionary mustbecomplete,andany tagsmissing
are considered deletionsandshouldbehandled,withamissingmandatorytagcausingthecommand
request toreturn failure.A clientshouldfetch thecurrentmetadataandmodifyitappropriatelybefore
settingit.

CommandParameters
Parameters

Type

Description

PossibleInput

fileUri

String

PathtoorIDofthefiletosetmetadata. "
mnt/mmc/DCIM/360C
AM01/
"

exif

Object

TIFF, Exif, and GPStag information in


JSONformat.

Results
Results

Commandhasnoreturnvalue.

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC49

Input&Output
CommandInput
{

"
parameters
":{

"
fileUri
":"fileURI",

"
exif
":{
"
ImageWidth
":
XX,
"
ImageHeight
":
XX,
"
GPSLatitude
":
XX,
"
GPSLongitude
":
XX
}
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
": "parameter
exifisunrecognized"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._setMetadata", "parameters": {"fileUri": /mnt/mmc/DCIM/360CAM01/360_XXXX.JPG ", "exif":
{"GPSLatitude":XX,"GPSLongitude":XX}}}'

Giroptic360camOSC50

c.camera._patchMetadata
Description
Whenpatchingimagemetadata,theJSONdictionaryisadeltatoapplyoverthecurrentimage
metadata, withthetag present adding toorreplacingmetadatainformationinthefile.Thisprovidesa
camera client with an easy way of adding or changing the Rating or RatingPercent tags, without
havingtofirstfetchthecurrentimagemetadata.

CommandParameters
Parameters

Type

Description

PossibleInput

fileUri

String

Path to or ID of the file to patch


metadata.

"
mnt/mmc/DCIM/360C
AM01/
"

exif

Object

TIFF, Exif, and GPStag information in


JSONformat.

Results
Results

Commandhasnoreturnvalue.

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC51

Input&Output
CommandInput
{

"
parameters
":{

"
fileUri
":"fileURI",

"
exif
":{
"
GPSLatitude
":
XX,
"
GPSLongitude
":
XX
}
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
": "parameter
exifisunrecognized"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._patchMetadata", "parameters": {"fileUri": "/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG", "exif":
{"GPSAltitude":XX}}}'

Giroptic360camOSC52

VI.ImageCommands

Giroptic360camOSC53

a.camera.getImage
Description
Returns a full
size or scaled image given its path. Input parameters include resolution. This
commandshouldreturn"Content
Type:image/jpeg"
.

CommandParameters
Parameters
fileUri

Type
String

maxSize
(optional)

Description

PossibleInput

URI of the target file. Manufacturers "


mnt/mmc/DCIM/360C
decide whether to use absolute or
AM01/
"
relative URIs.Clients maytreatthisas
anopaqueidentifier.

Number Maximum sizeof the requestedimage,


max
(scaledimage_width,
scaledimage_height).
Ifmissing,afull
sizeimageisreturned.
If maxSize is larger than full
size, a
full
sizeimageisreturnedtoo.

[0+

Results
Results

Errors

content
: image binary data, including missingParameter

: any required parameter is

corresponding (e.g. scaled) metadata in image notspecified,e.g.sessionIdisnotspecified.

header.
invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC54

Input&Output
CommandInput
{
"
parameters
":{

"
fileUri
":"fileURI",

"
maxSize
":XX
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
":
"invalid
maxSizeparameter"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.getImage", "parameters": {"fileUri": "/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG", "maxSize":
XX}}'

Giroptic360camOSC55

b.camera._getImagePreview
Description
Gets the media (video/image) thumbnail. Parameters include width, height andformat ofthe
thumbnail.

CommandParameters
Parameters

Type

Description

PossibleInput

fileUri

String

Path to or ID of the filetoget preview


for.

width

int

Widthoftheboundingbox.

[0+

height

int

Heightoftheboundingbox.

[0+

format

String

Content format of the file returned,


base64 or blob, if not provided, the
contentofthefileisbase64encoded.

"
mnt/mmc/DCIM/360C
AM01/
"

"
base64
"
,
"blob"

Results
Results
content
: Preview image data. Content is

returned as base64 encoded string or blob


binarydatadependingonthe
format
parameter.
If blob format is chosen, http bodys content is
justrequestedbinarydata.

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Giroptic360camOSC56

Input&Output
CommandInput
{
"
parameters
":{

"
fileUri
":"fileURI",

"
width
":XX,

"
height
":XX,
"
format
":"XXXX"
}
}

CommandOutput
{
"
results
":{

"
content
":"formatcontent"
}
}

*exampleonlywithbase64format.

OutputError
{
"
error
":{

"
code
":
"missingParameter",

"
message
": "parameter is
notspecified"
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera._getImagePreview", "parameters": {"fileUri": "/mnt/mmc/DCIM/360CAM01/360_XXXX.JPG",
"width":XX,"height":XX}}'

Giroptic360camOSC57

c.camera.listImages
Description
Lists all images of the camera.The images are returnedin the orderof capture time, newest
first.

CommandParameters
Parameters
entryCount

Type
int

maxSize

Description

PossibleInput
[0+

Desiresnumberofentriestoreturn.

Number Maximum size of thumbnail images,


max
(thumbnail_width,
thumbnail_height).Requiredonlywhen
includethumbistrue.

[1284096]

fileUri
(optinal)

String

Absolute path ofthe directory tolist all "/mnt/mmc/DCIM/360C


images. if it is omitted, the default
AM01/360B0018/"
directoryisused.

continuationToken
(optional)

String

An opaque continuation token of type


string, returned by previous listImages
call, used toretrievenextimages.Omit
this parameter for the first listImages
call.

Composedby10
characters.

Boolean Defaults to true. Use false to omit


thumbnailimagesfromtheresult.

'
true
'
or
'
false
'

includeThumb
(optional)

Results
Results*
entries
:

Alistofimageproperties.

Errors
missingParameter
: any required parameter is

notspecified,e.g.sessionIdisnotspecified.

totalEntries
:

Total number of entries in


storage.
invalidParameterName
: any input parameter

isunrecognized.
continuationToken
:
:(Optional)Setonlyifthe
result is incomplete. To fetchremaining entries, invalidParameterValue
: any input parameter

the clientshouldcalllistImagescommand again is recognized, but its valueis invalidfor various


withthetoken.
reasons, for example, the sessionId doesn't

exist or it is not active any more or its type is


*notes: This commandreturns amaximum of10 images
incorrect.
perresultandacontinuationToken.

Giroptic360camOSC58

Input&Output
CommandInput
{
"
parameters
":{

"
entryCount
":XX,

"
maxSize
":XX,

"
includeThumb
":XXXX

}
}

CommandOutput

OutputError

{
"
results
":{

"
entries
":[{

"
name
":"XXXX",

"
uri
":"imageURI",

"
size
":XX,

"
dateTimeZone
":"XXXX:XX:XX

XX:XX:XX+XX:XX"
"
lat
":XX

"
lng
":

XX
"
width
":XX

"
height
":XX

"
thumbnail
":"ENCODEDSTRING"

}
...
{
...
}
],
"
totalEntries
":XX,

"
continuationToken
":"XXXX"

}
}

{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
":
"parameter
continuationToken is out of
range."
}
}

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.listImages","parameters":{"entryCount":XX,"maxSize":XX,"includeThumb":XXXX}}'

Giroptic360camOSC59

VII.Get&SetOptions

Giroptic360camOSC60

a.camera.getOptions
Description
Getstheinformationforspecifiedproperties.

CommandParameters
Parameters

Type

Description

PossibleInput

sessionId

String

Uniquesession identifierobtainedfrom
thecamera.startSessioncommand.

Composedby10
characters.

optionNames

String
Array

Multiple names of properties to be


returned.

AlloptionNamesare
setonoptionstable.

Results
Results

Errors


JSON string with options specified in the missingParameter
: any required parameter is

optionNamesparameter
notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

UnauthorizedCommand

Input&Output
CommandInput
{
"
parameters
":{

"
sessionId
":"XXXXX",
"
optionNames
":[
"
captureMode
","
gps
",
"
_timelapseInterval
"
]
}
}

CommandOutput
{
"
results
":{
"
options
":{
"
captureMode
":"XXXX",
"
gps
":"XXXX",
"
_timelapseInterval
":XX
}
}
}

OutputError
{
"
error
":{

"
code
":
"invalidParameterName",

"
message
": "parameter
optionNamesisunrecognized"
}
}

Giroptic360camOSC61

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.getOptions", "parameters": {"sessionId": "XXXXXXXXXX", "optionNames": ["_videoFramerate",
"_videoBitrate"]}}'

Giroptic360camOSC62

b.camera.setOptions
Description
Sets the values for specified properties, e.g. GPS
on/off,
date & time, ISO, white balance,
shutterspeed,sleep/poweroffdelayetc.

CommandParameters
Parameters

Type

Description

PossibleInput

sessionId

String

Uniquesession identifierobtainedfrom
thecamera.startSessioncommand.

Composedby10
characters.

options

Object

Multiple properties (<key, value>pairs)


tobeset.

Alloptionsareseton
optionstable.

Results
Results

Errors


JSON string with options specified in the missingParameter
: any required parameter is

optionNamesparameter
notspecified,e.g.sessionIdisnotspecified.

invalidParameterName
: any input parameter
isunrecognized.

invalidParameterValue
: any input parameter

is recognized, but its valueis invalidfor various


reasons, for example, the sessionId doesn't
exist or it is not active any more or its type is
incorrect.

Input&Output
CommandInput
{

"
parameters
":{

"
sessionId
":"XXXXXX",
"
options
":{
"
captureMode
":"XXXX"
}
}
}

CommandOutput

OutputError
{
"
error
":{

"
code
":
"invalidParameterValue",

"
message
": "No valid
parameters"
}
}

Giroptic360camOSC63

cURLExample
curl X POST H "contenttype: application/json" http://192.168.1.168/osc/commands/execute d '{"name":
"camera.setOptions","parameters":{"sessionId":"XXXXXXXXXX","options":{"_videoBitrate":XX}}}'

Giroptic360camOSC64

c.Options

The following table shows all the options that can be changed and/or obtained by
camera.setOptions and camera.getOptions. An option cannot be changed when its corresponding
support isemptyoronlycontainsoneoption,e.g.when"shutterSpeedSupport"isempty(auto mode),
clients cannot setOptionsfor"shutterSpeed".So,itis cameras responsibility toupdatethe available
optionswheneverneeded.xxxSupportoptionsareNOTallowedtobesetbyclients.

Name

Type

Description

captureMode

String

Currentcapturemode.Defaultto_video.

captureModeSupport

StringArray

List of capture modes currently available.


[_video, image, _burst, _timelapse,
_setting, _live]._livemodeisnotavailableon
batterymode.

exposureMode

Number

Current exposure mode, default to 0 (auto


exposure).

exposureModeSupport

Number
Array

List of exposure modes currently available


ExposureMode.
0=Autoexposure
1=Manualexposure

shutterSpeed

Number

Currentshutterspeedsettinginmicroseconds.

shutterSpeedSupport

Number
Array

Listof shutter speedscurrentlyavailable,e.g.[50,


1002000,5000]or[]whenitisinautomode.

whiteBalance

String

Current white balance setting, e.g. _shadow.


Defaultto_auto_normal.

whiteBalanceSupport

StringArray

List of white balance settings currently available,


whichcanbeasubsetofourpredefinedlist:
[ _auto_wide, _auto_normal, _sunny,
_shadow,_indoor].

fileFormat

Object

Currentimagetypeandresolution,e.g.
{
type:jpeg,
width:4096,
height:2048
}

fileFormatSupport

ObjectArray List of the file formats currentlyavailable. Results


dependsonthecurrentcaptureMode,e.g.
[
Giroptic360camOSC65

{
type:mp4,
width:2048,
height:1024
},

{
type:jpeg,
width:4096,
height:2048
}
]
exposureDelay

Number

Current delay between the takePicture command


andwhentheexposureisstarted,inseconds.

exposureDelaySupport

Object

Range of exposure delays currently available, in


seconds.

{
"minDelay":0,
"maxDelay":60
}

hdr

Boolean

Turn HDR capture mode current status on/off.


Value must be true or false. Default value is
false. It can be set to true only when
hrdSupportistrue.

_hdrInCam*

Boolean

Turn embedded HDR status on/off. Default value


isfalse.

hdrSupport

Boolean

Value mustbe true or false depending onifthe


camerasupportsthis.

exposureBracket

Object

Currentexposurebracketsetting,withtwoentries,
"shots", anintegercontainingthenumberofshots
to betaken,and"increment",anumbercontaining
fstop increment between shots. Relevantif"hdr"
optionisenabled.
Forexample,
{
"shots":3,
"increment":[0,4,4]
}

Defaulttoempty"{}"when"hdr"isfalse.

Giroptic360camOSC66

exposureBracketSupport

Object

Exposurebracketsettingscurrentlyavailable,e.g.
{
"shotsSupport":[1,3,5,7],

"incrementSupport": [2, 1.67, 1.33, 1, 0.67,


0.33,0,,2]
}

Defaulttoempty"{}"if"hdr"isfalse.

_timelapseInterval

Number

Current interval between two consecutive


capturingpictureson_timelapsecaptureModein
seconds.

_timelapseIntervalSupport

Number
Array

Timelapse interval settings currently available in


seconds.[1,2,5,10,15,20,30]

_burstDuration

Number

Current duration in second of capturing pictures


on_burstcaptureMode.

_burstDurationSupport

Number
Array

Listof_burstmodedurationdelaysinseconds.

_videoBitrate

Number

Currentvideoencodingbitrateinbit/s.
minBitrate=500000
maxBitrate=20000000

_videoBitrateSupport

Object

Min and max encoding bitrate supported by the


camerainbit/s.

[5,10,15,30]

{
"min":500000,
"max:20000000
}
*Optionavailableonlyonlivemode
_videoFramerate

Number

Currentvideoframeratevalueinfps.
*Optionavailableonlyonlivemode

_videoFramerateSupport

Object

Min and max encoding frame rate supported by


thecamerainbit/s.

{
"min":5,
"max:30
}
*Optionavailableonlyonrecordmode

Giroptic360camOSC67

_recordFramerateBitrate

Number

videorecordingparameters:
0:30fps/15Mbps
1:25fps/20Mbps

Defautis1.

_sensorMode

String

Currentsensormodeusedin_videomode.
singleMode:asingleopticalsensorisused.
360Mode : the three optical sensors are used
outputtingasphericalvideo.
Defaultis360Mode

_sensorModeSupport

StringArray

Listofsensormodesavailablein_videomode.
[singleMode,360Mode]

_sensorNumber

Number

CurrentsensorusedinsingleMode:1,2or3.
Defaultis1.
Cf:360camsensorindex.

_sensorNumberSupport

Number
Array

List of _sensorNumber
available.
[1,2,3]

gyro

Boolean

Turn camera Gyroscope module on/off. Value


must be true or false. Default value is true It
can be set to true only when "gyroSupport" is
true.

gyroSupport

Boolean

If the camera has a gyroscope, this valueshould


betrue,otherwise,false.

_dpcMode

Boolean

Videodefectivepixelcorrectionmode.
false:softDPC(lessstrong)
true:hardDPC
Defaultvalueisfalse.

_rotationFlag

Boolean

Enable/Disable auto rotation metadata. Default


valueistrue.

gps*

Boolean

Turn camera GPS module on/off. Value must be


true or false. It can be set to true only when
"gpsSupport"istrue.

*:Optioncurrentlynotavailable.

gpsPosition

Object

gpsPosition help GPS to hang signal faster by


providing the position and the date/hour of the
moment.Theformatis:

parameter

inputs

Giroptic360camOSC68

{
lat:50.631909,
long:3.021227,
alt:19,
dateTime:2016:02:2917:16:55
}

Rangeofvaluecanbe:
Latitude:90&90with0.000001step
Longitude:180&180with0.000001step
Altitude:10000&10000with0.000001step
dateTime:YYYY:MM:DDHH:MM:SS
Timeshownin24hourformatinUTCformat.

Position must have an accuracy of atleast30km


and dateTime an accuracy of 3s. This operation
must be used only one time per session
otherwise, the gps need to be deactivate and
reactivate.
imageStabilization

String

Currentimagestabilizationoperation,e.g."off"
Alwaysoffwhengyroisfalse

imageStabilizationSupport

StringArray

Image stabilization operationscurrently available.


Ourpredefinedlistis:
[
"off",
"_horizontal_stabilization",
"_vibration_correction"].

totalSpace

Number

Numberofbytesoftotalstorage.Cannotbeset.

remainingSpace

Number

Numberofbytesoffreestorage.Cannotbeset.

remainingPictures

Number

Estimated number ofremainingpicturesbasedon


currentcapturesetting.Cannotbeset.

remainingVideo

Number

Remaining record time available in seconds for


videomode.Cannotbeset.

_SDcardState

Number

SDcardcurrentstate.
0:NoSDcard
1:BadFilesystemformatonSDcard
2:SDcardinsertedandmounted
3:SDcardfullmemoryspace

batteryLevel

Number

Expressedasapercentageofthebattery
remaining.

dateTimeZone

String

Current date and time information. May be set by


setOptions using phones date time and time
zone. The format is "YYYY:MM:DD HH:MM:SS
()HHMM" withtime shown in24hourformat,and
Giroptic360camOSC69

the date and time separated by one blank


character and one blank character betweentime
and time and time zone. Time zone is an offset
from the UTC time, e.g. 2014:05:18 01:04:29
+0200meansUTC+2.

Giroptic360camOSC70

d.Appendix

360camsensorindex

DirectoryArchitecture
Tofollowthedesign rulesfor camerafile system(DCF2.0standard),theSDcardisorganized
likethefollowingschematic.

Each folder in DCIMdirectory iscomposedof8characters 360CAMand2digits,startingat


01 and finish at 99. Only one folder is created at the time. A folder is created if the number of
files/foldersinthecurrent360CAMxxfolderis9999correspondingtoafullfolder.
Incasewherethereisa360CAM99folderfull,thecounterrestartsat360CAM01.

Giroptic360camOSC71

Insidea360CAMxxfolder,youcanhave:
2typesoffiles:
360_YYYY.JPG
360_YYYY.MP4
3typesoffolders:
360TYYYYforTimeLapsemode
360BYYYYforBurstmode
360HYYYYforHDRmode

Where YYYY is a number between 0000 and 9999. Like a 360CAMxx folder each file/folder is
composedof 8 characters(withoutextension) 360,letter ofthe mode : _ or TorBorHand
endingwithanumberstartingat0000till9999.

Thesameruleisapplyina360XYYYYfolder,exceptthatitcanthaveanotherfolderinthisone.
Ifafolderisfull(9999files)anewfolderiscreatedandthecounterrestartsfrom0000.

Giroptic360camOSC72

RevisionHistory

Title

Description

v1.0.3

camera._getStreamUrl

Changeofstreamtypedescription

possibleInput

AddedPossibleInputcolumnonCommandParameterstable

camera.listImages

Addedfunctioncamera.listImages

camera.setOptions

Addmultipleoptionscapability
Addoptions:
gyroSupport
Correctbugon:
batteryLevel

ManufacturerGuide

ManufacturerguideaddtotheOSC

v1.0.4

Options

Increasefunctionstability(setandget)
Addoptions:
_sensorMode
_sensorModeSupport
_sensorNumber
_sensorNumberSupport
Addinformation:
batteryIsCharging
Correctbugs:
shutterSpeed
batteryLevel
Updatedescriptions:
shutterSpeed
shutterSpeedSupport
gyroSupport

v1.0.5

DirectoryDescription

AdddirectoryarchitectureanditsoperationfollowingtheDCF2.0standard

v1.0.6

camera.listImages

AddfileUrioption
Changetheorderofimages(newestfirst)

camera._listDirectory

Changetheorderofcontent(newestfirst)

v1.0.7

Giroptic360camOSC73

camera._getStreamUrl
Options

Addprotocoloption

Addoptions:
_SDcardState
_hdrInCam

v1.0.8

Options

v1.0.9

command

Add
paramState
command(camerapushcommand)
AddgpsPositionoptions

state

Addsettingstatein_cameraStatevalue

Options

Add_settingincaptureModeSupportvalue

v1.1.0

camera._getAttributes

Add videoDuration, videoWidthand videoHeight parameters in


contentresultifentryisavideofile

camera._listDirectory

Add videoDuration, videoWidthand videoHeight parameters in


contentresultsifentryisavideofile

camera._getImagePreview

Addvideothumbnailcapability

v1.1.1

command

AddwifiModecommand

camera._getStreamUrl

AdduserNameandpasswordoptions

v1.1.2

NewexposureDelaySupportdefinition
ChangedateTimeZoneformat
Add_rotationFlagoption
Add_dpcModeoption
Add_recordFramerateBitrateoption

paramState

ChangechangingModetype
AddchangingFlagoption
AddswitchToCaptureMode

state

AddstorageChangedoptiontostatecommand.
RemovesessionExclusivefromstatecommand.

Options

AddremainingVideotoOptions
Giroptic360camOSC74

Giroptic360camOSC75

S-ar putea să vă placă și