Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Pearl 9100 cannot start camera in full screen

I use code from rim examples to start the camera player in my app:

 

 

player = Manager.createPlayer( "capture://video" );
            player.realize();
            _videoControl = (VideoControl)player.getControl( "VideoControl" );
            if (_videoControl != null)
            {
                _videoField = (Field) _videoControl.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
            	_videoControl.setDisplayFullScreen(true);
                _videoControl.setVisible(true);
            }
            player.start();

 

later i add the _videoField to the screen.

The code seems to work fine on bold and storm but on bb pearl 9100 when the player starts not the whole screen is occupied by the player but about 1/3 of the screen remains blank. Despite calling

setDisplayFullScreen(true)

 

the player still doesn't occupy the whole height of the display. The width is fine - it uses all the width.

Any ideas why is this happening?

 

I also tried this:

 

_videoControl.setDisplaySize(Display.getWidth(), Display.getHeight());

 

 

but the result is the same.

 

----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy
Contributor
Posts: 43
Registered: ‎05-21-2010
My Device: curve 8520
My Carrier: staff

Re: Pearl 9100 cannot start camera in full screen

Hi dx22,

 

do u solve ur problem?

 

i have the same problem, and i think for BB which have screen height > screen widht, especially for BB Pearl, it doesn't work when using:

setDisplayFullScreen(true)

 

The default camera on BB Pearl it self, it has a full width screen, but has a non-full height screen,

so i think it has the same behavior on camera API too.

 

so, u have to set the video size on your own :

setDisplaySize(Display.getWidth(), Display.getHeight() - 1);

 

atleast, it works for me.

 

thank u.

 

 

Developer
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: Pearl 9100 cannot start camera in full screen

[ Edited ]

So did you manage to get it to work in full screen with this?

 

 

setDisplaySize(Display.getWidth(), Display.getHeight() - 1);

 

 

I didn't solve it and created a ticket here:

https://www.blackberry.com/jira/browse/JAVAAPI-1694 (you need bb developer zone account to access it)

 

In that ticket there is a link to the previous ticket where it became clear that this is a bug in rim apis.

 

Which platform version are you using because on older versions the camera view couldn't even be embedded. After update of the os i was able to embed camera view but not in full screen. So please clarify - did you manage to embed the camera view in full screen with the above line of code?

 

 

 

----

UPDATE: I just tried you approach and it doesn't work - the camera view is still not full screen. My os version is v5.0.0.921(Platform 6.2.0.101)

----------------------------------------------------------------------
Press the button to give kudos if I helped you Smiley Happy
Highlighted
Developer
Posts: 50
Registered: ‎12-23-2009
My Device: Not Specified

Re: Pearl 9100 cannot start camera in full screen

Please see the video recording demo that comes with JDE 5.0. There are several parameters sent to the player:

 

_player = javax.microedition.media.Manager.createPlayer("capture://video?" + encoding);

 

 

If you'll check what the value of  "encoding" variable you'll see that it has value like following:

 

ENCODINGS:
encoding=video/3gpp&mode=standard
encoding=video/3gpp&mode=mms
encoding=video/3gpp&width=480&height=360&video_codec=MPEG-4&audio_codec=AMR
encoding=video/3gpp&width=176&height=144&video_codec=MPEG-4&audio_codec=AMR
encoding=video/3gpp&width=480&height=360&video_codec=MPEG-4&audio_codec=PCM
encoding=video/3gpp&width=176&height=144&video_codec=MPEG-4&audio_codec=PCM
encoding=video/3gpp&width=480&height=360&video_codec=MPEG-4&audio_codec=AAC
encoding=video/3gpp&width=176&height=144&video_codec=MPEG-4&audio_codec=AAC
encoding=video/3gpp&width=480&height=360&video_codec=H263&audio_codec=AMR
encoding=video/3gpp&width=176&height=144&video_codec=H263&audio_codec=AMR
encoding=video/3gpp&width=480&height=360&video_codec=H263&audio_codec=PCM
encoding=video/3gpp&width=176&height=144&video_codec=H263&audio_codec=PCM
encoding=video/3gpp&width=480&height=360&video_codec=H263&audio_codec=AAC
encoding=video/3gpp&width=176&height=144&video_codec=H263&audio_codec=AAC

 This is for 9700 simulator. Available width and height are varying according to device model.

 

Contributor
Posts: 43
Registered: ‎05-21-2010
My Device: curve 8520
My Carrier: staff

Re: Pearl 9100 cannot start camera in full screen

@dx22 :

 

like i told u before, i didn't set Pearl with a fullscreen mode, because i can't manage it.

That code just for tricky it.

 

thank u.