va
Class TimedAcquisition

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--va.TimedAcquisition
All Implemented Interfaces:
java.lang.Runnable

class TimedAcquisition
extends java.lang.Thread

A thread that acquires a video sequence and at two different frame rates.


Field Summary
protected  int frameCurrent
           
protected  short[][] frames
           
protected  int framesPhase1
           
protected  int[] framesTimestamps
           
protected  int height
           
protected  int initialN
           
static java.lang.String INITIALSTRING
           
protected  int msFrameDurationPhase1
           
protected  int msFrameDurationPhase2
           
protected  int msPhase1End
           
protected  int msPhase2End
           
protected  boolean running
           
protected  long start
           
protected  VAInterface vaInterface
           
protected  VideoWatch watch
           
protected  int width
           
 
Fields inherited from class java.lang.Thread
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals
 
Constructor Summary
TimedAcquisition(VAInterface vaInterface, VideoWatch watch, double initialFrameRate, int initialN, double sustainedFrameRate, int sustainedN, int width, int height)
           
 
Method Summary
protected  void framesToStack(java.lang.String name, short[][] frames)
           
protected  boolean grabFrame(short[][] buffer, int frameCurrent)
          Grab the current frame and copy into the framebuffer.
 void kill()
          The kill method is called when the watcher is to stop.
 void run()
          Grabs a frame at the required frame rate.
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INITIALSTRING

public static final java.lang.String INITIALSTRING

running

protected boolean running

start

protected long start

msPhase1End

protected int msPhase1End

msPhase2End

protected int msPhase2End

msFrameDurationPhase1

protected int msFrameDurationPhase1

msFrameDurationPhase2

protected int msFrameDurationPhase2

frameCurrent

protected int frameCurrent

framesPhase1

protected int framesPhase1

width

protected int width

height

protected int height

initialN

protected int initialN

frames

protected short[][] frames

framesTimestamps

protected int[] framesTimestamps

watch

protected VideoWatch watch

vaInterface

protected VAInterface vaInterface
Constructor Detail

TimedAcquisition

public TimedAcquisition(VAInterface vaInterface,
                        VideoWatch watch,
                        double initialFrameRate,
                        int initialN,
                        double sustainedFrameRate,
                        int sustainedN,
                        int width,
                        int height)
Method Detail

run

public void run()
Grabs a frame at the required frame rate.
Overrides:
run in class java.lang.Thread

grabFrame

protected boolean grabFrame(short[][] buffer,
                            int frameCurrent)
Grab the current frame and copy into the framebuffer.

framesToStack

protected void framesToStack(java.lang.String name,
                             short[][] frames)

kill

public void kill()
The kill method is called when the watcher is to stop.