j2me and video recording

C

cloud139

Ciao folks,
does RecordControl is a good solution to record a live video?
I explain the question: can RecordControl record a live video from
camera?

I post some code:
public void recordVideo()
{
try
{
//Create a Player that captures live audio.
//Player p = Manager.createPlayer("capture://audio");
//p.realize();
// Get the RecordControl, set the record stream,
// start the Player and record for 5 seconds.
rc = (RecordControl)player.getControl("RecordControl");
output = new ByteArrayOutputStream();
rc.setRecordStream(output);
rc.startRecord();
//player.start();
Thread.currentThread().sleep(5000);
//rc.commit();
//player.close();
}
//catch (IOException ioe) {}
//catch (MediaException me) {}
catch (Exception ie) { }
}

public void stopRecord()
{
try
{
System.out.println("BUFFER OUTPUT:" + output.size());
rc.commit();
rc.stopRecord();
}
catch (Exception e){}
}
}

I found this code on many forums and it doesn't work over every
configuration I tryied (SUN wireless toolkit and some mobile phones
including Nokia 6680 and SonyEricsson K700i).
By specifing: <rc=(RecordControl)player.getControl("RecordControl"); >
this returns null even if the device supports video recording (checking
<supports.video.capture>)....

thank you all
 
J

Jeffrey Spoon

In message <[email protected]>,


I found this code on many forums and it doesn't work over every
configuration I tryied (SUN wireless toolkit and some mobile phones
including Nokia 6680 and SonyEricsson K700i).
By specifing: <rc=(RecordControl)player.getControl("RecordControl"); >
this returns null even if the device supports video recording (checking
<supports.video.capture>)....

thank you all


Isn't the problem with the phone manufacturers implementations of J2ME,
in that it's not always correctly implemented on every make and model of
phone. So the code could be fine.

This is what put me off developing some stuff in J2ME MIDP, I wasn't
sure the likelihood of it working on the various different phone models
because the Java and MIDP implementations are often buggy and all I had
to test was one phone model and the various phone emulators.
 
C

cloud139

Jeffrey Spoon ha scritto:
In message <[email protected]>,





Isn't the problem with the phone manufacturers implementations of J2ME,
in that it's not always correctly implemented on every make and model of
phone. So the code could be fine.

This is what put me off developing some stuff in J2ME MIDP, I wasn't
sure the likelihood of it working on the various different phone models
because the Java and MIDP implementations are often buggy and all I had
to test was one phone model and the various phone emulators.


Thank you Jeffrey, i had the same feeling when i had this kind of
problems at first.... but at least i hoped it could be a my mistake in
the code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top