|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
jmapps.ui.JMFrame
jmapps.ui.PlayerFrame
j2d.video.Camera
public class Camera
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
boolean |
showTimes
|
java.lang.String |
timeBreakdown
|
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Camera()
Default constructor. |
|
Camera(java.lang.String deviceName)
Constructs a camera with the passed camera deviceName. |
|
Camera(java.lang.String deviceName,
int displayMode,
boolean showTimes,
javax.media.format.VideoFormat videoFormat)
Constructs a camera with the passed camera deviceName. |
|
Camera(java.lang.String deviceName,
javax.media.format.VideoFormat videoFormat)
Constructs a camera with the passed camera deviceName. |
|
Camera(javax.media.format.VideoFormat videoFormat)
Constructs a camera with the passed camera deviceName. |
Method Summary | |
---|---|
void |
controllerUpdate(javax.media.ControllerEvent event)
DO NOT use this method!!! It is for initializing the camera, and is only public because it is inherited. |
java.lang.String |
getDeviceName()
Returns the device name that the object is using. |
java.awt.Image |
getImage()
Returns the current image in java.awt.Image format |
java.awt.Dimension |
getImageDimension()
Returns the dimesions requested for this watch camera device. |
ObservableImage |
getObservableImage()
|
java.lang.String |
getShortDeviceName()
Returns the device name without the "vfw:" prefix. |
javax.media.format.VideoFormat |
getVideoFormat()
Returns the video format of this camera device. |
static void |
main(java.lang.String[] args)
Entry point for viewing the camera images without doing any processing on the pixels. |
void |
open(javax.media.protocol.DataSource dataSource)
DO NOT use this method!!!! It is for initializing the camera, and is only public because it is inherited |
void |
startWatching()
startWatching will initiate image transfer from the camera. |
void |
stopWatching()
Stops the camera. |
Methods inherited from class jmapps.ui.PlayerFrame |
---|
actionPerformed, componentAdded, componentRemoved, open, open, setPlaceholder, windowClosed, windowClosing |
Methods inherited from class jmapps.ui.JMFrame |
---|
addNotify, autoPosition, autoPosition, setVisible, windowActivated, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
Methods inherited from class java.awt.Frame |
---|
getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public java.lang.String timeBreakdown
public boolean showTimes
Constructor Detail |
---|
public Camera()
public Camera(java.lang.String deviceName)
deviceName
- Name of the camera device to use for this camera object.
(The most robust way to get a valid deviceName is to
make a call to getDeviceNameList and use one of the returned
values when calling this constructor.)public Camera(javax.media.format.VideoFormat videoFormat)
videoFormat
- The video format you want this camera to use.
(The most robust way to get a valid videoFormat is to
make a call to getAllSupportedVideoFormats() and use
one of the returned values when calling this constructor.)public Camera(java.lang.String deviceName, javax.media.format.VideoFormat videoFormat)
deviceName
- Name of the camera device to use for this camera object.
(The most robust way to get a valid deviceName is to
make a call to getDeviceNameList and use one of the returned
values when calling this constructor.)videoFormat
- The video format you want this camera to use.
(The most robust way to get a valid videoFormat is to
make a call to getAllSupportedVideoFormats() and use
one of the returned values when calling this constructor.)public Camera(java.lang.String deviceName, int displayMode, boolean showTimes, javax.media.format.VideoFormat videoFormat)
deviceName
- Name of the camera device to use for this camera object.
(The most robust way to get a valid deviceName is to
make a call to getDeviceNameList and use one of the returned
values when calling this constructor.)displayMode
- The display mode of the camera.
DISPLAY_NOTHING - (the default) does not show
DISPLAY_ON_EVENT - (used for debug) used in main of this class to show images when requested
DISPLAY_ALL_VIDEO - (used for debug) streams the video to a player frameshowTimes
- Used purely for debugging purposes, but shows processing times.
(If you override processTimes you can use addTimeString and if
this is set to true, after every image is processed the
time string debug info is printed to the console.)videoFormat
- The video format you want this camera to use.
(The most robust way to get a valid videoFormat is to
make a call to getAllSupportedVideoFormats() and use
one of the returned values when calling this constructor.)Method Detail |
---|
public void stopWatching()
public void startWatching()
public void open(javax.media.protocol.DataSource dataSource)
open
in class jmapps.ui.PlayerFrame
public void controllerUpdate(javax.media.ControllerEvent event)
controllerUpdate
in interface javax.media.ControllerListener
controllerUpdate
in class jmapps.ui.PlayerFrame
public static void main(java.lang.String[] args)
public java.awt.Image getImage()
public java.awt.Dimension getImageDimension()
public javax.media.format.VideoFormat getVideoFormat()
public java.lang.String getDeviceName()
public java.lang.String getShortDeviceName()
public ObservableImage getObservableImage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |