最近想做一个基于ffmpeg的播放器,最好的方法就是参考ffplay。简单分析一下

在stream_open后启动三个线程


  read_thread: 关键函数av_read_frame 作用是读取帧 推测单独拿出一个线程是因为接受网络数据时,怕因堵塞丢包

  video_thread:  关键函数avcodec_decode_video2 解码视频,单独解码线程,解码后放入队列,能够减少绘制时延时

  refresh_thread: 产生各种event,包括绘制消息


   在event_loop内关键函数 video_refresh:绘制


流程图:


ffplay流程分析



转载地址: https://blog.csdn.net/liuhongxiangm/article/details/17790019

相关文章:

  • 2021-09-15
  • 2021-11-16
  • 2021-12-07
  • 2021-08-08
  • 2021-11-24
  • 2021-09-06
  • 2021-07-27
  • 2022-12-23
猜你喜欢
  • 2021-10-22
  • 2022-12-23
  • 2021-08-21
  • 2021-10-07
  • 2022-02-26
  • 2022-12-23
相关资源
相似解决方案