TRVCamErrorEvent

<< Click to display table of contents >>

TRVCamErrorEvent

Unit [VCL and LCL] MRVType;

Unit [FMX] fmxMRVType;

type
  TRVCamErrorSource = (rvcesFFmpeg, rvcesGStreamer, 
    rvcesWebCamera, rvcesFilePlayer);
 
  TRVCamErrorEvent = procedure (Sender: TObject; 
    Source: TRVCamErrorSource;
    const ErrorCode: Integer; const ErrorString: String
    var IsCritical: Boolean) of object;

This is the type of the following events:

TRVAudioPlayer.OnError (on recording audio)

TRVCamera.OnError (on receiving or remuxing video)

TRVCamRecoder.OnError (on recording video).

These events allows handling errors and warnings.

Parameters

Source – error source (FFmpeg decoding or encoding, or GStreamer decoding, web camera (video capture device), local file player).

ErrorCode – numeric error code. Error codes are platform-dependent. For example, RVMedia uses different methods to access video capture devices on Windows, macOS, and Linux, each with its own set of possible error codes.

ErrorString – human readable error message (in English)

If IsCritical = True, the error is critical, and the operation will be interrupted. Any value assigned to IsCritical in this event will be ignored.

If IsCritical = False, the error is considered a warning, and the operation will continue. However, you can set IsCritical := True in the event handler to stop the current operation.