public abstract class VideoCapture extends CaptureBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_AUDIO_SOURCE |
static java.lang.String |
PROPERTY_FRAMERATE |
static java.lang.String |
PROPERTY_VIDEO_SOURCE |
PROPERTY_CAPTURE_AREA, PROPERTY_CAPTURE_TRANSPARENT_WINDOWS, PROPERTY_INCLUDE_CURSOR
Modifier | Constructor and Description |
---|---|
protected |
VideoCapture()
Creates new video capture.
|
protected |
VideoCapture(VideoSource source)
Creates new video capture for the specified video source.
|
Modifier and Type | Method and Description |
---|---|
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.
|
EncodingParameters |
getEncodingParameters()
Returns the specified encoding settings.
|
Framerate |
getFramerate()
Returns the specified screen capture framerate in FPS units.
|
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 |
isStarted()
Returns the state of this video capture.
|
void |
pause()
Pauses current video capturing process.
|
void |
setAudioSource(AudioSource audioSource)
Specifies new audio source for recording.
|
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 |
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.
|
addPropertyChangeListener, addPropertyChangeListener, getCaptureArea, getPropertyChangeSupport, isCaptureTransparentWindows, isIncludeCursor, removePropertyChangeListener, setCaptureArea, setCaptureTransparentWindows, setIncludeCursor
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
protected VideoCapture()
protected VideoCapture(VideoSource source)
source
- video sourcepublic 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 formatpublic 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()