Android: How to record the orientation change in MediaProjection API

589 views Asked by At

I am trying to record the orientation change(Landscape, Upsidedown landscape and upsidedown vertical) with the screen recorder api of android(mediaprojection api)

As in I want the recorded video's orientation to be changed when the screen's orientation is changed while recording.

I was looking to maybe pass some parameters to a function in MediaProjection API but couldn't find a function to do that. The createVirtualDisplay() method in MediaProjection API takes the following parameters: VirtualDisplay createVirtualDisplay (String name, int width, int height, int dpi, int flags, Surface surface, VirtualDisplay.Callback callback, Handler handler)

But it doesn't take the orientation parameter. Am I missing something?

0

There are 0 answers