FFmpeg
caf.c
Go to the documentation of this file.
1 /*
2  * CAF common code
3  * Copyright (c) 2007 Justin Ruggles
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * CAF common code
25  */
26 
27 #include "avformat.h"
28 #include "internal.h"
29 #include "caf.h"
30 
31 /**
32  * Known codec tags for CAF
33  */
35  { AV_CODEC_ID_AAC, MKTAG('a','a','c',' ') },
36  { AV_CODEC_ID_AAC, MKTAG('a','a','c','l') },
37  { AV_CODEC_ID_AC3, MKTAG('a','c','-','3') },
38  { AV_CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') },
39  { AV_CODEC_ID_ADPCM_IMA_WAV, MKTAG('m','s', 0, 17 ) },
40  { AV_CODEC_ID_ADPCM_MS, MKTAG('m','s', 0, 2 ) },
41  { AV_CODEC_ID_ALAC, MKTAG('a','l','a','c') },
42  { AV_CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },
43  /* FIXME: use DV demuxer, as done in MOV */
44  /*{ AV_CODEC_ID_DVAUDIO, MKTAG('v','d','v','a') },*/
45  /*{ AV_CODEC_ID_DVAUDIO, MKTAG('d','v','c','a') },*/
46  { AV_CODEC_ID_GSM, MKTAG('a','g','s','m') },
47  { AV_CODEC_ID_GSM_MS, MKTAG('m','s', 0, '1') },
48  { AV_CODEC_ID_ILBC, MKTAG('i','l','b','c') },
49  { AV_CODEC_ID_FLAC, MKTAG('f','l','a','c') },
50  { AV_CODEC_ID_MACE3, MKTAG('M','A','C','3') },
51  { AV_CODEC_ID_MACE6, MKTAG('M','A','C','6') },
52  { AV_CODEC_ID_MP1, MKTAG('.','m','p','1') },
53  { AV_CODEC_ID_MP2, MKTAG('.','m','p','2') },
54  { AV_CODEC_ID_MP3, MKTAG('.','m','p','3') },
55  { AV_CODEC_ID_MP3, MKTAG('m','s', 0 ,'U') },
56  { AV_CODEC_ID_OPUS, MKTAG('o','p','u','s') },
57  { AV_CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
58  { AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
59  { AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') },
60  { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','2') },
61  { AV_CODEC_ID_QDMC, MKTAG('Q','D','M','C') },
62  /* currently unsupported codecs */
63  /*{ AC-3 over S/PDIF MKTAG('c','a','c','3') },*/
64  /*{ MPEG4CELP MKTAG('c','e','l','p') },*/
65  /*{ MPEG4HVXC MKTAG('h','v','x','c') },*/
66  /*{ MPEG4TwinVQ MKTAG('t','w','v','q') },*/
67 
68  { AV_CODEC_ID_PCM_S8, MKTAG('l','p','c','m') },
69  { AV_CODEC_ID_PCM_S16LE, MKTAG('l','p','c','m') },
70  { AV_CODEC_ID_PCM_S16BE, MKTAG('l','p','c','m') },
71  { AV_CODEC_ID_PCM_S24LE, MKTAG('l','p','c','m') },
72  { AV_CODEC_ID_PCM_S24BE, MKTAG('l','p','c','m') },
73  { AV_CODEC_ID_PCM_S32LE, MKTAG('l','p','c','m') },
74  { AV_CODEC_ID_PCM_S32BE, MKTAG('l','p','c','m') },
75  { AV_CODEC_ID_PCM_F32LE, MKTAG('l','p','c','m') },
76  { AV_CODEC_ID_PCM_F32BE, MKTAG('l','p','c','m') },
77  { AV_CODEC_ID_PCM_F64LE, MKTAG('l','p','c','m') },
78  { AV_CODEC_ID_PCM_F64BE, MKTAG('l','p','c','m') },
79  { AV_CODEC_ID_NONE, 0 },
80 };
81 
AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:328
AV_CODEC_ID_MACE6
@ AV_CODEC_ID_MACE6
Definition: codec_id.h:450
AV_CODEC_ID_PCM_F32BE
@ AV_CODEC_ID_PCM_F32BE
Definition: codec_id.h:348
AV_CODEC_ID_ADPCM_MS
@ AV_CODEC_ID_ADPCM_MS
Definition: codec_id.h:373
AV_CODEC_ID_ADPCM_IMA_QT
@ AV_CODEC_ID_ADPCM_IMA_QT
Definition: codec_id.h:367
AV_CODEC_ID_AC3
@ AV_CODEC_ID_AC3
Definition: codec_id.h:443
caf.h
AV_CODEC_ID_ALAC
@ AV_CODEC_ID_ALAC
Definition: codec_id.h:456
AV_CODEC_ID_AMR_NB
@ AV_CODEC_ID_AMR_NB
Definition: codec_id.h:421
AV_CODEC_ID_FLAC
@ AV_CODEC_ID_FLAC
Definition: codec_id.h:452
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:329
AV_CODEC_ID_MP3
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: codec_id.h:441
AV_CODEC_ID_PCM_S8
@ AV_CODEC_ID_PCM_S8
Definition: codec_id.h:332
AV_CODEC_ID_MACE3
@ AV_CODEC_ID_MACE3
Definition: codec_id.h:449
AVCodecTag
Definition: internal.h:42
AV_CODEC_ID_MP2
@ AV_CODEC_ID_MP2
Definition: codec_id.h:440
AV_CODEC_ID_PCM_MULAW
@ AV_CODEC_ID_PCM_MULAW
Definition: codec_id.h:334
AV_CODEC_ID_PCM_ALAW
@ AV_CODEC_ID_PCM_ALAW
Definition: codec_id.h:335
internal.h
NULL
#define NULL
Definition: coverity.c:32
AV_CODEC_ID_QDM2
@ AV_CODEC_ID_QDM2
Definition: codec_id.h:459
AV_CODEC_ID_GSM
@ AV_CODEC_ID_GSM
as in Berlin toast format
Definition: codec_id.h:458
AV_CODEC_ID_AAC
@ AV_CODEC_ID_AAC
Definition: codec_id.h:442
AV_CODEC_ID_QCELP
@ AV_CODEC_ID_QCELP
Definition: codec_id.h:464
AV_CODEC_ID_PCM_S24LE
@ AV_CODEC_ID_PCM_S24LE
Definition: codec_id.h:340
AV_CODEC_ID_QDMC
@ AV_CODEC_ID_QDMC
Definition: codec_id.h:490
AV_CODEC_ID_OPUS
@ AV_CODEC_ID_OPUS
Definition: codec_id.h:500
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
AV_CODEC_ID_PCM_F64BE
@ AV_CODEC_ID_PCM_F64BE
Definition: codec_id.h:350
AV_CODEC_ID_PCM_S32BE
@ AV_CODEC_ID_PCM_S32BE
Definition: codec_id.h:337
ff_codec_caf_tags
const AVCodecTag ff_codec_caf_tags[]
Known codec tags for CAF.
Definition: caf.c:34
AV_CODEC_ID_GSM_MS
@ AV_CODEC_ID_GSM_MS
Definition: codec_id.h:470
avformat.h
ff_caf_codec_tags_list
const AVCodecTag *const ff_caf_codec_tags_list[]
Definition: caf.c:82
AV_CODEC_ID_PCM_S32LE
@ AV_CODEC_ID_PCM_S32LE
Definition: codec_id.h:336
AV_CODEC_ID_PCM_F64LE
@ AV_CODEC_ID_PCM_F64LE
Definition: codec_id.h:351
AV_CODEC_ID_ADPCM_IMA_WAV
@ AV_CODEC_ID_ADPCM_IMA_WAV
Definition: codec_id.h:368
AV_CODEC_ID_ILBC
@ AV_CODEC_ID_ILBC
Definition: codec_id.h:499
AV_CODEC_ID_PCM_F32LE
@ AV_CODEC_ID_PCM_F32LE
Definition: codec_id.h:349
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
AV_CODEC_ID_MP1
@ AV_CODEC_ID_MP1
Definition: codec_id.h:482
AV_CODEC_ID_PCM_S24BE
@ AV_CODEC_ID_PCM_S24BE
Definition: codec_id.h:341