"Fossies" - the Fresh Open Source Software Archive

Member "MediaInfo_CLI_GNU_FromSource/MediaInfoLib/Source/MediaInfo/Audio/File_Ac3.h" (10 Sep 2019, 5028 Bytes) of package /linux/misc/MediaInfo_CLI_19.09_GNU_FromSource.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "File_Ac3.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 19.07_vs_19.09.

    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_Ac3H
    9 #define MediaInfo_Ac3H
   10 //---------------------------------------------------------------------------
   11 
   12 //---------------------------------------------------------------------------
   13 #include "MediaInfo/File__Analyze.h"
   14 #include "MediaInfo/TimeCode.h"
   15 //---------------------------------------------------------------------------
   16 
   17 namespace MediaInfoLib
   18 {
   19 
   20 //***************************************************************************
   21 // Class File_Ac3
   22 //***************************************************************************
   23 
   24 class File_Ac3 : public File__Analyze
   25 {
   26 public :
   27     //In
   28     int64u Frame_Count_Valid;
   29     bool   MustParse_dac3;
   30     bool   MustParse_dec3;
   31     bool   CalculateDelay;
   32 
   33     //Constructor/Destructor
   34     File_Ac3();
   35     ~File_Ac3();
   36 
   37 private :
   38     //Streams management
   39     void Streams_Fill();
   40     void Streams_Finish();
   41 
   42     //Buffer - File header
   43     bool FileHeader_Begin();
   44 
   45     //Buffer - Synchro
   46     bool Synchronize();
   47     void Synched_Init();
   48     bool Synched_Test();
   49 
   50     //Buffer - Demux
   51     #if MEDIAINFO_DEMUX
   52     bool Demux_UnpacketizeContainer_Test();
   53     #endif //MEDIAINFO_DEMUX
   54 
   55     //Buffer - Global
   56     void Read_Buffer_Continue ();
   57     void Read_Buffer_Unsynched();
   58     #if MEDIAINFO_SEEK
   59     size_t Read_Buffer_Seek (size_t Method, int64u Value, int64u ID);
   60     #endif //MEDIAINFO_SEEK
   61 
   62     //Buffer - Per element
   63     void Header_Parse();
   64     void Data_Parse();
   65 
   66     //Elements
   67     void Core();
   68     void Core_Frame();
   69     void HD();
   70     void emdf();
   71     void emdf_sync();
   72     void emdf_container();
   73     void emdf_payload_config();
   74     void emdf_protection();
   75     void object_audio_metadata_payload();
   76     void program_assignment();
   77     void joc();
   78     void joc_header();
   79     void joc_info();
   80     void joc_data_point_info();
   81     void joc_data();
   82     void joc_ext_data();
   83 
   84     void TimeStamp();
   85     void dac3();
   86     void dec3();
   87     bool FrameSynchPoint_Test();
   88     bool CRC_Compute(size_t Size);
   89     size_t Core_Size_Get();
   90     size_t HD_Size_Get();
   91 
   92     //Parsing
   93     void Get_V4(int8u  Bits, int32u  &Info, const char* Name);
   94     void Skip_V4(int8u  Bits, const char* Name);
   95 
   96     //Buffer
   97     const int8u* Save_Buffer;
   98     size_t Save_Buffer_Offset;
   99     size_t Save_Buffer_Size;
  100 
  101     //Temp EMDF
  102     size_t EMDF_RemainPos;
  103     size_t RemainAfterEMDF;
  104 
  105     //Temp JOC
  106     int8u joc_num_objects;
  107     std::map<int8u, size_t> joc_num_objects_map;
  108     int8u joc_ext_config_idx;
  109     
  110     //Temp
  111     struct dolby
  112     {
  113         int8u  dialnorm;
  114         int8u  compr;
  115         int8u  dynrng;  //This is only the first occurence of aufblk
  116         bool   compre;
  117         bool   dynrnge;  //This is only the first occurence of aufblk
  118 
  119         dolby()
  120             :
  121             dialnorm(0),
  122             compr(0),
  123             dynrng(0),
  124             compre(false),
  125             dynrnge(false)
  126         {
  127         }
  128     };
  129     dolby  FirstFrame_Dolby;
  130     int8u* addbsi_Buffer;
  131     size_t addbsi_Buffer_Size;
  132     int64u Formats[2]; // AC-3 or E-AC-3
  133     std::vector<int64u> dialnorms;
  134     std::vector<int64u> comprs;
  135     std::vector<int64u> dynrngs;
  136     std::map<int8u, int64u> fscods;
  137     std::map<int8u, int64u> frmsizecods;
  138     int64u Frame_Count_HD;
  139     int32u nonstd_bed_channel_assignment_mask;
  140     int16u chanmap_Max[8][9];
  141     int16u frmsizplus1_Max[8][9];
  142     int16u HD_BitRate_Max;
  143     int16u HD_Channels2;
  144     int16u HD_flags;
  145     int8u  num_dynamic_objects;
  146     int8u  fscod;
  147     int8u  fscod2;
  148     int8u  frmsizecod;
  149     int8u  bsid;
  150     int8u  bsid_Max;
  151     int8u  bsmod_Max[8][9];
  152     int8u  acmod_Max[8][9];
  153     int8u  dsurmod_Max[8][9];
  154     int8u  numblkscod;
  155     int8u  HD_StreamType;
  156     int8u  HD_SubStreams_Count;
  157     int8u  HD_SamplingRate1;
  158     int8u  HD_SamplingRate2;
  159     int8u  HD_Channels1;
  160     int8u  HD_Resolution1;
  161     int8u  HD_Resolution2;
  162     int8u  substreamid_Independant_Current;
  163     int8u  substreams_Count;
  164     int8u  joc_complexity_index_Container;
  165     int8u  joc_complexity_index_Stream;
  166     bool   b_lfe_present;
  167     bool   lfeon_Max[8][9];
  168     bool   dxc3_Parsed;
  169     bool   HD_MajorSync_Parsed;
  170     bool   HD_NoRestart;
  171     bool   HD_ExtraParity;
  172     bool   HD_IsVBR;
  173     bool   HD_HasAtmos;
  174     bool   Core_IsPresent;
  175     bool   HD_IsPresent;
  176     bool   dynrnge_Exists;
  177     bool   chanmape_Max[8][9];
  178     bool   TimeStamp_IsPresent;
  179     bool   TimeStamp_IsParsing;
  180     bool   TimeStamp_Parsed;
  181     bool   BigEndian;
  182     bool   IgnoreCrc_Done;
  183     bool   IgnoreCrc;
  184     TimeCode TimeStamp_FirstFrame;
  185     size_t TimeStamp_Count;
  186 };
  187 
  188 } //NameSpace
  189 
  190 #endif