vxp
Class JMFLivePushPixelSource

java.lang.Object
  extended byvxp.PixelSource
      extended byvxp.JMFLivePushPixelSource
All Implemented Interfaces:
javax.media.ControllerListener

public class JMFLivePushPixelSource
extends PixelSource
implements javax.media.ControllerListener


Field Summary
 javax.media.CaptureDeviceInfo captureDeviceInfo
           
 javax.media.Buffer imageBuffer
           
 javax.media.MediaLocator mediaLocator
           
 
Fields inherited from class vxp.PixelSource
kHeight, kWidth, vidWidth
 
Constructor Summary
JMFLivePushPixelSource(javax.swing.JFrame _f, int pw, int ph)
           
 
Method Summary
 java.lang.String changeSource(int whichSource)
           
 void controllerUpdate(javax.media.ControllerEvent event)
           
 java.awt.image.BufferedImage getImage()
          Gives you a bufferedImage from the live camera.
 int[] getPixel(int x, int y)
          This returns a 3 element array which contains the values for Red Green and Blue at the specified x,y coordinate.
 void getPixelArray(int[] _newPixels)
          This tickles tickles the video and puts the pixels in an int array that you supplied .
 boolean grabFrame()
          This gives you a fresh frame for getPixel and setPixel to operate on.
 void idleIt()
          This tickles whatever is suppling the video to give up fresh pixels.
 void idleIt(int numberOfTimes)
          This tickles whatever is suppling the video, with DV cameras you may have to tickle them many times between every frames to get rid of a lag.
 void killSession()
          Be sure to call this when you close or destroy your main window so a connection to your camera is not left hanging .
 void videoSettings()
          Gives you a pop up dialog box for the video digitizer driver.
 
Methods inherited from class vxp.PixelSource
addVideoListener, getArray, getColorOrder, getDeviceList, getDeviceName, getImage, getPixel, getPixel, getPixelArray, getPixelBrightness, getVideoHeight, getVideoWidth, setDevice, setDevice, setImageType, setImageType, setInput, setNativeArrays, setPixel, setPixel, setPixel, setPixel, tellVideoListeners
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

captureDeviceInfo

public javax.media.CaptureDeviceInfo captureDeviceInfo

mediaLocator

public javax.media.MediaLocator mediaLocator

imageBuffer

public javax.media.Buffer imageBuffer
Constructor Detail

JMFLivePushPixelSource

public JMFLivePushPixelSource(javax.swing.JFrame _f,
                              int pw,
                              int ph)
Method Detail

idleIt

public void idleIt()
This tickles whatever is suppling the video to give up fresh pixels.

Overrides:
idleIt in class PixelSource

idleIt

public void idleIt(int numberOfTimes)
This tickles whatever is suppling the video, with DV cameras you may have to tickle them many times between every frames to get rid of a lag.


getImage

public java.awt.image.BufferedImage getImage()
Gives you a bufferedImage from the live camera.

Overrides:
getImage in class PixelSource

getPixelArray

public void getPixelArray(int[] _newPixels)
This tickles tickles the video and puts the pixels in an int array that you supplied .

Overrides:
getPixelArray in class PixelSource
Parameters:
_newPixels - array that you want the pixel values placed into

grabFrame

public boolean grabFrame()
This gives you a fresh frame for getPixel and setPixel to operate on.

Overrides:
grabFrame in class PixelSource
Returns:

killSession

public void killSession()
Be sure to call this when you close or destroy your main window so a connection to your camera is not left hanging .

Overrides:
killSession in class PixelSource

getPixel

public int[] getPixel(int x,
                      int y)
This returns a 3 element array which contains the values for Red Green and Blue at the specified x,y coordinate. A fourth number is returned which is the offset in the big array for this pixel in case you want to manipulate it directly. This is very convenient but maybe a tiny bit slower. If you want speed you sould use getPixelArray and pull out the Red Green and Blue in your own object using shifting and Masking

Overrides:
getPixel in class PixelSource
Parameters:
x -
y -
Returns:
integer array with the offset in 0, the r in 1, the g in 2 and the b in 3

controllerUpdate

public void controllerUpdate(javax.media.ControllerEvent event)
Specified by:
controllerUpdate in interface javax.media.ControllerListener

changeSource

public java.lang.String changeSource(int whichSource)

videoSettings

public void videoSettings()
Description copied from class: PixelSource
Gives you a pop up dialog box for the video digitizer driver.

Overrides:
videoSettings in class PixelSource