Class Packetizer
- java.lang.Object
-
- net.sf.fmj.media.AbstractControls
-
- net.sf.fmj.media.AbstractPlugIn
-
- net.sf.fmj.media.AbstractCodec
-
- net.sf.fmj.media.AbstractPacketizer
-
- org.jitsi.impl.neomedia.codec.video.h264.Packetizer
-
- All Implemented Interfaces:
javax.media.Codec,javax.media.Controls,javax.media.PlugIn
public class Packetizer extends net.sf.fmj.media.AbstractPacketizerPacketizes H.264 encoded data/NAL units into RTP packets in accord with RFC 3984 "RTP Payload Format for H.264 Video".- Author:
- Damian Minkov, Lyubomir Marinov
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_PAYLOAD_SIZEMaximum payload size without the headers.
-
Constructor Summary
Constructors Constructor Description Packetizer()Initializes a new Packetizer instance which is to packetize H.264 encoded data/NAL units into RTP packets in accord with RFC 3984 "RTP Payload Format for H.264 Video".
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close this Packetizer.StringgetName()Gets the name of this PlugIn.javax.media.Format[]getSupportedOutputFormats(javax.media.Format in)Return the list of formats supported at the output.voidopen()Open this Packetizer.intprocess(javax.media.Buffer inBuffer, javax.media.Buffer outBuffer)Processes (packetize) a buffer.javax.media.FormatsetInputFormat(javax.media.Format in)Sets the input format.javax.media.FormatsetOutputFormat(javax.media.Format format)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.AbstractControls
addControl, getControl, getControls, removeControl
-
-
-
-
Field Detail
-
MAX_PAYLOAD_SIZE
public static final int MAX_PAYLOAD_SIZE
Maximum payload size without the headers.- See Also:
- Constant Field Values
-
-
Method Detail
-
close
public void close()
Close this Packetizer.- Specified by:
closein interfacejavax.media.PlugIn- Overrides:
closein classnet.sf.fmj.media.AbstractPlugIn
-
getName
public String getName()
Gets the name of this PlugIn.- Specified by:
getNamein interfacejavax.media.PlugIn- Overrides:
getNamein classnet.sf.fmj.media.AbstractPlugIn- Returns:
- the name of this PlugIn
-
getSupportedOutputFormats
public javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
Return the list of formats supported at the output.- Specified by:
getSupportedOutputFormatsin interfacejavax.media.Codec- Specified by:
getSupportedOutputFormatsin classnet.sf.fmj.media.AbstractCodec- Parameters:
in- input Format to determine corresponding output Formats- Returns:
- array of formats supported at output
-
open
public void open() throws javax.media.ResourceUnavailableExceptionOpen this Packetizer.- Specified by:
openin interfacejavax.media.PlugIn- Overrides:
openin classnet.sf.fmj.media.AbstractPlugIn- Throws:
javax.media.ResourceUnavailableException- if something goes wrong during initialization of the Packetizer.
-
process
public int process(javax.media.Buffer inBuffer, javax.media.Buffer outBuffer)Processes (packetize) a buffer.- Specified by:
processin interfacejavax.media.Codec- Overrides:
processin classnet.sf.fmj.media.AbstractPacketizer- Parameters:
inBuffer- input bufferoutBuffer- output buffer- Returns:
- BUFFER_PROCESSED_OK if buffer has been successfully processed
-
setInputFormat
public javax.media.Format setInputFormat(javax.media.Format in)
Sets the input format.- Specified by:
setInputFormatin interfacejavax.media.Codec- Overrides:
setInputFormatin classnet.sf.fmj.media.AbstractCodec- Parameters:
in- format to set- Returns:
- format
-
setOutputFormat
public javax.media.Format setOutputFormat(javax.media.Format format)
Sets the Format in which this Codec is to output media data.- Specified by:
setOutputFormatin interfacejavax.media.Codec- Overrides:
setOutputFormatin classnet.sf.fmj.media.AbstractCodec- Parameters:
format- 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
-
-