×
Namespaces

Variants
Actions

Archived:JSR-135 - VideoControl does not show captured content when Player object is started before setting the Displayable as current (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Compatibility
Platform(s):
S60 3rd Edition FP1
Article
Created: User:Technical writer 1 (14 Sep 2007)
Last edited: hamishwillee (14 Aug 2013)

Contents

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
This page was last modified on 14 August 2013, at 14:29.
35 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×