Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
52afa376
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,发现更多精彩内容 >>
提交
52afa376
编写于
12月 11, 2008
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove _t for POSIX compatibility.
Originally committed as revision 16057 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
76f940b2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
13 deletion
+13
-13
libavformat/nut.c
libavformat/nut.c
+3
-3
libavformat/nut.h
libavformat/nut.h
+4
-4
libavformat/nutdec.c
libavformat/nutdec.c
+3
-3
libavformat/nutenc.c
libavformat/nutenc.c
+3
-3
未找到文件。
libavformat/nut.c
浏览文件 @
52afa376
...
...
@@ -47,16 +47,16 @@ int64_t ff_lsb2full(StreamContext *stream, int64_t lsb){
return
((
lsb
-
delta
)
&
mask
)
+
delta
;
}
int
ff_nut_sp_pos_cmp
(
syncpoint_t
*
a
,
syncpoint_
t
*
b
){
int
ff_nut_sp_pos_cmp
(
Syncpoint
*
a
,
Syncpoin
t
*
b
){
return
((
a
->
pos
-
b
->
pos
)
>>
32
)
-
((
b
->
pos
-
a
->
pos
)
>>
32
);
}
int
ff_nut_sp_pts_cmp
(
syncpoint_t
*
a
,
syncpoint_
t
*
b
){
int
ff_nut_sp_pts_cmp
(
Syncpoint
*
a
,
Syncpoin
t
*
b
){
return
((
a
->
ts
-
b
->
ts
)
>>
32
)
-
((
b
->
ts
-
a
->
ts
)
>>
32
);
}
void
ff_nut_add_sp
(
NUTContext
*
nut
,
int64_t
pos
,
int64_t
back_ptr
,
int64_t
ts
){
syncpoint_t
*
sp
=
av_mallocz
(
sizeof
(
syncpoint_
t
));
Syncpoint
*
sp
=
av_mallocz
(
sizeof
(
Syncpoin
t
));
struct
AVTreeNode
*
node
=
av_mallocz
(
av_tree_node_size
);
sp
->
pos
=
pos
;
...
...
libavformat/nut.h
浏览文件 @
52afa376
...
...
@@ -50,14 +50,14 @@ typedef enum{
FLAG_MATCH_TIME
=
2048
,
///<If set, match_time_delta is coded in the frame header
FLAG_CODED
=
4096
,
///<if set, coded_flags are stored in the frame header
FLAG_INVALID
=
8192
,
///<if set, frame_code is invalid
}
flag_t
;
}
Flag
;
typedef
struct
{
uint64_t
pos
;
uint64_t
back_ptr
;
// uint64_t global_key_pts;
int64_t
ts
;
}
syncpoint_
t
;
}
Syncpoin
t
;
typedef
struct
{
uint16_t
flags
;
...
...
@@ -106,8 +106,8 @@ typedef struct {
void
ff_nut_reset_ts
(
NUTContext
*
nut
,
AVRational
time_base
,
int64_t
val
);
int64_t
ff_lsb2full
(
StreamContext
*
stream
,
int64_t
lsb
);
int
ff_nut_sp_pos_cmp
(
syncpoint_t
*
a
,
syncpoint_
t
*
b
);
int
ff_nut_sp_pts_cmp
(
syncpoint_t
*
a
,
syncpoint_
t
*
b
);
int
ff_nut_sp_pos_cmp
(
Syncpoint
*
a
,
Syncpoin
t
*
b
);
int
ff_nut_sp_pts_cmp
(
Syncpoint
*
a
,
Syncpoin
t
*
b
);
void
ff_nut_add_sp
(
NUTContext
*
nut
,
int64_t
pos
,
int64_t
back_ptr
,
int64_t
ts
);
extern
const
Dispositions
ff_nut_dispositions
[];
...
...
libavformat/nutdec.c
浏览文件 @
52afa376
...
...
@@ -846,9 +846,9 @@ assert(0);
static
int
read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
pts
,
int
flags
){
NUTContext
*
nut
=
s
->
priv_data
;
AVStream
*
st
=
s
->
streams
[
stream_index
];
syncpoint_
t
dummy
=
{.
ts
=
pts
*
av_q2d
(
st
->
time_base
)
*
AV_TIME_BASE
};
syncpoint_
t
nopts_sp
=
{.
ts
=
AV_NOPTS_VALUE
,
.
back_ptr
=
AV_NOPTS_VALUE
};
syncpoint_
t
*
sp
,
*
next_node
[
2
]
=
{
&
nopts_sp
,
&
nopts_sp
};
Syncpoin
t
dummy
=
{.
ts
=
pts
*
av_q2d
(
st
->
time_base
)
*
AV_TIME_BASE
};
Syncpoin
t
nopts_sp
=
{.
ts
=
AV_NOPTS_VALUE
,
.
back_ptr
=
AV_NOPTS_VALUE
};
Syncpoin
t
*
sp
,
*
next_node
[
2
]
=
{
&
nopts_sp
,
&
nopts_sp
};
int64_t
pos
,
pos2
,
ts
;
int
i
;
...
...
libavformat/nutenc.c
浏览文件 @
52afa376
...
...
@@ -260,7 +260,7 @@ static void put_v(ByteIOContext *bc, uint64_t val){
put_byte
(
bc
,
val
&
127
);
}
static
void
put_t
(
NUTContext
*
nut
,
StreamContext
*
nus
,
ByteIOContext
*
bc
,
uint64_t
val
){
static
void
put_t
t
(
NUTContext
*
nut
,
StreamContext
*
nus
,
ByteIOContext
*
bc
,
uint64_t
val
){
val
*=
nut
->
time_base_count
;
val
+=
nus
->
time_base
-
nut
->
time_base
;
put_v
(
bc
,
val
);
...
...
@@ -664,7 +664,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
//FIXME: Ensure store_sp is 1 in the first place.
if
(
store_sp
){
syncpoint_
t
*
sp
,
dummy
=
{.
pos
=
INT64_MAX
};
Syncpoin
t
*
sp
,
dummy
=
{.
pos
=
INT64_MAX
};
ff_nut_reset_ts
(
nut
,
*
nus
->
time_base
,
pkt
->
dts
);
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
){
...
...
@@ -684,7 +684,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
ret
=
url_open_dyn_buf
(
&
dyn_bc
);
if
(
ret
<
0
)
return
ret
;
put_t
(
nut
,
nus
,
dyn_bc
,
pkt
->
dts
);
put_t
t
(
nut
,
nus
,
dyn_bc
,
pkt
->
dts
);
put_v
(
dyn_bc
,
sp
?
(
nut
->
last_syncpoint_pos
-
sp
->
pos
)
>>
4
:
0
);
put_packet
(
nut
,
bc
,
dyn_bc
,
1
,
SYNCPOINT_STARTCODE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录