summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2015-02-22 20:16:28 +0000
committerjhurst <>2015-02-22 20:16:28 +0000
commitcc15da3e3cb47333f92d8701b03b0ef87a88bea4 (patch)
tree0f1ead2c0bff304923bbe8e7c557cc9fb78ddf2e /src
parent528cacb6122b33f73a805fbb47b4ae83a46db418 (diff)
megasubs
Diffstat (limited to 'src')
-rw-r--r--src/AS_02_TimedText.cpp5
-rw-r--r--src/AS_DCP_TimedText.cpp6
-rwxr-xr-xsrc/MXF.cpp2
-rwxr-xr-xsrc/MXFTypes.cpp4
-rwxr-xr-xsrc/Wav.cpp4
-rw-r--r--src/path-test.cpp1
6 files changed, 15 insertions, 7 deletions
diff --git a/src/AS_02_TimedText.cpp b/src/AS_02_TimedText.cpp
index fc851ec..7faa7ce 100644
--- a/src/AS_02_TimedText.cpp
+++ b/src/AS_02_TimedText.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008-2014, John Hurst
+Copyright (c) 2008-2015, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -514,6 +514,9 @@ AS_02::TimedText::MXFWriter::h__Writer::SetSourceStream(ASDCP::TimedText::TimedT
resourceSubdescriptor->EssenceStreamID = m_EssenceStreamID++;
m_EssenceSubDescriptorList.push_back((FileDescriptor*)resourceSubdescriptor);
m_EssenceDescriptor->SubDescriptors.push_back(resourceSubdescriptor->InstanceUID);
+
+ // 72 == sizeof K, L, instanceuid, uuid + sizeof int32 + tag/len * 4
+ m_HeaderSize += ( resourceSubdescriptor->MIMEMediaType.ArchiveLength() * 2 /*ArchiveLength is broken*/ ) + 72;
}
}
diff --git a/src/AS_DCP_TimedText.cpp b/src/AS_DCP_TimedText.cpp
index 6b52823..5274037 100644
--- a/src/AS_DCP_TimedText.cpp
+++ b/src/AS_DCP_TimedText.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2008-2014, John Hurst
+Copyright (c) 2008-2015, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -569,7 +569,9 @@ ASDCP::TimedText::MXFWriter::h__Writer::SetSourceStream(ASDCP::TimedText::TimedT
resourceSubdescriptor->EssenceStreamID = m_EssenceStreamID++;
m_EssenceSubDescriptorList.push_back((FileDescriptor*)resourceSubdescriptor);
m_EssenceDescriptor->SubDescriptors.push_back(resourceSubdescriptor->InstanceUID);
- m_HeaderSize += resourceSubdescriptor->MIMEMediaType.ArchiveLength() + 20; // 20 == sizeof uuid + sizeof int32
+
+ // 72 == sizeof K, L, instanceuid, uuid + sizeof int32 + tag/len * 4
+ m_HeaderSize += ( resourceSubdescriptor->MIMEMediaType.ArchiveLength() * 2 /*ArchiveLength is broken*/ ) + 72;
}
m_EssenceStreamID = 10;
diff --git a/src/MXF.cpp b/src/MXF.cpp
index c3a3a5d..d0ece08 100755
--- a/src/MXF.cpp
+++ b/src/MXF.cpp
@@ -881,7 +881,7 @@ ASDCP::MXF::OP1aHeader::WriteToFile(Kumu::FileWriter& Writer, ui32_t HeaderSize)
if ( HeaderSize < 4096 )
{
DefaultLogSink().Error("HeaderSize %u is too small. Must be >= 4096\n", HeaderSize);
- return RESULT_FAIL;
+ return RESULT_PARAM;
}
ASDCP::FrameBuffer HeaderBuffer;
diff --git a/src/MXFTypes.cpp b/src/MXFTypes.cpp
index 46ddf61..6f0358f 100755
--- a/src/MXFTypes.cpp
+++ b/src/MXFTypes.cpp
@@ -326,7 +326,9 @@ ASDCP::MXF::UTF16String::Archive(Kumu::MemIOWriter* Writer) const
return false;
}
else if ( count == 0 )
- break;
+ {
+ break;
+ }
bool result = Writer->WriteUi16BE((ui16_t)wcp);
diff --git a/src/Wav.cpp b/src/Wav.cpp
index 0ba3fe8..20776d5 100755
--- a/src/Wav.cpp
+++ b/src/Wav.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2005-2009, John Hurst
+Copyright (c) 2005-2015, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -408,7 +408,7 @@ ASDCP::RF64::SimpleRF64Header::WriteToFile(Kumu::FileWriter& OutFile) const
ui32_t write_count = 0;
ui64_t RIFF_len = data_len + SimpleWavHeaderLength - 8;
- DefaultLogSink().Debug("RIFF_len is %llu.\n", RIFF_len);
+ // DefaultLogSink().Debug("RIFF_len is %llu.\n", RIFF_len);
byte_t* tmp_header = NULL;
ui32_t header_len = 0;
diff --git a/src/path-test.cpp b/src/path-test.cpp
index 30a5e09..f3cb131 100644
--- a/src/path-test.cpp
+++ b/src/path-test.cpp
@@ -141,6 +141,7 @@ main(int argc, const char** argv)
FreeSpaceForPath("/", free_space, total_space);
cerr << "Free space: " << free_space << endl;
cerr << "Total space: " << total_space << endl;
+ cerr << "Used space: " << ( (total_space - free_space ) / float(total_space) ) << endl;
cerr << "OK" << endl;