001package net.bramp.ffmpeg.info;
002
003import org.apache.commons.lang3.builder.EqualsBuilder;
004import org.apache.commons.lang3.builder.HashCodeBuilder;
005
006public class Filter {
007  /** Is timeline editing supported */
008  private final boolean timelineSupported;
009
010  /** Is slice based multi-threading supported */
011  private final boolean sliceThreading;
012
013  /** Are there command line options */
014  private final boolean commandSupport;
015
016  /** The filters name */
017  private final String name;
018
019  /** The input filter pattern */
020  private final FilterPattern inputPattern;
021
022  /** The output filter pattern */
023  private final FilterPattern outputPattern;
024
025  /** A short description of the filter */
026  private final String description;
027
028  public Filter(
029      boolean timelineSupported,
030      boolean sliceThreading,
031      boolean commandSupport,
032      String name,
033      FilterPattern inputPattern,
034      FilterPattern outputPattern,
035      String description) {
036    this.timelineSupported = timelineSupported;
037    this.sliceThreading = sliceThreading;
038    this.commandSupport = commandSupport;
039    this.name = name;
040    this.inputPattern = inputPattern;
041    this.outputPattern = outputPattern;
042    this.description = description;
043  }
044
045  public boolean isTimelineSupported() {
046    return timelineSupported;
047  }
048
049  public boolean isSliceThreading() {
050    return sliceThreading;
051  }
052
053  public boolean isCommandSupport() {
054    return commandSupport;
055  }
056
057  public String getName() {
058    return name;
059  }
060
061  public FilterPattern getInputPattern() {
062    return inputPattern;
063  }
064
065  public FilterPattern getOutputPattern() {
066    return outputPattern;
067  }
068
069  public String getDescription() {
070    return description;
071  }
072
073  @Override
074  public boolean equals(Object obj) {
075    return EqualsBuilder.reflectionEquals(this, obj);
076  }
077
078  @Override
079  public String toString() {
080    return name;
081  }
082
083  @Override
084  public int hashCode() {
085    return HashCodeBuilder.reflectionHashCode(this);
086  }
087}