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
2253d6d7
Commit
2253d6d7
authored
Feb 02, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more flexible mapping selection
Originally committed as revision 16941 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
a4397fa9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
mxfenc.c
libavformat/mxfenc.c
+16
-8
No files found.
libavformat/mxfenc.c
View file @
2253d6d7
...
...
@@ -75,10 +75,18 @@ typedef struct {
UID
container_ul
;
UID
element_ul
;
UID
codec_ul
;
enum
CodecID
id
;
void
(
*
write_desc
)();
}
MXFContainerEssenceEntry
;
static
const
struct
{
enum
CodecID
id
;
int
index
;
}
mxf_essence_mappings
[]
=
{
{
CODEC_ID_MPEG2VIDEO
,
0
},
{
CODEC_ID_PCM_S16LE
,
1
},
{
0
}
};
static
void
mxf_write_wav_desc
(
AVFormatContext
*
s
,
AVStream
*
st
);
static
void
mxf_write_aes3_desc
(
AVFormatContext
*
s
,
AVStream
*
st
);
static
void
mxf_write_mpegvideo_desc
(
AVFormatContext
*
s
,
AVStream
*
st
);
...
...
@@ -87,19 +95,19 @@ static const MXFContainerEssenceEntry mxf_essence_container_uls[] = {
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x02
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x02
,
0x04
,
0x60
,
0x01
},
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x02
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x15
,
0x01
,
0x05
,
0x00
},
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x03
,
0x04
,
0x01
,
0x02
,
0x02
,
0x01
,
0x00
,
0x00
,
0x00
},
CODEC_ID_MPEG2VIDEO
,
mxf_write_mpegvideo_desc
},
mxf_write_mpegvideo_desc
},
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x02
,
0x06
,
0x03
,
0x00
},
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x02
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x16
,
0x01
,
0x03
,
0x00
},
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x02
,
0x02
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
},
CODEC_ID_PCM_S16LE
,
mxf_write_aes3_desc
},
mxf_write_aes3_desc
},
{
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x02
,
0x06
,
0x01
,
0x00
},
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x01
,
0x02
,
0x01
,
0x01
,
0x0D
,
0x01
,
0x03
,
0x01
,
0x16
,
0x01
,
0x01
,
0x00
},
{
0x06
,
0x0E
,
0x2B
,
0x34
,
0x04
,
0x01
,
0x01
,
0x01
,
0x04
,
0x02
,
0x02
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
},
CODEC_ID_PCM_S16LE
,
mxf_write_wav_desc
},
mxf_write_wav_desc
},
{
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
CODEC_ID_NONE
,
NULL
},
NULL
},
};
typedef
struct
MXFContext
{
...
...
@@ -264,9 +272,9 @@ static int klv_encode_ber_length(ByteIOContext *pb, uint64_t len)
static
int
mxf_get_essence_container_ul_index
(
enum
CodecID
id
)
{
int
i
;
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
mxf_essence_container_uls
)
;
i
++
)
if
(
mxf_essence_
container_ul
s
[
i
].
id
==
id
)
return
i
;
for
(
i
=
0
;
mxf_essence_mappings
[
i
].
id
;
i
++
)
if
(
mxf_essence_
mapping
s
[
i
].
id
==
id
)
return
mxf_essence_mappings
[
i
].
index
;
return
-
1
;
}
...
...
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