setup static method

Future<void> setup({
  1. required int width,
  2. required int height,
  3. required int fps,
  4. required int videoBitrate,
  5. required ProfileLevel profileLevel,
  6. required int audioChannels,
  7. required int audioBitrate,
  8. required int sampleRate,
  9. required String filepath,
})

setup encoder

Implementation

static Future<void> setup(
    {required int width,
    required int height,
    required int fps,
    required int videoBitrate,
    required ProfileLevel profileLevel,
    required int audioChannels,
    required int audioBitrate,
    required int sampleRate,
    required String filepath}) async {
  _createIntermediateDirectories(filepath);
  FlutterQuickVideoEncoder.width = width;
  FlutterQuickVideoEncoder.height = height;
  FlutterQuickVideoEncoder.fps = fps;
  FlutterQuickVideoEncoder.audioChannels = audioChannels;
  FlutterQuickVideoEncoder.sampleRate = sampleRate;
  FlutterQuickVideoEncoder.filepath = filepath;
  return await _invokeMethod('setup', {
    'width': width,
    'height': height,
    'fps': fps,
    'videoBitrate': videoBitrate,
    'profileLevel': profileLevel.toString().split('.')[1],
    'audioChannels': audioChannels,
    'audioBitrate': audioBitrate,
    'sampleRate': sampleRate,
    'filepath': filepath,
  });
}