Events
You can receive camera events of the connected camera using the CameraEventListener
protocol.
Contents
Supported Camera Events
RICOH Camera Wireless SDK supports the following camera events:
imageStored
is called when image is stored to the camera storage.captureComplete
is called when capturing an image is completed.deviceDisconnected
is called when the camera you’ve already made a connection is disconnected.liveViewFrameUpdated
is called when live view frame data is updated.
Register Events
Override the virtual method corresponding to the event you want to receive in your derived class of CameraEventListener
.
You can also see Live View for an example of liveViewFrameUpdated
.
class UserEventListener: CameraEventListener {
func imageStored(sender: CameraDevice, image: CameraImage) {
print("Image Stored. Image Name: \(image.name)")
}
func captureComplete(sender: CameraDevice, capture: Capture) {
print("Capture Complete. Caputure ID: \(capture.id)")
}
func deviceDisconnected(sender: CameraDevice) {
print("Device Disconnected.")
}
}
And register the event listener as follows:
let userEventListener = UserEventListener()
cameraDevice.addEventListener(listener: userEventListener)
Registered events are called when corresponding events occur at CameraDevice
.
See Also
- Capture - Demonstrates how to capture images.
- Connection - Demonstrates how to make connections with cameras.
- Live View - Describes
liveViewFrameUpdated
.