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
Highlighted
Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ
Accepted Solution

Larger camera viewfinder when decreasing output size?

When changing the dimension of the output video from the camera frames (callback) I had to change the size on both the camera and viewfinder... But is there a way to keep the displayed viewfinder large? Can I open two viewfinders?
BlackBerry Development Advisor
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

Re: Larger camera viewfinder when decreasing output size?

Unfortunately, no.  The same buffers displayed to the screen are used for video encoding on platforms which report CAMERA_FEATURE_PREVIEWISVIDEO (eg. PlayBook and Dev Alpha).  This is a hardware limitation.  We have roughed-in support for future hardware which may be able to provide 2 streams of different sizes, which is why you're noticing you had to change 2 settings.

 

You are free to size your viewfinder window larger than the actual resolution though.  The same way a 1080p viewfinder won't actually fit on the screen, you can up-scale a smaller viewfinder by just updating the window properties (or via a comparable cascades foreign window control setting).

 

Cheers,

Sean

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Larger camera viewfinder when decreasing output size?

[ Edited ]

Thanks.

 

Yea, this works fine and doesn't look "scaled" at all (pixely):

 

void onWindowAttached(unsigned long handle, const QString &group, const QString &id)
{
    ...

    int size[] = {768, 1280};
    screen_set_window_property_iv(win, SCREEN_PROPERTY_SIZE, size);

    ...
}