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

Native Development

Reply
Developer
indy2718
Posts: 36
Registered: ‎01-16-2013
My Device: Z10
My Carrier: Telus
Accepted Solution

Mismatch: camera features/resolution from has_feature/specs and usable features/resolution

I was making a non-entertainment native app which uses the camera.  A requirement of my app is set the focus mode of the camera to manual.   

 

My Z10 version 10.1.0.4181 returns true for camera_has_feature(CAMERA_FEATURE_MANUALFOCUS).  

Great, but when I try camera_set_focus_mode(_camera, CAMERA_FOCUSMODE_MANUAL) it returns CAMERA_EOPNOTSUPP.

Is manual focus supported?  I was hoping to use the manual_step functions.

 

Also, there are 3 photo resolutions supported according to camera_get_photo_output_resolutions.

2448x3264   (8 Megapixels)

1836x3264  (6 Megapixels and it's the photo dimensions of the photos taken by the default Z10 camera app).

2448x2448

 

The 6 megapixel dimensional photo works fine, but when I tried the 2448x3264 starting the viewfinder will fail with CAMERA_EINVAL.   It's very concerning that if the Z10 doesn't support 8 megapixel photos, why is it advertised to do so?  Am I missing something concerning stabilization or some parameter I'm not aware of?  

 

Please use plain text.
BlackBerry Development Advisor
kcruise
Posts: 2
Registered: ‎09-11-2013
My Device: Q10, Z10
My Carrier: Rogers

Re: Mismatch: camera features/resolution from has_feature/specs and usable features/resolution

Greetings,

 

Can you tell me the camera unit you are trying to utilize here?

Please use plain text.
Developer
indy2718
Posts: 36
Registered: ‎01-16-2013
My Device: Z10
My Carrier: Telus

Re: Mismatch: camera features/resolution from has_feature/specs and usable features/resolution

Hi, I was using CAMERA_UNIT_REAR.

I found out what was wrong in both cases:

1. For trying to set the manual focus mode and getting CAMERA_EOPNOTSUPP.   You must start the viewfinder first before setting the focus mode.  Then it works.   I'm not quite sure if that's in the documentation.

2. Duh, the aspect ratio of the viewfinder must be the same as the picture you are trying to take.  My mistake.  

Please use plain text.
BlackBerry Development Advisor
kcruise
Posts: 2
Registered: ‎09-11-2013
My Device: Q10, Z10
My Carrier: Rogers

Re: Mismatch: camera features/resolution from has_feature/specs and usable features/resolution

Thanks for posting your solution!

Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Mismatch: camera features/resolution from has_feature/specs and usable features/resolution


indy2718 wrote:
1. For trying to set the manual focus mode and getting CAMERA_EOPNOTSUPP.   You must start the viewfinder first before setting the focus mode.  Then it works.   I'm not quite sure if that's in the documentation.

 


 

That's expected behaviour.  It's not possible to change things that only apply when the camera is running.  The exception of course I think is scene-modes.  If we didn't allow that, then there would be some visible flcker every time you started the viewfinder and then had to change modes.

 

I'll make a note that we should probably add this sort of thing to the docs.  Thanks.

 

Please use plain text.