FileDocCategorySizeDatePackage
JavaDecoder_ms.javaAPI DocJMF 2.1.1e2252Mon May 12 12:21:02 BST 2003com.ibm.media.codec.audio.gsm

JavaDecoder_ms

public class JavaDecoder_ms extends JavaDecoder
MS GSM decoder plugin wrapper, which uses Java methods to do the decoding.
author
Shay Ben-David bendavid@haifa.vnet.ibm.com

Fields Summary
public static final String
a_copyright_notice
Licensed Materials - Property of IBM

"Restricted Materials of IBM"

5648-B81

(c) Copyright IBM Corporation 1997,1999 All Rights Reserved

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corporation.
Constructors Summary
public JavaDecoder_ms()


     ////////////////////////////////////////////////////////////////////////////
    // Methods

      
	super();
	supportedInputFormats = new AudioFormat[] { new AudioFormat(AudioFormat.GSM_MS) };
        PLUGIN_NAME="GSM MS Decoder";
    
Methods Summary
protected intcalculateOutputSize(int inputSize)

        return inputSize/65 * 640;

    
protected voiddecode(byte[] inpData, int readPtr, byte[] outData, int writePtr, int inpLength)

        int numberOfFrames = (inpLength/65);

        for ( int n=1 ; n<=numberOfFrames ; n++,writePtr += 640,readPtr += 65) {
            decoder.decodeFrame(inpData, readPtr , outData,writePtr);
        }
    
public java.lang.Object[]getControls()

        if (controls==null) {
             controls=new Control[1];
             controls[0]=new SilenceSuppressionAdapter(this,false,false);
	}
        return (Object[])controls;
    
public voidopen()

        decoder=new GsmDecoder_ms();
        decoder.decoderInit();