Reputation: 613
I am making a media player app for a TVBox running Android 7.1.2. I want to rotate the HDMI output but the box's rotation is locked to landscape so I cannot rotate the app using setRequestedOrientation
.
The library I use is VLC Android with SurfaceView. I cannot use TextureView because it is so lag and drop FPS.
To rotate the HDMI output, I have tried the following:
:video-filter=rotate, :video-filter=transform
but it will only be available in 4.0.So is there any other way I can try to rotate screen orientation of HDMI output? Is there any chance that we can rotate screen by OpenGl ES or native code?
Thank you.
Upvotes: 0
Views: 1562
Reputation: 19223
so you are saying that you can't use video-filter=rotate
, what about video-filter=transform
?
final ArrayList<String> args = new ArrayList<>();
args.add("--video-filter=transform");
args.add("--transform-type=270");
mLibVLC = new LibVLC(context, args);
mMediaPlayer = new MediaPlayer(mLibVLC);
final IVLCVout vlcVout = mMediaPlayer.getVLCVout();
vlcVout.setVideoView(mSurfaceView);
vlcVout.setWindowSize(mSurfaceView.getWidth(), mSurfaceView.getHeight());
Upvotes: 1