FFmepg 多线程解码历程 - 5: ff_thread_init
来源:互联网 发布:手机酷狗链接不到网络 编辑:程序博客网 时间:2024/05/22 15:47
//用来判断是帧还是片线程初始化
int ff_thread_init(AVCodecContext *avctx)
{
if (avctx->thread_opaque) {
av_log(avctx, AV_LOG_ERROR, "avcodec_thread_init is ignored after avcodec_open\n");
return -1;
}
#if HAVE_W32THREADS
w32thread_init();
#endif
if (avctx->codec) {
//有效的线程参数,将会设置avctx->active_thread_type,进而判断进入下面if的哪个条件
validate_thread_parameters(avctx);//查看FFmepg 多线程解码历程 - 1:validate_thread_parameters 讲解
if (avctx->active_thread_type&FF_THREAD_SLICE)
return thread_init(avctx);
else if (avctx->active_thread_type&FF_THREAD_FRAME)
return frame_thread_init(avctx); //下一篇讲解frame_thread_init的具体内容
}
return 0;
}
int ff_thread_init(AVCodecContext *avctx)
{
if (avctx->thread_opaque) {
av_log(avctx, AV_LOG_ERROR, "avcodec_thread_init is ignored after avcodec_open\n");
return -1;
}
#if HAVE_W32THREADS
w32thread_init();
#endif
if (avctx->codec) {
//有效的线程参数,将会设置avctx->active_thread_type,进而判断进入下面if的哪个条件
validate_thread_parameters(avctx);//查看FFmepg 多线程解码历程 - 1:validate_thread_parameters 讲解
if (avctx->active_thread_type&FF_THREAD_SLICE)
return thread_init(avctx);
else if (avctx->active_thread_type&FF_THREAD_FRAME)
return frame_thread_init(avctx); //下一篇讲解frame_thread_init的具体内容
}
return 0;
}
- FFmepg 多线程解码历程 - 5: ff_thread_init
- FFmepg 多线程解码历程 - 5: ff_thread_init
- FFmepg 多线程解码历程
- FFmepg 多线程解码历程
- FFmepg 多线程解码历程 - 1:validate_thread_parameters
- FFmepg 多线程解码历程 - 2 :avcodec_decode_video2
- FFmepg 多线程解码历程 - 3: int ff_thread_decode_frame
- FFmepg 多线程解码历程 - 4:avcodec_open2
- FFmepg 多线程解码历程 - 6:frame_thread_init
- FFmepg 多线程解码历程 - 7:submit_packet
- FFmepg 多线程解码历程 - 1:validate_thread_parameters
- FFmepg 多线程解码历程 - 2 :avcodec_decode_video2
- FFmepg 多线程解码历程 - 3: int ff_thread_decode_frame
- FFmepg 多线程解码历程 - 4:avcodec_open2
- FFmepg 多线程解码历程 - 6:frame_thread_init
- FFmepg 多线程解码历程 - 7:submit_packet
- ffmepg开发历程
- FFMEPG avs2 解码支持
- 用byte array 声称的 Java String 对象的长度
- 改写《魔塔》前篇07:碰撞检测(附:前期阶段项目下载)
- 如何通过ssh来连接虚拟机(vmware)中的ubuntu
- KMeans聚类算法
- android定义animation动画效果
- FFmepg 多线程解码历程 - 5: ff_thread_init
- git install on Red Hat 5
- 浅谈C++中const成员和非const成员的联系和区别
- HTTP Live Streaming with a Webcam on Linux using VLC and a Segmenter
- ubuntu 快速部署openvpn
- SSH 登录ubuntu server在命令行中按tab键时总是提示LC_CTYPE 相关信息的解决办法
- 不由XML Layout 文件而由程序动态生成AlertDialog 及在其中附加更多UI 控件
- R.java 文件不能生成原因探究
- Winpcap的安装使用方法