FileDocCategorySizeDatePackage
DirectCamera.javaAPI DocphoneME MR2 API (J2ME)2066Wed May 02 16:47:08 BST 2007com.sun.mmedia

DirectCamera

public class DirectCamera extends DirectVideo

Fields Summary
Constructors Summary
public DirectCamera()
It does not need data source

        hasDataSource = false;
    
Methods Summary
public byte[]getSnapshot(java.lang.String imageType)
Camera snapshot

        checkState();
        checkPermission();

        if (null == imageType) {
            imageType = System.getProperty("video.snapshot.encodings");
            if (null == imageType) {
                throw new MediaException("Requested format is not supported");
            }
        }

        // Need revisit - Check encoding param validity (Not from Sprint PCS QVM based test case)

        byte[] data = null;
        if (hNative != 0) {
            data = nSnapShot(hNative, imageType.toLowerCase());
        }
        if (null == data) {
            throw new MediaException(imageType + " format is not supported");
        }
        return data;