Closed rolandvar closed 7 years ago
Hi, I don't implement and test yet and this is just assuming, please try followings.
As I know MediaCodec encoder can not change input Surface while encoding, but this sample use offscreen rendering technique to render video images on both screen(preview) and encoder at the same time. This means we can keep input Surface from MediaCodec encoder even if we change video source.
You may see error related SurfaceTexture(to receive video images for offscreen rendering) when changing camera. In that case I assume you need to dispose old SurfaceTexture and create it again (you will need exclusion control to avoid rendering while re-creating SurfaceTexture). saki
Close this because there are no activity
@Makingweb Did you implemented the switch camera successfully?
How I can add a method to change the camera while recording?