This page was last modified 09:31, 14 September 2007.
KIJ000745 - JSR-135: VideoControl does not show captured content when Player object is started before setting the Displayable as current
From Forum Nokia Wiki
| ID | KIJ000745 | Creation date | September 14, 2007 |
| Platform | S60 3rd Edition, FP1 | Devices | |
| Category | Java | Subcategory | JSR-135 MMAPI |
Overview
A Player object is created in order to capture an image from the phone’s camera. A VideoControl object is then created and appended to an LCDUI Form. When the Player object is started before setting the form as the current displayable, VideoControl does not show the captured content. The CustomItem control paints only white background.
Description
This happens whenever a Player object is started before Display.getDisplay() is called.
How to reproduce
Form form = new Form("Camera");
// Initializing VideoControl for snapshot taking
player = Manager.createPlayer("capture://video");
player.realize();
vControl = (VideoControl)player.getControl("VideoControl");
form.append((Item)(vControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null)));
player.start(); // user can see where the camera points
Display.getDisplay(this).setCurrent(form);
vControl.setVisible(true); // the video control remains blank
Solution
There is currently no solution. However, the issue can be avoided if Display.getDisplay() is called at least once during the MIDlet’s lifecycle before starting the Player, e.g. in the beginning of MIDlet’s constructor.
form.append((Item)(vControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null))); // Calling Display.getDisplay before starting the player Display.getDisplay(this).setCurrent(form); player.start(); // user can see where the camera points
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| playing 3gp problems | Red Falcon | Mobile Java Media (Graphics & Sounds) | 0 | 2008-05-26 09:13 |
| Play video on Canvas with N 6600 doesnt work. Please help!!! | Robert111 | Mobile Java Media (Graphics & Sounds) | 2 | 2006-02-22 08:45 |
| 3G game development | Kevin Gleeson | Mobile Java General | 2 | 2004-05-17 00:13 |
| Nokia 6680 and N73 problems | bluebelle_88 | Series 40 & S60 Platform Feedback | 10 | 2007-02-08 21:56 |
| DiscoveryListener Q | maozet | Bluetooth Technology | 1 | 2008-02-22 05:50 |

