Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_camera_capture_preview ( Camera camera,
CameraFile file,
GPContext context 

Captures a preview that won't be stored on the camera but returned in supplied file.

camera a Camera
file a CameraFile
context a GPContext
a gphoto2 error code
For example, you could use gp_capture_preview for taking some sample pictures before calling gp_capture.

Definition at line 989 of file gphoto2-camera.c.

References CHECK_NULL, GP_ERROR_NOT_SUPPORTED, gp_file_clean(), and GP_OK.

      CHECK_NULL (camera && file);
      CHECK_INIT (camera, context);

      CR (camera, gp_file_clean (file), context);

      if (!camera->functions->capture_preview) {
            gp_context_error (context, _("This camera can "
                  "not capture previews."));
            CAMERA_UNUSED (camera, context);
                return (GP_ERROR_NOT_SUPPORTED);

      CHECK_RESULT_OPEN_CLOSE (camera, camera->functions->capture_preview (
                              camera, file, context), context);

      CAMERA_UNUSED (camera, context);
      return (GP_OK);

Generated by  Doxygen 1.6.0   Back to index