Add support for feed-forward multi-track video requests.#129
Conversation
brosenberg42
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @jrobble)
detection/api/include/MPFDetectionComponent.h line 248 at r2 (raw file):
virtual std::vector<MPFVideoTrack> GetDetections(const MPFVideoJob &job) = 0; virtual std::vector<MPFVideoTrack> GetDetections(const MPFAllVideoTracksJob &job) {
I think this could cause confusion since a C++ developer could override this method. We could remove this method and throw the exception in CppComponentHandle. Then, C++ component developers would not see the method at all.
jrobble
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @brosenberg42 and @jrobble)
detection/api/include/MPFDetectionComponent.h line 248 at r2 (raw file):
Previously, brosenberg42 wrote…
I think this could cause confusion since a C++ developer could override this method. We could remove this method and throw the exception in
CppComponentHandle. Then, C++ component developers would not see the method at all.
Removing this method results in this error:
/home/mpf/git/openmpf-projects/openmpf/trunk/detection/executor/cpp/cli-runner/MpfCppSdkPythonBindings.cpp:189:100: error: no matching function for call to ‘MPF::COMPONENT::MPFDetectionComponent::GetDetections(const MPF::COMPONENT::MPFAllVideoTracksJob&)’
189 | [](CppComponent& c, const MPFAllVideoTracksJob &job) { return c->GetDetections(job); },
|
I had to also update MpfCppSdkPythonBindings.cpp:
.def("GetDetections",
[](CppComponent& c, const MPFAllVideoTracksJob &job) {
throw std::runtime_error{"MPFAllVideoTracksJob is not currently supported."};
},
"job"_a,
call_guard_t())
brosenberg42
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @jrobble)
detection/api/include/MPFDetectionComponent.h line 248 at r2 (raw file):
Previously, jrobble (Jeff Robble) wrote…
Removing this method results in this error:
/home/mpf/git/openmpf-projects/openmpf/trunk/detection/executor/cpp/cli-runner/MpfCppSdkPythonBindings.cpp:189:100: error: no matching function for call to ‘MPF::COMPONENT::MPFDetectionComponent::GetDetections(const MPF::COMPONENT::MPFAllVideoTracksJob&)’ 189 | [](CppComponent& c, const MPFAllVideoTracksJob &job) { return c->GetDetections(job); }, |I had to also update
MpfCppSdkPythonBindings.cpp:.def("GetDetections", [](CppComponent& c, const MPFAllVideoTracksJob &job) { throw std::runtime_error{"MPFAllVideoTracksJob is not currently supported."}; }, "job"_a, call_guard_t())
Now that you have updated MpfCppSdkPythonBindings, can this be removed?
jrobble
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @brosenberg42 and @jrobble)
detection/api/include/MPFDetectionComponent.h line 248 at r2 (raw file):
Previously, brosenberg42 wrote…
Now that you have updated
MpfCppSdkPythonBindings, can this be removed?
Yes. Done.
brosenberg42
left a comment
There was a problem hiding this comment.
@brosenberg42 reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @jrobble)
Issues:
Related PRs:
This change is