Optimized file output from all MistIn* processes.
This commit is contained in:
parent
a9bf4fea4a
commit
3030be0384
1 changed files with 2 additions and 5 deletions
|
@ -123,16 +123,13 @@ namespace Mist {
|
|||
//output to dtsc
|
||||
DTSC::Meta newMeta = myMeta;
|
||||
newMeta.reset();
|
||||
JSON::Value tempVal;
|
||||
std::ofstream file(filename.c_str());
|
||||
long long int bpos = 0;
|
||||
seek(0);
|
||||
getNext();
|
||||
while (lastPack){
|
||||
tempVal = lastPack.toJSON();
|
||||
tempVal["bpos"] = bpos;
|
||||
newMeta.update(tempVal);
|
||||
file << std::string(lastPack.getData(), lastPack.getDataLen());
|
||||
newMeta.updatePosOverride(lastPack, bpos);
|
||||
file.write(lastPack.getData(), lastPack.getDataLen());
|
||||
bpos += lastPack.getDataLen();
|
||||
getNext();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue