blob: 4a5f2801800df34bffd72347f6242cfd7793faaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the License.html file in the root of the source tree.
*/
//---------------------------------------------------------------------------
#ifndef MediaInfo_Ac3H
#define MediaInfo_Ac3H
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "MediaInfo/File__Analyze.h"
//---------------------------------------------------------------------------
namespace MediaInfoLib
{
//***************************************************************************
// Class File_Ac3
//***************************************************************************
class File_Ac3 : public File__Analyze
{
public :
//In
int64u Frame_Count_Valid;
bool MustParse_dac3;
bool MustParse_dec3;
bool CalculateDelay;
//Constructor/Destructor
File_Ac3();
private :
//Streams management
void Streams_Fill();
void Streams_Finish();
//Buffer - File header
bool FileHeader_Begin();
//Buffer - Synchro
bool Synchronize();
void Synched_Init();
bool Synched_Test();
//Buffer - Demux
#if MEDIAINFO_DEMUX
bool Demux_UnpacketizeContainer_Test();
#endif //MEDIAINFO_DEMUX
//Buffer - Global
void Read_Buffer_Continue ();
void Read_Buffer_Unsynched();
#if MEDIAINFO_SEEK
size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
#endif //MEDIAINFO_SEEK
//Buffer - Per element
void Header_Parse();
void Data_Parse();
//Elements
void Core();
void Core_Frame();
void HD();
void TimeStamp();
void dac3();
void dec3();
bool FrameSynchPoint_Test();
bool CRC_Compute(size_t Size);
size_t Core_Size_Get();
size_t HD_Size_Get();
//Buffer
const int8u* Save_Buffer;
size_t Save_Buffer_Offset;
size_t Save_Buffer_Size;
//Temp
struct dolby
{
int8u dialnorm;
int8u compr;
int8u dynrng; //This is only the first occurence of aufblk
bool compre;
bool dynrnge; //This is only the first occurence of aufblk
dolby()
:
dialnorm(0),
compr(0),
dynrng(0),
compre(false),
dynrnge(false)
{
}
};
dolby FirstFrame_Dolby;
dolby FirstFrame_Dolby2;
std::vector<int64u> dialnorms;
std::vector<int64u> dialnorm2s;
std::vector<int64u> comprs;
std::vector<int64u> compr2s;
std::vector<int64u> dynrngs;
std::vector<int64u> dynrng2s;
std::map<int8u, int64u> fscods;
std::map<int8u, int64u> frmsizecods;
int64u Frame_Count_HD;
int16u chanmap_Max[8][9];
int16u frmsizplus1_Max[8][9];
int16u HD_BitRate_Max;
int16u HD_Channels2;
int8u fscod;
int8u fscod2;
int8u frmsizecod;
int8u bsid;
int8u bsid_Max;
int8u bsmod_Max[8][9];
int8u acmod_Max[8][9];
int8u dsurmod_Max[8][9];
int8u numblkscod;
int8u HD_StreamType;
int8u HD_SubStreams_Count;
int8u HD_SamplingRate1;
int8u HD_SamplingRate2;
int8u HD_Channels1;
int8u HD_Resolution1;
int8u HD_Resolution2;
int8u dynrng_Old;
int8u substreamid_Independant_Current;
int8u substreams_Count;
bool lfeon_Max[8][9];
bool dxc3_Parsed;
bool HD_MajorSync_Parsed;
bool HD_NoRestart;
bool HD_ExtraParity;
bool HD_IsVBR;
bool Core_IsPresent;
bool HD_IsPresent;
bool dynrnge_Exists;
bool chanmape_Max[8][9];
bool TimeStamp_IsPresent;
bool TimeStamp_IsParsing;
bool TimeStamp_Parsed;
bool TimeStamp_DropFrame_IsValid;
bool TimeStamp_DropFrame_Content;
bool BigEndian;
bool IgnoreCrc_Done;
bool IgnoreCrc;
float64 TimeStamp_Content;
};
} //NameSpace
#endif
|