fmpeg 自定义IO中断 AVFormatContext::interrupt_callback ,AVIOInterruptCB具体处理方法
来源:互联网 发布:dwg转excel软件 编辑:程序博客网 时间:2024/06/10 08:00
ffmpeg在接收网络流时 例如rtsp ,rtmp流,如果没有数据过来会阻塞:
引用网上的两个例子:http://hi.baidu.com/mingyuejingque/item/d37f505cab9d35ddd48bacc2?qq-pf-to=pcqq.group
http://stackoverflow.com/questions/14558172/ffmpeg-av-read-frame-need-very-long-time-to-stop
有些用ffmpeg命令行的 参数不知道可以改源码
(如果敲代码的原理相同,ffmpeg对外有接口,这里不用改源码,在AVFormatContext *_formatCtx;
中 填写callback 函数 处理中断,
//Initialize intrrupt callback AVIOInterruptCB icb={interruptCallBack,(__bridge void *)(self)}; _formatCtx->interrupt_callback=icb;)
具体流程:看下图:在libavformat/network.c 中更改下列源码
0 0
- fmpeg 自定义IO中断 AVFormatContext::interrupt_callback ,AVIOInterruptCB具体处理方法
- CC2530中断处理方法
- AVFormatContext
- AVFormatContext
- AVFormatContext
- AVFormatContext
- 【汇编】自定义9号中断(键盘输入处理中断)
- 【汇编】自定义9号中断(键盘输入处理中断)
- 在Windows CE增加自定义中断处理
- 在Windows CE增加自定义中断处理
- 在Windows CE增加自定义中断处理
- 在Windows CE增加自定义中断处理
- 在Windows CE增加自定义中断处理
- 在Windows CE增加自定义中断处理
- Linux中断实现方法(三):中断处理模型
- Linux中断实现方法(二):中断处理过程
- ARM Linux对中断的处理--中断注册方法
- arm7 LPC2103 中断的处理方法
- ListView+CursorAdapter+LoaderManger的配合使用
- 通过PowerShell卸载所有的SharePoint 2010 解决方案
- android 开源项目分类汇总
- 12 foreach 装箱拆箱 可变参数 枚举
- JPA实体注解(三)
- fmpeg 自定义IO中断 AVFormatContext::interrupt_callback ,AVIOInterruptCB具体处理方法
- Eclipse全键盘编码攻略之一——入门
- java.io.filenotfoundexception: the system cannot find the file specified
- C++ do while 0 的用法和意义
- pssh,pscp,pslurp使用实践
- UINavigationController详解(二)
- socket,HTTP,ASIHttpRequest的区别
- 二分图判定 nyoj1015(模板)
- 即时通讯之二次开发