/*
-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
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;
}
}
/*
-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
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;
if ( HeaderSize < 4096 )
{
DefaultLogSink().Error("HeaderSize %u is too small. Must be >= 4096\n", HeaderSize);
- return RESULT_FAIL;
+ return RESULT_PARAM;
}
ASDCP::FrameBuffer HeaderBuffer;
return false;
}
else if ( count == 0 )
- break;
+ {
+ break;
+ }
bool result = Writer->WriteUi16BE((ui16_t)wcp);
/*
-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
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;
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;