我正在为运行Android7.1.2的TVBox制作一个媒体播放器应用程序。我想要旋转的HDMI输出,但盒子的旋转锁定为景观,所以我不能旋转应用程序使用setRequestedOrientation。我使用的库是带有SurfaceView的VLC。我不能使用TextureView,因为它太滞后了,不能使用FPS。
为了旋转HDMI输出,我尝试了以下方法:
:video-filter=rotate, :video-filter=transform,但它只能在4.0中使用。那么,还有其他方法可以尝试旋转HDMI输出的屏幕方向吗?我们是否有可能通过OpenGl、ES或本机代码旋转屏幕?
谢谢。
发布于 2021-03-01 13:40:26
所以你说你不能使用video-filter=rotate,那么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());https://stackoverflow.com/questions/66422763
复制相似问题