Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
7caf0cc6
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,发现更多精彩内容 >>
提交
7caf0cc6
编写于
1月 21, 2007
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add codec_id <-> codec_tag tables to AVIn/OutputFormat
Originally committed as revision 7593 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
5c4e1928
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
95 addition
and
53 deletion
+95
-53
libavformat/aiff.c
libavformat/aiff.c
+1
-1
libavformat/asf-enc.c
libavformat/asf-enc.c
+9
-0
libavformat/au.c
libavformat/au.c
+1
-1
libavformat/avformat.h
libavformat/avformat.h
+17
-2
libavformat/avienc.c
libavformat/avienc.c
+1
-0
libavformat/flvenc.c
libavformat/flvenc.c
+2
-2
libavformat/gxfenc.c
libavformat/gxfenc.c
+1
-1
libavformat/isom.c
libavformat/isom.c
+1
-1
libavformat/isom.h
libavformat/isom.h
+1
-1
libavformat/libnut.c
libavformat/libnut.c
+1
-1
libavformat/mov.c
libavformat/mov.c
+2
-2
libavformat/movenc.c
libavformat/movenc.c
+2
-2
libavformat/nsvdec.c
libavformat/nsvdec.c
+2
-2
libavformat/riff.c
libavformat/riff.c
+32
-21
libavformat/riff.h
libavformat/riff.h
+17
-13
libavformat/swf.c
libavformat/swf.c
+1
-1
libavformat/voc.c
libavformat/voc.c
+1
-1
libavformat/voc.h
libavformat/voc.h
+1
-1
libavformat/wav.c
libavformat/wav.c
+2
-0
未找到文件。
libavformat/aiff.c
浏览文件 @
7caf0cc6
...
...
@@ -23,7 +23,7 @@
#include "riff.h"
#include "intfloat_readwrite.h"
static
const
CodecTag
codec_aiff_tags
[]
=
{
static
const
AV
CodecTag
codec_aiff_tags
[]
=
{
{
CODEC_ID_PCM_S16BE
,
MKTAG
(
'N'
,
'O'
,
'N'
,
'E'
)
},
{
CODEC_ID_PCM_S8
,
MKTAG
(
'N'
,
'O'
,
'N'
,
'E'
)
},
{
CODEC_ID_PCM_S24BE
,
MKTAG
(
'N'
,
'O'
,
'N'
,
'E'
)
},
...
...
libavformat/asf-enc.c
浏览文件 @
7caf0cc6
...
...
@@ -187,6 +187,13 @@
2*PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS \
)
static
const
AVCodecTag
codec_asf_bmp_tags
[]
=
{
{
CODEC_ID_MPEG4
,
MKTAG
(
'M'
,
'P'
,
'4'
,
'S'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'M'
,
'4'
,
'S'
,
'2'
)
},
{
CODEC_ID_MSMPEG4V3
,
MKTAG
(
'M'
,
'P'
,
'4'
,
'3'
)
},
{
CODEC_ID_NONE
,
0
},
};
static
int
preroll_time
=
2000
;
static
const
uint8_t
error_spread_ADPCM_G726
[]
=
{
0x01
,
0x90
,
0x01
,
0x90
,
0x01
,
0x01
,
0x00
,
0x00
};
...
...
@@ -842,6 +849,7 @@ AVOutputFormat asf_muxer = {
asf_write_packet
,
asf_write_trailer
,
.
flags
=
AVFMT_GLOBALHEADER
,
.
codec_tag
=
{
codec_asf_bmp_tags
,
codec_bmp_tags
,
codec_wav_tags
},
};
#endif
...
...
@@ -862,5 +870,6 @@ AVOutputFormat asf_stream_muxer = {
asf_write_packet
,
asf_write_trailer
,
.
flags
=
AVFMT_GLOBALHEADER
,
.
codec_tag
=
{
codec_asf_bmp_tags
,
codec_bmp_tags
,
codec_wav_tags
},
};
#endif //CONFIG_ASF_STREAM_MUXER
libavformat/au.c
浏览文件 @
7caf0cc6
...
...
@@ -35,7 +35,7 @@
#define AU_UNKOWN_SIZE ((uint32_t)(~0))
/* The ffmpeg codecs we support, and the IDs they have in the file */
static
const
CodecTag
codec_au_tags
[]
=
{
static
const
AV
CodecTag
codec_au_tags
[]
=
{
{
CODEC_ID_PCM_MULAW
,
1
},
{
CODEC_ID_PCM_S16BE
,
3
},
{
CODEC_ID_PCM_ALAW
,
27
},
...
...
libavformat/avformat.h
浏览文件 @
7caf0cc6
...
...
@@ -25,8 +25,8 @@
extern
"C"
{
#endif
#define LIBAVFORMAT_VERSION_INT ((51<<16)+(
7
<<8)+0)
#define LIBAVFORMAT_VERSION 51.
7
.0
#define LIBAVFORMAT_VERSION_INT ((51<<16)+(
8
<<8)+0)
#define LIBAVFORMAT_VERSION 51.
8
.0
#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
...
...
@@ -96,6 +96,8 @@ typedef struct AVFrac {
/*************************************************/
/* input/output formats */
struct
AVCodecTag
;
struct
AVFormatContext
;
/* this structure contains the data a format has to probe a file */
...
...
@@ -155,6 +157,13 @@ typedef struct AVOutputFormat {
/* currently only used to set pixel format if not YUV420P */
int
(
*
set_parameters
)(
struct
AVFormatContext
*
,
AVFormatParameters
*
);
int
(
*
interleave_packet
)(
struct
AVFormatContext
*
,
AVPacket
*
out
,
AVPacket
*
in
,
int
flush
);
/**
* list of supported codec_id-codec_tag pairs, ordered by "better choice first"
* the arrays are all CODEC_ID_NONE terminated
*/
const
struct
AVCodecTag
*
codec_tag
[
4
];
/* private fields */
struct
AVOutputFormat
*
next
;
}
AVOutputFormat
;
...
...
@@ -210,6 +219,8 @@ typedef struct AVInputFormat {
(RTSP) */
int
(
*
read_pause
)(
struct
AVFormatContext
*
);
const
struct
AVCodecTag
*
codec_tag
[
4
];
/* private fields */
struct
AVInputFormat
*
next
;
}
AVInputFormat
;
...
...
@@ -396,6 +407,10 @@ void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload);
void
av_register_all
(
void
);
/* codec tag <-> codec id */
enum
CodecID
av_codec_get_id
(
const
struct
AVCodecTag
*
tags
[
4
],
unsigned
int
tag
);
unsigned
int
av_codec_get_tag
(
const
struct
AVCodecTag
*
tags
[
4
],
enum
CodecID
id
);
/* media file input */
AVInputFormat
*
av_find_input_format
(
const
char
*
short_name
);
AVInputFormat
*
av_probe_input_format
(
AVProbeData
*
pd
,
int
is_opened
);
...
...
libavformat/avienc.c
浏览文件 @
7caf0cc6
...
...
@@ -575,5 +575,6 @@ AVOutputFormat avi_muxer = {
avi_write_header
,
avi_write_packet
,
avi_write_trailer
,
.
codec_tag
=
{
codec_bmp_tags
,
codec_wav_tags
},
};
#endif //CONFIG_AVI_MUXER
libavformat/flvenc.c
浏览文件 @
7caf0cc6
...
...
@@ -25,7 +25,7 @@
#undef NDEBUG
#include <assert.h>
static
const
CodecTag
flv_video_codec_ids
[]
=
{
static
const
AV
CodecTag
flv_video_codec_ids
[]
=
{
{
CODEC_ID_FLV1
,
FLV_CODECID_H263
},
{
CODEC_ID_FLASHSV
,
FLV_CODECID_SCREEN
},
{
CODEC_ID_VP6F
,
FLV_CODECID_VP6
},
...
...
@@ -33,7 +33,7 @@ static const CodecTag flv_video_codec_ids[] = {
{
CODEC_ID_NONE
,
0
}
};
static
const
CodecTag
flv_audio_codec_ids
[]
=
{
static
const
AV
CodecTag
flv_audio_codec_ids
[]
=
{
{
CODEC_ID_MP3
,
FLV_CODECID_MP3
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_PCM_S8
,
FLV_CODECID_PCM_BE
>>
FLV_AUDIO_CODECID_OFFSET
},
{
CODEC_ID_PCM_S16BE
,
FLV_CODECID_PCM_BE
>>
FLV_AUDIO_CODECID_OFFSET
},
...
...
libavformat/gxfenc.c
浏览文件 @
7caf0cc6
...
...
@@ -85,7 +85,7 @@ static const GXF_Lines gxf_lines_tab[] = {
{
720
,
6
},
};
static
const
CodecTag
gxf_media_types
[]
=
{
static
const
AV
CodecTag
gxf_media_types
[]
=
{
{
CODEC_ID_MJPEG
,
3
},
/* NTSC */
{
CODEC_ID_MJPEG
,
4
},
/* PAL */
{
CODEC_ID_PCM_S24LE
,
9
},
...
...
libavformat/isom.c
浏览文件 @
7caf0cc6
...
...
@@ -26,7 +26,7 @@
#include "isom.h"
/* http://gpac.sourceforge.net/tutorial/mediatypes.htm */
const
CodecTag
ff_mov_obj_type
[]
=
{
const
AV
CodecTag
ff_mov_obj_type
[]
=
{
{
CODEC_ID_MPEG4
,
32
},
{
CODEC_ID_H264
,
33
},
{
CODEC_ID_AAC
,
64
},
...
...
libavformat/isom.h
浏览文件 @
7caf0cc6
...
...
@@ -25,7 +25,7 @@
#define FFMPEG_ISOM_H
/* isom.c */
extern
const
CodecTag
ff_mov_obj_type
[];
extern
const
AV
CodecTag
ff_mov_obj_type
[];
int
ff_mov_iso639_to_lang
(
const
char
*
lang
,
int
mp4
);
int
ff_mov_lang_to_iso639
(
int
code
,
char
*
to
);
...
...
libavformat/libnut.c
浏览文件 @
7caf0cc6
...
...
@@ -10,7 +10,7 @@ typedef struct {
nut_stream_header_t
*
s
;
}
NUTContext
;
static
const
CodecTag
nut_tags
[]
=
{
static
const
AV
CodecTag
nut_tags
[]
=
{
{
CODEC_ID_MPEG4
,
MKTAG
(
'm'
,
'p'
,
'4'
,
'v'
)
},
{
CODEC_ID_MP3
,
MKTAG
(
'm'
,
'p'
,
'3'
,
' '
)
},
{
CODEC_ID_VORBIS
,
MKTAG
(
'v'
,
'r'
,
'b'
,
's'
)
},
...
...
libavformat/mov.c
浏览文件 @
7caf0cc6
...
...
@@ -66,7 +66,7 @@
#undef NDEBUG
#include <assert.h>
static
const
CodecTag
mov_video_tags
[]
=
{
static
const
AV
CodecTag
mov_video_tags
[]
=
{
/* { CODEC_ID_, MKTAG('c', 'v', 'i', 'd') }, *//* Cinepak */
/* { CODEC_ID_H263, MKTAG('r', 'a', 'w', ' ') }, *//* Uncompressed RGB */
/* { CODEC_ID_H263, MKTAG('Y', 'u', 'v', '2') }, *//* Uncompressed YUV422 */
...
...
@@ -127,7 +127,7 @@ static const CodecTag mov_video_tags[] = {
{
CODEC_ID_NONE
,
0
},
};
static
const
CodecTag
mov_audio_tags
[]
=
{
static
const
AV
CodecTag
mov_audio_tags
[]
=
{
{
CODEC_ID_PCM_S32BE
,
MKTAG
(
'i'
,
'n'
,
'3'
,
'2'
)
},
{
CODEC_ID_PCM_S24BE
,
MKTAG
(
'i'
,
'n'
,
'2'
,
'4'
)
},
{
CODEC_ID_PCM_S16BE
,
MKTAG
(
'N'
,
'O'
,
'N'
,
'E'
)
},
/* uncompressed */
...
...
libavformat/movenc.c
浏览文件 @
7caf0cc6
...
...
@@ -322,7 +322,7 @@ static int mov_write_wave_tag(ByteIOContext *pb, MOVTrack* track)
return
updateSize
(
pb
,
pos
);
}
static
const
CodecTag
codec_movaudio_tags
[]
=
{
static
const
AV
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'
)
},
...
...
@@ -526,7 +526,7 @@ static int mov_write_avcc_tag(ByteIOContext *pb, MOVTrack *track)
return
updateSize
(
pb
,
pos
);
}
static
const
CodecTag
codec_movvideo_tags
[]
=
{
static
const
AV
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'
)
},
...
...
libavformat/nsvdec.c
浏览文件 @
7caf0cc6
...
...
@@ -183,7 +183,7 @@ typedef struct {
//DVDemuxContext* dv_demux;
}
NSVContext
;
static
const
CodecTag
nsv_codec_video_tags
[]
=
{
static
const
AV
CodecTag
nsv_codec_video_tags
[]
=
{
{
CODEC_ID_VP3
,
MKTAG
(
'V'
,
'P'
,
'3'
,
' '
)
},
{
CODEC_ID_VP3
,
MKTAG
(
'V'
,
'P'
,
'3'
,
'0'
)
},
{
CODEC_ID_VP3
,
MKTAG
(
'V'
,
'P'
,
'3'
,
'1'
)
},
...
...
@@ -202,7 +202,7 @@ static const CodecTag nsv_codec_video_tags[] = {
{
0
,
0
},
};
static
const
CodecTag
nsv_codec_audio_tags
[]
=
{
static
const
AV
CodecTag
nsv_codec_audio_tags
[]
=
{
{
CODEC_ID_MP3
,
MKTAG
(
'M'
,
'P'
,
'3'
,
' '
)
},
{
CODEC_ID_AAC
,
MKTAG
(
'A'
,
'A'
,
'C'
,
' '
)
},
{
CODEC_ID_AAC
,
MKTAG
(
'A'
,
'A'
,
'C'
,
'P'
)
},
/* _CUTTED__MUXED_2 Heads - Out Of The City.nsv */
...
...
libavformat/riff.c
浏览文件 @
7caf0cc6
...
...
@@ -22,10 +22,11 @@
#include "avformat.h"
#include "avcodec.h"
#include "riff.h"
#include "allformats.h" // for asf_muxer
/* Note: when encoding, the first matching tag is used, so order is
important if multiple tags possible for a given codec. */
const
CodecTag
codec_bmp_tags
[]
=
{
const
AV
CodecTag
codec_bmp_tags
[]
=
{
{
CODEC_ID_H264
,
MKTAG
(
'H'
,
'2'
,
'6'
,
'4'
)
},
{
CODEC_ID_H264
,
MKTAG
(
'h'
,
'2'
,
'6'
,
'4'
)
},
{
CODEC_ID_H264
,
MKTAG
(
'X'
,
'2'
,
'6'
,
'4'
)
},
...
...
@@ -42,10 +43,10 @@ const CodecTag codec_bmp_tags[] = {
{
CODEC_ID_H263P
,
MKTAG
(
'U'
,
'2'
,
'6'
,
'3'
)
},
{
CODEC_ID_H263P
,
MKTAG
(
'v'
,
'i'
,
'v'
,
'1'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'F'
,
'M'
,
'P'
,
'4'
)},
{
CODEC_ID_MPEG4
,
MKTAG
(
'D'
,
'I'
,
'V'
,
'X'
)
,
.
invalid_asf
=
1
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'D'
,
'X'
,
'5'
,
'0'
)
,
.
invalid_asf
=
1
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'X'
,
'V'
,
'I'
,
'D'
)
,
.
invalid_asf
=
1
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'F'
,
'M'
,
'P'
,
'4'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'D'
,
'I'
,
'V'
,
'X'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'D'
,
'X'
,
'5'
,
'0'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'X'
,
'V'
,
'I'
,
'D'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'M'
,
'P'
,
'4'
,
'S'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
'M'
,
'4'
,
'S'
,
'2'
)
},
{
CODEC_ID_MPEG4
,
MKTAG
(
0x04
,
0
,
0
,
0
)
},
/* some broken avi use this */
...
...
@@ -60,7 +61,7 @@ const CodecTag codec_bmp_tags[] = {
{
CODEC_ID_MPEG4
,
MKTAG
(
'R'
,
'M'
,
'P'
,
'4'
)
},
{
CODEC_ID_MSMPEG4V3
,
MKTAG
(
'D'
,
'I'
,
'V'
,
'3'
)
,
.
invalid_asf
=
1
},
/* default signature when using MSMPEG4 */
{
CODEC_ID_MSMPEG4V3
,
MKTAG
(
'D'
,
'I'
,
'V'
,
'3'
)
},
/* default signature when using MSMPEG4 */
{
CODEC_ID_MSMPEG4V3
,
MKTAG
(
'M'
,
'P'
,
'4'
,
'3'
)
},
/* added based on MPlayer */
...
...
@@ -168,7 +169,7 @@ const CodecTag codec_bmp_tags[] = {
{
CODEC_ID_NONE
,
0
},
};
const
CodecTag
codec_wav_tags
[]
=
{
const
AV
CodecTag
codec_wav_tags
[]
=
{
{
CODEC_ID_MP2
,
0x50
},
{
CODEC_ID_MP3
,
0x55
},
{
CODEC_ID_AC3
,
0x2000
},
...
...
@@ -206,7 +207,7 @@ const CodecTag codec_wav_tags[] = {
{
0
,
0
},
};
unsigned
int
codec_get_tag
(
const
CodecTag
*
tags
,
int
id
)
unsigned
int
codec_get_tag
(
const
AV
CodecTag
*
tags
,
int
id
)
{
while
(
tags
->
id
!=
CODEC_ID_NONE
)
{
if
(
tags
->
id
==
id
)
...
...
@@ -216,17 +217,7 @@ unsigned int codec_get_tag(const CodecTag *tags, int id)
return
0
;
}
unsigned
int
codec_get_asf_tag
(
const
CodecTag
*
tags
,
unsigned
int
id
)
{
while
(
tags
->
id
!=
CODEC_ID_NONE
)
{
if
(
!
tags
->
invalid_asf
&&
tags
->
id
==
id
)
return
tags
->
tag
;
tags
++
;
}
return
0
;
}
enum
CodecID
codec_get_id
(
const
CodecTag
*
tags
,
unsigned
int
tag
)
enum
CodecID
codec_get_id
(
const
AVCodecTag
*
tags
,
unsigned
int
tag
)
{
while
(
tags
->
id
!=
CODEC_ID_NONE
)
{
if
(
toupper
((
tag
>>
0
)
&
0xFF
)
==
toupper
((
tags
->
tag
>>
0
)
&
0xFF
)
...
...
@@ -239,6 +230,26 @@ enum CodecID codec_get_id(const CodecTag *tags, unsigned int tag)
return
CODEC_ID_NONE
;
}
unsigned
int
av_codec_get_tag
(
const
AVCodecTag
*
tags
[
4
],
enum
CodecID
id
)
{
int
i
;
for
(
i
=
0
;
i
<
4
&&
tags
[
i
];
i
++
){
int
tag
=
codec_get_tag
(
tags
[
i
],
id
);
if
(
tag
)
return
tag
;
}
return
0
;
}
enum
CodecID
av_codec_get_id
(
const
AVCodecTag
*
tags
[
4
],
unsigned
int
tag
)
{
int
i
;
for
(
i
=
0
;
i
<
4
&&
tags
[
i
];
i
++
){
enum
CodecID
id
=
codec_get_id
(
tags
[
i
],
tag
);
if
(
id
!=
CODEC_ID_NONE
)
return
id
;
}
return
CODEC_ID_NONE
;
}
unsigned
int
codec_get_bmp_tag
(
int
id
)
{
return
codec_get_tag
(
codec_bmp_tags
,
id
);
...
...
@@ -367,7 +378,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
}
/* BITMAPINFOHEADER header */
void
put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
CodecTag
*
tags
,
int
for_asf
)
void
put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AV
CodecTag
*
tags
,
int
for_asf
)
{
put_le32
(
pb
,
40
+
enc
->
extradata_size
);
/* size */
put_le32
(
pb
,
enc
->
width
);
...
...
@@ -376,7 +387,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags
put_le16
(
pb
,
enc
->
bits_per_sample
?
enc
->
bits_per_sample
:
24
);
/* depth */
/* compression type */
put_le32
(
pb
,
for_asf
?
(
enc
->
codec_tag
?
enc
->
codec_tag
:
codec_get_asf_tag
(
tags
,
enc
->
codec_id
))
:
enc
->
codec_tag
);
//
put_le32
(
pb
,
for_asf
?
(
enc
->
codec_tag
?
enc
->
codec_tag
:
av_codec_get_tag
(
asf_muxer
.
codec_tag
,
enc
->
codec_id
))
:
enc
->
codec_tag
);
//
put_le32
(
pb
,
enc
->
width
*
enc
->
height
*
3
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
...
...
libavformat/riff.h
浏览文件 @
7caf0cc6
...
...
@@ -19,33 +19,37 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file riff.h
* internal header for RIFF based (de)muxers
* do NOT include this in end user applications
*/
#ifndef FF_RIFF_H
#define FF_RIFF_H
offset_t
start_tag
(
ByteIOContext
*
pb
,
const
char
*
tag
);
void
end_tag
(
ByteIOContext
*
pb
,
offset_t
start
);
typedef
struct
CodecTag
{
typedef
struct
AV
CodecTag
{
int
id
;
unsigned
int
tag
;
unsigned
int
invalid_asf
:
1
;
}
CodecTag
;
}
AVCodecTag
;
void
put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
CodecTag
*
tags
,
int
for_asf
);
void
put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AV
CodecTag
*
tags
,
int
for_asf
);
int
put_wav_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
);
int
wav_codec_get_id
(
unsigned
int
tag
,
int
bps
);
void
get_wav_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
codec
,
int
size
);
extern
const
CodecTag
codec_bmp_tags
[];
extern
const
CodecTag
codec_wav_tags
[];
extern
const
AV
CodecTag
codec_bmp_tags
[];
extern
const
AV
CodecTag
codec_wav_tags
[];
unsigned
int
codec_get_tag
(
const
CodecTag
*
tags
,
int
id
);
enum
CodecID
codec_get_id
(
const
CodecTag
*
tags
,
unsigned
int
tag
);
unsigned
int
codec_get_bmp_tag
(
int
id
);
unsigned
int
codec_get_wav_tag
(
int
id
);
enum
CodecID
codec_get_bmp_id
(
unsigned
int
tag
);
enum
CodecID
codec_get_wav_id
(
unsigned
int
tag
);
unsigned
int
codec_get_asf_tag
(
const
CodecTag
*
tags
,
unsigned
int
id
);
unsigned
int
codec_get_tag
(
const
AVCodecTag
*
tags
,
int
id
);
enum
CodecID
codec_get_id
(
const
AVCodecTag
*
tags
,
unsigned
int
tag
);
unsigned
int
codec_get_bmp_tag
(
int
id
)
attribute_deprecated
;
//use av_codec_get_tag
unsigned
int
codec_get_wav_tag
(
int
id
)
attribute_deprecated
;
//use av_codec_get_tag
enum
CodecID
codec_get_bmp_id
(
unsigned
int
tag
)
attribute_deprecated
;
//use av_codec_get_id
enum
CodecID
codec_get_wav_id
(
unsigned
int
tag
)
attribute_deprecated
;
//use av_codec_get_id
void
ff_parse_specific_params
(
AVCodecContext
*
stream
,
int
*
au_rate
,
int
*
au_ssize
,
int
*
au_scale
);
#endif
libavformat/swf.c
浏览文件 @
7caf0cc6
...
...
@@ -80,7 +80,7 @@ typedef struct {
int
audio_type
;
}
SWFContext
;
static
const
CodecTag
swf_codec_tags
[]
=
{
static
const
AV
CodecTag
swf_codec_tags
[]
=
{
{
CODEC_ID_FLV1
,
0x02
},
{
CODEC_ID_VP6F
,
0x04
},
{
0
,
0
},
...
...
libavformat/voc.c
浏览文件 @
7caf0cc6
...
...
@@ -23,7 +23,7 @@
const
unsigned
char
voc_magic
[
21
]
=
"Creative Voice File
\x1A
"
;
const
CodecTag
voc_codec_tags
[]
=
{
const
AV
CodecTag
voc_codec_tags
[]
=
{
{
CODEC_ID_PCM_U8
,
0x00
},
{
CODEC_ID_ADPCM_SBPRO_4
,
0x01
},
{
CODEC_ID_ADPCM_SBPRO_3
,
0x02
},
...
...
libavformat/voc.h
浏览文件 @
7caf0cc6
...
...
@@ -43,7 +43,7 @@ typedef enum voc_type {
}
voc_type_t
;
extern
const
unsigned
char
voc_magic
[
21
];
extern
const
CodecTag
voc_codec_tags
[];
extern
const
AV
CodecTag
voc_codec_tags
[];
int
voc_get_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
,
AVStream
*
st
,
int
max_size
);
...
...
libavformat/wav.c
浏览文件 @
7caf0cc6
...
...
@@ -235,6 +235,7 @@ AVInputFormat wav_demuxer = {
wav_read_packet
,
wav_read_close
,
wav_read_seek
,
.
codec_tag
=
{
codec_wav_tags
},
};
#endif
#ifdef CONFIG_WAV_MUXER
...
...
@@ -249,5 +250,6 @@ AVOutputFormat wav_muxer = {
wav_write_header
,
wav_write_packet
,
wav_write_trailer
,
.
codec_tag
=
{
codec_wav_tags
},
};
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录