---------------------------------------------------------------------------
| 956 | |
| 957 | //--------------------------------------------------------------------------- |
| 958 | void EbuCore_Transform_Text(Node* Parent, MediaInfo_Internal &MI, size_t StreamPos) |
| 959 | { |
| 960 | Node* Child=Parent->Add_Child("ebucore:dataFormat", true); |
| 961 | |
| 962 | //if (!MI.Get(Stream_Text, StreamPos, Text_ID).empty()) |
| 963 | // ToReturn+=__T(" dataFormatId=\"")+MI.Get(Stream_Text, StreamPos, Text_ID)+__T("\""); |
| 964 | Ztring Format_Version=MI.Get(Stream_Text, StreamPos, Text_Format_Version); |
| 965 | if (!Format_Version.empty()) |
| 966 | { |
| 967 | Format_Version.FindAndReplace(__T("Version "), Ztring()); |
| 968 | Child->Add_Attribute("dataFormatVersionId", Format_Version); |
| 969 | } |
| 970 | Child->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_Format, "dataFormatName"); |
| 971 | Child->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_ID, "dataTrackId"); |
| 972 | |
| 973 | //subtitlingTrack |
| 974 | { |
| 975 | Node* Child2=Child->Add_Child("ebucore:captioningFormat", true); |
| 976 | Child2->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_Format, "captioningFormatName"); |
| 977 | Child2->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_ID, "trackId"); |
| 978 | Child2->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_Title, "typeLabel"); |
| 979 | Child2->Add_Attribute_IfNotEmpty(MI, Stream_Text, StreamPos, Text_Language, "language"); |
| 980 | |
| 981 | if (!MI.Get(Stream_Text, StreamPos, Text_CodecID).empty() || !MI.Get(Stream_Text, StreamPos, Text_Format_Commercial_IfAny).empty()) |
| 982 | { |
| 983 | Node* Child3=Child->Add_Child("ebucore:codec", true); |
| 984 | if (!MI.Get(Stream_Text, StreamPos, Text_CodecID).empty()) |
| 985 | Child3->Add_Child("ebucore:codecIdentifier", true)->Add_Child("dc:identifier", MI.Get(Stream_Text, StreamPos, Text_CodecID), true); |
| 986 | Child3->Add_Child_IfNotEmpty(MI, Stream_Text, StreamPos, Text_Format_Commercial_IfAny, "ebucore:name", true); |
| 987 | } |
| 988 | } |
| 989 | } |
| 990 | |
| 991 | //--------------------------------------------------------------------------- |
| 992 | Ztring EbuCore_Duration(int64s MS) |
no test coverage detected