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
248 #define AV_CODEC_ID_H266 AV_CODEC_ID_VVC
249 
309 
310  /* various PCM "codecs" */
311  AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
343 
349 
350  /* various ADPCM codecs */
382 
402 
403  /* AMR */
406 
407  /* RealAudio codecs*/
410 
411  /* various DPCM codecs */
416 
420 
421  /* audio codecs */
422  AV_CODEC_ID_MP2 = 0x15000,
423  AV_CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
440  AV_CODEC_ID_GSM, ///< as in Berlin toast format
452  AV_CODEC_ID_GSM_MS, /* as found in WAV */
490 
518 
519  /* subtitle codecs */
520  AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
523  AV_CODEC_ID_TEXT, ///< raw UTF-8 text
530 
548 
549  /* other specific kind of codecs (generally used for attachments) */
550  AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
551  AV_CODEC_ID_TTF = 0x18000,
552 
553  AV_CODEC_ID_SCTE_35, ///< Contain timestamp estimated through PCR of program stream.
563 
564 
565  AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
566 
567  AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
568  * stream (only used by libavformat) */
569  AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
570  * stream (only used by libavformat) */
571  AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
572  AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket
573 };
574 
575 /**
576  * Get the type of the given codec.
577  */
579 
580 /**
581  * Get the name of a codec.
582  * @return a static string identifying the codec; never NULL
583  */
584 const char *avcodec_get_name(enum AVCodecID id);
585 
586 /**
587  * @}
588  */
589 
590 #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:565
A dummy id pointing at the start of audio codecs.
Definition: codec_id.h:311
Dummy codec for streams containing only metadata information.
Definition: codec_id.h:571
Convenience header that includes libavutil&#39;s core.
Contain timestamp estimated through PCR of program stream.
Definition: codec_id.h:553
A dummy ID pointing at the start of various fake codecs.
Definition: codec_id.h:550
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:423
enum AVCodecID codec_id
Definition: vaapi_decode.c:369
Passthrough codec, AVFrames wrapped in AVPacket.
Definition: codec_id.h:572
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:569
AVMediaType
Definition: avutil.h:199
raw UTF-8 text
Definition: codec_id.h:523
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
Definition: utils.c:1236
FAKE codec to indicate a raw MPEG-2 TS stream (only used by libavformat)
Definition: codec_id.h:567
as in Berlin toast format
Definition: codec_id.h:440
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
Get the type of the given codec.
Definition: codec_desc.c:3512
A dummy ID pointing at the start of subtitle codecs.
Definition: codec_id.h:520