|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.teamdev.jxcapture.VideoCapture
public abstract class VideoCapture
Base class that defines the video capture API.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_AUDIO_SOURCE
|
static java.lang.String |
PROPERTY_CAPTURE_AREA
|
static java.lang.String |
PROPERTY_CAPTURE_TRANSPARENT_WINDOWS
|
static java.lang.String |
PROPERTY_FRAMERATE
|
static java.lang.String |
PROPERTY_INCLUDE_CURSOR
|
static java.lang.String |
PROPERTY_VIDEO_SOURCE
|
Constructor Summary | |
---|---|
protected |
VideoCapture()
Creates new video capture. |
protected |
VideoCapture(VideoSource source)
Creates new video capture for the specified video source. |
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. |
static VideoCapture |
create()
Constructs video capture object for a native video format. |
static VideoCapture |
create(VideoFormat videoFormat)
Constructs video capture instance object for the specified video format. |
protected abstract void |
doPause()
Performs the steps required to pause a video capture process. |
protected abstract void |
doStart()
Performs the steps required to start a video capture process. |
protected abstract void |
doStop()
Performs the steps required to stop a video capture process. |
abstract java.util.List<AudioCodec> |
getAudioCodecs()
Returns the list of audio codecs that this video capture can provide. |
AudioSource |
getAudioSource()
Returns the specified audio source. |
static java.util.List<VideoFormat> |
getAvailableFormats()
Returns the list of available video formats for a current platform. |
java.awt.Rectangle |
getCaptureArea()
|
EncodingParameters |
getEncodingParameters()
Returns the specified encoding settings. |
Framerate |
getFramerate()
Returns the specified screen capture framerate in FPS units. |
protected java.beans.PropertyChangeSupport |
getPropertyChangeSupport()
|
abstract java.util.List<Codec> |
getVideoCodecs()
Returns the list of video codecs that this video capture can provide. |
abstract VideoFormat |
getVideoFormat()
Returns the video format that this video capture provides. |
VideoSource |
getVideoSource()
Returns the specified video source. |
static boolean |
isAvailable()
Checks whether video capture is supported for the current architecture and OS version |
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. |
boolean |
isStarted()
Returns the state of this video capture. |
void |
pause()
Pauses current video capturing process. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove the specified property listener. |
void |
setAudioSource(AudioSource audioSource)
Specifies new audio source for recording. |
void |
setCaptureArea(java.awt.Rectangle area)
|
void |
setCaptureTransparentWindows(boolean captureTransparentWindows)
Sets true if the captureTransparentWindows operation should allow to captureTransparentWindows
transparent or layered windows, otherwise - false . |
void |
setEncodingParameters(EncodingParameters encodingParameters)
Set the encoding parameters. |
void |
setFramerate(Framerate value)
Specifies a required screen capture framerate in frames per second (FPS) units. |
void |
setFramerate(int value)
Specifies a required screen capture framerate in frames per second (FPS) units. |
void |
setIncludeCursor(boolean includeCursor)
Includes (or excludes) the cursor image to (or from) the resulting image of the capture operation. |
void |
setVideoSource(VideoSource videoSource)
Specifies video source for recording. |
void |
start()
Starts this video capture asynchronously. |
void |
start(EncodingParameters encodingParameters)
Starts this video capture asynchronously. |
void |
stop()
Stops a video capture process. |
protected void |
validate(EncodingParameters encodingParameters)
Validates encoding settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_FRAMERATE
public static final java.lang.String PROPERTY_VIDEO_SOURCE
public static final java.lang.String PROPERTY_AUDIO_SOURCE
public static final java.lang.String PROPERTY_CAPTURE_AREA
public static final java.lang.String PROPERTY_INCLUDE_CURSOR
public static final java.lang.String PROPERTY_CAPTURE_TRANSPARENT_WINDOWS
Constructor Detail |
---|
protected VideoCapture()
protected VideoCapture(VideoSource source)
source
- video sourceMethod Detail |
---|
public boolean isStarted()
public EncodingParameters getEncodingParameters()
public void setEncodingParameters(EncodingParameters encodingParameters)
encodingParameters
- parameter for encodingpublic Framerate getFramerate()
public void setFramerate(int value)
Framerate.MIN
and
Framerate.MAX
constant, or Framerate.ACTUAL
which defines an actual
capture frame rate.
value
- required frame rate value that must be in range [Framerate.MIN
- Framerate.MAX
]
java.lang.IllegalArgumentException
- if specified framerate is not validpublic void setFramerate(Framerate value)
value
- required frame rate valuepublic final void start(EncodingParameters encodingParameters)
encodingParameters
- encoding parameterspublic final void start()
protected void validate(EncodingParameters encodingParameters)
encodingParameters
- specifies video encoding settingsprotected abstract void doStart()
public final void stop()
public final void pause()
protected abstract void doPause()
protected abstract void doStop()
public abstract VideoFormat getVideoFormat()
public abstract java.util.List<Codec> getVideoCodecs()
Codec
objects.public abstract java.util.List<AudioCodec> getAudioCodecs()
Codec
objects.public static VideoCapture create(VideoFormat videoFormat)
videoFormat
- specifies the required video format
public static VideoCapture create()
public static java.util.List<VideoFormat> getAvailableFormats()
VideoFormat
objectspublic AudioSource getAudioSource()
public void setAudioSource(AudioSource audioSource)
audioSource
- new audio source; null is allowed valuepublic VideoSource getVideoSource()
public void setVideoSource(VideoSource videoSource)
videoSource
- new video sourcepublic static boolean isAvailable()
protected java.beans.PropertyChangeSupport getPropertyChangeSupport()
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- property namelistener
- listenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- listenerpublic java.awt.Rectangle getCaptureArea()
public void setCaptureArea(java.awt.Rectangle area)
area
- required rectangular capture areapublic boolean isIncludeCursor()
true
if the result of the capture operation
includes the cursor image, false
otherwisepublic void setIncludeCursor(boolean includeCursor)
includeCursor
- If true
, this cursor image is
included into the result of the capture operation;
otherwise notpublic boolean isCaptureTransparentWindows()
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.
true
if the capture transparent or layered window
option is set, otherwise - false
public void setCaptureTransparentWindows(boolean captureTransparentWindows)
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.
captureTransparentWindows
- true
if the captureTransparentWindows operation should allow
to captureTransparentWindows transparent or layered window, otherwise -
false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |