MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / AdmProfile

Method AdmProfile

Source/MediaInfo/MediaInfo_Config.cpp:3919–3952  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3917
3918#if MEDIAINFO_CONFORMANCE
3919string MediaInfo_Config::AdmProfile(const Ztring& Value2)
3920{
3921 Ztring Value(Value2);
3922 transform(Value.begin(), Value.end(), Value.begin(), (int(*)(int))tolower); //(int(*)(int)) is a patch for unix
3923 ZtringList List;
3924 List.Separator_Set(0, __T(","));
3925 List.Write(Value);
3926 adm_profile Result;
3927 for (const auto& ItemZ : List)
3928 {
3929 const auto Item = ItemZ.To_UTF8();
3930 if (Item == "auto")
3931 Adm_Profile.Auto = true;
3932 else if (Item == "itu-r_bs.2076-0")
3933 Adm_Profile.BS2076 = 0;
3934 else if (Item == "itu-r_bs.2076-1")
3935 Adm_Profile.BS2076 = 1;
3936 else if (Item == "itu-r_bs.2076-2")
3937 Adm_Profile.BS2076 = 2;
3938 else if (Item.rfind("urn:ebu:tech:3392:1.0:", 0) == 0)
3939 {
3940 if (Item.size() > 22 && Item[22] >= '1' && Item[22] <= '4')
3941 Adm_Profile.Ebu3392 = Item[22] - '0';
3942 else
3943 return "Unknown ADM profile " + Item;
3944 }
3945 else
3946 return "Unknown ADM profile " + Item;
3947 }
3948
3949 CriticalSectionLocker CSL(CS);
3950 Adm_Profile = Result;
3951 return {};
3952}
3953#endif //MEDIAINFO_CONFORMANCE
3954
3955#if MEDIAINFO_CONFORMANCE

Callers 1

Streams_FillMethod · 0.80

Calls 4

beginMethod · 0.45
endMethod · 0.45
WriteMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected