FileDocCategorySizeDatePackage
VideoCodec.javaAPI DocJMF 2.1.1e2513Mon May 12 12:21:00 BST 2003com.ibm.media.codec.video

VideoCodec

public abstract class VideoCodec extends BasicCodec

Fields Summary
protected String
PLUGIN_NAME
protected VideoFormat[]
defaultOutputFormats
protected VideoFormat[]
supportedInputFormats
protected VideoFormat[]
supportedOutputFormats
protected VideoFormat
inputFormat
protected VideoFormat
outputFormat
protected final boolean
DEBUG
Constructors Summary
Methods Summary
public booleancheckFormat(javax.media.Format format)

       Dimension inSize = ((VideoFormat) format).getSize();
        if (!inSize.equals(outputFormat.getSize()) ) {
           videoResized();
        }
        return true;
    
protected javax.media.FormatgetInputFormat()

	return inputFormat;
    
protected javax.media.Format[]getMatchingOutputFormats(javax.media.Format in)

        return new Format[0];
    
public java.lang.StringgetName()



       
	return PLUGIN_NAME;
    
protected javax.media.FormatgetOutputFormat()

	return outputFormat;
    
public javax.media.Format[]getSupportedInputFormats()

	return supportedInputFormats;
    
public javax.media.Format[]getSupportedOutputFormats(javax.media.Format in)


        // null input format
        if (in == null) {
            return defaultOutputFormats;
        }

        // mismatch input format
        if ( !(in instanceof VideoFormat ) ||
             (matches(in,supportedInputFormats) == null) ) {
                return new Format[0];

        }

        // match input format
        return getMatchingOutputFormats(in);

   
public javax.media.FormatsetInputFormat(javax.media.Format format)

	if ( !(format instanceof VideoFormat) ||
           (null == matches(format, supportedInputFormats)) )
	        return null;

	inputFormat = (VideoFormat)format;
	return format;
    
public javax.media.FormatsetOutputFormat(javax.media.Format format)


	// This methods assumes setInputFormat has already been called.

	if ( !(format instanceof VideoFormat) ||
           (null == matches(format, getMatchingOutputFormats(inputFormat))) )
	        return null;

	outputFormat = (VideoFormat)format;

	return format;
    
protected voidupdateOutput(javax.media.Buffer outputBuffer, javax.media.Format format, int length, int offset)

	outputBuffer.setFormat(format);
	outputBuffer.setLength(length);
	outputBuffer.setOffset(offset);
    
protected voidvideoResized()