Are Somebody knows how to rotate liveviewOrientation in Sony Camera remote API

94 Views Asked by At

I'm using the Sony Camera API for taking a picture remotely, but when I rotate the camera streaming image is still vertical. API ver. is 2.40. I checked the Reference of API but there is nothing about orientation of live view

1

There are 1 best solutions below

1
On

Look to api getevent (pooling or callback) , you will see a liveviewOrientation value in the result.

{ "type":"liveviewOrientation", "liveviewOrientation":"90" }

Then you have to rotate your output stream.

It's device dependant

Rotate:

Read the stream, look for Common Header to decode "Packet",then extract JPEG image from one "Packet",decode it.
Rotate the image according to liveviewOrientation, then show it to your display.