BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 03-10-2010, 02:37 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2010
Model: 8900
PIN: N/A
Carrier: trainee
Posts: 30
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default make more than one clip while recording

Please Login to Remove!

hi !

how to make more than one video clip,while recording.
is it possible using for loop?

i m using following code to record one clip:

private class StartRecordingThread extends Thread
{
public void run()
{
try{

videoEncodings = System
.getProperty("video.encodings");

final boolean hasVideoRecording = videoEncodings != null
&& videoEncodings.length() > 0;

if (player == null || recorder == null)
{
if (hasVideoRecording)
{
int encodingSpace = videoEncodings
.indexOf(' ');
if (encodingSpace != -1)
{
videoEncodings = videoEncodings
.substring(0, encodingSpace);
}
player = Manager
.createPlayer("capture://video?"
+ videoEncodings);
player.start();
VideoControl video = (VideoControl) player
.getControl("VideoControl");
cameraView = (Field) video
.initDisplayMode(
VideoControl.USE_GUI_PRIMITIVE,
"net.rim.device.api.ui.Field");
getApplication().invokeLater(new Runnable()
{
public void run()
{
add(cameraView);
}
});

}

recorder = (RecordControl) player
.getControl("RecordControl");
}


String PATH = System.getProperty("fileconn.dir.videos") + "video.3gp";
conn = (FileConnection)Connector.open(PATH,Connector.READ _WRITE);
if(!conn.exists())
conn.create();
conn.truncate(0);
// conn.close();

OutputStream out=conn.openDataOutputStream();
recorder.setRecordStream(out);
recorder.startRecord();
recording = true;
Thread.currentThread().sleep(15000);
recorder.stopRecord();
recorder.commit();
recording = false;
out.close();
conn.close();

player.stop();
player.deallocate();
player.close();
//conn.close();//end of fro loop
}
catch (Throwable t)
{
Dialog.alert(t.getMessage());
t.printStackTrace();
}
}

}
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

General Electric 8AB15A4AL1 AC AMMETER Amp Meter 0-5A 25-125 hertz Used
$39.0
General Electric 8AB15A4AL1 AC AMMETER Amp Meter 0-5A 25-125 hertz Used pictureAC Ammeter 0 to 1 Amp AC Panel Mount PM 1 AC
$12.0
AC Ammeter 0 to 1 Amp AC Panel Mount PM 1 AC pictureAntique WESTON AMMETER Model 273 (#22980) 400 Amp DC - 10 inches - Steampunk
$25.0
Antique WESTON AMMETER Model 273 (#22980) 400 Amp DC - 10 inches - Steampunk pictureDT830B LCD Digital Multimeter Voltmeter Ammeter AC DC Voltage OHM Circuit Tester
$0.11
DT830B LCD Digital Multimeter Voltmeter Ammeter AC DC Voltage OHM Circuit Tester pictureANENG AN8008 Digital Multimeter 9999 Counts Square Ammeter Wave Voltage AC/DC
$25.19
ANENG AN8008 Digital Multimeter 9999 Counts Square Ammeter Wave Voltage AC/DC picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.