From 7ff636405a6bff37432e1c70123f0e6936186166 Mon Sep 17 00:00:00 2001 From: jhurst Date: Thu, 2 Jan 2014 23:29:22 +0000 Subject: o Fixed missing-index-partion bugs for AS-02 files. o Improved integration of ST 377-4 MCA concepts with ST 429-2 static labels. o Added new EssenceType_t values for IMF/AS-02 track files. o Added detection for AS-02 track files to ASDCP::EssenceType() o Changed lots of "const char*" to "const std::string&" in the APIs defined by KM_fileio.h and AS_DCP.h. o Fixed VBR Delta Segment entries to correctly flag progressive material. o Fixed PCM unwrapping bugs in as-02-unwrap. --- src/TimedText_Parser.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/TimedText_Parser.cpp') diff --git a/src/TimedText_Parser.cpp b/src/TimedText_Parser.cpp index b7b58c5..3312b58 100644 --- a/src/TimedText_Parser.cpp +++ b/src/TimedText_Parser.cpp @@ -136,8 +136,8 @@ public: return m_DefaultResolver; } - Result_t OpenRead(const char* filename); - Result_t OpenRead(const std::string& xml_doc, const char* filename); + Result_t OpenRead(const std::string& filename); + 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; }; @@ -178,7 +178,7 @@ decode_rational(const char* str_rat) // Result_t -ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead(const char* filename) +ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead(const std::string& filename) { Result_t result = ReadFileIntoString(filename, m_XMLDoc); @@ -191,14 +191,18 @@ ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead(const char* file // Result_t -ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead(const std::string& xml_doc, const char* filename) +ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead(const std::string& xml_doc, const std::string& filename) { m_XMLDoc = xml_doc; - if ( filename != 0 ) - m_Filename = filename; + if ( filename.empty() ) + { + m_Filename = ""; + } else - m_Filename = ""; + { + m_Filename = filename; + } return OpenRead(); } @@ -394,7 +398,7 @@ ASDCP::TimedText::DCSubtitleParser::~DCSubtitleParser() // Opens the stream for reading, parses enough data to provide a complete // set of stream metadata for the MXFWriter below. ASDCP::Result_t -ASDCP::TimedText::DCSubtitleParser::OpenRead(const char* filename) const +ASDCP::TimedText::DCSubtitleParser::OpenRead(const std::string& filename) const { const_cast(this)->m_Parser = new h__SubtitleParser; @@ -408,7 +412,7 @@ ASDCP::TimedText::DCSubtitleParser::OpenRead(const char* filename) const // Parses an XML document to provide a complete set of stream metadata for the MXFWriter below. Result_t -ASDCP::TimedText::DCSubtitleParser::OpenRead(const std::string& xml_doc, const char* filename) const +ASDCP::TimedText::DCSubtitleParser::OpenRead(const std::string& xml_doc, const std::string& filename) const { const_cast(this)->m_Parser = new h__SubtitleParser; -- cgit v1.2.3