All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.itshidu.ffmpeg.job.FFmpegJob Maven / Gradle / Ivy

package com.itshidu.ffmpeg.job;

import javax.annotation.Nullable;

import com.itshidu.ffmpeg.FFmpeg;
import com.itshidu.ffmpeg.progress.ProgressListener;

import static com.google.common.base.Preconditions.checkNotNull;

/** @author bramp */
public abstract class FFmpegJob implements Runnable {

  public enum State {
    WAITING,
    RUNNING,
    FINISHED,
    FAILED,
  }

  final FFmpeg ffmpeg;
  final ProgressListener listener;

  State state = State.WAITING;

  public FFmpegJob(FFmpeg ffmpeg) {
    this(ffmpeg, null);
  }

  public FFmpegJob(FFmpeg ffmpeg, @Nullable ProgressListener listener) {
    this.ffmpeg = checkNotNull(ffmpeg);
    this.listener = listener;
  }

  public State getState() {
    return state;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy