Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.monte.media
Class AbstractCodec

    java.lang.Object
      org.monte.media.AbstractCodec

All Implemented Interfaces:
  Codec

Direct Known Subclasses:
  AbstractAudioCodec, AbstractVideoCodec, PassThroughCodec

    public abstract class AbstractCodec

extends java.lang.Object
implements Codec

`AbstractCodec`.

Version:
  1.0 2011-03-12 Created.
Author:
  Werner Randelshofer

Field Summary
`protected Format` | `inputFormat`
`protected Format[]` | `inputFormats`
`protected java.lang.String` | `name`
`protected Format` | `outputFormat`
`protected Format[]` | `outputFormats`

Fields inherited from interface org.monte.media.Codec
`CODEC_FAILED, CODEC_INPUT_NOT_CONSUMED, CODEC_OK, CODEC_OUTPUT_NOT_FILLED`

Constructor Summary
`AbstractCodec(Format[] supportedInputOutputFormats)`
`AbstractCodec(Format[] supportedInputFormats, Format[] supportedOutputFormats)`

Method Summary
`Format` | `getInputFormat()`
`Format[]` | `getInputFormats()` Lists all of the input formats that this codec accepts.
`java.lang.String` | `getName()` Returns a human readable name of the codec.
`Format` | `getOutputFormat()`
`Format[]` | `getOutputFormats(Format input)` Lists all of the output formats that this codec can generate with the provided input format.
`void` | `reset()` Empty implementation of the reset method.
`Format` | `setInputFormat(Format f)` Sets the input format.
`Format` | `setOutputFormat(Format f)` Sets the output format.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.monte.media.Codec
`process`

Field Detail

### inputFormats

    protected Format[] inputFormats

### outputFormats

    protected Format[] outputFormats

### inputFormat

    protected Format inputFormat

### outputFormat

    protected Format outputFormat

### name

    protected java.lang.String name

Constructor Detail

### AbstractCodec

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

### AbstractCodec

    public AbstractCodec(Format[] supportedInputOutputFormats)

Method Detail

### 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 java.lang.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 java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD