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 //
9 // Information about Non-PCM Audio and Data in an AES3
10 //
11 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12 
13 //---------------------------------------------------------------------------
14 #ifndef MediaInfo_File_SmpteSt0337H
15 #define MediaInfo_File_SmpteSt0337H
16 //---------------------------------------------------------------------------
17 
18 //---------------------------------------------------------------------------
19 #include "MediaInfo/Audio/File_Pcm.h"
20 //---------------------------------------------------------------------------
21 
22 namespace MediaInfoLib
23 {
24 
25 //***************************************************************************
26 // Class File_SmpteSt0337
27 //***************************************************************************
28 
29 class File_SmpteSt0337 : public File_Pcm_Base
30 {
31 public :
32     // In
33     int8u   Container_Bits;
34     int8u   Endianness;
35     bool    Aligned;
36 
37     // Constructor/Destructor
38     File_SmpteSt0337();
39     ~File_SmpteSt0337();
40 
41 private :
42     // Streams management
43     void Streams_Accept();
44     void Streams_Fill();
45     void Streams_Finish();
46 
47     // Buffer - Global
48     #if MEDIAINFO_SEEK
49     void Read_Buffer_Unsynched();
50     size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
51     #endif // MEDIAINFO_SEEK
52 
53     // Buffer - Synchro
54     bool Synchronize();
55     bool Synched_Test();
56     void Synched_Init();
57 
58     // Buffer - Per element
59     void Header_Parse();
60     void Data_Parse();
61 
62     // Elements
63     void Raw();
64     void Frame();
65     void Frame_WithPadding();
66     void Frame_FromMpegPs();
67 
68     // Temp
69     float64 FrameRate;
70     int8u   Stream_Bits;
71     int8u   Padding;
72     int32u  data_type;
73     std::map<int64u, int64u> FrameSizes;
74     int64s  GuardBand_Before;
75     int64s  GuardBand_After;
76     size_t  NullPadding_Size;
77 
78     // Parser
79     File__Analyze* Parser;
80     void Parser_Parse(const int8u* Parser_Buffer, size_t Parser_Buffer_Size);
81 
82     #if MEDIAINFO_SEEK
83         bool                        Duration_Detected;
84     #endif // MEDIAINFO_SEEK
85 };
86 
87 } // NameSpace
88 
89 #endif
90 
91