I am having issues with using the camera on Adobe AIR mobile devices.
The performance of the camera is ok on newer phones, but on galaxy s2 for example it is impossible to use. I am using the camera like this:
_camera = Camera.getCamera("0");
if (_camera != null)
{
// _video = new Video();
_video = new Video(_camera.width, _camera.height);
// _video.width = _cameraHeight;
_video.width = _cameraHeight;
_video.height = Starling.current.nativeStage.fullScreenWidth;
_camera.addEventListener(ActivityEvent.ACTIVITY, onCameraActivity);
_camera.setMode( _video.width,_video.height, 30 );
_video.attachCamera(_camera);
_videoContainer.addChild(_video);
}
Does anyone have any recommendations?
EDIT: The problem is that the framerate drops to around 1 on Galaxy S2 and the app crashes. On my galaxy S3 it works around 30fps. I also tried uploading the video to the GPU on every frame using
flash.display3D.textures.Texture(image.texture.base).uploadFromBitmapData(bmd);
it gets better on my galaxy s3 then, fps is around 50-60, but on galaxy s2 still terrible and unusable(around 1 fps)