---------------------------------------------------------------------------
| 148 | |
| 149 | //--------------------------------------------------------------------------- |
| 150 | Ztring MediaInfo_Internal::Inform() |
| 151 | { |
| 152 | { |
| 153 | CriticalSectionLocker CSL(CS); |
| 154 | if (Info && Info->Status[File__Analyze::IsUpdated]) |
| 155 | Info->Open_Buffer_Update(); |
| 156 | } |
| 157 | |
| 158 | #if MEDIAINFO_TRACE |
| 159 | if (MediaInfoLib::Config.Inform_Get()!=__T("MAXML") && (MediaInfoLib::Config.Trace_Level_Get() || MediaInfoLib::Config.Inform_Get()==__T("Details"))) |
| 160 | { |
| 161 | if (!Details.empty()) |
| 162 | return Ztring().From_UTF8(Details); |
| 163 | else if (Info) |
| 164 | return Info->Details_Get(); |
| 165 | else |
| 166 | return Ztring(); |
| 167 | } |
| 168 | #endif //MEDIAINFO_TRACE |
| 169 | |
| 170 | #if MEDIAINFO_ADVANCED |
| 171 | if (Config.TimeCode_Dumps) |
| 172 | { |
| 173 | string Result="<media"; |
| 174 | if (Config.ParseSpeed<1.0) |
| 175 | Result+=" full=\"0\""; |
| 176 | Ztring Options=Get(Stream_General, 0, General_CompleteName, Info_Options); |
| 177 | if (InfoOption_ShowInInform<Options.size() && Options[InfoOption_ShowInInform]==__T('Y')) |
| 178 | { |
| 179 | Result+=" ref=\""; |
| 180 | Result+=XML_Encode(Get(Stream_General, 0, General_CompleteName)).To_UTF8(); |
| 181 | Result+='\"'; |
| 182 | } |
| 183 | Result+=" format=\""; |
| 184 | Result+=XML_Encode(Get(Stream_General, 0, General_Format)).To_UTF8(); |
| 185 | Result+="\">\n"; |
| 186 | for (const auto& TimeCode_Dump : *Config.TimeCode_Dumps) |
| 187 | { |
| 188 | Result+=" <timecode_stream"; |
| 189 | Result+=TimeCode_Dump.second.Attributes_First; |
| 190 | if (TimeCode_Dump.second.Attributes_First.find(" frame_rate=\"")==string::npos && Count_Get(Stream_Video)==1) |
| 191 | { |
| 192 | auto FrameRate_Num=Get(Stream_Video, 0, Video_FrameRate_Num); |
| 193 | auto FrameRate_Den=Get(Stream_Video, 0, Video_FrameRate_Den); |
| 194 | auto FrameRate=Get(Stream_Video, 0, Video_FrameRate); |
| 195 | if (!FrameRate_Num.empty() && !FrameRate_Den.empty()) |
| 196 | FrameRate=FrameRate_Num+__T('/')+FrameRate_Den; |
| 197 | if (!FrameRate.empty()) |
| 198 | { |
| 199 | Result += " frame_rate=\""; |
| 200 | Result += XML_Encode(FrameRate).To_UTF8(); |
| 201 | Result += '"'; |
| 202 | } |
| 203 | } |
| 204 | if (TimeCode_Dump.second.Attributes_First.find(" source=\"")==string::npos) |
| 205 | { |
| 206 | auto ID_Pos=TimeCode_Dump.second.Attributes_First.find(" id=\""); |
| 207 | if (ID_Pos!=string::npos) |
nothing calls this directly
no test coverage detected