- Android screen capturer
- The internal looper thread calls the VideoSink "onFrame" implementation of my capturer
- I forward the frame to a given capturerObserver.onFrameCaptured
In earlier versions (lower Android SDK, WebRTC M105) I could forward the frame "as is". Now I'm using SDK 31/33 and M114. The format of the VideoFrame offered via onFrame seems to not be I420 anymore, since I have to explicitly convert it (otherwise a black image is encoded).
This seems to be required now:
public void onFrame(VideoFrame frame) {
VideoFrame i420Frame = new VideoFrame(frame.getBuffer().toI420(), frame.getRotation(), frame.getTimestampNs());
this.capturerObserver.onFrameCapturered(i420Frame);
i420Frame.release();
}
Can anybody elaborate about the format provided in onFrame?