public class VideoCamera.PreAccessCodec
extends java.lang.Object
implements javax.media.Codec
Modifier and Type | Field and Description |
---|---|
(package private) javax.media.Format |
input
The input format.
|
(package private) javax.media.Format |
output
The output format.
|
Constructor and Description |
---|
PreAccessCodec()
Construct a PreAccessCodec.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
accessFrame(javax.media.Buffer frame)
Callback to access individual video frames.
|
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.
|
(package private) javax.media.Buffer |
getFrame()
The code for a pass through codec.
|
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.
|
javax.media.Format input
javax.media.Format output
public PreAccessCodec() throws IllegalActionException
IllegalActionException
- Not thrown in this base class.void accessFrame(javax.media.Buffer frame)
frame
- The individual video frame.javax.media.Buffer getFrame() throws IllegalActionException
IllegalActionException
public java.lang.String getName()
getName
in interface javax.media.PlugIn
public void open()
open
in interface javax.media.PlugIn
public void close()
close
in interface javax.media.PlugIn
public void reset()
reset
in interface javax.media.PlugIn
public javax.media.Format[] getSupportedInputFormats()
getSupportedInputFormats
in interface javax.media.Codec
public javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
getSupportedOutputFormats
in interface javax.media.Codec
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.public javax.media.Format setInputFormat(javax.media.Format format)
setInputFormat
in interface javax.media.Codec
format
- The input format.public javax.media.Format setOutputFormat(javax.media.Format format)
setOutputFormat
in interface javax.media.Codec
format
- The output format.public int process(javax.media.Buffer in, javax.media.Buffer out)
process
in interface javax.media.Codec
in
- The input buffer.out
- The output buffer.public java.lang.Object[] getControls()
getControls
in interface javax.media.Controls
public java.lang.Object getControl(java.lang.String type)
getControl
in interface javax.media.Controls
type
- The type, which is ignored.