diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 19:29:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-29 19:29:48 +0200 |
commit | 03b88f6b393359957ac9f7f0fb9b148ab51b3da5 (patch) | |
tree | 9da2548d45816813308362cccb712a674f98715f /libavcodec | |
parent | 4506ed336ff74ea0cafbb01edbb44821815a60a4 (diff) | |
parent | 41334fcab41fee1a5a869c9f87c4a1d59a627b57 (diff) | |
download | ffmpeg-03b88f6b393359957ac9f7f0fb9b148ab51b3da5.tar.gz |
Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
lavfi/drawtext: allow to format pts as HH:MM:SS.mmm.
lavf/concatdec: implement automatic conversions.
lavf/concatdec: reindent after last commit.
lavf/concatdec: always do stream matching.
lavf/concatdec: check match_streams() return value.
lavf/concatdec: use a structure for each stream.
ffprobe: use the codec descriptor if no decoder was found.
lavf/matroska: add "binary" pseudo-MIME type.
lavc: minor bump and APIchanges for AVCodecDescriptor.mime_types.
lavc: add a mime_types field to codec descriptors.
lavc: add AV_CODEC_ID_BIN_DATA.
lavc: add codec descriptors for TTF and OTF.
lavc: add codec descriptors for deprecated ids.
lavc/codec_desc: add separation comment.
tools/ffhash: implement base64 output.
tools/ffhash: use av_hash_final_hex().
lavu/hash: add hash_final helpers.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 8 | ||||
-rw-r--r-- | libavcodec/codec_desc.c | 152 | ||||
-rw-r--r-- | libavcodec/version.h | 4 |
3 files changed, 162 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 9a14e6654a..1d42bbe0fa 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -533,6 +533,7 @@ enum AVCodecID { AV_CODEC_ID_SMPTE_KLV = MKBETAG('K','L','V','A'), AV_CODEC_ID_DVD_NAV = MKBETAG('D','N','A','V'), AV_CODEC_ID_TIMED_ID3 = MKBETAG('T','I','D','3'), + AV_CODEC_ID_BIN_DATA = MKBETAG('D','A','T','A'), AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it @@ -570,6 +571,13 @@ typedef struct AVCodecDescriptor { * Codec properties, a combination of AV_CODEC_PROP_* flags. */ int props; + + /** + * MIME type(s) associated with the codec. + * May be NULL; if not, a NULL-terminated array of MIME types. + * The first item is always non-NULL and is the prefered MIME type. + */ + const char *const *mime_types; } AVCodecDescriptor; /** diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 8785e3a810..4906a0a21d 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -26,6 +26,8 @@ #include "avcodec.h" #include "version.h" +#define MT(...) (const char *const[]){ __VA_ARGS__, NULL } + static const AVCodecDescriptor codec_descriptors[] = { /* video codecs */ { @@ -85,6 +87,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "mjpeg", .long_name = NULL_IF_CONFIG_SMALL("Motion JPEG"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, + .mime_types= MT("image/jpeg"), }, { .id = AV_CODEC_ID_MJPEGB, @@ -526,6 +529,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "bmp", .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/x-ms-bmp"), }, { .id = AV_CODEC_ID_CSCD, @@ -597,6 +601,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/jp2"), }, { .id = AV_CODEC_ID_VMNC, @@ -1277,6 +1282,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "gif", .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"), .props = AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/gif"), }, { .id = AV_CODEC_ID_JPEGLS, @@ -1299,6 +1305,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "pam", .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/x-portable-pixmap"), }, { .id = AV_CODEC_ID_PBM, @@ -1313,6 +1320,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "pcx", .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/x-pcx"), }, { .id = AV_CODEC_ID_PGM, @@ -1334,6 +1342,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "png", .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"), .props = AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/png"), }, { .id = AV_CODEC_ID_PPM, @@ -1376,6 +1385,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "targa", .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/x-targa", "image/x-tga"), }, { .id = AV_CODEC_ID_TIFF, @@ -1383,6 +1393,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "tiff", .long_name = NULL_IF_CONFIG_SMALL("TIFF image"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/tiff"), }, { .id = AV_CODEC_ID_TXD, @@ -1405,6 +1416,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("WebP"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/webp"), }, { .id = AV_CODEC_ID_WMV3IMAGE, @@ -1426,6 +1438,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "xwd", .long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + .mime_types= MT("image/x-xwindowdump"), }, /* various PCM "codecs" */ @@ -2649,6 +2662,15 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), .props = AV_CODEC_PROP_TEXT_SUB, }, + + /* other kind of codecs and pseudo-codecs */ + { + .id = AV_CODEC_ID_TTF, + .type = AVMEDIA_TYPE_DATA, + .name = "ttf", + .long_name = NULL_IF_CONFIG_SMALL("TrueType font"), + .mime_types= MT("application/x-truetype-font", "application/x-font"), + }, { .id = AV_CODEC_ID_BINTEXT, .type = AVMEDIA_TYPE_VIDEO, @@ -2671,6 +2693,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .props = AV_CODEC_PROP_INTRA_ONLY, }, { + .id = AV_CODEC_ID_OTF, + .type = AVMEDIA_TYPE_DATA, + .name = "otf", + .long_name = NULL_IF_CONFIG_SMALL("OpenType font"), + .mime_types= MT("application/vnd.ms-opentype"), + }, + { .id = AV_CODEC_ID_SMPTE_KLV, .type = AVMEDIA_TYPE_DATA, .name = "klv", @@ -2688,7 +2717,130 @@ static const AVCodecDescriptor codec_descriptors[] = { .name = "timed_id3", .long_name = NULL_IF_CONFIG_SMALL("timed ID3 metadata"), }, + { + .id = AV_CODEC_ID_BIN_DATA, + .type = AVMEDIA_TYPE_DATA, + .name = "bin_data", + .long_name = NULL_IF_CONFIG_SMALL("binary data"), + .mime_types= MT("application/octet-stream"), + }, + + /* deprecated codec ids */ + { + .id = AV_CODEC_ID_BRENDER_PIX_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "brender_pix_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("BRender PIX image (deprecated id)"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + }, + { + .id = AV_CODEC_ID_ESCAPE130_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "escape130_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("Escape 130 (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_EXR_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "exr_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("OpenEXR image (deprecated id)"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | + AV_CODEC_PROP_LOSSLESS, + }, + { + .id = AV_CODEC_ID_G2M_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "g2m_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("Go2Meeting (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_HEVC_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "hevc_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("H.265 / HEVC (High Efficiency Video Coding) (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_PAF_VIDEO_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "paf_video_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_SANM_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "sanm_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("LucasArts SANM/SMUSH video (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_VP7_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "vp7_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("On2 VP7 (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_WEBP_DEPRECATED, + .type = AVMEDIA_TYPE_VIDEO, + .name = "webp_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("WebP (deprecated id)"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | + AV_CODEC_PROP_LOSSLESS, + }, + { + .id = AV_CODEC_ID_VIMA, + .type = AVMEDIA_TYPE_AUDIO, + .name = "vima", + .long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_ADPCM_VIMA_DEPRECATED, + .type = AVMEDIA_TYPE_AUDIO, + .name = "adpcm_vima_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_OPUS_DEPRECATED, + .type = AVMEDIA_TYPE_AUDIO, + .name = "opus_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("Opus (Opus Interactive Audio Codec) (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_PAF_AUDIO_DEPRECATED, + .type = AVMEDIA_TYPE_AUDIO, + .name = "paf_audio_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio (deprecated id)"), + .props = AV_CODEC_PROP_LOSSY, + }, + { + .id = AV_CODEC_ID_PCM_S24LE_PLANAR_DEPRECATED, + .type = AVMEDIA_TYPE_AUDIO, + .name = "pcm_s24le_planar_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("PCM signed 24-bit little-endian planar (deprecated id)"), + .props = AV_CODEC_PROP_LOSSLESS, + }, + { + .id = AV_CODEC_ID_PCM_S32LE_PLANAR_DEPRECATED, + .type = AVMEDIA_TYPE_AUDIO, + .name = "pcm_s32le_planar_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("PCM signed 32-bit little-endian planar (deprecated id)"), + .props = AV_CODEC_PROP_LOSSLESS, + }, + { + .id = AV_CODEC_ID_TAK_DEPRECATED, + .type = AVMEDIA_TYPE_AUDIO, + .name = "tak_deprecated", + .long_name = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor) (deprecated id)"), + .props = AV_CODEC_PROP_LOSSLESS, + }, }; const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id) diff --git a/libavcodec/version.h b/libavcodec/version.h index 43a4cc4946..44ec052198 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,8 +29,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 55 -#define LIBAVCODEC_VERSION_MINOR 59 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 60 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ |