diff --git a/detection/api/include/MPFVideoCapture.h b/detection/api/include/MPFVideoCapture.h index f11cc6c..ab74348 100644 --- a/detection/api/include/MPFVideoCapture.h +++ b/detection/api/include/MPFVideoCapture.h @@ -57,6 +57,8 @@ namespace MPF { namespace COMPONENT { explicit MPFVideoCapture(const MPFVideoJob &videoJob, bool enableFrameTransformers=true, bool enableFrameFiltering=true); + explicit MPFVideoCapture(const std::string &videoPath); + bool Read(cv::Mat &frame); diff --git a/detection/api/src/MPFVideoCapture.cpp b/detection/api/src/MPFVideoCapture.cpp index c057fff..b5205fe 100644 --- a/detection/api/src/MPFVideoCapture.cpp +++ b/detection/api/src/MPFVideoCapture.cpp @@ -60,6 +60,12 @@ namespace MPF { namespace COMPONENT { } + MPFVideoCapture::MPFVideoCapture(const std::string &videoPath) + : MPFVideoCapture(MPFVideoJob("", videoPath, 0, -1, {}, {}), false, false) + { + } + + IFrameTransformer::Ptr MPFVideoCapture::GetFrameTransformer(bool enableFrameTransformers, const MPFVideoJob &job) const { if (enableFrameTransformers) {