CBLCameraProperties

Objective-C

@protocol CBLCameraProperties <NSObject>

Swift

protocol CameraProperties : NSObjectProtocol

Camera property methods.

Clock

  • Attempt to update the camera’s internal clock to the given date/time.

    Note

    Olympus cameras can only update their time when the current command categories contains CBLCameraAvailableCommandCategoryFilesystemAccess.

    Only cameras that contain CBLCameraSupportedFunctionalityUpdateClock in their functionality flags support this operation.

    For cameras that support changing timezones, the camera’s timezone will be set to the current system timezone and the time will be set correctly — e.g., passing date as [NSDate new] will set the camera to the system’s timezone and the time will match the system’s time. If the camera’s time zone is CET before calling this method and the system’s time zone is PST, setting 2017-01-01 12:00:00 will set the camera to 2017-01-01 12:00:00 PST (equivalent to 2017-01-01 20:00:00 CET).

    For cameras that don’t support changing timezones, the camera’s time will be set to the given time and the camera’s time zone (if any) will remain unchanged — e.g., passing date as [NSDate new] will set the time to the system’s time, but the timezone will not change. If the camera’s time zone is CET before calling this method and the system’s time zone is PST, setting 2017-01-01 12:00:00 will set the camera to 2017-01-01 12:00:00 CET.

    In all cases, the user-visible date and time on the camera will match the value of date passed to this method. However, depending on the camera, the time zone may be incorrect, meaning that the camera’s system time may not technically be the intended time.

    • Canon: Timezone and DST will be set correctly.
    • Nikon: Timezone cannot be changed.
    • Olympus: Timezone will be set correctly.
    • Sony: System clock cannot be changed at all (this method will always return an error).
    • Panasonic: System clock cannot be changed at all (this method will always return an error).
    • Fujifilm: System clock cannot be changed at all (this method will always return an error).

    Declaration

    Objective-C

    - (void)updateClockTo:(nonnull NSDate *)date
        completionCallback:(nullable CBLErrorableOperationCallback)block;

    Swift

    func updateClock(to date: Date, completionCallback block: ErrorableOperationCallback? = nil)

    Parameters

    date

    The date/time to set.

    block

    The block to trigger when the value has been set or an error occurs.

Autoexposure

  • Returns the latest auto exposure measurement from the camera, or nil if AE is not currently running.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) CBLCameraAEResult *autoexposureResult;

    Swift

    var autoexposureResult: AEResult? { get }

Camera Properties

  • The known property identifiers, encoded as CBLPropertyIdentifier values in NSNumber objects. Observable with key-value observing.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSArray<NSNumber *> *knownPropertyIdentifiers;

    Swift

    var knownPropertyIdentifiers: [NSNumber] { get }
  • Returns a property object for the given identifier. If the property is currently unknown, returns an object with currentValue, validSettableValues, etc set to nil.

    The returned object is owned by the receiver, and the same object will be returned on subsequent calls to this method with the same identifier.

    Declaration

    Objective-C

    - (id<CBLCameraProperty> _Nonnull)propertyWithIdentifier:
        (CBLPropertyIdentifier)identifier;

    Swift

    func property(with identifier: PropertyIdentifier) -> CameraProperty

    Parameters

    identifier

    The property identifier to get a property object for.

  • Returns an array of property objects for the given category that have a non-nil currentValue.

    Declaration

    Objective-C

    - (NSArray<id<CBLCameraProperty>> *_Nonnull)populatedPropertiesInCategory:
        (CBLPropertyCategory)category;

    Swift

    func populatedProperties(in category: PropertyCategory) -> [CameraProperty]

    Parameters

    category

    The category for which to get properties.