
February 26th, 2007, 05:31 AM
|
|
Registered User
|
|
Join Date: Jan 2007
Posts: 6
Time spent in forums: 3 h 12 m 51 sec
Reputation Power: 0
|
|
Hi Problem in Playing 3gp Video File in J2ME....URGENT
Hi all,
I am working on MMAPI. I did playing a mpg on emulator. Now i want to play 3gp video file on the emulator. I have tried but it is not working it is showing a Exception as cannot create a Player for: video/3gpp. The code is as follows:
is = getClass().getResourceAsStream("toyota_version01.3gp");// To play 3gp file from jar file
player = Manager.createPlayer(is, "video/3gpp");
player.realize();
vdc = (VideoControl) player.getControl("VideoControl");
vdc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
if(vdc != null)
{
vdc.setDisplayLocation((getWidth()/2 - vdc.getSourceWidth()/2), ((getHeight()/2 - vdc.getSourceHeight()/2)-30));
vdc.setVisible(true);
player.start();
}
Anybody please check and correct my code.
Thanks in advance,
Dhanalakshmi
|