---------------------------------------------------------------------------
| 1422 | |
| 1423 | //--------------------------------------------------------------------------- |
| 1424 | Ztring Export_EbuCore::Transform(MediaInfo_Internal &MI, version Version, acquisitiondataoutputmode AcquisitionDataOutputMode, format Format, const Ztring& ExternalMetadataValues, const Ztring& ExternalMetaDataConfig) |
| 1425 | { |
| 1426 | bool UseExternalMetaData=(!ExternalMetaDataConfig.empty() && !ExternalMetadataValues.empty()); |
| 1427 | |
| 1428 | //Current date/time is ISO format |
| 1429 | time_t Seconds=time(NULL); |
| 1430 | Ztring DateTime; DateTime.Date_From_Seconds_1970((int32u)Seconds); |
| 1431 | if (!DateTime.empty()) |
| 1432 | { |
| 1433 | DateTime.FindAndReplace(__T("UTC "), __T("")); |
| 1434 | DateTime.FindAndReplace(__T(" "), __T("T")); |
| 1435 | } |
| 1436 | |
| 1437 | size_t As11_Core_Pos=(size_t)-1; |
| 1438 | size_t As11_Segmentation_Pos=(size_t)-1; |
| 1439 | size_t As11_UkDpp_Pos=(size_t)-1; |
| 1440 | for (size_t StreamPos_Temp=0; StreamPos_Temp<MI.Count_Get(Stream_Other); StreamPos_Temp++) |
| 1441 | { |
| 1442 | if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 Core")) |
| 1443 | As11_Core_Pos=StreamPos_Temp; |
| 1444 | if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 Segmentation")) |
| 1445 | As11_Segmentation_Pos=StreamPos_Temp; |
| 1446 | if (MI.Get(Stream_Other, StreamPos_Temp, Other_Format)==__T("AS-11 UKDPP")) |
| 1447 | As11_UkDpp_Pos=StreamPos_Temp; |
| 1448 | } |
| 1449 | |
| 1450 | //ebuCoreMain |
| 1451 | Node* Node_CoreMain = new Node("ebucore:ebuCoreMain"); |
| 1452 | Node_CoreMain->Add_Attribute("xmlns:dc", "http://purl.org/dc/elements/1.1/"); |
| 1453 | if (Version==Version_1_5) |
| 1454 | { |
| 1455 | Node_CoreMain->Add_Attribute("xmlns:ebucore", "urn:ebu:metadata-schema:ebuCore_2014"); |
| 1456 | Node_CoreMain->Add_Attribute("xmlns:xalan", "http://xml.apache.org/xalan"); |
| 1457 | Node_CoreMain->Add_Attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); |
| 1458 | Node_CoreMain->Add_Attribute("xsi:schemaLocation", "urn:ebu:metadata-schema:ebuCore_2014 http://www.ebu.ch/metadata/schemas/EBUCore/20140318/EBU_CORE_20140318.xsd"); |
| 1459 | Node_CoreMain->Add_Attribute("version", "1.5"); |
| 1460 | } |
| 1461 | else if (Version==Version_1_6) |
| 1462 | { |
| 1463 | Node_CoreMain->Add_Attribute("xmlns:ebucore", "urn:ebu:metadata-schema:ebuCore_2015"); |
| 1464 | Node_CoreMain->Add_Attribute("xmlns:xalan", "http://xml.apache.org/xalan"); |
| 1465 | Node_CoreMain->Add_Attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); |
| 1466 | Node_CoreMain->Add_Attribute("xsi:schemaLocation", string("urn:ebu:metadata-schema:ebuCore_2015 http")+string(MediaInfoLib::Config.Https_Get()?"s":"")+"://www.ebu.ch/metadata/schemas/EBUCore/20150522/ebucore_20150522.xsd"); |
| 1467 | Node_CoreMain->Add_Attribute("version", "1.6"); |
| 1468 | } |
| 1469 | else if (Version==Version_1_8) |
| 1470 | { |
| 1471 | Node_CoreMain->Add_Attribute("xmlns:ebucore", "urn:ebu:metadata-schema:ebucore"); |
| 1472 | Node_CoreMain->Add_Attribute("xmlns:xalan", "http://xml.apache.org/xalan"); |
| 1473 | Node_CoreMain->Add_Attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); |
| 1474 | Node_CoreMain->Add_Attribute("xsi:schemaLocation", string("urn:ebu:metadata-schema:ebucore http")+string(MediaInfoLib::Config.Https_Get()?"s":"")+"://www.ebu.ch/metadata/schemas/EBUCore/20171009/ebucore.xsd"); |
| 1475 | Node_CoreMain->Add_Attribute("version", "1.8"); |
| 1476 | Node_CoreMain->Add_Attribute("writingLibraryName", "MediaInfoLib"); |
| 1477 | Node_CoreMain->Add_Attribute("writingLibraryVersion", MediaInfoLib::Config.Info_Version_Get().SubString(__T(" - v"), Ztring())); |
| 1478 | } |
| 1479 | Ztring Date=DateTime.substr(0, 10); |
| 1480 | Node_CoreMain->Add_Attribute("dateLastModified", Date); |
| 1481 | Ztring Time=DateTime.substr(11); |
nothing calls this directly
no test coverage detected