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
259fe728
Commit
259fe728
authored
Jul 22, 2014
by
Marc-Antoine Arnaud
Committed by
Luca Barbato
Jul 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mxf: Extract origin information from material and source track
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
c9d982aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
mxfdec.c
libavformat/mxfdec.c
+14
-0
No files found.
libavformat/mxfdec.c
View file @
259fe728
...
...
@@ -111,6 +111,7 @@ typedef struct {
UID
*
structural_components_refs
;
int
structural_components_count
;
int64_t
duration
;
uint8_t
origin
;
}
MXFSequence
;
typedef
struct
{
...
...
@@ -686,6 +687,9 @@ static int mxf_read_sequence(void *arg, AVIOContext *pb, int tag, int size, UID
case
0x0201
:
avio_read
(
pb
,
sequence
->
data_definition_ul
,
16
);
break
;
case
0x4b02
:
sequence
->
origin
=
avio_r8
(
pb
);
break
;
case
0x1001
:
sequence
->
structural_components_count
=
avio_rb32
(
pb
);
if
(
sequence
->
structural_components_count
>=
UINT_MAX
/
sizeof
(
UID
))
...
...
@@ -1589,6 +1593,16 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
}
}
st
->
need_parsing
=
AVSTREAM_PARSE_HEADERS
;
if
(
material_track
->
sequence
->
origin
)
{
char
material_origin
[
3
];
snprintf
(
material_origin
,
sizeof
(
material_origin
),
"%d"
,
material_track
->
sequence
->
origin
);
av_dict_set
(
&
st
->
metadata
,
"material_track_origin"
,
material_origin
,
0
);
}
if
(
source_track
->
sequence
->
origin
)
{
char
source_origin
[
3
];
snprintf
(
source_origin
,
sizeof
(
source_origin
),
"%d"
,
source_track
->
sequence
->
origin
);
av_dict_set
(
&
st
->
metadata
,
"source_track_origin"
,
source_origin
,
0
);
}
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
container_ul
=
mxf_get_codec_ul
(
mxf_sound_essence_container_uls
,
essence_container_ul
);
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_NONE
)
...
...
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