Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Unified Diff: media/mp4/fourccs.h

Issue 10536014: Implement ISO BMFF support in Media Source. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/mp4/fourccs.h
diff --git a/media/mp4/fourccs.h b/media/mp4/fourccs.h
new file mode 100644
index 0000000000000000000000000000000000000000..d434d4d87163984bb5afea9c9df4bcb2790d068e
--- /dev/null
+++ b/media/mp4/fourccs.h
@@ -0,0 +1,92 @@
+// 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.
+
+#ifndef MEDIA_MP4_FOURCCS_H_
+#define MEDIA_MP4_FOURCCS_H_
+
+#include <string>
+
+typedef uint32 FourCC;
acolwell GONE FROM CHROMIUM 2012/06/06 17:32:39 How about making this an enum and putting it withi
strobe_ 2012/06/07 16:33:54 Done.
+
+#define FOURCC_AVC1 0x61766331
+#define FOURCC_AVCC 0x61766343
+#define FOURCC_CENC 0x63656e63
+#define FOURCC_CO64 0x636f3634
+#define FOURCC_CTTS 0x63747473
+#define FOURCC_DINF 0x64696e66
+#define FOURCC_EDTS 0x65647473
+#define FOURCC_ELST 0x656c7374
+#define FOURCC_ENCA 0x656e6361
+#define FOURCC_ENCV 0x656e6376
+#define FOURCC_ESDS 0x65736473
+#define FOURCC_FREE 0x66726565
+#define FOURCC_FRMA 0x66726d61
+#define FOURCC_FTYP 0x66747970
+#define FOURCC_HDLR 0x68646c72
+#define FOURCC_HINT 0x68696e74
+#define FOURCC_IODS 0x696f6473
+#define FOURCC_MDAT 0x6d646174
+#define FOURCC_MDHD 0x6d646864
+#define FOURCC_MDIA 0x6d646961
+#define FOURCC_MEHD 0x6d656864
+#define FOURCC_MFHD 0x6d666864
+#define FOURCC_MFRA 0x6d667261
+#define FOURCC_MINF 0x6d696e66
+#define FOURCC_MOOF 0x6d6f6f66
+#define FOURCC_MOOV 0x6d6f6f76
+#define FOURCC_MP4A 0x6d703461
+#define FOURCC_MP4V 0x6d703476
+#define FOURCC_MVEX 0x6d766578
+#define FOURCC_MVHD 0x6d766864
+#define FOURCC_PASP 0x70617370
+#define FOURCC_PSSH 0x70737368
+#define FOURCC_SAIO 0x7361696f
+#define FOURCC_SAIZ 0x7361697a
+#define FOURCC_SCHI 0x73636869
+#define FOURCC_SCHM 0x7363686d
+#define FOURCC_SDTP 0x73647470
+#define FOURCC_SIDX 0x73696478
+#define FOURCC_SINF 0x73696e66
+#define FOURCC_SKIP 0x736b6970
+#define FOURCC_SMHD 0x736d6864
+#define FOURCC_SOUN 0x736f756e
+#define FOURCC_STBL 0x7374626c
+#define FOURCC_STCO 0x7374636f
+#define FOURCC_STSC 0x73747363
+#define FOURCC_STSD 0x73747364
+#define FOURCC_STSS 0x73747373
+#define FOURCC_STSZ 0x7374737a
+#define FOURCC_STTS 0x73747473
+#define FOURCC_STYP 0x73747970
+#define FOURCC_TENC 0x74656e63
+#define FOURCC_TFDT 0x74666474
+#define FOURCC_TFHD 0x74666864
+#define FOURCC_TKHD 0x746b6864
+#define FOURCC_TRAF 0x74726166
+#define FOURCC_TRAK 0x7472616b
+#define FOURCC_TREX 0x74726578
+#define FOURCC_TRUN 0x7472756e
+#define FOURCC_UDTA 0x75647461
+#define FOURCC_UUID 0x75756964
+#define FOURCC_VIDE 0x76696465
+#define FOURCC_VMHD 0x766d6864
+#define FOURCC_WIDE 0x77696465
+
+namespace media {
+namespace mp4 {
+
+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);
+}
+
+}
+}
+
+#endif // MEDIA_MP4_FOURCCS_H_

Powered by Google App Engine
This is Rietveld 408576698