From 49e8af588fd52309ca50a3e09d49495f3ed5affc Mon Sep 17 00:00:00 2001 From: Jerome Martinez Date: Fri, 6 Sep 2024 23:22:06 +0200 Subject: [PATCH] TEMP --- Source/Common/Output.cpp | 3 + Source/Common/Output.h | 6 +- Source/Common/Output_Xml.cpp | 174 ++++++++++++++++++++++++++++++---- Source/Common/ProcessFile.cpp | 11 ++- 4 files changed, 171 insertions(+), 23 deletions(-) diff --git a/Source/Common/Output.cpp b/Source/Common/Output.cpp index 405fded6..1bef4ba0 100644 --- a/Source/Common/Output.cpp +++ b/Source/Common/Output.cpp @@ -173,9 +173,12 @@ bool Frame_HasErrors(const MediaInfo_Event_DvDif_Analysis_Frame_1& Frame) rec_date_time RecDateTime(Frame); frame_seqn Seqn(Frame); abst_bf AbstBf = (Frame.AbstBf); + coherency_flags Coherency(Frame); return false || Frame.Video_STA_Errors || Frame.Audio_Data_Errors + || Coherency.conceal_aud_l() + || Coherency.conceal_aud_r() || TimeCode.NonConsecutive() || TimeCode.Repeat() || RecDateTime.NonConsecutive() diff --git a/Source/Common/Output.h b/Source/Common/Output.h index fa25c86a..99f75246 100644 --- a/Source/Common/Output.h +++ b/Source/Common/Output.h @@ -68,6 +68,7 @@ struct timecode { public: timecode() {} + timecode(decltype(MediaInfo_Event_DvDif_Analysis_Frame_1::TimeCode) Value, decltype(MediaInfo_Event_DvDif_Analysis_Frame_1::MoreFlags) Value2) : _Value(Value), _Value2(Value2) {} timecode(const MediaInfo_Event_DvDif_Analysis_Frame_1& Frame) : _Value(Frame.TimeCode), _Value2(Frame.MoreFlags) {} timecode(const MediaInfo_Event_DvDif_Analysis_Frame_1* Frame) : _Value(Frame->TimeCode), _Value2(Frame->MoreFlags) {} inline bool HasValue() { return ((_Value >> 8) & 0x1FFFF) != 0x1FFFF; } @@ -122,7 +123,10 @@ struct coherency_flags inline bool no_sourceorcontrol_aud() { return ((_Value >> 6) & 0x1); } // 6 inline bool no_pack() { return no_pack_sub() && no_pack_vid() && no_pack_aud() ; } inline bool full_conceal() { return full_conceal_vid() && full_conceal_aud(); } - inline bool no_data() { return (_Value2 >> 3) & 0x1; } // + inline bool no_data() { return (_Value2 >> 3) & 0x1; } // 3 + inline bool conceal_aud_l() { return (_Value2 >> 4) & 0x1; } // 4 + inline bool conceal_aud_r() { return (_Value2 >> 5) & 0x1; } // 5 + inline bool conceal_aud() { return full_conceal_aud() || conceal_aud_l() || conceal_aud_r(); } private: decltype(MediaInfo_Event_DvDif_Analysis_Frame_1::Coherency_Flags) _Value; diff --git a/Source/Common/Output_Xml.cpp b/Source/Common/Output_Xml.cpp index 312c2687..8183e6ac 100644 --- a/Source/Common/Output_Xml.cpp +++ b/Source/Common/Output_Xml.cpp @@ -56,6 +56,13 @@ static string to_hexstring(uint16_t value) // Helpers //*************************************************************************** +//--------------------------------------------------------------------------- +enum format { + Format_Unknown, + Format_DV, + Format_DAT, +}; + //--------------------------------------------------------------------------- static void Dseq_Begin(string& Text, size_t o, int Dseq) { @@ -244,22 +251,30 @@ return_value Output_Xml(ostream& Out, std::vector& PerFile, bitset