可以参考下面两篇文章,写的很好 https://blog.csdn.net/avideointerfaces/article/details/91958986 https://blog.csdn.net/maweifei/article/details/81148414