diff options
| author | John Hurst <jhurst@cinecert.com> | 2021-08-26 20:43:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-26 20:43:24 -0700 |
| commit | 53e27f364c39cd70e34c05aeab4afcbeaf116b49 (patch) | |
| tree | fce9f1483259c402e569a45340faf75c3317a13a /src/TimedText_Parser.cpp | |
| parent | b8c87905046423d7f04e9103ffb321a4d23870eb (diff) | |
| parent | 9c6e1bc188987558e64f72f1561749ccd20b5379 (diff) | |
Merge pull request #11 from DolbyLaboratories/dolby/atmos_storage/asdcplib_integration/dont_export_symbols
Do not export symbols on definitions in cpp. (moved functions and classes to an unnamed namespace and made variables static)
Diffstat (limited to 'src/TimedText_Parser.cpp')
| -rw-r--r-- | src/TimedText_Parser.cpp | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/TimedText_Parser.cpp b/src/TimedText_Parser.cpp index 020baf3..d3eca72 100644 --- a/src/TimedText_Parser.cpp +++ b/src/TimedText_Parser.cpp @@ -39,7 +39,7 @@ using namespace ASDCP; using Kumu::DefaultLogSink; -const char* c_dcst_namespace_name = "http://www.smpte-ra.org/schemas/428-7/2007/DCST"; +static const char* c_dcst_namespace_name = "http://www.smpte-ra.org/schemas/428-7/2007/DCST"; //------------------------------------------------------------------------------------------ @@ -144,36 +144,37 @@ public: Result_t OpenRead(const std::string& xml_doc, const std::string& filename); Result_t ReadAncillaryResource(const byte_t* uuid, FrameBuffer& FrameBuf, const IResourceResolver& Resolver) const; }; +namespace { + // + bool + get_UUID_from_element(XMLElement* Element, UUID& ID) + { + assert(Element); + const char* p = Element->GetBody().c_str(); -// -bool -get_UUID_from_element(XMLElement* Element, UUID& ID) -{ - assert(Element); - const char* p = Element->GetBody().c_str(); + if ( strncmp(p, "urn:uuid:", 9) == 0 ) + { + p += 9; + } + + return ID.DecodeHex(p); + } - if ( strncmp(p, "urn:uuid:", 9) == 0 ) + // + bool + get_UUID_from_child_element(const char* name, XMLElement* Parent, UUID& outID) { - p += 9; - } - - return ID.DecodeHex(p); -} + assert(name); + assert(Parent); + XMLElement* Child = Parent->GetChildWithName(name); -// -bool -get_UUID_from_child_element(const char* name, XMLElement* Parent, UUID& outID) -{ - assert(name); - assert(Parent); - XMLElement* Child = Parent->GetChildWithName(name); + if ( Child == 0 ) + { + return false; + } - if ( Child == 0 ) - { - return false; + return get_UUID_from_element(Child, outID); } - - return get_UUID_from_element(Child, outID); } // |
