Class AbstractCodec

java.lang.Object
org.monte.media.av.AbstractCodec
All Implemented Interfaces:
Codec
Direct Known Subclasses:
AbstractAudioCodec, AbstractVideoCodec, AdjustTimeCodec, PassThroughCodec, TrimTimeCodec

public abstract class AbstractCodec extends Object implements Codec
AbstractCodec.
Author:
Werner Randelshofer
  • Field Details

    • inputFormats

      protected Format[] inputFormats
    • outputFormats

      protected Format[] outputFormats
    • inputFormat

      protected Format inputFormat
    • outputFormat

      protected Format outputFormat
    • name

      protected String name
  • Constructor Details

    • AbstractCodec

      public AbstractCodec(Format[] supportedInputFormats, Format[] supportedOutputFormats)
    • AbstractCodec

      public AbstractCodec(Format[] supportedInputOutputFormats)
  • Method Details

    • getInputFormats

      public Format[] getInputFormats()
      Description copied from interface: Codec
      Lists all of the input formats that this codec accepts.
      Specified by:
      getInputFormats in interface Codec
    • getOutputFormats

      public Format[] getOutputFormats(Format input)
      Description copied from interface: Codec
      Lists all of the output formats that this codec can generate with the provided input format. If the input format is null, returns all supported output formats.
      Specified by:
      getOutputFormats in interface Codec
    • setInputFormat

      public Format setInputFormat(Format f)
      Description copied from interface: Codec
      Sets the input format. Returns the format that was actually set. This is the closest format that the Codec supports. Returns null if the specified format is not supported and no reasonable match could be found.
      Specified by:
      setInputFormat in interface Codec
    • setOutputFormat

      public Format setOutputFormat(Format f)
      Description copied from interface: Codec
      Sets the output format. Returns the format that was actually set. This is the closest format that the Codec supports. Returns null if the specified format is not supported and no reasonable match could be found.
      Specified by:
      setOutputFormat in interface Codec
    • getInputFormat

      public Format getInputFormat()
      Specified by:
      getInputFormat in interface Codec
    • getOutputFormat

      public Format getOutputFormat()
      Specified by:
      getOutputFormat in interface Codec
    • getName

      public String getName()
      Description copied from interface: Codec
      Returns a human readable name of the codec.
      Specified by:
      getName in interface Codec
    • reset

      public void reset()
      Empty implementation of the reset method. Don't call super.
      Specified by:
      reset in interface Codec
    • toString

      public String toString()
      Overrides:
      toString in class Object