net.sf.fmj.media.codec.video.jpeg
Class DePacketizer
java.lang.Object
net.sf.fmj.media.AbstractControls
net.sf.fmj.media.AbstractPlugIn
net.sf.fmj.media.AbstractCodec
net.sf.fmj.media.codec.video.jpeg.DePacketizer
- All Implemented Interfaces:
- Codec, Controls, PlugIn
public class DePacketizer
- extends AbstractCodec
- implements Codec
JPEG/RTP depacketizer Codec.
FMJ's functional equivalent of com.sun.media.codec.video.jpeg.DePacketizer.
Reassembles JPEG RTP packets into JPEG frames, as per
RFC 2035 - RTP Payload Format for JPEG Video. See http://www.rfc-archive.org/getrfc.php?rfc=2035
TODO: support restart markers
TODO: support q table headers
TODO: lunarphases.mov: when received, JMF puts extra stuff on the end that we don't.
- Author:
- Ken Larson, Martin Harvan
|
Constructor Summary |
DePacketizer()
Because packets can come out of order, it is possible that some packets for a newer frame
may arrive while an older frame is still incomplete. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DePacketizer
public DePacketizer()
- Because packets can come out of order, it is possible that some packets for a newer frame
may arrive while an older frame is still incomplete. However, in the case where we get nothing
but incomplete frames, we don't want to keep all of them around forever.
close
public void close()
- Specified by:
close in interface PlugIn- Overrides:
close in class AbstractPlugIn
getControl
public java.lang.Object getControl(java.lang.String controlType)
- Description copied from class:
AbstractControls
- Retrieve the first object that implements the given Class or Interface. The
full class name must be used. If the control is not supported then null is returned.
- Specified by:
getControl in interface Controls- Overrides:
getControl in class AbstractControls
- Returns:
- the object that implements the control, or null.
getControls
public java.lang.Object[] getControls()
- Description copied from class:
AbstractControls
- Retrieve an array of objects that control the object. If no controls are supported,
a zero length array is returned.
- Specified by:
getControls in interface Controls- Overrides:
getControls in class AbstractControls
- Returns:
- the array of object controls
getName
public java.lang.String getName()
- Specified by:
getName in interface PlugIn- Overrides:
getName in class AbstractPlugIn
getSupportedInputFormats
public Format[] getSupportedInputFormats()
- Specified by:
getSupportedInputFormats in interface Codec- Overrides:
getSupportedInputFormats in class AbstractCodec
getSupportedOutputFormats
public Format[] getSupportedOutputFormats(Format input)
- Specified by:
getSupportedOutputFormats in interface Codec- Specified by:
getSupportedOutputFormats in class AbstractCodec
open
public void open()
throws ResourceUnavailableException
- Specified by:
open in interface PlugIn- Overrides:
open in class AbstractPlugIn
- Throws:
ResourceUnavailableException
reset
public void reset()
- Specified by:
reset in interface PlugIn- Overrides:
reset in class AbstractPlugIn
setInputFormat
public Format setInputFormat(Format format)
- Specified by:
setInputFormat in interface Codec- Overrides:
setInputFormat in class AbstractCodec
setOutputFormat
public Format setOutputFormat(Format format)
- Specified by:
setOutputFormat in interface Codec- Overrides:
setOutputFormat in class AbstractCodec
process
public int process(Buffer input,
Buffer output)
- Specified by:
process in interface Codec- Specified by:
process in class AbstractCodec