ChillingVan / AndroidInstantVideo

展现Android硬编码下的视频数据流动,可以对视频做处理,例如加滤镜,加水印等,做直播推流(用RTMP)。 Show the stream of Android video hardware encode, including video processing and video publishing by RTMP.
Apache License 2.0
718 stars 196 forks source link

如何实现预览的分辨率和录像的分辨率不同 #13

Closed jinyingfeng closed 6 years ago

jinyingfeng commented 6 years ago

预览的CameraPreviewTextureView分辨率是180x320,录像的分辨率是1080x1920,我通过 @Override public void onSurfaceChanged(int width, int height) { width=1080; height=1920; super.onSurfaceChanged(width, height); } 实现了效果,但是预览窗口的180x320里的内容只是整个画面1080x1920的一部分,不是全部 请问,如何解决这个问题,谢谢

ChillingVan commented 6 years ago

试试在drawSurfaceTexture时,参数填入你想要的宽高

jinyingfeng commented 6 years ago

谢谢,@override public void onSurfaceChanged(int width, int height) { width=1080; height=1920; super.onSurfaceChanged(width, height); } + drawSurfaceTexture 搞定了:)