Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
8cc7a34d
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8cc7a34d
编写于
4月 07, 2004
作者:
A
Alex Beregszaszi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support for wider range of codecs
Originally committed as revision 2973 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
465e1dad
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
46 addition
and
32 deletion
+46
-32
libavformat/movenc.c
libavformat/movenc.c
+46
-32
未找到文件。
libavformat/movenc.c
浏览文件 @
8cc7a34d
...
...
@@ -236,31 +236,38 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack* track)
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
)
{
int
pos
=
url_ftell
(
pb
);
int
pos
=
url_ftell
(
pb
),
tag
;
put_be32
(
pb
,
0
);
/* size */
if
(
track
->
enc
->
codec_id
==
CODEC_ID_PCM_MULAW
)
put_tag
(
pb
,
"ulaw"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_PCM_ALAW
)
put_tag
(
pb
,
"alaw"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_ADPCM_IMA_QT
)
put_tag
(
pb
,
"ima4"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_MACE3
)
put_tag
(
pb
,
"MAC3"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_MACE6
)
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
tag
=
codec_get_tag
(
codec_movaudio_tags
,
track
->
enc
->
codec_id
);
// if no mac fcc found, try with Microsoft tags
if
(
!
tag
)
{
int
tmp
=
codec_get_tag
(
codec_wav_tags
,
track
->
enc
->
codec_id
);
if
(
tmp
)
tag
=
MKTAG
(
'm'
,
's'
,
((
tmp
>>
8
)
&
0xff
),
(
tmp
&
0xff
));
}
if
(
!
tag
)
put_tag
(
pb
,
" "
);
else
put_le32
(
pb
,
tag
);
// store it byteswapped
put_be32
(
pb
,
0
);
/* Reserved */
put_be16
(
pb
,
0
);
/* Reserved */
...
...
@@ -424,22 +431,29 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack* track) // Basic
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
)
{
int
pos
=
url_ftell
(
pb
);
int
pos
=
url_ftell
(
pb
),
tag
;
put_be32
(
pb
,
0
);
/* size */
if
(
track
->
enc
->
codec_id
==
CODEC_ID_SVQ1
)
put_tag
(
pb
,
"SVQ1"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_SVQ3
)
put_tag
(
pb
,
"SVQ3"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_MPEG4
)
put_tag
(
pb
,
"mp4v"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_H263
)
put_tag
(
pb
,
"s263"
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_DVVIDEO
)
put_tag
(
pb
,
"dvc "
);
tag
=
codec_get_tag
(
codec_movvideo_tags
,
track
->
enc
->
codec_id
);
// if no mac fcc found, try with Microsoft tags
if
(
!
tag
)
tag
=
codec_get_tag
(
codec_bmp_tags
,
track
->
enc
->
codec_id
);
if
(
!
tag
)
put_tag
(
pb
,
" "
);
else
put_tag
(
pb
,
" "
);
/* Unknown tag */
put_le32
(
pb
,
tag
);
// store it byteswapped
put_be32
(
pb
,
0
);
/* Reserved */
put_be16
(
pb
,
0
);
/* Reserved */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录