Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
019ac05a
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
019ac05a
编写于
7月 17, 2003
作者:
F
Fabrice Bellard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added primitive aborting system
Originally committed as revision 2058 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
d5809b0a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
1 deletion
+32
-1
libavformat/avio.c
libavformat/avio.c
+22
-0
libavformat/avio.h
libavformat/avio.h
+10
-1
未找到文件。
libavformat/avio.c
浏览文件 @
019ac05a
...
...
@@ -19,7 +19,10 @@
#include "avformat.h"
#include <ctype.h>
static
int
default_interrupt_cb
(
void
);
URLProtocol
*
first_protocol
=
NULL
;
URLInterruptCB
*
url_interrupt_cb
=
default_interrupt_cb
;
int
register_protocol
(
URLProtocol
*
protocol
)
{
...
...
@@ -165,3 +168,22 @@ void url_get_filename(URLContext *h, char *buf, int buf_size)
{
pstrcpy
(
buf
,
buf_size
,
h
->
filename
);
}
static
int
default_interrupt_cb
(
void
)
{
return
0
;
}
/**
* The callback is called in blocking functions to test regulary if
* asynchronous interruption is needed. -EINTR is returned in this
* case by the interrupted function. 'NULL' means no interrupt
* callback is given.
*/
void
url_set_interrupt_cb
(
URLInterruptCB
*
interrupt_cb
)
{
if
(
!
interrupt_cb
)
interrupt_cb
=
default_interrupt_cb
;
url_interrupt_cb
=
interrupt_cb
;
}
libavformat/avio.h
浏览文件 @
019ac05a
...
...
@@ -28,6 +28,8 @@ typedef struct URLPollEntry {
#define URL_WRONLY 1
#define URL_RDWR 2
typedef
int
URLInterruptCB
(
void
);
int
url_open
(
URLContext
**
h
,
const
char
*
filename
,
int
flags
);
int
url_read
(
URLContext
*
h
,
unsigned
char
*
buf
,
int
size
);
int
url_write
(
URLContext
*
h
,
unsigned
char
*
buf
,
int
size
);
...
...
@@ -38,6 +40,12 @@ offset_t url_filesize(URLContext *h);
int
url_get_max_packet_size
(
URLContext
*
h
);
void
url_get_filename
(
URLContext
*
h
,
char
*
buf
,
int
buf_size
);
/* the callback is called in blocking functions to test regulary if
asynchronous interruption is needed. -EINTR is returned in this
case by the interrupted function. 'NULL' means no interrupt
callback is given. */
void
url_set_interrupt_cb
(
URLInterruptCB
*
interrupt_cb
);
/* not implemented */
int
url_poll
(
URLPollEntry
*
poll_table
,
int
n
,
int
timeout
);
...
...
@@ -52,6 +60,7 @@ typedef struct URLProtocol {
}
URLProtocol
;
extern
URLProtocol
*
first_protocol
;
extern
URLInterruptCB
*
url_interrupt_cb
;
int
register_protocol
(
URLProtocol
*
protocol
);
...
...
@@ -100,7 +109,7 @@ int url_feof(ByteIOContext *s);
#define URL_EOF (-1)
int
url_fgetc
(
ByteIOContext
*
s
);
int
url_fprintf
(
ByteIOContext
*
s
,
const
char
*
fmt
,
...);
int
url_fprintf
(
ByteIOContext
*
s
,
const
char
*
fmt
,
...)
__attribute__
((
format
(
printf
,
2
,
3
)))
;
char
*
url_fgets
(
ByteIOContext
*
s
,
char
*
buf
,
int
buf_size
);
void
put_flush_packet
(
ByteIOContext
*
s
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录