diff options
| author | milla <marc.illa@dolby.com> | 2021-05-27 12:20:05 +0200 |
|---|---|---|
| committer | milla <marc.illa@dolby.com> | 2021-06-03 14:21:33 +0200 |
| commit | 9c6e1bc188987558e64f72f1561749ccd20b5379 (patch) | |
| tree | 649c4f28b8ec7db3f256bb520ed6b5786a2315be /src/TimedText_Parser.cpp | |
| parent | f9d7fbc33aa571c547d916b145712469efd9f4b8 (diff) | |
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); } // |
