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_Av1H
9 #define MediaInfo_Av1H
10 //---------------------------------------------------------------------------
11 
12 //---------------------------------------------------------------------------
13 #include "MediaInfo/File__Analyze.h"
14 #include "MediaInfo/File__Duplicate.h"
15 #include <cmath>
16 //---------------------------------------------------------------------------
17 
18 namespace MediaInfoLib
19 {
20 
21 //***************************************************************************
22 // Class File_Av1
23 //***************************************************************************
24 
25 class File_Av1 : public File__Analyze
26 {
27 public :
28     //In
29     int64u Frame_Count_Valid;
30     bool   FrameIsAlwaysComplete;
31 
32     //Constructor/Destructor
33     File_Av1();
34     ~File_Av1();
35 
36 private :
37     File_Av1(const File_Av1 &File_Av1); //No copy
38     File_Av1 &operator =(const File_Av1 &); //No copy
39 
40     //Streams management
41     void Streams_Accept();
42     void Streams_Fill();
43     void Streams_Finish();
44 
45     //Buffer - Global
46     void Read_Buffer_OutOfBand();
47 
48     //Buffer - Per element
49     void Header_Parse();
50     void Data_Parse();
51 
52     //Elements
53     void sequence_header();
54     void temporal_delimiter();
55     void frame_header();
56     void tile_group();
57     void metadata();
58     void metadata_hdr_cll();
59     void metadata_hdr_mdcv();
60     void padding();
61 
62     //Temp
63     Ztring  MasteringDisplay_ColorPrimaries;
64     Ztring  MasteringDisplay_Luminance;
65     int16u  maximum_content_light_level;
66     int16u  maximum_frame_average_light_level;
67     bool  sequence_header_Parsed;
68     bool  SeenFrameHeader;
69     string GOP;
70 
71     //Helpers
72     std::string GOP_Detect(std::string PictureTypes);
73 };
74 
75 } //NameSpace
76 
77 #endif
78