Module: GPhoto2::Camera::Capture
- Included in:
- GPhoto2::Camera
- Defined in:
- lib/gphoto2/camera/capture.rb
Instance Method Summary collapse
- #capture(type = :image) ⇒ GPhoto2::CameraFile
-
#preview ⇒ GPhoto2::CameraFile
Captures a preview from the camera.
-
#trigger ⇒ void
Triggers a capture and immedately returns.
Instance Method Details
#capture(type = :image) ⇒ GPhoto2::CameraFile
13 14 15 16 17 |
# File 'lib/gphoto2/camera/capture.rb', line 13 def capture(type = :image) save path = _capture(type) CameraFile.new(self, path.folder, path.name) end |
#preview ⇒ GPhoto2::CameraFile
Captures a preview from the camera.
Previews are not stored on the camera but are returned as data in a GPhoto2::CameraFile.
54 55 56 57 |
# File 'lib/gphoto2/camera/capture.rb', line 54 def preview save capture_preview end |
#trigger ⇒ void
This method returns an undefined value.
Triggers a capture and immedately returns.
A camera trigger is the first half of a #capture. Instead of returning a GPhoto2::CameraFile, a trigger immediately returns and the caller has to poll for events.
31 32 33 34 |
# File 'lib/gphoto2/camera/capture.rb', line 31 def trigger save trigger_capture end |