语言

Menu
Sites
Language
Camera preview usage with OnCameraPreviewed () callback

Hi all,
I am trying to use StartPreview() method of the Camera class this way:
r = _pCamera->StartPreview(NULL, true);
And I am extracting [in] previewedData ByteBuffer inside OnCameraPreviewed () callback but the preview image is rotated on 90 degrees and flipped
And I should rotate the image on 270 degrees and flip manually.
Did anybody meet such issue? Is it ok?

Thank you.
Alexey.

响应

2 回复
Alex Ashirov

Hi Alexey,

Please take a look at help for the Tizen::Media::ICameraEventListener::OnCameraPreviewed(). According to the help:

"The camera rotation can differ according to the physical design.
For keeping compatibility between the targets, the application must check the hardware camera rotation. Based on this information, the application can rotate the preview data."

Also, the help topic contains example demonstrates how to use the OnCameraPreviewed() method to rotate the preview data in the portrait mode.

Alex Dem


Hi Alex,
I have studied this :-)
One more issue is in next: for M0 devices I am able to use Tizen::Media::Camera::SetPreviewRotation() but  this id does not work for M1
Alexey.