FFmpeg
codec_id.h
Go to the documentation of this file.
1 /*
2  * Codec IDs
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_CODEC_ID_H
22 #define AVCODEC_CODEC_ID_H
23 
24 #include "libavutil/avutil.h"
25 
26 /**
27  * @addtogroup lavc_core
28  * @{
29  */
30 
31 /**
32  * Identify the syntax and semantics of the bitstream.
33  * The principle is roughly:
34  * Two decoders with the same ID can decode the same streams.
35  * Two encoders with the same ID can encode compatible streams.
36  * There may be slight deviations from the principle due to implementation
37  * details.
38  *
39  * If you add a codec ID to this list, add it so that
40  * 1. no value of an existing codec ID changes (that would break ABI),
41  * 2. it is as close as possible to similar codecs
42  *
43  * After adding new codec IDs, do not forget to add an entry to the codec
44  * descriptor list and bump libavcodec minor version.
45  */
46 enum AVCodecID {
48 
49  /* video codecs */
51  AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
186 #define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM
224 #define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC
245 
299 
300  /* various PCM "codecs" */
301  AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
333 
339 
340  /* various ADPCM codecs */
372 
391 
392  /* AMR */
395 
396  /* RealAudio codecs*/
399 
400  /* various DPCM codecs */
405 
409 
410  /* audio codecs */
411  AV_CODEC_ID_MP2 = 0x15000,
412  AV_CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
429  AV_CODEC_ID_GSM, ///< as in Berlin toast format
441  AV_CODEC_ID_GSM_MS, /* as found in WAV */
479 
506 
507  /* subtitle codecs */
508  AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
511  AV_CODEC_ID_TEXT, ///< raw UTF-8 text
518 
536 
537  /* other specific kind of codecs (generally used for attachments) */
538  AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
539  AV_CODEC_ID_TTF = 0x18000,
540 
541  AV_CODEC_ID_SCTE_35, ///< Contain timestamp estimated through PCR of program stream.
551 
552 
553  AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
554 
555  AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
556  * stream (only used by libavformat) */
557  AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
558  * stream (only used by libavformat) */
559  AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
560  AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket
561 };
562 
563 /**
564  * Get the type of the given codec.
565  */
567 
568 /**
569  * Get the name of a codec.
570  * @return a static string identifying the codec; never NULL
571  */
572 const char *avcodec_get_name(enum AVCodecID id);
573 
574 /**
575  * @}
576  */
577 
578 #endif // AVCODEC_CODEC_ID_H
codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it ...
Definition: codec_id.h:553
A dummy id pointing at the start of audio codecs.
Definition: codec_id.h:301
Dummy codec for streams containing only metadata information.
Definition: codec_id.h:559
Convenience header that includes libavutil&#39;s core.
Contain timestamp estimated through PCR of program stream.
Definition: codec_id.h:541
A dummy ID pointing at the start of various fake codecs.
Definition: codec_id.h:538
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: codec_id.h:46
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: codec_id.h:412
enum AVCodecID codec_id
Definition: vaapi_decode.c:369
Passthrough codec, AVFrames wrapped in AVPacket.
Definition: codec_id.h:560
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:51
FAKE codec to indicate a MPEG-4 Systems stream (only used by libavformat)
Definition: codec_id.h:557
AVMediaType
Definition: avutil.h:199
raw UTF-8 text
Definition: codec_id.h:511
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
Definition: utils.c:1193
FAKE codec to indicate a raw MPEG-2 TS stream (only used by libavformat)
Definition: codec_id.h:555
as in Berlin toast format
Definition: codec_id.h:429
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
Get the type of the given codec.
Definition: codec_desc.c:3426
A dummy ID pointing at the start of subtitle codecs.
Definition: codec_id.h:508