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.Codec
A 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 void
close()
In this class, do nothing.java.lang.Object
getControl(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.String
getName()
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.void
open()
In this class, do nothing.int
process(javax.media.Buffer in, javax.media.Buffer out)
Process a individual frame.void
reset()
In this class, do nothing.javax.media.Format
setInputFormat(javax.media.Format format)
Set the input format.javax.media.Format
setOutputFormat(javax.media.Format format)
Set the output format.
-
-
-
Constructor Detail
-
PreAccessCodec
public PreAccessCodec() throws IllegalActionException
Construct 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:
getName
in interfacejavax.media.PlugIn
- Returns:
- Always return "Pre-Access Codec".
-
open
public void open()
In this class, do nothing.- Specified by:
open
in interfacejavax.media.PlugIn
-
close
public void close()
In this class, do nothing.- Specified by:
close
in interfacejavax.media.PlugIn
-
reset
public void reset()
In this class, do nothing.- Specified by:
reset
in interfacejavax.media.PlugIn
-
getSupportedInputFormats
public javax.media.Format[] getSupportedInputFormats()
Return the supported input formats, which are YUV and RGB.- Specified by:
getSupportedInputFormats
in 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:
getSupportedOutputFormats
in 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:
setInputFormat
in 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:
setOutputFormat
in 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:
process
in 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:
getControls
in interfacejavax.media.Controls
- Returns:
- The controls.
-
getControl
public java.lang.Object getControl(java.lang.String type)
Get the control for a type.- Specified by:
getControl
in interfacejavax.media.Controls
- Parameters:
type
- The type, which is ignored.- Returns:
- Always return null.
-
-