Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

int gp_camera_capture ( Camera camera,
CameraCaptureType  type,
CameraFilePath path,
GPContext context 
)

Captures an image, movie, or sound clip depending on the given type.

Parameters:
camera a Camera
type a CameraCaptureType
path a CameraFilePath
context a GPContext
Returns:
a gphoto2 error code
The resulting file will be stored on the camera. The location gets stored in path. The file can then be downloaded using gp_camera_file_get.

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

References CHECK_NULL, GP_ERROR_NOT_SUPPORTED, and GP_OK.

{
      CHECK_NULL (camera);
      CHECK_INIT (camera, context);

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

      CHECK_RESULT_OPEN_CLOSE (camera, camera->functions->capture (camera,
                                    type, path, context), context);

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


Generated by  Doxygen 1.6.0   Back to index