com.dopanic.panicarkit.lib
Class PARCameraView

java.lang.Object
  extended by SurfaceView
      extended by com.dopanic.panicarkit.lib.PARCameraView

public class PARCameraView
extends SurfaceView

Represents AR camera view


Constructor Summary
PARCameraView(Context context)
          Constructor
PARCameraView(Context ctx, AttributeSet attrs)
          Constructor
 
Method Summary
 Camera getCamera()
          Getter for camera object
 Point getViewSize()
          Get view size
 void onPreviewFrame(byte[] arg0, Camera arg1)
           
protected  void onSizeChanged(int xNew, int yNew, int xOld, int yOld)
          Listener implementation
 void startCamera()
          Start camera
 void stopCamera()
          Stops camera
 void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
          Listener implementation
 void surfaceCreated(SurfaceHolder holder)
          Listener implementation
 void surfaceDestroyed(SurfaceHolder holder)
          Listener implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PARCameraView

public PARCameraView(Context ctx,
                     AttributeSet attrs)
Constructor

Parameters:
ctx - Application context
attrs - Attribute set

PARCameraView

public PARCameraView(Context context)
Constructor

Parameters:
context - Application context
Method Detail

getViewSize

public Point getViewSize()
Get view size

Returns:
View size

stopCamera

public void stopCamera()
Stops camera


startCamera

public void startCamera()
Start camera


surfaceCreated

public void surfaceCreated(SurfaceHolder holder)
Listener implementation

Parameters:
holder - Surface holder

surfaceDestroyed

public void surfaceDestroyed(SurfaceHolder holder)
Listener implementation

Parameters:
holder - Surface holder

surfaceChanged

public void surfaceChanged(SurfaceHolder holder,
                           int format,
                           int width,
                           int height)
Listener implementation

Parameters:
holder - Surface holder
format - Format
width - Width
height - Height

onPreviewFrame

public void onPreviewFrame(byte[] arg0,
                           Camera arg1)

getCamera

public Camera getCamera()
Getter for camera object

Returns:
Camera

onSizeChanged

protected void onSizeChanged(int xNew,
                             int yNew,
                             int xOld,
                             int yOld)
Listener implementation

Parameters:
xNew -
yNew -
xOld -
yOld -



Copyright © 2014 doPanic GmbH. All rights reserved.