Removing some no longer needed code.
This commit is contained in:
parent
da458f1ab6
commit
08e6622dc7
1 changed files with 0 additions and 51 deletions
|
@ -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<std::string>(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();
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue