public class ScreenRecorder extends AbstractStateModel
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ScreenRecorder.MouseGrabber |
static class |
ScreenRecorder.State |
| Modifier and Type | Field and Description |
|---|---|
protected int |
audioTrack |
static java.lang.String |
ENCODING_BLACK_CURSOR |
static java.lang.String |
ENCODING_WHITE_CURSOR |
static java.lang.String |
ENCODING_YELLOW_CURSOR |
protected java.util.concurrent.ScheduledThreadPoolExecutor |
mouseCaptureTimer |
protected Format |
mouseFormat |
protected java.util.concurrent.ScheduledFuture |
mouseFuture |
protected ScreenRecorder.MouseGrabber |
mouseGrabber |
protected java.io.File |
movieFolder |
protected long |
recordingStartTime |
protected long |
recordingStopTime |
protected int |
videoTrack |
changeEvent, listenerList| Constructor and Description |
|---|
ScreenRecorder(java.awt.GraphicsConfiguration cfg) |
ScreenRecorder(java.awt.GraphicsConfiguration cfg,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat) |
ScreenRecorder(java.awt.GraphicsConfiguration cfg,
java.awt.Rectangle captureArea,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat) |
ScreenRecorder(java.awt.GraphicsConfiguration cfg,
java.awt.Rectangle captureArea,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat,
java.io.File movieFolder) |
| Modifier and Type | Method and Description |
|---|---|
protected java.io.File |
createMovieFile(Format fileFormat) |
protected MovieWriter |
createMovieWriter() |
float |
getAudioLevelLeft() |
float |
getAudioLevelRight() |
javax.sound.sampled.Mixer |
getAudioMixer() |
java.util.List<java.io.File> |
getCreatedMovieFiles() |
long |
getMaxFileSize() |
long |
getMaxRecordingTime() |
long |
getStartTime() |
ScreenRecorder.State |
getState() |
java.lang.String |
getStateMessage() |
void |
setAudioMixer(javax.sound.sampled.Mixer mixer) |
void |
setMaxFileSize(long maxFileSize) |
void |
setMaxRecordingTime(long maxRecordingTime) |
void |
start() |
protected void |
startMouseCapture() |
void |
stop() |
protected void |
stopMouseCapture() |
protected void |
waitUntilMouseCaptureStopped() |
protected void |
write(Buffer buf) |
addChangeListener, fireStateChanged, removeChangeListenerpublic static final java.lang.String ENCODING_BLACK_CURSOR
public static final java.lang.String ENCODING_WHITE_CURSOR
public static final java.lang.String ENCODING_YELLOW_CURSOR
protected Format mouseFormat
protected long recordingStartTime
protected volatile long recordingStopTime
protected java.util.concurrent.ScheduledThreadPoolExecutor mouseCaptureTimer
protected int videoTrack
protected int audioTrack
protected ScreenRecorder.MouseGrabber mouseGrabber
protected java.util.concurrent.ScheduledFuture mouseFuture
protected java.io.File movieFolder
public ScreenRecorder(java.awt.GraphicsConfiguration cfg)
throws java.io.IOException,
java.awt.AWTException
java.io.IOExceptionjava.awt.AWTExceptionpublic ScreenRecorder(java.awt.GraphicsConfiguration cfg,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat)
throws java.io.IOException,
java.awt.AWTException
java.io.IOExceptionjava.awt.AWTExceptionpublic ScreenRecorder(java.awt.GraphicsConfiguration cfg,
java.awt.Rectangle captureArea,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat)
throws java.io.IOException,
java.awt.AWTException
java.io.IOExceptionjava.awt.AWTExceptionpublic ScreenRecorder(java.awt.GraphicsConfiguration cfg,
java.awt.Rectangle captureArea,
Format fileFormat,
Format screenFormat,
Format mouseFormat,
Format audioFormat,
java.io.File movieFolder)
throws java.io.IOException,
java.awt.AWTException
java.io.IOExceptionjava.awt.AWTExceptionprotected MovieWriter createMovieWriter() throws java.io.IOException
java.io.IOExceptionpublic java.util.List<java.io.File> getCreatedMovieFiles()
protected java.io.File createMovieFile(Format fileFormat) throws java.io.IOException
java.io.IOExceptionpublic ScreenRecorder.State getState()
public java.lang.String getStateMessage()
public long getStartTime()
public void start()
throws java.io.IOException
java.io.IOExceptionprotected void startMouseCapture()
throws java.io.IOException
java.io.IOExceptionprotected void stopMouseCapture()
protected void waitUntilMouseCaptureStopped()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic float getAudioLevelLeft()
public float getAudioLevelRight()
public void stop()
throws java.io.IOException
java.io.IOExceptionprotected void write(Buffer buf) throws java.io.IOException, java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic long getMaxRecordingTime()
public void setMaxRecordingTime(long maxRecordingTime)
public long getMaxFileSize()
public void setMaxFileSize(long maxFileSize)
public javax.sound.sampled.Mixer getAudioMixer()
public void setAudioMixer(javax.sound.sampled.Mixer mixer)
Copyright © 2022. All Rights Reserved.