2013-09-24 01:35:40 +00:00
|
|
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-04-10 21:42:38 +00:00
|
|
|
#ifndef MEDIA_FORMATS_MP4_FOURCCS_H_
|
|
|
|
#define MEDIA_FORMATS_MP4_FOURCCS_H_
|
2013-09-24 01:35:40 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2014-09-19 20:41:13 +00:00
|
|
|
namespace edash_packager {
|
2013-09-24 01:35:40 +00:00
|
|
|
namespace media {
|
|
|
|
namespace mp4 {
|
|
|
|
|
2015-11-23 23:12:04 +00:00
|
|
|
// TODO(rkuroiwa): Make these case sensitive. e.g. FOURCC_avc1.
|
2013-09-24 01:35:40 +00:00
|
|
|
enum FourCC {
|
|
|
|
FOURCC_NULL = 0,
|
2015-12-21 23:10:17 +00:00
|
|
|
FOURCC_ID32 = 0x49443332,
|
|
|
|
FOURCC_PRIV = 0x50524956,
|
2016-01-08 23:56:33 +00:00
|
|
|
FOURCC_AC3 = 0x61632d33, // This fourcc is "ac-3".
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_AVC1 = 0x61766331,
|
|
|
|
FOURCC_AVCC = 0x61766343,
|
|
|
|
FOURCC_BLOC = 0x626C6F63,
|
|
|
|
FOURCC_CENC = 0x63656e63,
|
|
|
|
FOURCC_CO64 = 0x636f3634,
|
|
|
|
FOURCC_CTTS = 0x63747473,
|
2016-01-08 23:56:33 +00:00
|
|
|
FOURCC_DAC3 = 0x64616333,
|
2013-11-27 01:52:13 +00:00
|
|
|
FOURCC_DASH = 0x64617368,
|
2015-12-07 19:56:07 +00:00
|
|
|
FOURCC_DDTS = 0x64647473,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_DINF = 0x64696e66,
|
2013-11-27 01:52:13 +00:00
|
|
|
FOURCC_DREF = 0x64726566,
|
2015-12-07 19:56:07 +00:00
|
|
|
FOURCC_DTSC = 0x64747363,
|
|
|
|
FOURCC_DTSE = 0x64747365,
|
|
|
|
FOURCC_DTSH = 0x64747368,
|
|
|
|
FOURCC_DTSL = 0x6474736c,
|
|
|
|
FOURCC_DTSM = 0x6474732d,
|
|
|
|
FOURCC_DTSP = 0x6474732b,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_EDTS = 0x65647473,
|
|
|
|
FOURCC_ELST = 0x656c7374,
|
|
|
|
FOURCC_ENCA = 0x656e6361,
|
|
|
|
FOURCC_ENCV = 0x656e6376,
|
|
|
|
FOURCC_ESDS = 0x65736473,
|
|
|
|
FOURCC_FREE = 0x66726565,
|
|
|
|
FOURCC_FRMA = 0x66726d61,
|
|
|
|
FOURCC_FTYP = 0x66747970,
|
|
|
|
FOURCC_HDLR = 0x68646c72,
|
2015-10-29 00:26:29 +00:00
|
|
|
FOURCC_HEV1 = 0x68657631,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_HINT = 0x68696e74,
|
2015-10-29 00:26:29 +00:00
|
|
|
FOURCC_HVC1 = 0x68766331,
|
|
|
|
FOURCC_HVCC = 0x68766343,
|
2013-11-27 01:52:13 +00:00
|
|
|
FOURCC_ISO6 = 0x69736f36,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_IODS = 0x696f6473,
|
|
|
|
FOURCC_MDAT = 0x6d646174,
|
|
|
|
FOURCC_MDHD = 0x6d646864,
|
|
|
|
FOURCC_MDIA = 0x6d646961,
|
|
|
|
FOURCC_MECO = 0x6d65636f,
|
|
|
|
FOURCC_MEHD = 0x6d656864,
|
|
|
|
FOURCC_META = 0x6d657461,
|
|
|
|
FOURCC_MFHD = 0x6d666864,
|
|
|
|
FOURCC_MFRA = 0x6d667261,
|
|
|
|
FOURCC_MINF = 0x6d696e66,
|
|
|
|
FOURCC_MOOF = 0x6d6f6f66,
|
|
|
|
FOURCC_MOOV = 0x6d6f6f76,
|
2013-11-27 01:52:13 +00:00
|
|
|
FOURCC_MP41 = 0x6d703431,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_MP4A = 0x6d703461,
|
|
|
|
FOURCC_MP4V = 0x6d703476,
|
|
|
|
FOURCC_MVEX = 0x6d766578,
|
|
|
|
FOURCC_MVHD = 0x6d766864,
|
|
|
|
FOURCC_PASP = 0x70617370,
|
|
|
|
FOURCC_PDIN = 0x7064696e,
|
|
|
|
FOURCC_PRFT = 0x70726674,
|
|
|
|
FOURCC_PSSH = 0x70737368,
|
|
|
|
FOURCC_SAIO = 0x7361696f,
|
|
|
|
FOURCC_SAIZ = 0x7361697a,
|
2014-03-24 21:09:58 +00:00
|
|
|
FOURCC_SBGP = 0x73626770,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_SCHI = 0x73636869,
|
|
|
|
FOURCC_SCHM = 0x7363686d,
|
|
|
|
FOURCC_SDTP = 0x73647470,
|
2014-03-24 21:09:58 +00:00
|
|
|
FOURCC_SEIG = 0x73656967,
|
2015-12-21 18:34:21 +00:00
|
|
|
FOURCC_SENC = 0x73656e63,
|
2014-03-24 21:09:58 +00:00
|
|
|
FOURCC_SGPD = 0x73677064,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_SIDX = 0x73696478,
|
|
|
|
FOURCC_SINF = 0x73696e66,
|
|
|
|
FOURCC_SKIP = 0x736b6970,
|
|
|
|
FOURCC_SMHD = 0x736d6864,
|
|
|
|
FOURCC_SOUN = 0x736f756e,
|
|
|
|
FOURCC_SSIX = 0x73736978,
|
|
|
|
FOURCC_STBL = 0x7374626c,
|
|
|
|
FOURCC_STCO = 0x7374636f,
|
|
|
|
FOURCC_STSC = 0x73747363,
|
|
|
|
FOURCC_STSD = 0x73747364,
|
|
|
|
FOURCC_STSS = 0x73747373,
|
|
|
|
FOURCC_STSZ = 0x7374737a,
|
|
|
|
FOURCC_STTS = 0x73747473,
|
|
|
|
FOURCC_STYP = 0x73747970,
|
2013-10-08 17:37:58 +00:00
|
|
|
FOURCC_STZ2 = 0x73747a32,
|
2015-11-23 23:12:04 +00:00
|
|
|
FOURCC_SUBT = 0x73756274,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_TENC = 0x74656e63,
|
2015-11-23 23:12:04 +00:00
|
|
|
FOURCC_TEXT = 0x74657874,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_TFDT = 0x74666474,
|
|
|
|
FOURCC_TFHD = 0x74666864,
|
|
|
|
FOURCC_TKHD = 0x746b6864,
|
|
|
|
FOURCC_TRAF = 0x74726166,
|
|
|
|
FOURCC_TRAK = 0x7472616b,
|
|
|
|
FOURCC_TREX = 0x74726578,
|
|
|
|
FOURCC_TRUN = 0x7472756e,
|
|
|
|
FOURCC_UDTA = 0x75647461,
|
2015-11-23 23:12:04 +00:00
|
|
|
FOURCC_URL = 0x75726c20,
|
|
|
|
FOURCC_URN = 0x75726e20,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_UUID = 0x75756964,
|
|
|
|
FOURCC_VIDE = 0x76696465,
|
|
|
|
FOURCC_VMHD = 0x766d6864,
|
2015-10-26 20:50:22 +00:00
|
|
|
FOURCC_VP08 = 0x76703038,
|
|
|
|
FOURCC_VP09 = 0x76703039,
|
|
|
|
FOURCC_VP10 = 0x76703130,
|
|
|
|
FOURCC_VPCC = 0x76706343,
|
2013-09-24 01:35:40 +00:00
|
|
|
FOURCC_WIDE = 0x77696465,
|
2015-11-23 23:12:04 +00:00
|
|
|
FOURCC_ctim = 0x6374696d,
|
|
|
|
FOURCC_iden = 0x6964656e,
|
|
|
|
FOURCC_payl = 0x7061796c,
|
|
|
|
FOURCC_sthd = 0x73746864,
|
|
|
|
FOURCC_sttg = 0x73747467,
|
|
|
|
FOURCC_vlab = 0x766c6162,
|
|
|
|
FOURCC_vsid = 0x76736964,
|
|
|
|
FOURCC_vttC = 0x76747443,
|
|
|
|
FOURCC_vtta = 0x76747461,
|
|
|
|
FOURCC_vttc = 0x76747463,
|
|
|
|
FOURCC_vtte = 0x76747465,
|
|
|
|
FOURCC_wvtt = 0x77767474,
|
2013-09-24 01:35:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const inline std::string FourCCToString(FourCC fourcc) {
|
|
|
|
char buf[5];
|
|
|
|
buf[0] = (fourcc >> 24) & 0xff;
|
|
|
|
buf[1] = (fourcc >> 16) & 0xff;
|
|
|
|
buf[2] = (fourcc >> 8) & 0xff;
|
|
|
|
buf[3] = (fourcc) & 0xff;
|
|
|
|
buf[4] = 0;
|
|
|
|
return std::string(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace mp4
|
|
|
|
} // namespace media
|
2014-09-19 20:41:13 +00:00
|
|
|
} // namespace edash_packager
|
2013-09-24 01:35:40 +00:00
|
|
|
|
2014-04-10 21:42:38 +00:00
|
|
|
#endif // MEDIA_FORMATS_MP4_FOURCCS_H_
|