Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions detection/api/include/MPFDetectionComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,46 @@ namespace MPF { namespace COMPONENT {
};


struct MPFAllVideoTracksJob : MPFJob {
const int start_frame;
const int stop_frame;
const bool has_feed_forward_tracks;
const std::vector<MPFVideoTrack> feed_forward_tracks;

MPFAllVideoTracksJob(std::string job_name,
std::string data_uri,
int start_frame,
int stop_frame,
Properties job_properties,
Properties media_properties)
: MPFJob(std::move(job_name),
std::move(data_uri),
std::move(job_properties),
std::move(media_properties))
, start_frame(start_frame)
, stop_frame(stop_frame)
, has_feed_forward_tracks(false) {
}

MPFAllVideoTracksJob(std::string job_name,
std::string data_uri,
int start_frame,
int stop_frame,
std::vector<MPFVideoTrack> tracks,
Properties job_properties,
Properties media_properties)
: MPFJob(std::move(job_name),
std::move(data_uri),
std::move(job_properties),
std::move(media_properties))
, start_frame(start_frame)
, stop_frame(stop_frame)
, has_feed_forward_tracks(true)
, feed_forward_tracks(std::move(tracks)) {
}
};


struct MPFImageJob : MPFJob {
const bool has_feed_forward_location;
const MPFImageLocation feed_forward_location;
Expand Down Expand Up @@ -205,6 +245,10 @@ namespace MPF { namespace COMPONENT {

virtual std::vector<MPFVideoTrack> GetDetections(const MPFVideoJob &job) = 0;

virtual std::vector<MPFVideoTrack> GetDetections(const MPFAllVideoTracksJob &job) {
throw std::runtime_error{"MPFAllVideoTracksJob is not currently supported."};
}

virtual std::vector<MPFImageLocation> GetDetections(const MPFImageJob &job) = 0;

virtual std::vector<MPFAudioTrack> GetDetections(const MPFAudioJob &job) = 0;
Expand Down