dm_camera_capture Function

public function dm_camera_capture(camera, output, command) result(rc)

Captures a single frame from a V4L2 device or RTSP stream with FFmpeg, and optionally adds a timestamp with GraphicsMagick. If the input is an RTSP stream, the URL must start with rtsp://.

The function returns the following error codes:

  • E_EMPTY if camera input or output is empty.
  • E_INVALID if camera device or RTSP stream URL is invalid.
  • E_IO if FFmpeg command execution failed.

Arguments

Type IntentOptional Attributes Name
type(camera_type), intent(in) :: camera

Camera type.

character(len=*), intent(in) :: output

Output file.

character(len=:), intent(out), optional, allocatable :: command

Executed command.

Return Value integer


Calls

proc~~dm_camera_capture~~CallsGraph proc~dm_camera_capture dm_camera_capture proc~dm_camera_device_is_valid dm_camera_device_is_valid proc~dm_camera_capture->proc~dm_camera_device_is_valid proc~dm_file_exists dm_file_exists proc~dm_camera_capture->proc~dm_file_exists proc~dm_string_starts_with dm_string_starts_with proc~dm_camera_capture->proc~dm_string_starts_with