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)

Jump to: navigation, search
Archived.png
Archived: 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.


SignpostIcon FilmReel 52.png
Article Metadata

Compatibility
Platform(s): S60 3rd Edition FP1

Article
Created: User:Technical writer 1 (14 Sep 2007)
Last edited: hamishwillee (28 Jun 2012)

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 28 June 2012, at 08:40.
132 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved