liveMedia/EBMLNumber.hh

Go to the documentation of this file.
00001 /**********
00002 This library is free software; you can redistribute it and/or modify it under
00003 the terms of the GNU Lesser General Public License as published by the
00004 Free Software Foundation; either version 2.1 of the License, or (at your
00005 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
00006 
00007 This library is distributed in the hope that it will be useful, but WITHOUT
00008 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00009 FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
00010 more details.
00011 
00012 You should have received a copy of the GNU Lesser General Public License
00013 along with this library; if not, write to the Free Software Foundation, Inc.,
00014 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
00015 **********/
00016 // "liveMedia"
00017 // Copyright (c) 1996-2013 Live Networks, Inc.  All rights reserved.
00018 // EBML numbers (ids and sizes)
00019 // C++ header
00020 
00021 #ifndef _EBML_NUMBER_HH
00022 #define _EBML_NUMBER_HH
00023 
00024 #include "NetCommon.h"
00025 #include "Boolean.hh"
00026 #include <stdio.h>
00027 
00028 #define EBML_NUMBER_MAX_LEN 8
00029 
00030 class EBMLNumber {
00031 public:
00032   EBMLNumber(Boolean stripLeading1 = True);
00033   virtual ~EBMLNumber();
00034 
00035   u_int64_t val() const;  
00036   char* hexString() const; // used for debugging
00037   Boolean operator==(u_int64_t arg2) const { return val() == arg2; }
00038   Boolean operator!=(u_int64_t arg2) const { return !(*this == arg2); }
00039 
00040 public:
00041   Boolean stripLeading1;
00042   unsigned len;
00043   u_int8_t data[EBML_NUMBER_MAX_LEN];
00044 };
00045 
00046 // Definitions of some Matroska/EBML IDs (including the ones that we check for):
00047 #define MATROSKA_ID_EBML 0x1A45DFA3
00048 #define MATROSKA_ID_VOID 0xEC
00049 #define MATROSKA_ID_CRC_32 0xBF
00050 #define MATROSKA_ID_SEGMENT 0x18538067
00051 #define MATROSKA_ID_SEEK_HEAD 0x114D9B74
00052 #define MATROSKA_ID_SEEK 0x4DBB
00053 #define MATROSKA_ID_SEEK_ID 0x53AB
00054 #define MATROSKA_ID_SEEK_POSITION 0x53AC
00055 #define MATROSKA_ID_INFO 0x1549A966
00056 #define MATROSKA_ID_SEGMENT_UID 0x73A4
00057 #define MATROSKA_ID_TIMECODE_SCALE 0x2AD7B1
00058 #define MATROSKA_ID_DURATION 0x4489
00059 #define MATROSKA_ID_DATE_UTC 0x4461
00060 #define MATROSKA_ID_MUXING_APP 0x4D80
00061 #define MATROSKA_ID_WRITING_APP 0x5741
00062 #define MATROSKA_ID_CLUSTER 0x1F43B675
00063 #define MATROSKA_ID_TIMECODE 0xE7
00064 #define MATROSKA_ID_POSITION 0xA7
00065 #define MATROSKA_ID_PREV_SIZE 0xAB
00066 #define MATROSKA_ID_SIMPLEBLOCK 0xA3
00067 #define MATROSKA_ID_BLOCK_GROUP 0xA0
00068 #define MATROSKA_ID_BLOCK 0xA1
00069 #define MATROSKA_ID_BLOCK_DURATION 0x9B
00070 #define MATROSKA_ID_REFERENCE_BLOCK 0xFB
00071 #define MATROSKA_ID_TRACKS 0x1654AE6B
00072 #define MATROSKA_ID_TRACK_ENTRY 0xAE
00073 #define MATROSKA_ID_TRACK_NUMBER 0xD7
00074 #define MATROSKA_ID_TRACK_UID 0x73C5
00075 #define MATROSKA_ID_TRACK_TYPE 0x83
00076 #define MATROSKA_ID_FLAG_ENABLED 0xB9
00077 #define MATROSKA_ID_FLAG_DEFAULT 0x88
00078 #define MATROSKA_ID_FLAG_FORCED 0x55AA
00079 #define MATROSKA_ID_FLAG_LACING 0x9C
00080 #define MATROSKA_ID_MIN_CACHE 0x6DE7
00081 #define MATROSKA_ID_DEFAULT_DURATION 0x23E383
00082 #define MATROSKA_ID_TRACK_TIMECODE_SCALE 0x23314F
00083 #define MATROSKA_ID_MAX_BLOCK_ADDITION_ID 0x55EE
00084 #define MATROSKA_ID_NAME 0x536E
00085 #define MATROSKA_ID_LANGUAGE 0x22B59C
00086 #define MATROSKA_ID_CODEC 0x86
00087 #define MATROSKA_ID_CODEC_PRIVATE 0x63A2
00088 #define MATROSKA_ID_CODEC_NAME 0x258688
00089 #define MATROSKA_ID_CODEC_DECODE_ALL 0xAA
00090 #define MATROSKA_ID_VIDEO 0xE0
00091 #define MATROSKA_ID_FLAG_INTERLACED 0x9A
00092 #define MATROSKA_ID_PIXEL_WIDTH 0xB0
00093 #define MATROSKA_ID_PIXEL_HEIGHT 0xBA
00094 #define MATROSKA_ID_DISPLAY_WIDTH 0x54B0
00095 #define MATROSKA_ID_DISPLAY_HEIGHT 0x54BA
00096 #define MATROSKA_ID_AUDIO 0xE1
00097 #define MATROSKA_ID_SAMPLING_FREQUENCY 0xB5
00098 #define MATROSKA_ID_OUTPUT_SAMPLING_FREQUENCY 0x78B5
00099 #define MATROSKA_ID_CHANNELS 0x9F
00100 #define MATROSKA_ID_CONTENT_ENCODINGS 0x6D80
00101 #define MATROSKA_ID_CONTENT_ENCODING 0x6240
00102 #define MATROSKA_ID_CONTENT_COMPRESSION 0x5034
00103 #define MATROSKA_ID_CONTENT_COMP_ALGO 0x4254
00104 #define MATROSKA_ID_CONTENT_COMP_SETTINGS 0x4255
00105 #define MATROSKA_ID_CONTENT_ENCRYPTION 0x5035
00106 #define MATROSKA_ID_CUES 0x1C53BB6B
00107 #define MATROSKA_ID_CUE_POINT 0xBB
00108 #define MATROSKA_ID_CUE_TIME 0xB3
00109 #define MATROSKA_ID_CUE_TRACK_POSITIONS 0xB7
00110 #define MATROSKA_ID_CUE_TRACK 0xF7
00111 #define MATROSKA_ID_CUE_CLUSTER_POSITION 0xF1
00112 #define MATROSKA_ID_CUE_BLOCK_NUMBER 0x5378
00113 #define MATROSKA_ID_TAGS 0x1254C367
00114 
00115 class EBMLId: public EBMLNumber {
00116 public:
00117   EBMLId();
00118   virtual ~EBMLId();
00119 
00120   char const* stringName() const; // used for debugging
00121 };
00122 
00123 class EBMLDataSize: public EBMLNumber {
00124 public:
00125   EBMLDataSize();
00126   virtual ~EBMLDataSize();
00127 };
00128 
00129 #endif

Generated on Mon Apr 29 13:28:01 2013 for live by  doxygen 1.5.2