I'm developing a video recording program on 6131 & 6212 using Java ME with JSR135 MMAPI support. I'm trying to recording video and save it to SD card.
Here is how I did:
Player videoPlayer = Manager.createPlayer("capture://video");
videoPlayer.realize();
RecordControl videoRecordControl = (RecordControl) videoPlayer.getControl("RecordControl");
String file = "file:///e:/" + String.valueOf(System.currentTimeMillis()) + ".3gp";
FileConnection fcVideo = (FileConnection) Connector.open(file);
if (!fcVideo.exists()) {
fcVideo.create();
}
videoRecordControl.setRecordStream(fcVideo.openOutputStream());
int recordSize = Integer.MAX_VALUE - 1;
recordSize = videoRecordControl.setRecordSizeLimit(recordSize);
videoRecordControl.startRecord();
videoPlayer.start();
// Do something else and wait for stop command
videoPlayer.stop();
videoRecordControl.commit();
videoPlayer.close();
videoRecordControl = null;
fcVideo.close();
fcVideo = null;
When recording video using Player and RecordControl objects, there seems to be some file size or time length limit for recording video. It happens even after I set the record size of RecordControl using setRecordSize(Integer.MAX_VALUE - 1).
Can anybody give me some advise on this?
Or where can I find more information about video recording using MMAPI?
I downloaded 'Mobile Media API Support In Nokia Devices' resource from:
http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html
http://www.forum.nokia.com/info/sw.n..._0_en.xls.html
But there are no information for these two phones (6131 & 6212) and no information about record size limit.
Thanks for any idea in advance!![]()



