Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
7f37f568
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,发现更多精彩内容 >>
提交
7f37f568
编写于
12月 13, 2008
作者:
D
Diego Biurrun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
whitespace cosmetics
Originally committed as revision 16100 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
bda4e394
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
29 deletion
+39
-29
libavformat/allformats.c
libavformat/allformats.c
+9
-9
libavformat/avio.h
libavformat/avio.h
+17
-14
libavformat/aviobuf.c
libavformat/aviobuf.c
+13
-6
未找到文件。
libavformat/allformats.c
浏览文件 @
7f37f568
...
...
@@ -22,16 +22,16 @@
#include "rtp_internal.h"
#include "rdt.h"
#define REGISTER_MUXER(X,x) { \
extern AVOutputFormat x##_muxer; \
if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
#define REGISTER_DEMUXER(X,x) { \
extern AVInputFormat x##_demuxer; \
if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
#define REGISTER_MUXER(X,x) {
extern AVOutputFormat x##_muxer;
\
if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
#define REGISTER_DEMUXER(X,x) {
extern AVInputFormat x##_demuxer;
\
if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
#define REGISTER_PROTOCOL(X,x) { \
extern URLProtocol x##_protocol; \
if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
#define REGISTER_PROTOCOL(X,x) {
extern URLProtocol x##_protocol; \
if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
/* If you do not call this function, then you can select exactly which
formats you want to support */
...
...
libavformat/avio.h
浏览文件 @
7f37f568
...
...
@@ -114,8 +114,8 @@ int av_url_read_pause(URLContext *h, int pause);
* @return >= 0 on success
* @see AVInputFormat::read_seek
*/
int64_t
av_url_read_seek
(
URLContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
int64_t
av_url_read_seek
(
URLContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
/**
* Passing this as the "whence" parameter to a seek function causes it to
...
...
@@ -133,8 +133,8 @@ typedef struct URLProtocol {
int
(
*
url_close
)(
URLContext
*
h
);
struct
URLProtocol
*
next
;
int
(
*
url_read_pause
)(
URLContext
*
h
,
int
pause
);
int64_t
(
*
url_read_seek
)(
URLContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
int64_t
(
*
url_read_seek
)(
URLContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
}
URLProtocol
;
extern
URLProtocol
*
first_protocol
;
...
...
@@ -170,8 +170,8 @@ typedef struct {
unsigned
long
(
*
update_checksum
)(
unsigned
long
checksum
,
const
uint8_t
*
buf
,
unsigned
int
size
);
int
error
;
///< contains the error code or 0 if no error happened
int
(
*
read_pause
)(
void
*
opaque
,
int
pause
);
int64_t
(
*
read_seek
)(
void
*
opaque
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
int64_t
(
*
read_seek
)(
void
*
opaque
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
}
ByteIOContext
;
int
init_put_byte
(
ByteIOContext
*
s
,
...
...
@@ -238,8 +238,8 @@ int url_feof(ByteIOContext *s);
int
url_ferror
(
ByteIOContext
*
s
);
int
av_url_read_fpause
(
ByteIOContext
*
h
,
int
pause
);
int64_t
av_url_read_fseek
(
ByteIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
int64_t
av_url_read_fseek
(
ByteIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
#define URL_EOF (-1)
/** @note return URL_EOF (-1) if EOF */
...
...
@@ -253,7 +253,7 @@ int url_fprintf(ByteIOContext *s, const char *fmt, ...);
#endif
/** @note unlike fgets, the EOL character is not returned and a whole
line is parsed. return NULL if first char read was EOF */
line is parsed. return NULL if first char read was EOF */
char
*
url_fgets
(
ByteIOContext
*
s
,
char
*
buf
,
int
buf_size
);
void
put_flush_packet
(
ByteIOContext
*
s
);
...
...
@@ -274,7 +274,7 @@ int get_buffer(ByteIOContext *s, unsigned char *buf, int size);
int
get_partial_buffer
(
ByteIOContext
*
s
,
unsigned
char
*
buf
,
int
size
);
/** @note return 0 if EOF, so you cannot use it if EOF handling is
necessary */
necessary */
int
get_byte
(
ByteIOContext
*
s
);
unsigned
int
get_le24
(
ByteIOContext
*
s
);
unsigned
int
get_le32
(
ByteIOContext
*
s
);
...
...
@@ -295,7 +295,7 @@ static inline int url_is_streamed(ByteIOContext *s)
}
/** @note when opened as read/write, the buffers are only used for
writing */
writing */
int
url_fdopen
(
ByteIOContext
**
s
,
URLContext
*
h
);
/** @warning must be called before any I/O */
...
...
@@ -307,7 +307,7 @@ int url_setbufsize(ByteIOContext *s, int buf_size);
int
url_resetbuf
(
ByteIOContext
*
s
,
int
flags
);
/** @note when opened as read/write, the buffers are only used for
writing */
writing */
int
url_fopen
(
ByteIOContext
**
s
,
const
char
*
filename
,
int
flags
);
int
url_fclose
(
ByteIOContext
*
s
);
URLContext
*
url_fileno
(
ByteIOContext
*
s
);
...
...
@@ -355,9 +355,12 @@ int url_open_dyn_packet_buf(ByteIOContext **s, int max_packet_size);
*/
int
url_close_dyn_buf
(
ByteIOContext
*
s
,
uint8_t
**
pbuffer
);
unsigned
long
ff_crc04C11DB7_update
(
unsigned
long
checksum
,
const
uint8_t
*
buf
,
unsigned
int
len
);
unsigned
long
ff_crc04C11DB7_update
(
unsigned
long
checksum
,
const
uint8_t
*
buf
,
unsigned
int
len
);
unsigned
long
get_checksum
(
ByteIOContext
*
s
);
void
init_checksum
(
ByteIOContext
*
s
,
unsigned
long
(
*
update_checksum
)(
unsigned
long
c
,
const
uint8_t
*
p
,
unsigned
int
len
),
unsigned
long
checksum
);
void
init_checksum
(
ByteIOContext
*
s
,
unsigned
long
(
*
update_checksum
)(
unsigned
long
c
,
const
uint8_t
*
p
,
unsigned
int
len
),
unsigned
long
checksum
);
/* udp.c */
int
udp_set_remote_url
(
URLContext
*
h
,
const
char
*
uri
);
...
...
libavformat/aviobuf.c
浏览文件 @
7f37f568
...
...
@@ -68,7 +68,8 @@ ByteIOContext *av_alloc_put_byte(
void
*
opaque
,
int
(
*
read_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
int
(
*
write_packet
)(
void
*
opaque
,
uint8_t
*
buf
,
int
buf_size
),
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
))
{
int64_t
(
*
seek
)(
void
*
opaque
,
int64_t
offset
,
int
whence
))
{
ByteIOContext
*
s
=
av_mallocz
(
sizeof
(
ByteIOContext
));
init_put_byte
(
s
,
buffer
,
buffer_size
,
write_flag
,
opaque
,
read_packet
,
write_packet
,
seek
);
...
...
@@ -322,17 +323,23 @@ static void fill_buffer(ByteIOContext *s)
}
}
unsigned
long
ff_crc04C11DB7_update
(
unsigned
long
checksum
,
const
uint8_t
*
buf
,
unsigned
int
len
){
unsigned
long
ff_crc04C11DB7_update
(
unsigned
long
checksum
,
const
uint8_t
*
buf
,
unsigned
int
len
)
{
return
av_crc
(
av_crc_get_table
(
AV_CRC_32_IEEE
),
checksum
,
buf
,
len
);
}
unsigned
long
get_checksum
(
ByteIOContext
*
s
){
unsigned
long
get_checksum
(
ByteIOContext
*
s
)
{
s
->
checksum
=
s
->
update_checksum
(
s
->
checksum
,
s
->
checksum_ptr
,
s
->
buf_ptr
-
s
->
checksum_ptr
);
s
->
update_checksum
=
NULL
;
return
s
->
checksum
;
}
void
init_checksum
(
ByteIOContext
*
s
,
unsigned
long
(
*
update_checksum
)(
unsigned
long
c
,
const
uint8_t
*
p
,
unsigned
int
len
),
unsigned
long
checksum
){
void
init_checksum
(
ByteIOContext
*
s
,
unsigned
long
(
*
update_checksum
)(
unsigned
long
c
,
const
uint8_t
*
p
,
unsigned
int
len
),
unsigned
long
checksum
)
{
s
->
update_checksum
=
update_checksum
;
if
(
s
->
update_checksum
){
s
->
checksum
=
checksum
;
...
...
@@ -665,8 +672,8 @@ int av_url_read_fpause(ByteIOContext *s, int pause)
return
s
->
read_pause
(
s
->
opaque
,
pause
);
}
int64_t
av_url_read_fseek
(
ByteIOContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
int64_t
av_url_read_fseek
(
ByteIOContext
*
s
,
int
stream_index
,
int64_t
timestamp
,
int
flags
)
{
URLContext
*
h
=
s
->
opaque
;
int64_t
ret
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录