Java 类org.webrtc.videoengine.VideoCaptureDeviceInfoAndroid.AndroidVideoCaptureDevice 实例源码

项目:CSipSimple    文件:CameraUtils9.java   
@Override
public void Init(VideoCaptureDeviceInfoAndroid deviceInfoAndroid,
        List<AndroidVideoCaptureDevice> listToPopulate)
        throws SecurityException,
        IllegalArgumentException, NoSuchMethodException, ClassNotFoundException,
        IllegalAccessException, InvocationTargetException {

    Camera camera = null;

    // From Android 2.3 and onwards
    for (int i = 0; i < Camera.getNumberOfCameras(); ++i) {
        AndroidVideoCaptureDevice newDevice = deviceInfoAndroid.new AndroidVideoCaptureDevice();

        Camera.CameraInfo info = new Camera.CameraInfo();
        Camera.getCameraInfo(i, info);
        newDevice.index = i;
        newDevice.orientation = info.orientation;
        if (info.facing == Camera.CameraInfo.CAMERA_FACING_BACK) {
            newDevice.deviceUniqueName =
                    "Camera " + i + ", Facing back, Orientation " + info.orientation;
        }
        else {
            newDevice.deviceUniqueName =
                    "Camera " + i + ", Facing front, Orientation " + info.orientation;
            newDevice.frontCameraType = FrontFacingCameraType.Android23;
        }

        camera = Camera.open(i);
        Camera.Parameters parameters = camera.getParameters();
        deviceInfoAndroid.AddDeviceInfo(newDevice, parameters);
        camera.release();
        camera = null;
        listToPopulate.add(newDevice);
    }
}
项目:CSipSimple    文件:CameraUtils3.java   
@Override
public void Init(VideoCaptureDeviceInfoAndroid deviceInfoAndroid,
        List<AndroidVideoCaptureDevice> listToPopulate) throws SecurityException,
        IllegalArgumentException, NoSuchMethodException, ClassNotFoundException,
        IllegalAccessException, InvocationTargetException {
    // TODO Auto-generated method stub

}
项目:CSipSimple    文件:VideoCaptureAndroid.java   
public VideoCaptureAndroid(int in_id, long in_context, Camera in_camera,
        AndroidVideoCaptureDevice in_device) {
    id = in_id;
    context = in_context;
    camera = in_camera;
    currentDevice = in_device;
    cameraUtils = CameraUtilsWrapper.getInstance();
}
项目:CSipSimple    文件:CameraUtilsWrapper.java   
/**
 * Init the camera list
 * @param deviceInfoAndroid the VideoCaptureDeviceInfoAndroid instance
 * @param listToPopulate List to be populated with detected devices
 * @throws SecurityException
 * @throws IllegalArgumentException
 * @throws NoSuchMethodException
 * @throws ClassNotFoundException
 * @throws IllegalAccessException
 * @throws InvocationTargetException
 */
public abstract void Init(VideoCaptureDeviceInfoAndroid deviceInfoAndroid,
        List<AndroidVideoCaptureDevice> listToPopulate) throws SecurityException,
        IllegalArgumentException, NoSuchMethodException, ClassNotFoundException,
        IllegalAccessException, InvocationTargetException;