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
2bd26dea
Commit
2bd26dea
authored
May 19, 2018
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mxfdec: add support for recognizing timed text streams
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
d070d6f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
mxfdec.c
libavformat/mxfdec.c
+8
-0
No files found.
libavformat/mxfdec.c
View file @
2bd26dea
...
@@ -1280,6 +1280,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
...
@@ -1280,6 +1280,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
static
const
MXFCodecUL
mxf_data_essence_container_uls
[]
=
{
static
const
MXFCodecUL
mxf_data_essence_container_uls
[]
=
{
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x04
,
0x01
,
0x01
,
0x09
,
0x0d
,
0x01
,
0x03
,
0x01
,
0x02
,
0x0d
,
0x00
,
0x00
},
16
,
AV_CODEC_ID_NONE
,
"vbi_smpte_436M"
},
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x04
,
0x01
,
0x01
,
0x09
,
0x0d
,
0x01
,
0x03
,
0x01
,
0x02
,
0x0d
,
0x00
,
0x00
},
16
,
AV_CODEC_ID_NONE
,
"vbi_smpte_436M"
},
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x04
,
0x01
,
0x01
,
0x09
,
0x0d
,
0x01
,
0x03
,
0x01
,
0x02
,
0x0e
,
0x00
,
0x00
},
16
,
AV_CODEC_ID_NONE
,
"vbi_vanc_smpte_436M"
},
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x04
,
0x01
,
0x01
,
0x09
,
0x0d
,
0x01
,
0x03
,
0x01
,
0x02
,
0x0e
,
0x00
,
0x00
},
16
,
AV_CODEC_ID_NONE
,
"vbi_vanc_smpte_436M"
},
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x04
,
0x01
,
0x01
,
0x09
,
0x0d
,
0x01
,
0x03
,
0x01
,
0x02
,
0x13
,
0x01
,
0x01
},
16
,
AV_CODEC_ID_TTML
},
{
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
0
,
AV_CODEC_ID_NONE
},
{
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
0
,
AV_CODEC_ID_NONE
},
};
};
...
@@ -2351,7 +2352,13 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
...
@@ -2351,7 +2352,13 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
st
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
st
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
}
}
}
else
if
(
st
->
codecpar
->
codec_type
==
AVMEDIA_TYPE_DATA
)
{
}
else
if
(
st
->
codecpar
->
codec_type
==
AVMEDIA_TYPE_DATA
)
{
enum
AVMediaType
type
;
container_ul
=
mxf_get_codec_ul
(
mxf_data_essence_container_uls
,
essence_container_ul
);
container_ul
=
mxf_get_codec_ul
(
mxf_data_essence_container_uls
,
essence_container_ul
);
if
(
st
->
codecpar
->
codec_id
==
AV_CODEC_ID_NONE
)
st
->
codecpar
->
codec_id
=
container_ul
->
id
;
type
=
avcodec_get_type
(
st
->
codecpar
->
codec_id
);
if
(
type
==
AVMEDIA_TYPE_SUBTITLE
)
st
->
codecpar
->
codec_type
=
type
;
if
(
container_ul
->
desc
)
if
(
container_ul
->
desc
)
av_dict_set
(
&
st
->
metadata
,
"data_type"
,
container_ul
->
desc
,
0
);
av_dict_set
(
&
st
->
metadata
,
"data_type"
,
container_ul
->
desc
,
0
);
}
}
...
@@ -2501,6 +2508,7 @@ static const MXFMetadataReadTableEntry mxf_metadata_read_table[] = {
...
@@ -2501,6 +2508,7 @@ static const MXFMetadataReadTableEntry mxf_metadata_read_table[] = {
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x5b
,
0x00
},
mxf_read_generic_descriptor
,
sizeof
(
MXFDescriptor
),
Descriptor
},
/* VBI - SMPTE 436M */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x5b
,
0x00
},
mxf_read_generic_descriptor
,
sizeof
(
MXFDescriptor
),
Descriptor
},
/* VBI - SMPTE 436M */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x5c
,
0x00
},
mxf_read_generic_descriptor
,
sizeof
(
MXFDescriptor
),
Descriptor
},
/* VANC/VBI - SMPTE 436M */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x5c
,
0x00
},
mxf_read_generic_descriptor
,
sizeof
(
MXFDescriptor
),
Descriptor
},
/* VANC/VBI - SMPTE 436M */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x5e
,
0x00
},
mxf_read_generic_descriptor
,
sizeof
(
MXFDescriptor
),
Descriptor
},
/* MPEG2AudioDescriptor */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x5e
,
0x00
},
mxf_read_generic_descriptor
,
sizeof
(
MXFDescriptor
),
Descriptor
},
/* MPEG2AudioDescriptor */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x64
,
0x00
},
mxf_read_generic_descriptor
,
sizeof
(
MXFDescriptor
),
Descriptor
},
/* DC Timed Text Descriptor */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x3A
,
0x00
},
mxf_read_track
,
sizeof
(
MXFTrack
),
Track
},
/* Static Track */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x3A
,
0x00
},
mxf_read_track
,
sizeof
(
MXFTrack
),
Track
},
/* Static Track */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x3B
,
0x00
},
mxf_read_track
,
sizeof
(
MXFTrack
),
Track
},
/* Generic Track */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x3B
,
0x00
},
mxf_read_track
,
sizeof
(
MXFTrack
),
Track
},
/* Generic Track */
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x14
,
0x00
},
mxf_read_timecode_component
,
sizeof
(
MXFTimecodeComponent
),
TimecodeComponent
},
{
{
0x06
,
0x0e
,
0x2b
,
0x34
,
0x02
,
0x53
,
0x01
,
0x01
,
0x0d
,
0x01
,
0x01
,
0x01
,
0x01
,
0x01
,
0x14
,
0x00
},
mxf_read_timecode_component
,
sizeof
(
MXFTimecodeComponent
),
TimecodeComponent
},
...
...
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