FileDocCategorySizeDatePackage
VideoCodecChain.javaAPI DocJMF 2.1.1e1495Mon May 12 12:20:44 BST 2003com.sun.media.util

VideoCodecChain

public class VideoCodecChain extends CodecChain

Fields Summary
Constructors Summary
public VideoCodecChain(VideoFormat vf)

	Dimension size = vf.getSize();
	VideoFormat inputFormat = vf;

	if (size == null || vf == null)
	    throw new UnsupportedFormatException(vf);

	if (!buildChain(vf))
	    throw new UnsupportedFormatException(vf);
    
Methods Summary
public java.awt.ComponentgetControlComponent()

	if (renderer instanceof VideoRenderer)
	    return ((VideoRenderer)renderer).getComponent();
	else
	    return null;
    
booleanisRawFormat(javax.media.Format format)
MPEG video is not raw format. However, MonitorAdapter is only setting the render flag true for I frames on MPEG video so it can be treated as raw. Otherwise all frames must go to the decoder and the current decoder overloads the CPU.

	// If raw format, no need to decode just to keep state
	return ((format instanceof RGBFormat || format instanceof YUVFormat ||
		(format.getEncoding() != null &&
		(format.getEncoding().equalsIgnoreCase(VideoFormat.JPEG) ||
		format.getEncoding().equalsIgnoreCase(VideoFormat.MPEG)))));