RecorderConfiguration constructor

RecorderConfiguration({
  1. required DataSource dataSource,
  2. String logsDir = '',
  3. Map<HardwareSpecification, String>? hardwareSpecifications,
  4. List<DataType> recordedTypes = const <DataType>[],
  5. int minDurationSeconds = 30,
  6. Resolution videoQuality = Resolution.unknown,
  7. int chunkDurationSeconds = 0,
  8. bool continuousRecording = true,
  9. bool enableAudio = false,
  10. int maxDiskSpaceUsed = 0,
  11. int keepMinSeconds = 0,
  12. bool deleteOlderThanKeepMin = false,
  13. RecordingTransportMode transportMode = RecordingTransportMode.unknown,
})

Creates a RecorderConfiguration with the specified properties.

Parameters

  • IN dataSource The data source used for recording.
  • IN logsDir The directory used to keep the logs. Default is empty string.
  • IN hardwareSpecifications The device hardware specifications. Default is empty map.
  • IN recordedTypes The types that are recorded. Default is empty list.
  • IN minDurationSeconds The minimum recording duration for it to be saved. Default is 30.
  • IN videoQuality The video quality of the recording. Default is Resolution.unknown.
  • IN chunkDurationSeconds The chunk duration time in seconds. Default is 600.
  • IN continuousRecording Whether the recording should continue automatically after reaching the chunk duration. Default is true.
  • IN enableAudio Flag indicating whether audio should be recorded. Default is false.
  • IN maxDiskSpaceUsed Maximum disk space that recordings can occupy. Default is 0 (ignore disk limit).
  • IN keepMinSeconds Minimum seconds of recordings to retain on disk. Default is 0 (keep all recordings).
  • IN deleteOlderThanKeepMin Flag to delete older logs exceeding the keepMinSeconds threshold. Default is false.
  • IN transportMode The transport mode used at the time the log was recorded. Default is RecordingTransportMode.unknown.

Implementation

factory RecorderConfiguration({
  required DataSource dataSource,
  String logsDir = '',
  Map<HardwareSpecification, String>? hardwareSpecifications,
  List<DataType> recordedTypes = const <DataType>[],
  int minDurationSeconds = 30,
  Resolution videoQuality = Resolution.unknown,
  int chunkDurationSeconds = 0,
  bool continuousRecording = true,
  bool enableAudio = false,
  int maxDiskSpaceUsed = 0,
  int keepMinSeconds = 0,
  bool deleteOlderThanKeepMin = false,
  RecordingTransportMode transportMode = RecordingTransportMode.unknown,
}) {
  final RecorderConfiguration result = RecorderConfiguration._create();

  result.dataSource = dataSource;
  result.logsDir = logsDir;
  result.recordedTypes = recordedTypes;
  if (hardwareSpecifications != null) {
    result.hardwareSpecifications = hardwareSpecifications;
  }
  result.minDurationSeconds = minDurationSeconds;
  result.videoQuality = videoQuality;
  result.chunkDurationSeconds = chunkDurationSeconds;
  result.continuousRecording = continuousRecording;
  result.enableAudio = enableAudio;
  result.maxDiskSpaceUsed = maxDiskSpaceUsed;
  result.keepMinSeconds = keepMinSeconds;
  result.deleteOlderThanKeepMin = deleteOlderThanKeepMin;
  result.transportMode = transportMode;

  return result;
}