code: public final void stopCapture() {
  		synchronized (this) {
  			// make sure we are running
  			if ((state == STATE_STOPPED) || (state == STATE_ABOUT_TO_STOP))
  				//throw new StateException("The capture is about to stop");
  				return;
  
  			// update our state
  			state = STATE_ABOUT_TO_STOP;
  		}
  		
  		if (thread.isAlive()) {
  			thread.interrupt();
  			
  			// wait for thread to exit if the push thread is not the one
  			// trying to join
  			if (! Thread.currentThread().equals(thread)) {
  				while (state == STATE_ABOUT_TO_STOP) {
  					try {
  						// wait for thread to exit
  						thread.join();
  						//thread = null;
  					} catch (InterruptedException e) {
  						// interrupted while waiting for the thread to join
  						// keep waiting
  						// System.err.println("interrupted while waiting for frame pusher thread to complete");
  						// e.printStackTrace();
  						// throw new StateException("interrupted while waiting for frame pusher thread to complete", e);
  					}
  				}
  			}
  			
  		}
  	}
docs: This method instructs this source to stop frame delivery
  to the {@link CaptureCallback} object.
  @throws StateException if the capture has already been stopped