Hi,guys:
Does any body know what cause the Player throw an exception called "Unable to realize".My test phone is Samsung S5620.I want to play a 3gp video using "rtsp protocol".Following is pieces of my code.
try{
if (player == null) {
player = Manager.createPlayer(url);
player.addPlayerListener(this);
}
if (player != null) {
player.realize();
player.prefetch();
Control[] controls = player.getControls();
for (int i = 0; i < controls.length; i++) {
if (controls[i] instanceof VideoControl) {
videoC = (VideoControl) controls[i];
videoC.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,
Display.getInstance().getCanvasImpl());
videoC.setDisplayLocation(videoX, videoY);
videoC.setDisplaySize(videoW, videoH);
videoC.setVisible(false);
}
if (controls[i] instanceof VolumeControl) {
volumeC = (VolumeControl) controls[i];
volumeLevel = volumeC.getLevel();
if (volumeLevel == 0) {
volumeC.setLevel(60);
}
}
}
in_Player_State = PLAYER_STATE_DEVICE_PREPARE;
player.start();
setVisable(true);
in_Player_State = PLAYER_STATE_DEVICE_STARTED;
}catch(Exception e){
//Unable to realize -initial failed
}

Reply With Quote

