Skip to main content

Import

Constructor

Parameters

Methods

getCapabilities, getExposureTime, setExposureTime, setControl

Use the shared control model for application settings. It exposes only observed properties and re-checks current choices before writes. Shutter speed and shutter angle share the shutterSpeed id (exposureTime is a search alias); converting units requires the actual frame rate. Native angle mode is preserved.
These writes require writable, advertised values; the examples do not establish support on every camera or in every shooting mode.

connect

Connect to a camera device.

disconnect

Disconnect from the camera device.

send

Send a PTP operation to the camera.

get

Get a camera property value.

set

Set a camera property value.

getStandardPropertyStates

Read the standard PTP properties advertised by the connected body and current USB mode. Each state includes code, codeHex, name, decoded value, raw value, writable, form (none, range, or enum), and any advertised choices/range.
Use this method before building controls for a generic or Olympus camera. Vendor recognition alone does not prove that a body publishes ISO, aperture, focus, or capture operations.

setStandardProperty

Set one recognized standard property. Darkgrade re-reads the live property descriptors, rejects absent and read-only properties, and rejects enum values the body did not advertise.
The physically tested Olympus E-PL5 MTP mode publishes battery level and writable date/time, but no exposure, focus, or remote-capture control. Newer Olympus bodies automatically expose any standard properties they actually advertise.

on

Register an event handler.

off

Unregister an event handler.

getAperture

Get the current aperture value.

setAperture

Set the aperture value.

getShutterSpeed

Get the current shutter speed value.

setShutterSpeed

Set the shutter speed value.

getIso

Get the current ISO value.

setIso

Set the ISO value.

captureImage

Capture an image from the camera.

captureLiveView

Capture a live view frame from the camera.

startRecording

Start video recording.

stopRecording

Stop video recording.

listObjects

List all objects stored on the camera.

getObject

Retrieve an object from the camera.

Exports

The module also exports the vendor-specific camera implementations:
  • CanonCamera
  • GenericCamera
  • NikonCamera
  • SonyCamera
These can be imported directly if you need vendor-specific functionality: