Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e076173f
Commit
e076173f
authored
Jul 28, 2006
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename variables
Originally committed as revision 5839 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5e441e31
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
mxf.c
libavformat/mxf.c
+25
-25
No files found.
libavformat/mxf.c
View file @
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment