我已經能夠讓我的a-7相機通過使用api拍照。不過,我試圖轉移這些圖像卡住了。通過下面的文檔我叫setCameraFunction使用下面的JSON將其更改爲內容傳輸模式:索尼Ilce-7相機遠程API無法更改爲「內容傳輸」模式
{"id":1,"error":[1,"Not Available Now"]}
下面是我用的是序列的輸出:
{"method":"setCameraFunction","params":["Contents Transfer"],"id":1,"version":"1.0"}
但相機總是返回取圖像(每個呼叫之間5秒暫停):
Request: {"method":"startRecMode","params":[],"id":1,"version":"1.0"}
Response: {"result":[0],"id":1}
Request: {"method":"getAvailableShootMode","params":[],"id":1,"version":"1.0"}
Response: {"result":["still",["still"]],"id":1}
Request: {"method":"actTakePicture","params":[],"id":1,"version":"1.0"}
Response: {"result":[["http:\/\/192.168.122.1:8080\/postview\/pict20170707_003048_0.JPG"]],"id":1}
Request: {"method":"stopRecMode","params":[],"id":1,"version":"1.0"}
Response: {"result":[0],"id":1}
Request: {"method":"getStorageInformation","params":[],"id":1,"version":"1.0"}
Response: {"id":1,"error":[1,"Not Available Now"]}
Request: {"method":"setCameraFunction","params":["Contents Transfer"],"id":1,"version":"1.0"}
Response: {"id":1,"error":[1,"Not Available Now"]}
有時getStorageInformation返回具有:
{
"result": [
[
{
"storageDescription": "Storage Media",
"numberOfRecordableImages": 3275,
"storageID": "Memory Card 1",
"recordTarget": true,
"recordableTime": -1
}
]
],
"id": 1
}
但是,嘗試更改爲內容模式時總會產生「現在不可用」。
我已經能夠使用actTakePicture函數生成的url訪問預覽圖像,但這是一個低分辨率圖像,它不適用於我們的應用程序。
在嘗試進入「Contents Transfer」模式之前,我也嘗試過沒有調用「stopRecMode」函數,但它沒有任何區別。試圖進入內容傳輸模式之前的「getEvent」功能的
輸出:
{
"result": [
{
"type": "availableApiList",
"names": [
"getVersions",
"getMethodTypes",
"getApplicationInfo",
"getAvailableApiList",
"getEvent",
"startRecMode",
"stopRecMode"
]
},
{
"cameraStatus": "NotReady",
"type": "cameraStatus"
},
null,
{
"type": "liveviewStatus",
"liveviewStatus": false
},
null,
[],
[],
null,
null,
null,
[],
null,
{
"cameraFunctionCandidates": [
"Contents Transfer",
"Remote Shooting"
],
"type": "cameraFunction",
"currentCameraFunction": "Remote Shooting"
},
null,
null,
null,
null,
null,
null,
{
"postviewImageSizeCandidates": [
"2M"
],
"type": "postviewImageSize",
"currentPostviewImageSize": "2M"
},
null,
{
"shootModeCandidates": [
"still"
],
"type": "shootMode",
"currentShootMode": "still"
},
null,
null,
null,
null,
null,
{
"fNumberCandidates": [],
"type": "fNumber",
"currentFNumber": "--"
},
null,
null,
null,
null,
{
"type": "shutterSpeed",
"shutterSpeedCandidates": [],
"currentShutterSpeed": "1/60"
},
{
"type": "whiteBalance",
"currentColorTemperature": -1,
"checkAvailability": true,
"currentWhiteBalanceMode": "Auto WB"
},
null
],
"id": 1
}
其他信息:
升級相機的最新固件(版本3.20),安裝了最新的智能遠端控制應用程序(版本4.30)。
我完全停留在這裏,任何建議都會很棒。
感謝