Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
e076173f
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,发现更多精彩内容 >>
提交
e076173f
编写于
7月 28, 2006
作者:
B
Baptiste Coudurier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename variables
Originally committed as revision 5839 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
5e441e31
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
25 addition
and
25 deletion
+25
-25
libavformat/mxf.c
libavformat/mxf.c
+25
-25
未找到文件。
libavformat/mxf.c
浏览文件 @
e076173f
...
...
@@ -89,8 +89,8 @@ typedef struct MXFTrack {
typedef
struct
MXFDescriptor
{
UID
uid
;
UID
essence_container
;
UID
essence_co
mpression
;
UID
essence_container
_ul
;
UID
essence_co
dec_ul
;
enum
CodecType
codec_type
;
AVRational
sample_rate
;
AVRational
aspect_ratio
;
...
...
@@ -596,7 +596,7 @@ static int mxf_read_metadata_multiple_descriptor(MXFContext *mxf, KLVPacket *klv
static
int
mxf_read_metadata_generic_descriptor
(
MXFContext
*
mxf
,
KLVPacket
*
klv
)
{
ByteIOContext
*
pb
=
&
mxf
->
fc
->
pb
;
MXFDescriptor
*
desc
=
av_mallocz
(
sizeof
(
*
desc
));
MXFDescriptor
*
desc
riptor
=
av_mallocz
(
sizeof
(
*
descriptor
));
int
bytes_read
=
0
;
int
i
,
j
;
...
...
@@ -607,44 +607,44 @@ static int mxf_read_metadata_generic_descriptor(MXFContext *mxf, KLVPacket *klv)
dprintf
(
"tag 0x%04X, size %d
\n
"
,
tag
,
size
);
switch
(
tag
)
{
case
0x3C0A
:
get_buffer
(
pb
,
desc
->
uid
,
16
);
get_buffer
(
pb
,
desc
riptor
->
uid
,
16
);
break
;
case
0x3004
:
get_buffer
(
pb
,
desc
->
essence_container
,
16
);
get_buffer
(
pb
,
desc
riptor
->
essence_container_ul
,
16
);
break
;
case
0x3006
:
desc
->
linked_track_id
=
get_be32
(
pb
);
desc
riptor
->
linked_track_id
=
get_be32
(
pb
);
break
;
case
0x3201
:
/* PictureEssenceCoding */
desc
->
codec_type
=
CODEC_TYPE_VIDEO
;
get_buffer
(
pb
,
desc
->
essence_compression
,
16
);
desc
riptor
->
codec_type
=
CODEC_TYPE_VIDEO
;
get_buffer
(
pb
,
desc
riptor
->
essence_codec_ul
,
16
);
break
;
case
0x3203
:
desc
->
width
=
get_be32
(
pb
);
desc
riptor
->
width
=
get_be32
(
pb
);
break
;
case
0x3202
:
desc
->
height
=
get_be32
(
pb
);
desc
riptor
->
height
=
get_be32
(
pb
);
break
;
case
0x320E
:
desc
->
aspect_ratio
.
num
=
get_be32
(
pb
);
desc
->
aspect_ratio
.
den
=
get_be32
(
pb
);
desc
riptor
->
aspect_ratio
.
num
=
get_be32
(
pb
);
desc
riptor
->
aspect_ratio
.
den
=
get_be32
(
pb
);
break
;
case
0x3D0A
:
desc
->
block_align
=
get_be16
(
pb
);
desc
riptor
->
block_align
=
get_be16
(
pb
);
break
;
case
0x3D03
:
desc
->
sample_rate
.
num
=
get_be32
(
pb
);
desc
->
sample_rate
.
den
=
get_be32
(
pb
);
desc
riptor
->
sample_rate
.
num
=
get_be32
(
pb
);
desc
riptor
->
sample_rate
.
den
=
get_be32
(
pb
);
break
;
case
0x3D06
:
/* SoundEssenceCompression */
desc
->
codec_type
=
CODEC_TYPE_AUDIO
;
get_buffer
(
pb
,
desc
->
essence_compression
,
16
);
desc
riptor
->
codec_type
=
CODEC_TYPE_AUDIO
;
get_buffer
(
pb
,
desc
riptor
->
essence_codec_ul
,
16
);
break
;
case
0x3D07
:
desc
->
channels
=
get_be32
(
pb
);
desc
riptor
->
channels
=
get_be32
(
pb
);
break
;
case
0x3D01
:
desc
->
bits_per_sample
=
get_be32
(
pb
);
desc
riptor
->
bits_per_sample
=
get_be32
(
pb
);
break
;
default:
url_fskip
(
pb
,
size
);
...
...
@@ -653,13 +653,13 @@ static int mxf_read_metadata_generic_descriptor(MXFContext *mxf, KLVPacket *klv)
}
for
(
i
=
0
;
i
<
mxf
->
packages_count
;
i
++
)
{
if
(
mxf
->
packages
[
i
])
{
if
(
!
memcmp
(
mxf
->
packages
[
i
]
->
descriptor_ref
,
desc
->
uid
,
16
))
{
mxf
->
packages
[
i
]
->
descriptor
=
desc
;
if
(
!
memcmp
(
mxf
->
packages
[
i
]
->
descriptor_ref
,
desc
riptor
->
uid
,
16
))
{
mxf
->
packages
[
i
]
->
descriptor
=
desc
riptor
;
return
0
;
}
else
if
(
mxf
->
packages
[
i
]
->
descriptor
)
{
/* MultipleDescriptor */
for
(
j
=
0
;
j
<
mxf
->
packages
[
i
]
->
descriptor
->
sub_descriptors_count
;
j
++
)
{
if
(
!
memcmp
(
mxf
->
packages
[
i
]
->
descriptor
->
sub_descriptors_refs
[
j
],
desc
->
uid
,
16
))
{
mxf
->
packages
[
i
]
->
descriptor
->
sub_descriptors
[
j
]
=
desc
;
if
(
!
memcmp
(
mxf
->
packages
[
i
]
->
descriptor
->
sub_descriptors_refs
[
j
],
desc
riptor
->
uid
,
16
))
{
mxf
->
packages
[
i
]
->
descriptor
->
sub_descriptors
[
j
]
=
desc
riptor
;
return
0
;
}
}
...
...
@@ -789,9 +789,9 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
continue
;
}
#ifdef DEBUG
PRINT_KEY
(
descriptor
->
essence_co
mpression
);
PRINT_KEY
(
descriptor
->
essence_co
dec_ul
);
#endif
st
->
codec
->
codec_id
=
mxf_get_codec_id
(
mxf_codec_uls
,
&
descriptor
->
essence_co
mpression
);
st
->
codec
->
codec_id
=
mxf_get_codec_id
(
mxf_codec_uls
,
&
descriptor
->
essence_co
dec_ul
);
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_VIDEO
)
{
st
->
codec
->
width
=
descriptor
->
width
;
st
->
codec
->
height
=
descriptor
->
height
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录