src/Aircraft/replay.*: modified to match change to simgear::HTTP::FileRequest::setCallback().
We now use a function pointer instead of a lambda.
This commit is contained in:
parent
f3679f121d
commit
5a70245ba9
2 changed files with 12 additions and 4 deletions
|
@ -1980,6 +1980,13 @@ void FGReplay::indexContinuousRecording(const void* data, size_t numbytes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FGReplay::call_indexContinuousRecording(void* ref, const void* data, size_t numbytes)
|
||||||
|
{
|
||||||
|
FGReplay* self = (FGReplay*) ref;
|
||||||
|
SG_LOG(SG_GENERAL, SG_BULK, "calling indexContinuousRecording() data=" << data << " numbytes=" << numbytes);
|
||||||
|
self->indexContinuousRecording(data, numbytes);
|
||||||
|
}
|
||||||
|
|
||||||
/** Read a flight recorder tape with given filename from disk.
|
/** Read a flight recorder tape with given filename from disk.
|
||||||
* Copies MetaData's "meta" node into MetaMeta out-param.
|
* Copies MetaData's "meta" node into MetaMeta out-param.
|
||||||
* Actual data and signal configuration is not read when in "Preview" mode.
|
* Actual data and signal configuration is not read when in "Preview" mode.
|
||||||
|
@ -2026,10 +2033,7 @@ FGReplay::loadTape(const SGPath& Filename, bool Preview, SGPropertyNode& MetaMet
|
||||||
// Always call indexContinuousRecording once in case there is
|
// Always call indexContinuousRecording once in case there is
|
||||||
// nothing to download.
|
// nothing to download.
|
||||||
indexContinuousRecording(nullptr, 1 /*Zero means EOF. */);
|
indexContinuousRecording(nullptr, 1 /*Zero means EOF. */);
|
||||||
filerequest->setCallback( [this](const void* data, size_t numbytes) {
|
filerequest->setCallback(call_indexContinuousRecording, this);
|
||||||
SG_LOG(SG_GENERAL, SG_BULK, "calling indexContinuousRecording() data=" << data << " numbytes=" << numbytes);
|
|
||||||
indexContinuousRecording(data, numbytes);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
indexContinuousRecording(nullptr, 0);
|
indexContinuousRecording(nullptr, 0);
|
||||||
|
|
|
@ -191,6 +191,10 @@ private:
|
||||||
//
|
//
|
||||||
void indexContinuousRecording(const void* data, size_t numbytes);
|
void indexContinuousRecording(const void* data, size_t numbytes);
|
||||||
|
|
||||||
|
// Callback for use with simgear::HTTP::FileRequest::setCallback().
|
||||||
|
//
|
||||||
|
static void call_indexContinuousRecording(void* ref, const void* data, size_t numbytes);
|
||||||
|
|
||||||
SGPropertyNode_ptr continuousWriteHeader(
|
SGPropertyNode_ptr continuousWriteHeader(
|
||||||
std::ofstream& out,
|
std::ofstream& out,
|
||||||
const SGPath& path,
|
const SGPath& path,
|
||||||
|
|
Loading…
Add table
Reference in a new issue