1 /* Copyright (c) MediaArea.net SARL. All Rights Reserved. 2 * 3 * Use of this source code is governed by a BSD-style license that can 4 * be found in the License.html file in the root of the source tree. 5 */ 6 7 //--------------------------------------------------------------------------- 8 #ifndef MediaInfo_DtsH 9 #define MediaInfo_DtsH 10 //--------------------------------------------------------------------------- 11 12 //--------------------------------------------------------------------------- 13 #include "MediaInfo/File__Analyze.h" 14 #ifdef ES 15 #undef ES //Solaris defines this somewhere 16 #endif 17 //--------------------------------------------------------------------------- 18 19 namespace MediaInfoLib 20 { 21 22 //*************************************************************************** 23 // Class File_Dts 24 //*************************************************************************** 25 26 class File_Dts : public File__Analyze 27 { 28 public : 29 //In 30 int64u Frame_Count_Valid; 31 32 //Constructor/Destructor 33 File_Dts(); 34 35 private : 36 //Streams management 37 void Streams_Fill(); 38 void Streams_Finish(); 39 40 //Buffer - File header 41 bool FileHeader_Begin(); 42 43 //Buffer - Synchro 44 bool Synchronize(); 45 bool Synched_Test(); 46 void Read_Buffer_Unsynched(); 47 48 //Buffer - Demux 49 #if MEDIAINFO_DEMUX 50 bool Demux_UnpacketizeContainer_Test(); 51 #endif //MEDIAINFO_DEMUX 52 53 //Buffer - Per element 54 void Header_Parse(); 55 void Data_Parse(); 56 57 //Elements 58 void Core(); 59 void Core_XCh(int64u Size); 60 void Core_XXCh(int64u Size); 61 void Core_X96k(int64u Size); 62 void HD(); 63 void HD_XCh(int64u Size); 64 void HD_XXCh(int64u Size); 65 void HD_X96k(int64u Size); 66 void HD_XLL(int64u Size); 67 void HD_XBR(int64u Size); 68 void HD_XSA(int64u Size); 69 70 //Buffer 71 bool FrameSynchPoint_Test(); 72 const int8u* Save_Buffer; 73 size_t Save_Buffer_Offset; 74 size_t Save_Buffer_Size; 75 76 //Temp 77 std::vector<ZenLib::int32u> Asset_Sizes; 78 Ztring Profile; 79 int32u Original_Size; 80 int32u HD_size; 81 int16u Primary_Frame_Byte_Size; 82 int16u Number_Of_PCM_Sample_Blocks; 83 int16u HD_SpeakerActivityMask; 84 int8u channel_arrangement; 85 int8u channel_arrangement_XCh; 86 int8u sample_frequency; 87 int8u sample_frequency_X96k; 88 int8u bit_rate; 89 int8u lfe_effects; 90 int8u bits_per_sample; 91 int8u ExtensionAudioDescriptor; 92 int8u HD_BitResolution; 93 int8u HD_MaximumSampleRate; 94 int8u HD_TotalNumberChannels; 95 int8u HD_ExSSFrameDurationCode; 96 bool ExtendedCoding; 97 bool Word; 98 bool BigEndian; 99 bool ES; 100 bool Core_Exists; 101 enum presence 102 { 103 presence_Core_Core, 104 presence_Core_XXCh, 105 presence_Core_X96, 106 presence_Core_XCh, 107 presence_Extended_Core, 108 presence_Extended_XBR, 109 presence_Extended_XXCh, 110 presence_Extended_X96, 111 presence_Extended_LBR, 112 presence_Extended_XLL, 113 presence_Extended_XLL_X, 114 presence_Max 115 }; 116 std::bitset<presence_Max> Presence; 117 enum data 118 { 119 Profiles, 120 Channels, 121 ChannelPositions, 122 ChannelPositions2, 123 ChannelLayout, 124 BitDepth, 125 SamplingRate, 126 BitRate, 127 BitRate_Mode, 128 Compression_Mode, 129 data_Max, 130 }; 131 ZtringList Data[data_Max]; 132 int8u Core_Core_AMODE; 133 int8u Core_Core_LFF; 134 int8u Core_XCh_AMODE; 135 int8u Core_XXCh_nuNumChSetsInXXCh; 136 size_t Extension_XLL_X_No; 137 size_t Extension_XLL_X_Yes; 138 139 //Helpers 140 float64 BitRate_Get(bool WithHD=false); 141 void Streams_Fill_Extension(); 142 void Streams_Fill_Core_ES(); 143 void Streams_Fill_Core(); 144 }; 145 146 } //NameSpace 147 148 #endif 149