summaryrefslogtreecommitdiff
path: root/src/ST2052_TextParser.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2018-03-25 22:54:20 +0000
committerjhurst <>2018-03-25 22:54:20 +0000
commitffc88e36d1b15a863bad6577dee7d59254edfa22 (patch)
treef46ee12919d9eb6690815eb01f48e3fae73ddfbb /src/ST2052_TextParser.cpp
parent40ecb821a29d1049e0a69149b20e552c7fbb0ae0 (diff)
o Fixed MinorVersion error (was "2", is now "3") when writing BodyPartition packs preceding partitions in AS-02 files.
o Fixed AS-DCP timed text writer, was creating DM Segment instead of SourceClip in the source package. o Changed SourcePackage timecode track start to 00:00:00:00 (was 01:00:00:00) o Fixed reference counting errors in asdcp.MXFWriter and asdcp.TimedTextWriter that were causing asdcp.MXFReader and asdcp.TimedTextReader (respectively) to remain allocated after all references had been deleted, thus leaking file handles and memory. o Fixed broken arg parser (missing format token in format string for "EssenceType" argument) in TimedTextWriter
Diffstat (limited to 'src/ST2052_TextParser.cpp')
-rw-r--r--src/ST2052_TextParser.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/ST2052_TextParser.cpp b/src/ST2052_TextParser.cpp
index a98b4ca..305f46f 100644
--- a/src/ST2052_TextParser.cpp
+++ b/src/ST2052_TextParser.cpp
@@ -230,7 +230,7 @@ class AS_02::TimedText::ST2052_TextParser::h__TextParser
{
XMLElement m_Root;
ResourceTypeMap_t m_ResourceTypes;
- Result_t OpenRead(const std::string& profile_name);
+ Result_t OpenRead();
ASDCP_NO_COPY_CONSTRUCT(h__TextParser);
@@ -259,22 +259,22 @@ public:
return m_DefaultResolver;
}
- Result_t OpenRead(const std::string& filename, const std::string& profile_name);
- Result_t OpenRead(const std::string& xml_doc, const std::string& filename, const std::string& profile_name);
+ 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, ASDCP::TimedText::FrameBuffer& FrameBuf,
const ASDCP::TimedText::IResourceResolver& Resolver) const;
};
//
Result_t
-AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead(const std::string& filename, const std::string& profile_name)
+AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead(const std::string& filename)
{
Result_t result = ReadFileIntoString(filename, m_XMLDoc);
if ( KM_SUCCESS(result) )
{
m_Filename = filename;
- result = OpenRead(profile_name);
+ result = OpenRead();
}
return result;
@@ -282,12 +282,11 @@ AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead(const std::string&
//
Result_t
-AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead(const std::string& xml_doc, const std::string& filename,
- const std::string& profile_name)
+AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead(const std::string& xml_doc, const std::string& filename)
{
m_XMLDoc = xml_doc;
m_Filename = filename;
- return OpenRead(profile_name);
+ return OpenRead();
}
@@ -297,7 +296,7 @@ std::string const IMSC1_textProfile = "http://www.w3.org/ns/ttml/profile/imsc1/t
//
Result_t
-AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead(const std::string& profile_name)
+AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead()
{
setup_default_font_family_list();
@@ -310,7 +309,6 @@ AS_02::TimedText::ST2052_TextParser::h__TextParser::OpenRead(const std::string&
m_TDesc.EncodingName = "UTF-8"; // the XML parser demands UTF-8
m_TDesc.ResourceList.clear();
m_TDesc.ContainerDuration = 0;
- m_TDesc.NamespaceName = profile_name; // set the profile explicitly
std::set<std::string>::const_iterator i;
// Attempt to set the profile from <conformsToStandard>
@@ -466,11 +464,11 @@ AS_02::TimedText::ST2052_TextParser::~ST2052_TextParser()
// Opens the stream for reading, parses enough data to provide a complete
// set of stream metadata for the MXFWriter below.
ASDCP::Result_t
-AS_02::TimedText::ST2052_TextParser::OpenRead(const std::string& filename, const std::string& profile_name) const
+AS_02::TimedText::ST2052_TextParser::OpenRead(const std::string& filename) const
{
const_cast<AS_02::TimedText::ST2052_TextParser*>(this)->m_Parser = new h__TextParser;
- Result_t result = m_Parser->OpenRead(filename, profile_name);
+ Result_t result = m_Parser->OpenRead(filename);
if ( ASDCP_FAILURE(result) )
const_cast<AS_02::TimedText::ST2052_TextParser*>(this)->m_Parser = 0;
@@ -480,12 +478,11 @@ AS_02::TimedText::ST2052_TextParser::OpenRead(const std::string& filename, const
// Parses an XML document to provide a complete set of stream metadata for the MXFWriter below.
Result_t
-AS_02::TimedText::ST2052_TextParser::OpenRead(const std::string& xml_doc, const std::string& filename,
- const std::string& profile_name) const
+AS_02::TimedText::ST2052_TextParser::OpenRead(const std::string& xml_doc, const std::string& filename) const
{
const_cast<AS_02::TimedText::ST2052_TextParser*>(this)->m_Parser = new h__TextParser;
- Result_t result = m_Parser->OpenRead(xml_doc, filename, profile_name);
+ Result_t result = m_Parser->OpenRead(xml_doc, filename);
if ( ASDCP_FAILURE(result) )
const_cast<AS_02::TimedText::ST2052_TextParser*>(this)->m_Parser = 0;