/* (non-Javadoc)
@see au.edu.jcu.v4l4j.FrameGrabber#stopCapture()
544306
@Override
	public final void stopCapture(){
		state.stop();
		// At this stage, further calls to getVideoFrame() will throw an exception..
		// However, the push thread might still be blocked in getVideoFrame().

		// The push thread blocked in getVideoFrame() can be blocked either:
		// 1) in getAvailableVideoFrame(), waiting for an available frame
		// OR
		// 2) in fillBuffer(), waiting for a V4L buffer

		// If the push thread is blocked in 1), we can wake it up by interrupting it.
		// If the push thread is blocked in 2), tell the JNI layer to stop the capture
		// which will wake up the push thread blocked in fillBuffer() with an error.

		// unblock thread in 1): stop the push source
		pushSource.stopCapture();

		// unblock thread in 2): tell libvideo to stop capture
		stop(object);

		// wait for thread blocked in 2) to return
		state.waitTillNoMoreUsers();

		// at this stage, we know that no one is waiting in getVideoFrame() anymore,
		// and further calls to it will throw a StateException.		

		// Make sure all video frames are recycled
		for(VideoFrame frame: videoFrames)
			frame.recycle();

		// remove all frames from available queue
		synchronized(availableVideoFrames) {
			availableVideoFrames.removeAllElements();
		}

		// commit new state
		state.commit();
	}
692717
public void stop() {
      // This method might get called several times.
      if (stopped) return;
      if (needToUnregister) {
         try {
            unregisterMBeans(resourceDMBeans);
            needToUnregister = false;
         } catch (Exception e) {
            log.problemsUnregisteringMBeans(e);
         }
      }
      stopped = true;
   }
509602
def stop_video(self, tick):
        
        if self.cnt_video == self.n_video:
            if tick >= self.end_diff:
                self.idx_button.setText('Start')
                self.video.stop()
531001
def stop_capture(self):
        """"""
        super(Treal, self).stop_capture()
        if self._machine:
            self._machine.close()
        self._stopped()
56339
public void stop() {
    if (runnerThread == null) {
      return;
    }

    runnerThread.interrupt();

    nsLock.writeLock().lock();
    try {
      if (runnerThread == null) {
        return;
      }

      this.cancel();
      this.close();

      while (runnerThread.isAlive()) {
        runnerThread.interrupt();
        try {
          runnerThread.join(1000);
        } catch (final Exception e) {
          e.printStackTrace();
          return;
        }
      }
      runnerThread = null;
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      nsLock.writeLock().unlock();
    }
  }
897202
@Override
    public void stop(){
        if (isStarted.compareAndSet(true,false)) {
            this.syncService.shutdown();
            getCache().clear();
            getMetadataKeyCache().clear();
        }
    }
484019
@Override
	public synchronized void stop()
	{
		if (!started)
			return;
		
		bridgeThread.pleaseStop();
		try
		{
			bridgeThread.join();
		}
		catch (InterruptedException e)
		{
			log.error("Wait for bridge thread completion was interrupted");
		}
		finally
		{
			bridgeThread = null;
		}
		
		log.info("["+bridgeDefinition.getName()+"] JMS bridge stopped.");
		started = false;
	}
284818
public function stopCapture()
    {
        // check if this batch is the active one... and capturing. Ignore, if we're not capturing...
        if ($this->isActive() && $this->isCapturing()) {
            $this->setCapture(false);

            return $this;
        }

        throw new ClientException('Cannot stop capturing with this batch. Batch is not active...');
    }
319213
@Override
    public void stop() {
        try {
            if (randomAccessFile != null) {
                randomAccessFile.close();
                fileChannel.close();
            }
            randomAccessFile = null;
            fileChannel = null;
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
1040274
@Override
  public void stop() {
    if (!isStopped()) {
      if (lifeCycle.address().id() != World.DEADLETTERS_ID) {
        // TODO: remove this actor as a child on parent
        lifeCycle.suspend();
        lifeCycle.stop(this);
      }
    }
  }
53200
@Override
	public final void setCaptureCallback(CaptureCallback callback) {
		if (callback == null)
			throw new NullPointerException("The callback object cannot be null");

		synchronized (state){
			// make sure we are in the right state.
			if (state.isStarted())
				throw new StateException("This frame grabber is already started");

			// create the push source object
			pushSource = new PushSource(this, callback, threadFactory);
		}
	}
1280736
@Override
    public void stop() {
        try {
            expectSupport.close();
        } catch (IOException e) {
            log(e, Project.MSG_DEBUG);
        }
    }
1178529
public function stop()
    {
        $this->getGarbageCollector()->stop();
        $this->getStartupBeanTaskGarbageCollector()->stop();
        $this->getObjectFactory()->stop();
    }
474775
public void stopRecording() {
        IRecordingListener listener = null;
        if (recordingListener != null && (listener = recordingListener.get()).isRecording()) {
            sendRecordStopNotify();
            notifyRecordingStop();
            // remove the listener
            removeStreamListener(listener);
            // stop the recording listener
            listener.stop();
            // clear and null-out the thread local
            recordingListener.clear();
            recordingListener = null;
        }
    }
776039
public static final <T extends UIObject> void stopAnimation(final T widget, final String animation){
        if (widget != null && animation != null) {
            stopAnimation(widget.getElement(), animation);
        }
    }
710919
@Override
   public final void stop() {
      // Trying to stop() from FAILED is valid, but may not work
      boolean failed;

      synchronized (this) {
         try {
            while (state == ComponentStatus.STOPPING) {
               wait();
            }
            if (!state.stopAllowed()) {
               getLog().debugf("Ignoring call to stop() as current state is %s", state);
               return;
            }

            failed = state == ComponentStatus.FAILED;
            state = ComponentStatus.STOPPING;
         } catch (InterruptedException e) {
            throw new CacheException("Interrupted waiting for the component registry to stop");
         }
      }

      preStop();

      try {
         internalStop();

         postStop();
      } catch (Throwable t) {
         if (failed) {
            getLog().failedToCallStopAfterFailure(t);
         } else {
            handleLifecycleTransitionFailure(t);
         }
      } finally {
         synchronized (this) {
            state = ComponentStatus.TERMINATED;
         }
      }
   }
1226360
private void stopLoadingAnimation() {

        if (m_loadingTimer != null) {
            m_loadingTimer.cancel();
        }
        if (m_clientLoading) {
            m_contentWrapper.remove(m_loadingPanel);
            doResize();
            m_clientLoading = false;
        }
    }