Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[syntax="java"]class Preview extends SurfaceView implements SurfaceHolder.Callback, Camera.PreviewCallback, PictureCallback { SurfaceHolder mHolder; Camera mCamera; Preview(Context context) { super(context); // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public void surfaceCreated(SurfaceHolder holder) { // The Surface has been created, acquire the camera and tell it where // to draw. mCamera = Camera.open(); try { mCamera.setPreviewDisplay(holder); } catch (IOException exception) { mCamera.release(); mCamera = null; // TODO: add more exception handling logic here } } public void surfaceDestroyed(SurfaceHolder holder) { // Surface will be destroyed when we return, so stop the preview. // Because the CameraDevice object is not a shared resource, it's very // important to release it when the activity is paused. mCamera.stopPreview(); mCamera.release(); mCamera = null; } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // Now that the size is known, set up the camera parameters and begin // the preview. w=800; //I am a very bad person ... hard coding! h=480; //I am a very bad person ... hard coding! Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewSize(w, h); mCamera.setParameters(parameters); PixelFormat p = new PixelFormat(); PixelFormat.getPixelFormatInfo(parameters.getPreviewFormat(),p); int bufSize = (w*h*p.bitsPerPixel)/8; //Must call this before calling addCallbackBuffer to get all the // reflection variables setup initForACB(); //Add three buffers to the buffer queue. I re-queue them once they are used in // onPreviewFrame, so we should not need many of them. byte[] buffer = new byte[bufSize]; addCallbackBuffer(buffer); buffer = new byte[bufSize]; addCallbackBuffer(buffer); buffer = new byte[bufSize]; addCallbackBuffer(buffer); setPreviewCallbackWithBuffer(); mCamera.startPreview(); } /** * This method will list all methods of the android.hardware.Camera class, * even the hidden ones. With the information it provides, you can use the same * approach I took below to expose methods that were written but hidden in eclair */ private void listAllCameraMethods(){ try { Class c = Class.forName("android.hardware.Camera"); Method[] m = c.getMethods(); for(int i=0; ihttp://android.git.kernel.org/?p=platfo ... 327e536ce1 * * @param b The buffer to register. Size should be width * height * bitsPerPixel / 8. */ private void addCallbackBuffer(byte[] b) { //Check to be sure initForACB has been called to setup // mAcb and mArglist if(mArglist == null) { initForACB(); } mArglist[0] = b; try { mAcb.invoke(mCamera, mArglist); } catch (Exception e) { Log.e("AR","invoking addCallbackBuffer failed: " + e.toString()); } } /** * Use this method instead of setPreviewCallback if you want to use manually allocated * buffers. Assumes that "this" implements Camera.PreviewCallback */ private void setPreviewCallbackWithBuffer() { try { Class c = Class.forName("android.hardware.Camera"); Method spcwb = null; //This way of finding our method is a bit inefficient, but I am a reflection novice, // and didn't want to waste the time figuring out the right way to do it. // since this method is only called once, this should not cause performance issues Method[] m = c.getMethods(); for(int i=0; i