Package ptolemy.actor.lib.jmf
Class VideoCamera.PreAccessCodec
- java.lang.Object
-
- ptolemy.actor.lib.jmf.VideoCamera.PreAccessCodec
-
- All Implemented Interfaces:
javax.media.Codec,javax.media.Controls,javax.media.PlugIn
- Enclosing class:
- VideoCamera
public class VideoCamera.PreAccessCodec extends java.lang.Object implements javax.media.CodecA pass-through codec to access to individual frames.
-
-
Constructor Summary
Constructors Constructor Description PreAccessCodec()Construct a PreAccessCodec.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()In this class, do nothing.java.lang.ObjectgetControl(java.lang.String type)Get the control for a type.java.lang.Object[]getControls()Return the controls, in this case, an empty array of size 0.java.lang.StringgetName()Return the name of this codec.javax.media.Format[]getSupportedInputFormats()Return the supported input formats, which are YUV and RGB.javax.media.Format[]getSupportedOutputFormats(javax.media.Format in)Return the supported output formats.voidopen()In this class, do nothing.intprocess(javax.media.Buffer in, javax.media.Buffer out)Process a individual frame.voidreset()In this class, do nothing.javax.media.FormatsetInputFormat(javax.media.Format format)Set the input format.javax.media.FormatsetOutputFormat(javax.media.Format format)Set the output format.
-
-
-
Constructor Detail
-
PreAccessCodec
public PreAccessCodec() throws IllegalActionExceptionConstruct a PreAccessCodec.- Throws:
IllegalActionException- Not thrown in this base class.
-
-
Method Detail
-
getName
public java.lang.String getName()
Return the name of this codec.- Specified by:
getNamein interfacejavax.media.PlugIn- Returns:
- Always return "Pre-Access Codec".
-
open
public void open()
In this class, do nothing.- Specified by:
openin interfacejavax.media.PlugIn
-
close
public void close()
In this class, do nothing.- Specified by:
closein interfacejavax.media.PlugIn
-
reset
public void reset()
In this class, do nothing.- Specified by:
resetin interfacejavax.media.PlugIn
-
getSupportedInputFormats
public javax.media.Format[] getSupportedInputFormats()
Return the supported input formats, which are YUV and RGB.- Specified by:
getSupportedInputFormatsin interfacejavax.media.Codec- Returns:
- the supported input formats.
-
getSupportedOutputFormats
public javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
Return the supported output formats.- Specified by:
getSupportedOutputFormatsin interfacejavax.media.Codec- Parameters:
in- The input format. If the input format is null, then YUV and RGB format are returned. If the input format is non-null, then it is returned.- Returns:
- the supported output formats.
-
setInputFormat
public javax.media.Format setInputFormat(javax.media.Format format)
Set the input format.- Specified by:
setInputFormatin interfacejavax.media.Codec- Parameters:
format- The input format.- Returns:
- the input format.
-
setOutputFormat
public javax.media.Format setOutputFormat(javax.media.Format format)
Set the output format.- Specified by:
setOutputFormatin interfacejavax.media.Codec- Parameters:
format- The output format.- Returns:
- the output format.
-
process
public int process(javax.media.Buffer in, javax.media.Buffer out)Process a individual frame.- Specified by:
processin interfacejavax.media.Codec- Parameters:
in- The input buffer.out- The output buffer.- Returns:
- BUFFER_PROCESSED_OK if no exception was thrown.
-
getControls
public java.lang.Object[] getControls()
Return the controls, in this case, an empty array of size 0.- Specified by:
getControlsin interfacejavax.media.Controls- Returns:
- The controls.
-
getControl
public java.lang.Object getControl(java.lang.String type)
Get the control for a type.- Specified by:
getControlin interfacejavax.media.Controls- Parameters:
type- The type, which is ignored.- Returns:
- Always return null.
-
-