Copyright 2012-04-26 Werner Randelshofer

org.monte.media
Class PassThroughCodec

java.lang.Object
  extended by org.monte.media.AbstractCodec
      extended by org.monte.media.PassThroughCodec
All Implemented Interfaces:
Codec

public class PassThroughCodec
extends AbstractCodec

PassThroughCodec passes through all buffers in the specified time range.

Version:
$Id: PassThroughCodec.java 161 2012-01-31 12:51:31Z werner $
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class org.monte.media.AbstractCodec
inputFormat, inputFormats, name, outputFormat, outputFormats
 
Fields inherited from interface org.monte.media.Codec
CODEC_FAILED, CODEC_INPUT_NOT_CONSUMED, CODEC_OK, CODEC_OUTPUT_NOT_FILLED
 
Constructor Summary
PassThroughCodec()
           
 
Method Summary
 Rational getEndTime()
           
 Rational getStartTime()
           
 int process(Buffer in, Buffer out)
          Performs the media processing defined by this codec.
 void setEndTime(Rational newValue)
          Sets the end time of the buffers.
 Format setInputFormat(Format f)
          Sets the input format.
 void setStartTime(Rational newValue)
          Sets the start time of the buffers.
 
Methods inherited from class org.monte.media.AbstractCodec
getInputFormat, getInputFormats, getName, getOutputFormat, getOutputFormats, reset, setOutputFormat, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PassThroughCodec

public PassThroughCodec()
Method Detail

setStartTime

public void setStartTime(Rational newValue)
Sets the start time of the buffers.

Parameters:
newValue - Start time. Specify null, to pass through all buffers.

getStartTime

public Rational getStartTime()

getEndTime

public Rational getEndTime()

setEndTime

public void setEndTime(Rational newValue)
Sets the end time of the buffers.

Parameters:
newValue - Start time. Specify null, to pass through all buffers.

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
Overrides:
setInputFormat in class AbstractCodec

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.

Returns:
A combination of processing flags.

Copyright 2012-04-26 Werner Randelshofer