Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.codec.video.h263p
Class Packetizer

java.lang.Object
  extended by net.sf.fmj.media.AbstractControls
      extended by net.sf.fmj.media.AbstractPlugIn
          extended by net.sf.fmj.media.AbstractCodec
              extended by net.sf.fmj.media.AbstractPacketizer
                  extended by net.java.sip.communicator.impl.neomedia.codec.video.h263p.Packetizer
All Implemented Interfaces:
javax.media.Codec, javax.media.Controls, javax.media.PlugIn

public class Packetizer
extends net.sf.fmj.media.AbstractPacketizer

Packetizes H.263+ encoded data into RTP packets in accord with RFC 4529 "RTP Payload Format for ITU-T Rec. H.263 Video".

Author:
Sebastien Vincent, Lubomir Marinov

Field Summary
static int MAX_PAYLOAD_SIZE
          Maximum payload size without the headers.
 
Fields inherited from class net.sf.fmj.media.AbstractCodec
inputFormat, inputFormats, opened, outputFormat
 
Fields inherited from interface javax.media.PlugIn
BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
 
Constructor Summary
Packetizer()
          Initializes a new Packetizer instance which is to packetize H.263+ encoded data into RTP packets in accord with RFC 4529 "RTP Payload Format for ITU-T Rec.
 
Method Summary
 void close()
          Close this Packetizer.
 String getName()
          Get codec name.
 javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
          Return the list of formats supported at the output.
 void open()
          Open this Packetizer.
 int process(javax.media.Buffer inBuffer, javax.media.Buffer outBuffer)
          Processes (packetize) a buffer.
 javax.media.Format setInputFormat(javax.media.Format in)
          Sets the input format.
 javax.media.Format setOutputFormat(javax.media.Format out)
          Sets the Format in which this Codec is to output media data.
 
Methods inherited from class net.sf.fmj.media.AbstractPacketizer
doBuildPacketHeader, setDoNotSpanInputBuffers, setPacketSize, setPacketSizeImpl
 
Methods inherited from class net.sf.fmj.media.AbstractCodec
checkInputBuffer, dump, getInputFormat, getOutputFormat, getSupportedInputFormats, isEOM, propagateEOM
 
Methods inherited from class net.sf.fmj.media.AbstractPlugIn
reset
 
Methods inherited from class net.sf.fmj.media.AbstractControls
addControl, getControl, getControls, removeControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.media.PlugIn
reset
 
Methods inherited from interface javax.media.Controls
getControl, getControls
 

Field Detail

MAX_PAYLOAD_SIZE

public static final int MAX_PAYLOAD_SIZE
Maximum payload size without the headers.

See Also:
Constant Field Values
Constructor Detail

Packetizer

public Packetizer()
Initializes a new Packetizer instance which is to packetize H.263+ encoded data into RTP packets in accord with RFC 4529 "RTP Payload Format for ITU-T Rec. H.263 Video".

Method Detail

getName

public String getName()
Get codec name.

Specified by:
getName in interface javax.media.PlugIn
Overrides:
getName in class net.sf.fmj.media.AbstractPlugIn
Returns:
codec name

getSupportedOutputFormats

public javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
Return the list of formats supported at the output.

Specified by:
getSupportedOutputFormats in interface javax.media.Codec
Specified by:
getSupportedOutputFormats in class net.sf.fmj.media.AbstractCodec
Parameters:
in - input Format to determine corresponding output Format/tt>s
Returns:
array of formats supported at output

open

public void open()
          throws javax.media.ResourceUnavailableException
Open this Packetizer.

Specified by:
open in interface javax.media.PlugIn
Overrides:
open in class net.sf.fmj.media.AbstractPlugIn
Throws:
javax.media.ResourceUnavailableException - if something goes wrong during initialization of the Packetizer.

close

public void close()
Close this Packetizer.

Specified by:
close in interface javax.media.PlugIn
Overrides:
close in class net.sf.fmj.media.AbstractPlugIn

setInputFormat

public javax.media.Format setInputFormat(javax.media.Format in)
Sets the input format.

Specified by:
setInputFormat in interface javax.media.Codec
Overrides:
setInputFormat in class net.sf.fmj.media.AbstractCodec
Parameters:
in - format to set
Returns:
format

setOutputFormat

public javax.media.Format setOutputFormat(javax.media.Format out)
Sets the Format in which this Codec is to output media data.

Specified by:
setOutputFormat in interface javax.media.Codec
Overrides:
setOutputFormat in class net.sf.fmj.media.AbstractCodec
Parameters:
out - the Format in which this Codec is to output media data
Returns:
the Format in which this Codec is currently configured to output media data or null if format was found to be incompatible with this Codec

process

public int process(javax.media.Buffer inBuffer,
                   javax.media.Buffer outBuffer)
Processes (packetize) a buffer.

Specified by:
process in interface javax.media.Codec
Overrides:
process in class net.sf.fmj.media.AbstractPacketizer
Parameters:
inBuffer - input buffer
outBuffer - output buffer
Returns:
BUFFER_PROCESSED_OK if buffer has been successfully processed

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.