diff --git a/lib/local/CppInerop/OpenCVWrappers.h b/lib/local/CppInerop/OpenCVWrappers.h index a6ab23f..9d0f4f2 100644 --- a/lib/local/CppInerop/OpenCVWrappers.h +++ b/lib/local/CppInerop/OpenCVWrappers.h @@ -227,55 +227,4 @@ namespace OpenCVWrappers { }; - public ref class VideoWriter - { - private: - // OpenCV based video capture for reading from files - cv::VideoWriter* vc; - - public: - - VideoWriter(System::String^ location, int width, int height, double fps, bool colour) - { - - msclr::interop::marshal_context context; - std::string location_std_string = context.marshal_as(location); - - vc = new cv::VideoWriter(location_std_string, CV_FOURCC('D','I','V','X'), fps, cv::Size(width, height), colour); - - } - - // Return success - bool Write(RawImage^ img) - { - if(vc != nullptr && vc->isOpened()) - { - vc->write(img->Mat); - return true; - } - else - { - return false; - } - } - - // Finalizer. Definitely called before Garbage Collection, - // but not automatically called on explicit Dispose(). - // May be called multiple times. - !VideoWriter() - { - if(vc != nullptr) - { - vc->~VideoWriter(); - } - } - - // Destructor. Called on explicit Dispose() only. - ~VideoWriter() - { - this->!VideoWriter(); - } - - }; - }