The video display layer is based on SurfaceView in the JAVA layer, and is rendered by OpenGL in the native (native C/C++) layer (connected to ANativeWindow through EGL).Decode based on FFmpeg, not based on Android's own MediaPlayer player, nor based on Android's mediacodec hardware decoding.Every two frames of video are separated by a fixed delay, so there is a problem of slow and fast video playback It only demonstrates video decoding and display, and does not perform audio decoding or audio and video synchronization.In fact, we can also use OpenGL to perform hardware rendering, reduce CPU consumption, and improve the performance of the entire video playback. In my blog post Video playback of Android Native Window (ANativeWindow) based on FFmpeg and SurfaceView In the Android platform, we have implemented video decoding at the native (C/C++) layer through FFmpeg, and the display of images through SurfaceView (based on ANativeWindow).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |