com.github.sarxos.webcam.ds.buildin
Class WebcamDefaultDevice

java.lang.Object
  extended by com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice
All Implemented Interfaces:
WebcamDevice

public class WebcamDefaultDevice
extends Object
implements WebcamDevice


Field Summary
static Dimension SIZE_CIF
           
static Dimension SIZE_HVGA
           
static Dimension SIZE_QQVGA
           
static Dimension SIZE_QVGA
           
static Dimension SIZE_VGA
           
static Dimension SIZE_XGA
           
 
Constructor Summary
protected WebcamDefaultDevice(Device device)
           
 
Method Summary
 void close()
          Close device, however it can be open again.
 void dispose()
          Dispose device.
 BufferedImage getImage()
          Fetch image from underlying camera.
 String getName()
          Get device name.
 Dimension getSize()
          Get currently set image size.
 Dimension[] getSizes()
          Get the list of all possible image resolutions.
 void open()
          Open device, it can be closed any time.
 void setSize(Dimension size)
          Set new expected image size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE_QQVGA

public static final Dimension SIZE_QQVGA

SIZE_QVGA

public static final Dimension SIZE_QVGA

SIZE_CIF

public static final Dimension SIZE_CIF

SIZE_HVGA

public static final Dimension SIZE_HVGA

SIZE_VGA

public static final Dimension SIZE_VGA

SIZE_XGA

public static final Dimension SIZE_XGA
Constructor Detail

WebcamDefaultDevice

protected WebcamDefaultDevice(Device device)
Method Detail

getName

public String getName()
Description copied from interface: WebcamDevice
Get device name.

Specified by:
getName in interface WebcamDevice
Returns:
Device name

getSizes

public Dimension[] getSizes()
Description copied from interface: WebcamDevice
Get the list of all possible image resolutions.

Specified by:
getSizes in interface WebcamDevice
Returns:
Possible resolutions

getSize

public Dimension getSize()
Description copied from interface: WebcamDevice
Get currently set image size.

Specified by:
getSize in interface WebcamDevice
Returns:
The size which is currently set

setSize

public void setSize(Dimension size)
Description copied from interface: WebcamDevice
Set new expected image size.

Specified by:
setSize in interface WebcamDevice
Parameters:
size - the size to be set

getImage

public BufferedImage getImage()
Description copied from interface: WebcamDevice
Fetch image from underlying camera.

Specified by:
getImage in interface WebcamDevice
Returns:
Image

open

public void open()
Description copied from interface: WebcamDevice
Open device, it can be closed any time.

Specified by:
open in interface WebcamDevice

close

public void close()
Description copied from interface: WebcamDevice
Close device, however it can be open again.

Specified by:
close in interface WebcamDevice

dispose

public void dispose()
Description copied from interface: WebcamDevice
Dispose device. After device is disposed it cannot be open again.

Specified by:
dispose in interface WebcamDevice


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