com.teamdev.jxcapture.video.mac
Class LionVideoCapture

java.lang.Object
  extended by com.teamdev.jxcapture.VideoCapture
      extended by com.teamdev.jxcapture.video.mac.LionVideoCapture

public class LionVideoCapture
extends VideoCapture

This class provides video capturing functionality for MAC OS X 10.7 and higher


Field Summary
protected  java.util.List<AudioCodec> audioCodecs
           
protected  java.util.List<Codec> codecs
           
protected  com.jniwrapper.Library library
           
static java.lang.String PROPERTY_CAPTURE_AREA
           
static java.lang.String PROPERTY_CAPTURE_TRANSPARENT_WINDOWS
           
static java.lang.String PROPERTY_INCLUDE_CURSOR
           
 
Fields inherited from class com.teamdev.jxcapture.VideoCapture
PROPERTY_AUDIO_SOURCE, PROPERTY_FRAMERATE, PROPERTY_VIDEO_SOURCE
 
Constructor Summary
LionVideoCapture()
           
LionVideoCapture(VideoSource videoSource)
          Creates video capture instance.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add the specified property listener.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Add the specified property listener.
protected  void doPause()
          Performs the steps required to pause a video capture process.
protected  void doStart()
          Performs the steps required to start a video capture process.
protected  void doStop()
          Performs the steps required to stop a video capture process.
 java.util.List<AudioCodec> getAudioCodecs()
          Returns the list of audio codecs that this video capture can provide.
 java.awt.Rectangle getCaptureArea()
           
protected  java.beans.PropertyChangeSupport getPropertyChangeSupport()
           
protected  Codec getVideoCodec(EncodingParameters parameters)
           
 java.util.List<Codec> getVideoCodecs()
          Returns the list of video codecs that this video capture can provide.
 VideoFormat getVideoFormat()
          Returns the video format that this video capture provides.
protected  void initNativeController(VideoSource source, boolean withSound)
           
 boolean isCaptureTransparentWindows()
          Returns true if the capture operation allows to capture transparent or layered windows, otherwise - false.
 boolean isIncludeCursor()
          Determines whether the resulting image of the capture operation includes the cursor image.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove the specified property listener.
protected  void setAudioBitRate(int bitRate)
           
protected  void setAudioChannels(int channels)
           
protected  void setAudioCodec(int uniqueID)
           
protected  void setAudioInput(AudioSource audioSource)
           
protected  void setAudioSampleRate(double sampleRate)
           
protected  void setAudioVBR(boolean isVBR)
           
 void setCaptureArea(java.awt.Rectangle area)
           
protected  void setCaptureAreaToNativeController(java.awt.Rectangle captureRectangle)
           
protected  void setCaptureMouseToNativeController(boolean captureMouse)
           
 void setCaptureTransparentWindows(boolean captureTransparentWindows)
          Sets true if the captureTransparentWindows operation should allow to captureTransparentWindows transparent or layered windows, otherwise - false.
protected  void setCodecToNativeController(Codec codec)
           
protected  void setDesktopBounds(java.awt.Rectangle bounds)
           
protected  void setFramerateToNativeController(int framerate)
           
protected  void setFullscreen(boolean value)
           
 void setIncludeCursor(boolean includeCursor)
          Includes (or excludes) the cursor image to (or from) the resulting image of the capture operation.
protected  void setKeyFrameToNativeController(int keyFrameInterval)
           
protected  void setOutputDimensionsToNativeController(double width, double height)
           
protected  void setPathToNativeController(java.lang.String path)
           
protected  void setQualityToNativeController(int quality)
           
protected  void setWindowId(com.teamdev.jxdesktop.macosx.coregraphics.CGWindowID windowId)
           
protected  void startNativeController()
           
protected  void stopNativeController()
           
protected  void validate(EncodingParameters encodingParameters)
          Validates encoding settings.
 
Methods inherited from class com.teamdev.jxcapture.VideoCapture
create, create, getAudioSource, getAvailableFormats, getEncodingParameters, getFramerate, getVideoSource, isAvailable, isStarted, pause, setAudioSource, setEncodingParameters, setFramerate, setFramerate, setVideoSource, start, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codecs

protected java.util.List<Codec> codecs

audioCodecs

protected java.util.List<AudioCodec> audioCodecs

library

protected final com.jniwrapper.Library library

PROPERTY_CAPTURE_AREA

public static final java.lang.String PROPERTY_CAPTURE_AREA
See Also:
Constant Field Values

PROPERTY_INCLUDE_CURSOR

public static final java.lang.String PROPERTY_INCLUDE_CURSOR
See Also:
Constant Field Values

PROPERTY_CAPTURE_TRANSPARENT_WINDOWS

public static final java.lang.String PROPERTY_CAPTURE_TRANSPARENT_WINDOWS
See Also:
Constant Field Values
Constructor Detail

LionVideoCapture

public LionVideoCapture()

LionVideoCapture

public LionVideoCapture(VideoSource videoSource)
Creates video capture instance.

