SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.media.codec.video.h264
Class JNIDecoder

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.java.sip.communicator.impl.media.codec.video.h264.JNIDecoder
All Implemented Interfaces:
javax.media.Codec, javax.media.Controls, javax.media.PlugIn

public class JNIDecoder
extends net.sf.fmj.media.AbstractCodec
implements javax.media.Codec

Decodes incoming rtp data of type h264 and returns the result frames in RGB format.

Author:
Damian Minkov, Lubomir Marinov

Field Summary
 
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
JNIDecoder()
          Constructs new h264 decoder
 
Method Summary
 boolean checkFormat(javax.media.Format format)
           
 void close()
           
protected  javax.media.Format[] getMatchingOutputFormats(javax.media.Format in)
           
 String getName()
           
 javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
           
static javax.media.Format matches(javax.media.Format in, javax.media.Format[] outs)
          Utility to perform format matching.
 void open()
          Init the codec instances.
 int process(javax.media.Buffer inputBuffer, javax.media.Buffer outputBuffer)
           
 javax.media.Format setInputFormat(javax.media.Format format)
          Set the data input format.
 javax.media.Format setOutputFormat(javax.media.Format format)
           
 
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.Codec
getSupportedInputFormats
 
Methods inherited from interface javax.media.PlugIn
reset
 
Methods inherited from interface javax.media.Controls
getControl, getControls
 

Constructor Detail

JNIDecoder

public JNIDecoder()
Constructs new h264 decoder

Method Detail

getMatchingOutputFormats

protected javax.media.Format[] getMatchingOutputFormats(javax.media.Format in)

setInputFormat

public javax.media.Format setInputFormat(javax.media.Format format)
Set the data input format.

Specified by:
setInputFormat in interface javax.media.Codec
Overrides:
setInputFormat in class net.sf.fmj.media.AbstractCodec
Returns:
false if the format is not supported.

setOutputFormat

public javax.media.Format setOutputFormat(javax.media.Format format)
Specified by:
setOutputFormat in interface javax.media.Codec
Overrides:
setOutputFormat in class net.sf.fmj.media.AbstractCodec

open

public void open()
          throws javax.media.ResourceUnavailableException
Init the codec instances.

Specified by:
open in interface javax.media.PlugIn
Overrides:
open in class net.sf.fmj.media.AbstractPlugIn
Throws:
javax.media.ResourceUnavailableException

close

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

process

public int process(javax.media.Buffer inputBuffer,
                   javax.media.Buffer outputBuffer)
Specified by:
process in interface javax.media.Codec
Specified by:
process in class net.sf.fmj.media.AbstractCodec

checkFormat

public boolean checkFormat(javax.media.Format format)

getName

public String getName()
Specified by:
getName in interface javax.media.PlugIn
Overrides:
getName in class net.sf.fmj.media.AbstractPlugIn

getSupportedOutputFormats

public javax.media.Format[] getSupportedOutputFormats(javax.media.Format in)
Specified by:
getSupportedOutputFormats in interface javax.media.Codec
Specified by:
getSupportedOutputFormats in class net.sf.fmj.media.AbstractCodec

matches

public static javax.media.Format matches(javax.media.Format in,
                                         javax.media.Format[] outs)
Utility to perform format matching.

Parameters:
in - input format
outs - array of format

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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