Class CodecChain

java.lang.Object
org.monte.media.av.CodecChain
All Implemented Interfaces:
Codec

public class CodecChain extends Object implements Codec
CodecChain.
Author:
Werner Randelshofer
  • Constructor Details

    • CodecChain

      public CodecChain(Codec first, Codec second)
  • Method Details

    • createCodecChain

      public static Codec createCodecChain(List<Codec> codecs)
    • createCodecChain

      public static Codec createCodecChain(Codec... codecs)
    • 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 input)
      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
    • getInputFormat

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

      public Format setOutputFormat(Format output)
      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
    • getOutputFormat

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

      public int process(Buffer in, Buffer out)
      Description copied from interface: Codec
      Performs the media processing defined by this codec.

      Copies the data from the input buffer into the output buffer.

      Specified by:
      process in interface Codec
      Returns:
      A combination of processing flags.
    • 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()
      Description copied from interface: Codec
      Resets the state of the codec.
      Specified by:
      reset in interface Codec
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getElapsedTime

      public long getElapsedTime()
    • reportElapsedTime

      public String reportElapsedTime()