diff --git a/.gitignore b/.gitignore index 42b46a3..baeaeac 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ cmake-build-debug/ # IDE *.iml *.idea* +.vscode diff --git a/detection/api/include/MPFDetectionComponent.h b/detection/api/include/MPFDetectionComponent.h index ca053cc..f998177 100644 --- a/detection/api/include/MPFDetectionComponent.h +++ b/detection/api/include/MPFDetectionComponent.h @@ -213,8 +213,6 @@ namespace MPF { namespace COMPONENT { virtual bool Supports(MPFDetectionDataType data_type) = 0; - virtual std::string GetDetectionType() = 0; - MPFComponentType GetComponentType() override { return MPF_DETECTION_COMPONENT; }; protected: diff --git a/detection/api/include/MPFStreamingDetectionComponent.h b/detection/api/include/MPFStreamingDetectionComponent.h index 54255e5..dab5e2e 100644 --- a/detection/api/include/MPFStreamingDetectionComponent.h +++ b/detection/api/include/MPFStreamingDetectionComponent.h @@ -80,8 +80,6 @@ namespace MPF { namespace COMPONENT { public: virtual ~MPFStreamingDetectionComponent() = default; - virtual std::string GetDetectionType() = 0; - // Optional virtual void BeginSegment(const VideoSegmentInfo &segment_info) { }; diff --git a/detection/examples/AudioOnlyComponent/AudioOnly.cpp b/detection/examples/AudioOnlyComponent/AudioOnly.cpp index 945ded6..f4e0cee 100644 --- a/detection/examples/AudioOnlyComponent/AudioOnly.cpp +++ b/detection/examples/AudioOnlyComponent/AudioOnly.cpp @@ -74,9 +74,6 @@ std::vector AudioOnly::GetDetections(const MPFAudioJob &job) { } //----------------------------------------------------------------------------- -std::string AudioOnly::GetDetectionType() { - return "TEST_AUDIO"; -} MPF_COMPONENT_CREATOR(AudioOnly); MPF_COMPONENT_DELETER(); diff --git a/detection/examples/AudioOnlyComponent/AudioOnly.h b/detection/examples/AudioOnlyComponent/AudioOnly.h index 7449164..366976a 100644 --- a/detection/examples/AudioOnlyComponent/AudioOnly.h +++ b/detection/examples/AudioOnlyComponent/AudioOnly.h @@ -45,8 +45,6 @@ class AudioOnly : public MPFAudioDetectionComponentAdapter { bool Close() override; std::vector GetDetections(const MPFAudioJob &job) override; - - std::string GetDetectionType() override; }; #endif //OPENMPF_CPP_COMPONENT_SDK_AUDIOONLY_H diff --git a/detection/examples/AudioOnlyComponent/plugin-files/descriptor/descriptor.json b/detection/examples/AudioOnlyComponent/plugin-files/descriptor/descriptor.json index 59f2fb6..bcf5692 100644 --- a/detection/examples/AudioOnlyComponent/plugin-files/descriptor/descriptor.json +++ b/detection/examples/AudioOnlyComponent/plugin-files/descriptor/descriptor.json @@ -14,6 +14,7 @@ "name": "AudioOnly", "description": "This is a dummy detection component.", "actionType": "DETECTION", + "trackType": "TEST_AUDIO", "outputChangedCounter" : 1, "requiresCollection": { "states": [] @@ -28,4 +29,3 @@ } } } - diff --git a/detection/examples/GenericComponent/GenericComponent.cpp b/detection/examples/GenericComponent/GenericComponent.cpp index 52e2b7e..e3630d2 100644 --- a/detection/examples/GenericComponent/GenericComponent.cpp +++ b/detection/examples/GenericComponent/GenericComponent.cpp @@ -84,9 +84,6 @@ bool GenericComponent::Supports(MPFDetectionDataType data_type) { } //----------------------------------------------------------------------------- -std::string GenericComponent::GetDetectionType() { - return "GENERIC"; -} MPF_COMPONENT_CREATOR(GenericComponent); MPF_COMPONENT_DELETER(); diff --git a/detection/examples/GenericComponent/GenericComponent.h b/detection/examples/GenericComponent/GenericComponent.h index 253db07..0cb83c4 100644 --- a/detection/examples/GenericComponent/GenericComponent.h +++ b/detection/examples/GenericComponent/GenericComponent.h @@ -46,8 +46,6 @@ class GenericComponent : public MPFGenericDetectionComponentAdapter { std::vector GetDetections(const MPFGenericJob &job) override; bool Supports(MPFDetectionDataType data_type) override; - - std::string GetDetectionType() override; }; diff --git a/detection/examples/GenericComponent/plugin-files/descriptor/descriptor.json b/detection/examples/GenericComponent/plugin-files/descriptor/descriptor.json index 85d5cac..2538c4e 100644 --- a/detection/examples/GenericComponent/plugin-files/descriptor/descriptor.json +++ b/detection/examples/GenericComponent/plugin-files/descriptor/descriptor.json @@ -14,6 +14,7 @@ "name": "Generic", "description": "This is a dummy detection component.", "actionType": "DETECTION", + "trackType": "GENERIC", "outputChangedCounter" : 1, "requiresCollection": { "states": [] @@ -35,4 +36,3 @@ } } } - diff --git a/detection/examples/HelloWorldComponent/HelloWorld.cpp b/detection/examples/HelloWorldComponent/HelloWorld.cpp index 6315f0a..280f607 100644 --- a/detection/examples/HelloWorldComponent/HelloWorld.cpp +++ b/detection/examples/HelloWorldComponent/HelloWorld.cpp @@ -218,9 +218,6 @@ bool HelloWorld::Supports(MPFDetectionDataType data_type) { } //----------------------------------------------------------------------------- -std::string HelloWorld::GetDetectionType() { - return "HELLO"; -} MPF_COMPONENT_CREATOR(HelloWorld); MPF_COMPONENT_DELETER(); diff --git a/detection/examples/HelloWorldComponent/HelloWorld.h b/detection/examples/HelloWorldComponent/HelloWorld.h index 99ceeaa..45bec9c 100644 --- a/detection/examples/HelloWorldComponent/HelloWorld.h +++ b/detection/examples/HelloWorldComponent/HelloWorld.h @@ -53,8 +53,6 @@ class HelloWorld : public MPF::COMPONENT::MPFDetectionComponent { bool Supports(MPF::COMPONENT::MPFDetectionDataType data_type) override; - std::string GetDetectionType() override; - private: log4cxx::LoggerPtr hw_logger_; }; diff --git a/detection/examples/HelloWorldComponent/StreamingHelloWorld.cpp b/detection/examples/HelloWorldComponent/StreamingHelloWorld.cpp index 75a29c3..5858145 100644 --- a/detection/examples/HelloWorldComponent/StreamingHelloWorld.cpp +++ b/detection/examples/HelloWorldComponent/StreamingHelloWorld.cpp @@ -88,11 +88,6 @@ std::vector StreamingHelloWorld::EndSegment() { } -std::string StreamingHelloWorld::GetDetectionType() { - return "HELLO"; -} - - StreamingHelloWorld::~StreamingHelloWorld() { LOG4CXX_INFO(hw_logger_, "[" << job_name_ << "] Destroying component"); } diff --git a/detection/examples/HelloWorldComponent/StreamingHelloWorld.h b/detection/examples/HelloWorldComponent/StreamingHelloWorld.h index fd18842..a9acaf4 100644 --- a/detection/examples/HelloWorldComponent/StreamingHelloWorld.h +++ b/detection/examples/HelloWorldComponent/StreamingHelloWorld.h @@ -45,8 +45,6 @@ class StreamingHelloWorld : public MPF::COMPONENT::MPFStreamingDetectionComponen ~StreamingHelloWorld() override; - std::string GetDetectionType() override; - void BeginSegment(const MPF::COMPONENT::VideoSegmentInfo &segment_info) override; bool ProcessFrame(const cv::Mat &frame, int frame_number) override; diff --git a/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json b/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json index 615f015..90647fb 100644 --- a/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json +++ b/detection/examples/HelloWorldComponent/plugin-files/descriptor/descriptor.json @@ -15,6 +15,7 @@ "name": "HelloWorld", "description": "This is a dummy detection component.", "actionType": "DETECTION", + "trackType": "HELLO", "outputChangedCounter" : 1, "requiresCollection": { "states": [] @@ -74,4 +75,3 @@ } ] } - diff --git a/detection/examples/ImageTransformerComponent/ImageTransformerComponent.h b/detection/examples/ImageTransformerComponent/ImageTransformerComponent.h index b4f01bf..9df6a4a 100644 --- a/detection/examples/ImageTransformerComponent/ImageTransformerComponent.h +++ b/detection/examples/ImageTransformerComponent/ImageTransformerComponent.h @@ -36,8 +36,6 @@ namespace MPF { namespace COMPONENT { class ImageTransformerComponent : public MPFImageDetectionComponentAdapter { public: - std::string GetDetectionType() override { return "IMAGE_DATA"; } - bool Init() override; bool Close() override; diff --git a/detection/examples/ImageTransformerComponent/plugin-files/descriptor/descriptor.json b/detection/examples/ImageTransformerComponent/plugin-files/descriptor/descriptor.json index be44e54..7cd7a3d 100644 --- a/detection/examples/ImageTransformerComponent/plugin-files/descriptor/descriptor.json +++ b/detection/examples/ImageTransformerComponent/plugin-files/descriptor/descriptor.json @@ -14,6 +14,7 @@ "name": "TransformImage", "description": "This is a dummy detection component.", "actionType": "DETECTION", + "trackType": "IMAGE_DATA", "outputChangedCounter" : 1, "requiresCollection": { "states": [] @@ -35,4 +36,3 @@ } } } - diff --git a/detection/examples/VideoCaptureComponent/VideoCaptureComponent.h b/detection/examples/VideoCaptureComponent/VideoCaptureComponent.h index a9ca2d7..d0a5a4e 100644 --- a/detection/examples/VideoCaptureComponent/VideoCaptureComponent.h +++ b/detection/examples/VideoCaptureComponent/VideoCaptureComponent.h @@ -36,8 +36,6 @@ namespace MPF { namespace COMPONENT { class VideoCaptureComponent : public MPFVideoDetectionComponentAdapter { public: - std::string GetDetectionType() override { return "VIDEO"; } - bool Init() override; bool Close() override; diff --git a/detection/examples/VideoCaptureComponent/plugin-files/descriptor/descriptor.json b/detection/examples/VideoCaptureComponent/plugin-files/descriptor/descriptor.json index ab39d9f..7dc908e 100644 --- a/detection/examples/VideoCaptureComponent/plugin-files/descriptor/descriptor.json +++ b/detection/examples/VideoCaptureComponent/plugin-files/descriptor/descriptor.json @@ -14,6 +14,7 @@ "name": "VideoCapture", "description": "This is a dummy detection component.", "actionType": "DETECTION", + "trackType": "VIDEO", "outputChangedCounter" : 1, "requiresCollection": { "states": [] @@ -35,4 +36,3 @@ } } } -