public interface VideoProcessing
VideoDisplayActivity
class handles all the low level Android boiler plate for capturing and displaying video data. When new a new frame
arrives convertPreview(byte[], android.hardware.Camera) is called and very little time can be sent in this function or else the
application will crash. When the view is ready to be updated onDraw(android.graphics.Canvas) is called, which should be
executed quickly to avoid slowing down the GUI. To accomplish for of these speed requirements it is
recommended that a new thread be launched and used to process incoming video data and compute the output.VideoImageProcessing,
VideoRenderProcessing| Modifier and Type | Method and Description |
|---|---|
void |
convertPreview(byte[] bytes,
android.hardware.Camera camera)
Called inside the camera preview thread after new data has arrived.
|
void |
init(android.view.View view,
android.hardware.Camera camera,
android.hardware.Camera.CameraInfo info,
int rotation) |
void |
onDraw(android.graphics.Canvas canvas)
Invoked by Android GUI thread.
|
void |
stopProcessing()
Blocks until all processing has stopped
|
void init(android.view.View view,
android.hardware.Camera camera,
android.hardware.Camera.CameraInfo info,
int rotation)
void onDraw(android.graphics.Canvas canvas)
canvas - Use this canvas to draw results onto. Already be adjusted for the display and camera
preview size. .void convertPreview(byte[] bytes,
android.hardware.Camera camera)
bytes - Data from preview image in NV21 format.camera - Reference to cameravoid stopProcessing()