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
8cc7a34d
Commit
8cc7a34d
authored
Apr 07, 2004
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for wider range of codecs
Originally committed as revision 2973 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
465e1dad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
32 deletions
+46
-32
movenc.c
libavformat/movenc.c
+46
-32
No files found.
libavformat/movenc.c
View file @
8cc7a34d
...
@@ -236,31 +236,38 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack* track)
...
@@ -236,31 +236,38 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack* track)
return
updateSize
(
pb
,
pos
);
return
updateSize
(
pb
,
pos
);
}
}
const
CodecTag
codec_movaudio_tags
[]
=
{
{
CODEC_ID_PCM_MULAW
,
MKTAG
(
'u'
,
'l'
,
'a'
,
'w'
)
},
{
CODEC_ID_PCM_ALAW
,
MKTAG
(
'a'
,
'l'
,
'a'
,
'w'
)
},
{
CODEC_ID_ADPCM_IMA_QT
,
MKTAG
(
'i'
,
'm'
,
'a'
,
'4'
)
},
{
CODEC_ID_MACE3
,
MKTAG
(
'M'
,
'A'
,
'C'
,
'3'
)
},
{
CODEC_ID_MACE6
,
MKTAG
(
'M'
,
'A'
,
'C'
,
'6'
)
},
{
CODEC_ID_AAC
,
MKTAG
(
'm'
,
'p'
,
'4'
,
'a'
)
},
{
CODEC_ID_AMR_NB
,
MKTAG
(
's'
,
'a'
,
'm'
,
'r'
)
},
{
CODEC_ID_PCM_S16BE
,
MKTAG
(
't'
,
'w'
,
'o'
,
's'
)
},
{
CODEC_ID_PCM_S16LE
,
MKTAG
(
's'
,
'o'
,
'w'
,
't'
)
},
{
CODEC_ID_MP3
,
MKTAG
(
'.'
,
'm'
,
'p'
,
'3'
)
},
{
0
,
0
},
};
static
int
mov_write_audio_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
static
int
mov_write_audio_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
{
{
int
pos
=
url_ftell
(
pb
);
int
pos
=
url_ftell
(
pb
),
tag
;
put_be32
(
pb
,
0
);
/* size */
put_be32
(
pb
,
0
);
/* size */
if
(
track
->
enc
->
codec_id
==
CODEC_ID_PCM_MULAW
)
tag
=
codec_get_tag
(
codec_movaudio_tags
,
track
->
enc
->
codec_id
);
put_tag
(
pb
,
"ulaw"
);
// if no mac fcc found, try with Microsoft tags
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_PCM_ALAW
)
if
(
!
tag
)
put_tag
(
pb
,
"alaw"
);
{
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_ADPCM_IMA_QT
)
int
tmp
=
codec_get_tag
(
codec_wav_tags
,
track
->
enc
->
codec_id
);
put_tag
(
pb
,
"ima4"
);
if
(
tmp
)
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_MACE3
)
tag
=
MKTAG
(
'm'
,
's'
,
((
tmp
>>
8
)
&
0xff
),
(
tmp
&
0xff
));
put_tag
(
pb
,
"MAC3"
);
}
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_MACE6
)
if
(
!
tag
)
put_tag
(
pb
,
"MAC6"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_AAC
)
put_tag
(
pb
,
"mp4a"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_AMR_NB
)
put_tag
(
pb
,
"samr"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S16BE
)
put_tag
(
pb
,
"twos"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_PCM_S16LE
)
put_tag
(
pb
,
"sowt"
);
else
put_tag
(
pb
,
" "
);
put_tag
(
pb
,
" "
);
else
put_le32
(
pb
,
tag
);
// store it byteswapped
put_be32
(
pb
,
0
);
/* Reserved */
put_be32
(
pb
,
0
);
/* Reserved */
put_be16
(
pb
,
0
);
/* Reserved */
put_be16
(
pb
,
0
);
/* Reserved */
...
@@ -424,22 +431,29 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack* track) // Basic
...
@@ -424,22 +431,29 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack* track) // Basic
return
updateSize
(
pb
,
pos
);
return
updateSize
(
pb
,
pos
);
}
}
const
CodecTag
codec_movvideo_tags
[]
=
{
{
CODEC_ID_SVQ1
,
MKTAG
(
'S'
,
'V'
,
'Q'
,
'1'
)
},
{
CODEC_ID_SVQ3
,
MKTAG
(
'S'
,
'V'
,
'Q'
,
'3'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'm'
,
'p'
,
'4'
,
'v'
)
},
{
CODEC_ID_H263
,
MKTAG
(
's'
,
'2'
,
'6'
,
'3'
)
},
{
CODEC_ID_DVVIDEO
,
MKTAG
(
'd'
,
'v'
,
'c'
,
' '
)
},
{
0
,
0
},
};
static
int
mov_write_video_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
static
int
mov_write_video_tag
(
ByteIOContext
*
pb
,
MOVTrack
*
track
)
{
{
int
pos
=
url_ftell
(
pb
);
int
pos
=
url_ftell
(
pb
),
tag
;
put_be32
(
pb
,
0
);
/* size */
put_be32
(
pb
,
0
);
/* size */
if
(
track
->
enc
->
codec_id
==
CODEC_ID_SVQ1
)
put_tag
(
pb
,
"SVQ1"
);
tag
=
codec_get_tag
(
codec_movvideo_tags
,
track
->
enc
->
codec_id
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_SVQ3
)
// if no mac fcc found, try with Microsoft tags
put_tag
(
pb
,
"SVQ3"
);
if
(
!
tag
)
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_MPEG4
)
tag
=
codec_get_tag
(
codec_bmp_tags
,
track
->
enc
->
codec_id
);
put_tag
(
pb
,
"mp4v"
);
if
(
!
tag
)
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_H263
)
put_tag
(
pb
,
" "
);
put_tag
(
pb
,
"s263"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_DVVIDEO
)
put_tag
(
pb
,
"dvc "
);
else
else
put_tag
(
pb
,
" "
);
/* Unknown tag */
put_le32
(
pb
,
tag
);
// store it byteswapped
put_be32
(
pb
,
0
);
/* Reserved */
put_be32
(
pb
,
0
);
/* Reserved */
put_be16
(
pb
,
0
);
/* Reserved */
put_be16
(
pb
,
0
);
/* Reserved */
...
...
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