Package android.view

Examples of android.view.SurfaceHolder


        @Override
                public void run() {

            // This is our main acquisition thread's loop, we go until
            // asked to quit.
            SurfaceHolder holder = mHolder;
            while (!mDone) {
                // Lock the surface, this returns a Canvas that can
                // be used to render into.
                Canvas canvas = holder.lockCanvas();

                // Capture directly into the Surface
                if (mCamera != null) {
                    mCamera.capture(canvas);
                }

                // And finally unlock and post the surface.
                holder.unlockCanvasAndPost(canvas);
               
                if (interrupted()) {
                  yield();
                }
            }
View Full Code Here


    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    setContentView(R.layout.main);
        preview = (SurfaceView) findViewById(R.id.Preview);
        SurfaceHolder s = preview.getHolder();
        s.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        s.addCallback(this);
    }
View Full Code Here

        @Override
                public void run() {

            // This is our main acquisition thread's loop, we go until
            // asked to quit.
            SurfaceHolder holder = mHolder;
            while (!mDone) {
                // Lock the surface, this returns a Canvas that can
                // be used to render into.
                Canvas canvas = holder.lockCanvas();

                // Capture directly into the Surface
                if (mCamera != null) {
                    //mCamera.capture(canvas);
                }

                // And finally unlock and post the surface.
                holder.unlockCanvasAndPost(canvas);
               
                if (interrupted()) {
                  yield();
                }
            }
View Full Code Here

TOP

Related Classes of android.view.SurfaceHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.