Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,我现在也是用的Mediaprojection+mediacodec实现,但当屏幕从横屏切换为竖屏后,两边被黑边充满。这种情况是否有方法,将竖的录屏旋转? #27

Open
liwenjun97 opened this issue Jan 13, 2020 · 1 comment

Comments

@liwenjun97
Copy link

No description provided.

@myrao
Copy link
Owner

myrao commented Jan 20, 2020

其实这个现象是正常的,因为初始是横屏分辨率,编码器和 MediaProjection 初始化的时候就是以横屏分辨率来编码的,如果想要横屏转竖屏,需要中途将 meta-data 重新通知编码器,并且解码器也需要再次解析,会导致很多问题,实现也并非不可,但是付出的代价还不如改一下策略,如果是直播的话就中途断一下。如果是录制到本地,那就中断再次初始化,市面上很难看到一会儿横屏一会儿竖屏的这种视频流吧?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants