class ScreenRecorderAction extends AbstractDeviceAction {

  @VisibleForTesting
  static String getEmulatorScreenRecorderOptions(@NotNull Path filePath, @NotNull ScreenRecorderOptions options) {
    StringBuilder sb = new StringBuilder();

    if (options.width > 0 && options.height > 0) {
      sb.append("--size ");
      sb.append(options.width);
      sb.append('x');
      sb.append(options.height);
      sb.append(' ');
    }

    if (options.bitrateMbps > 0) {
      sb.append("--bit-rate ");
      sb.append(options.bitrateMbps * 1000000);
      sb.append(' ');
    }

    if (options.timeLimit > 0) {
      sb.append("--time-limit ");
      long seconds = TimeUnit.SECONDS.convert(options.timeLimit, options.timeLimitUnits);
      if (seconds > 180) {
        seconds = 180;
      }
      sb.append(seconds);
      sb.append(' ');
    }

    sb.append(filePath);

    return sb.toString();
  }

  public  ScreenRecorderAction(@NotNull Project project, @NotNull DeviceContext context);
  @VisibleForTesting  ScreenRecorderAction(@NotNull Project project, @NotNull DeviceContext context, @NotNull Features features);

}