codec_c: add CodecID and codec type for MPEG-H P2/HEVC/h.265

This commit is contained in:
Moritz Bunkus 2013-12-30 17:54:54 +01:00
parent b01bb3f7f2
commit db1b5e1de3
3 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,7 @@ codec_c::initialize() {
ms_codecs.emplace_back("MPEG-1/2", CT_V_MPEG12, "mpeg|mpg[12]|m[12]v.|mpgv|mp[12]v|h262|V_MPEG[12]");
ms_codecs.emplace_back("MPEG-4p2", CT_V_MPEG4_P2, "3iv2|xvi[dx]|divx|dx50|fmp4|mp4v|V_MPEG4/ISO/(?:SP|AP|ASP)");
ms_codecs.emplace_back("MPEG-4p10/AVC/h.264", CT_V_MPEG4_P10, "avc.|[hx]264|V_MPEG4/ISO/AVC");
ms_codecs.emplace_back("MPEG-H/HEVC/h.265", CT_V_MPEGH_P2, "hevc|[hx]265|V_MPEGH/ISO/HEVC");
ms_codecs.emplace_back("RealVideo", CT_V_REAL, "rv[1234]\\d|V_REAL/RV\\d+");
ms_codecs.emplace_back("Theora", CT_V_THEORA, "theo|thra|V_THEORA");
ms_codecs.emplace_back("Dirac", CT_V_DIRAC, "drac|V_DIRAC");

View File

@ -59,6 +59,7 @@
#define MKV_V_MPEG4_ASP "V_MPEG4/ISO/ASP"
#define MKV_V_MPEG4_AP "V_MPEG4/ISO/AP"
#define MKV_V_MPEG4_AVC "V_MPEG4/ISO/AVC"
#define MKV_V_MPEGH_HEVC "V_MPEGH/ISO/HEVC"
#define MKV_V_MSCOMP "V_MS/VFW/FOURCC"
#define MKV_V_REALV1 "V_REAL/RV10"
#define MKV_V_REALV2 "V_REAL/RV20"
@ -87,6 +88,7 @@ enum codec_type_e {
, CT_V_MPEG12 = 0x1000
, CT_V_MPEG4_P2
, CT_V_MPEG4_P10
, CT_V_MPEGH_P2
, CT_V_REAL
, CT_V_THEORA
, CT_V_DIRAC

View File

@ -113,6 +113,11 @@ TEST(Codec, LookUpStringVideo) {
EXPECT_TRUE(codec_c::look_up("x264").is(CT_V_MPEG4_P10));
EXPECT_TRUE(codec_c::look_up("avc1").is(CT_V_MPEG4_P10));
EXPECT_TRUE(codec_c::look_up(MKV_V_MPEGH_HEVC).is(CT_V_MPEGH_P2));
EXPECT_TRUE(codec_c::look_up("h265").is(CT_V_MPEGH_P2));
EXPECT_TRUE(codec_c::look_up("x265").is(CT_V_MPEGH_P2));
EXPECT_TRUE(codec_c::look_up("hevc").is(CT_V_MPEGH_P2));
EXPECT_TRUE(codec_c::look_up(MKV_V_REALV1).is(CT_V_REAL));
EXPECT_TRUE(codec_c::look_up(MKV_V_REALV2).is(CT_V_REAL));
EXPECT_TRUE(codec_c::look_up(MKV_V_REALV3).is(CT_V_REAL));