Bartosz Firyn (SarXos)

com.github.sarxos.webcam
Class WebcamLock

java.lang.Object
  extended by com.github.sarxos.webcam.WebcamLock

public class WebcamLock
extends Object

This class is used as a global (system) lock preventing other processes from using the same camera while it's open.

Author:
Bartosz Firyn (sarxos)

Method Summary
 boolean isLocked()
          Check if webcam is locked.
 void lock()
          Lock webcam.
 void unlock()
          Unlock webcam.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lock

public void lock()
Lock webcam.


unlock

public void unlock()
Unlock webcam.


isLocked

public boolean isLocked()
Check if webcam is locked.

Returns:
True if webcam is locked, false otherwise

Bartosz Firyn (SarXos)

Copyright © 2012-2013 Bartosz Firyn (SarXos). All Rights Reserved.