Ejemplo Monte
Beschreibung
GraphicsConfiguration gc = GraphicsEnvironment
.getLocalGraphicsEnvironment()
.getDefaultScreenDevice()
.getDefaultConfiguration();
int screenRate = 15;
int bitDepth = 16; // 8, 16, 24
java.lang.Float quality = 1.0f;
// mouse
java.lang.Integer mouseRate = 15; // 30
// audio
java.lang.Float audioRate = 8000f;
java.lang.Integer audioBitsPerSample = 8; // 8, 16
java.lang.Integer audioChannels = 2;
try {
// start filming
pScreen = new ScreenRecorder(gc,
new Rectangle(pScreen_pt.x,pScreen_pt.y,780,600),
new Format(MediaTypeKey, MediaType.FILE,
MovieFolder, "",
MovieFile,smovie_file,
MimeTypeKey, MIME_AVI),
new Format(MediaTypeKey, MediaType.VIDEO,
EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,
CompressorNameKey, COMPRESSOR_NAME_AVI_TECHSMITH_SCREEN_CAPTURE,
DepthKey, bitDepth,
FrameRateKey, Rational.valueOf(screenRate),
QualityKey, quality,
KeyFrameIntervalKey, screenRate * 60),
new Format(MediaTypeKey, MediaType.VIDEO,
EncodingKey, "black",
FrameRateKey, Rational.valueOf(mouseRate)),
new Format(MediaTypeKey, MediaType.AUDIO,
SampleRateKey, Rational.valueOf(audioRate),
SampleSizeInBitsKey, audioBitsPerSample,
ChannelsKey, audioChannels));
pScreen.start();
// start clock
pwatch.start();
} catch (IOException e) {
e.printStackTrace();
} catch (AWTException e) {
e.printStackTrace();
}
try {
// stop filming
pScreen.stop();
// stop clock
pwatch.resetWatch();
} catch (IOException e) {
e.printStackTrace();
}
bscreen = false;
breal = false;
bcloses = true;
pbtnclape.resetImage(0,"CLAPBOARD");
ID:(8826, 0)