Parameters:
videoSource - video source
Method Detail

setDesktopBounds

protected void setDesktopBounds(java.awt.Rectangle bounds)

setFullscreen

protected void setFullscreen(boolean value)

setWindowId

protected void setWindowId(com.teamdev.jxdesktop.macosx.coregraphics.CGWindowID windowId)

setCaptureMouseToNativeController

protected void setCaptureMouseToNativeController(boolean captureMouse)

setPathToNativeController

protected void setPathToNativeController(java.lang.String path)

setFramerateToNativeController

protected void setFramerateToNativeController(int framerate)

setQualityToNativeController

protected void setQualityToNativeController(int quality)

setOutputDimensionsToNativeController

protected void setOutputDimensionsToNativeController(double width,
                                                     double height)

setCaptureAreaToNativeController

protected void setCaptureAreaToNativeController(java.awt.Rectangle captureRectangle)

setCodecToNativeController

protected void setCodecToNativeController(Codec codec)

startNativeController

protected void startNativeController()

stopNativeController

protected void stopNativeController()

initNativeController

protected void initNativeController(VideoSource source,
                                    boolean withSound)

setKeyFrameToNativeController

protected void setKeyFrameToNativeController(int keyFrameInterval)

setAudioInput

protected void setAudioInput(AudioSource audioSource)

setAudioCodec

protected void setAudioCodec(int uniqueID)

setAudioBitRate

protected void setAudioBitRate(int bitRate)

setAudioSampleRate

protected void setAudioSampleRate(double sampleRate)

setAudioChannels

protected void setAudioChannels(int channels)

setAudioVBR

protected void setAudioVBR(boolean isVBR)

doStart

protected void doStart()
Description copied from class: VideoCapture
Performs the steps required to start a video capture process.

Specified by:
doStart in class VideoCapture

doStop

protected void doStop()
Description copied from class: VideoCapture
Performs the steps required to stop a video capture process.

Specified by:
doStop in class VideoCapture

getVideoCodec

protected Codec getVideoCodec(EncodingParameters parameters)

doPause

protected void doPause()
Description copied from class: VideoCapture
Performs the steps required to pause a video capture process.

Specified by:
doPause in class VideoCapture

validate

protected void validate(EncodingParameters encodingParameters)
Description copied from class: VideoCapture
Validates encoding settings.

Overrides:
validate in class VideoCapture
Parameters:
encodingParameters - specifies video encoding settings

getVideoFormat

public VideoFormat getVideoFormat()
Description copied from class: VideoCapture
Returns the video format that this video capture provides.

Specified by:
getVideoFormat in class VideoCapture
Returns:
video format provided by this video capture

getVideoCodecs

public java.util.List<Codec> getVideoCodecs()
Description copied from class: VideoCapture
Returns the list of video codecs that this video capture can provide.

Specified by:
getVideoCodecs in class VideoCapture
Returns:
list of Codec objects.

getAudioCodecs

public java.util.List<AudioCodec> getAudioCodecs()
Description copied from class: VideoCapture
Returns the list of audio codecs that this video capture can provide.

Specified by:
getAudioCodecs in class VideoCapture
Returns:
list of Codec objects.

getPropertyChangeSupport

protected java.beans.PropertyChangeSupport getPropertyChangeSupport()

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Add the specified property listener.

Parameters:
propertyName - property name
listener - listener

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add the specified property listener.

Parameters:
listener - listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove the specified property listener.

Parameters:
listener - listener

getCaptureArea

public java.awt.Rectangle getCaptureArea()
Returns:
specified capturing area

setCaptureArea

public void setCaptureArea(java.awt.Rectangle area)
Parameters:
area - required rectangular capture area

isIncludeCursor

public boolean isIncludeCursor()
Determines whether the resulting image of the capture operation includes the cursor image.

Returns:
true if the result of the capture operation includes the cursor image, false otherwise

setIncludeCursor

public void setIncludeCursor(boolean includeCursor)
Includes (or excludes) the cursor image to (or from) the resulting image of the capture operation.

Parameters:
includeCursor - If true, this cursor image is included into the result of the capture operation; otherwise not

isCaptureTransparentWindows

public boolean isCaptureTransparentWindows()
Returns true if the capture operation allows to capture transparent or layered windows, otherwise - false.

A layered or transparent window is used by some applications to create a fade-in/out effect for menus and windows. Layered windows are also used for desktop animation, such as animated help assistants.

Returns:
true if the capture transparent or layered window option is set, otherwise - false

setCaptureTransparentWindows

public void setCaptureTransparentWindows(boolean captureTransparentWindows)
Sets true if the captureTransparentWindows operation should allow to captureTransparentWindows transparent or layered windows, otherwise - false.

A layered or transparent window is used by some applications to create a fade-in/out effect for menus and windows. Layered windows are also used for desktop animation, such as animated help assistants.

Parameters:
captureTransparentWindows - true if the captureTransparentWindows operation should allow to captureTransparentWindows transparent or layered window, otherwise - false