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
BlackBerry Development Advisor
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: How to adjust the camera preview when screen is rotated?

correct, you need to rotate the camera buffer using camera_set_videovf_property(handle, CAMERA_IMGPROP_ROTATION, angle); and camera_set_video_property(handle, CAMERA_IMGPROP_ROTATION, angle);

I mentioned this previously in the thread.

Then your next question was: "but the viewfinder is now sideways" to which I also provided answers.

 

Just wait for the sample if you are still stuck.  Otherwise read through my posts.

 

Cheers,

Sean

 

Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: How to adjust the camera preview when screen is rotated?


smcveigh wrote:

correct, you need to rotate the camera buffer using camera_set_videovf_property(handle, CAMERA_IMGPROP_ROTATION, angle); and camera_set_video_property(handle, CAMERA_IMGPROP_ROTATION, angle);

I mentioned this previously in the thread.

Then your next question was: "but the viewfinder is now sideways" to which I also provided answers.

 

Just wait for the sample if you are still stuck.  Otherwise read through my posts.

 

Cheers,

Sean

 


The viewfinder is correct.  the only problem is the recorded video.

 

tried your suggestion and not working.

 

I will wait for your example.  thanks

BlackBerry Development Advisor
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: How to adjust the camera preview when screen is rotated?

here is the RotationCamera sample I wrote.

https://github.com/blackberry/Cascades-Community-Samples/tree/master/RotationCamera

 

It should be sufficiently documented.  Feel free to just steal entire functions from it.

 

Cheers,

Sean

Developer
Posts: 1,531
Registered: ‎07-14-2008
My Device: Z10

Re: How to adjust the camera preview when screen is rotated?

Thanks Sean.