sony-camera-api - CameraRemoteAPIbeta - deleteCont

2019-01-29 07:58发布

问题:

In the reference guide of the Sony Camera Remote API SDK (Sony_CameraRemoteAPIbeta_API-Reference_v2.10.pdf) the methods deleteContent and getContentList are documented.

But using the Sony Camera Remote API SDK with a Sony QX1 the methods deleteContent and getContentList are not listed in the results of getAvailableApiList (neither in "Remote Shooting" nor "Contents Transfer" mode).

I assume that they are therefore not available?

How can the photos on the SD card be deleted or formatted?

Running getAvailableApiList does list actFormatStorage in "Remote Shooting" Mode. How can this be applied?

回答1:

I have been able to delete files from the camera using the following sequence of calls:

  • setCameraFunction to "Contents Transfer"
  • getSourceList to get storage location
  • getContentCount to get count of files
  • getContentList to get list of files on camera
  • parse content list to get file URI's
  • deleteContent to delete each file

I am also trying to figure out how to use the actFormatStorage, but no luck so far



回答2:

Check to make sure you have the latest firmware installed on your camera. The "deleteContent" API is only available in API version 1.1 and "getContentList" in API version 1.3.

Also, after re-reading your question the "getAvailableApiList" only returns methods that are part of the "camera" service. "deleteContent" and "getContentList" are part of the "avContent" service and they won't be listed when you call "getAvailableApiList".

Instead you should call "getMethodTypes" to list the methods of the "avContent" service. See the section on page 10 of the API reference called "Supported APIs and availalble APIs" for more details.