问题
Can we render YUV frames from ffmpeg streaming output(AV_PIX_FMT_YUV420P) directly in Android screen without converting to RGB format?
回答1:
I've had some experience with Google WebRTC open source project recently.
It provide a fully packaged video call example, also contains an Android demo.
What the demo doing is displaying decoded video frames, which is I420(YUV420P) pixel format.
Take a look at the source code: https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/video_render/android/video_render_opengles20.cc
来源:https://stackoverflow.com/questions/26407165/rendering-yuv-ffmpeg-frames-in-android-native-ndk