Path: blob/master/dep/ffmpeg/include/libavcodec/codec_desc.h
4216 views
/*1* Codec descriptors public API2*3* This file is part of FFmpeg.4*5* FFmpeg is free software; you can redistribute it and/or6* modify it under the terms of the GNU Lesser General Public7* License as published by the Free Software Foundation; either8* version 2.1 of the License, or (at your option) any later version.9*10* FFmpeg is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU13* Lesser General Public License for more details.14*15* You should have received a copy of the GNU Lesser General Public16* License along with FFmpeg; if not, write to the Free Software17* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA18*/1920#ifndef AVCODEC_CODEC_DESC_H21#define AVCODEC_CODEC_DESC_H2223#include "libavutil/avutil.h"2425#include "codec_id.h"2627/**28* @addtogroup lavc_core29* @{30*/3132/**33* This struct describes the properties of a single codec described by an34* AVCodecID.35* @see avcodec_descriptor_get()36*/37typedef struct AVCodecDescriptor {38enum AVCodecID id;39enum AVMediaType type;40/**41* Name of the codec described by this descriptor. It is non-empty and42* unique for each codec descriptor. It should contain alphanumeric43* characters and '_' only.44*/45const char *name;46/**47* A more descriptive name for this codec. May be NULL.48*/49const char *long_name;50/**51* Codec properties, a combination of AV_CODEC_PROP_* flags.52*/53int props;54/**55* MIME type(s) associated with the codec.56* May be NULL; if not, a NULL-terminated array of MIME types.57* The first item is always non-NULL and is the preferred MIME type.58*/59const char *const *mime_types;60/**61* If non-NULL, an array of profiles recognized for this codec.62* Terminated with AV_PROFILE_UNKNOWN.63*/64const struct AVProfile *profiles;65} AVCodecDescriptor;6667/**68* Codec uses only intra compression.69* Video and audio codecs only.70*/71#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)72/**73* Codec supports lossy compression. Audio and video codecs only.74* @note a codec may support both lossy and lossless75* compression modes76*/77#define AV_CODEC_PROP_LOSSY (1 << 1)78/**79* Codec supports lossless compression. Audio and video codecs only.80*/81#define AV_CODEC_PROP_LOSSLESS (1 << 2)82/**83* Codec supports frame reordering. That is, the coded order (the order in which84* the encoded packets are output by the encoders / stored / input to the85* decoders) may be different from the presentation order of the corresponding86* frames.87*88* For codecs that do not have this property set, PTS and DTS should always be89* equal.90*/91#define AV_CODEC_PROP_REORDER (1 << 3)9293/**94* Video codec supports separate coding of fields in interlaced frames.95*/96#define AV_CODEC_PROP_FIELDS (1 << 4)9798/**99* Subtitle codec is bitmap based100* Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field.101*/102#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)103/**104* Subtitle codec is text based.105* Decoded AVSubtitle data can be read from the AVSubtitleRect->ass field.106*/107#define AV_CODEC_PROP_TEXT_SUB (1 << 17)108109/**110* @return descriptor for given codec ID or NULL if no descriptor exists.111*/112const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);113114/**115* Iterate over all codec descriptors known to libavcodec.116*117* @param prev previous descriptor. NULL to get the first descriptor.118*119* @return next descriptor or NULL after the last descriptor120*/121const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev);122123/**124* @return codec descriptor with the given name or NULL if no such descriptor125* exists.126*/127const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name);128129/**130* @}131*/132133#endif // AVCODEC_CODEC_DESC_H134135136