001package net.bramp.ffmpeg.options;
002
003import java.beans.ConstructorProperties;
004
005/**
006 * Encoding options for audio.
007 *
008 * @author bramp
009 */
010public class AudioEncodingOptions {
011  /**
012   * Whether encoding is enabled.
013   *
014   * @deprecated Use {@link #isEnabled()} instead.
015   */
016  @Deprecated public final boolean enabled;
017
018  /**
019   * The codec name.
020   *
021   * @deprecated Use {@link #getCodec()} instead.
022   */
023  @Deprecated public final String codec;
024
025  /**
026   * The number of audio channels.
027   *
028   * @deprecated Use {@link #getChannels()} instead.
029   */
030  @Deprecated public final int channels;
031
032  /**
033   * The audio sample rate.
034   *
035   * @deprecated Use {@link #getSampleRate()} instead.
036   */
037  @Deprecated public final int sample_rate;
038
039  /**
040   * The audio sample format.
041   *
042   * @deprecated Use {@link #getSampleFormat()} instead.
043   */
044  @Deprecated public final String sample_format;
045
046  /**
047   * The bit rate.
048   *
049   * @deprecated Use {@link #getBitRate()} instead.
050   */
051  @Deprecated public final long bit_rate;
052
053  /**
054   * The audio quality.
055   *
056   * @deprecated Use {@link #getQuality()} instead.
057   */
058  @Deprecated public final Double quality;
059
060  /** Constructs audio encoding options with the specified parameters. */
061  @ConstructorProperties({
062    "enabled",
063    "codec",
064    "channels",
065    "sample_rate",
066    "sample_format",
067    "bit_rate",
068    "quality"
069  })
070  public AudioEncodingOptions(
071      boolean enabled,
072      String codec,
073      int channels,
074      int sample_rate,
075      String sample_format,
076      long bit_rate,
077      Double quality) {
078    this.enabled = enabled;
079    this.codec = codec;
080    this.channels = channels;
081    this.sample_rate = sample_rate;
082    this.sample_format = sample_format;
083    this.bit_rate = bit_rate;
084    this.quality = quality;
085  }
086
087  public boolean isEnabled() {
088    return enabled;
089  }
090
091  public String getCodec() {
092    return codec;
093  }
094
095  public int getChannels() {
096    return channels;
097  }
098
099  public int getSampleRate() {
100    return sample_rate;
101  }
102
103  public String getSampleFormat() {
104    return sample_format;
105  }
106
107  public long getBitRate() {
108    return bit_rate;
109  }
110
111  public Double getQuality() {
112    return quality;
113  }
114}