mirror of
https://github.com/opencv/opencv.git
synced 2025-06-13 13:13:26 +08:00
Merge pull request #8112 from PkLab:Fix_7898
CoInitialize/CoUninitialize in VFW classes (#8112)
This commit is contained in:
parent
607ff2e189
commit
ece3fac7ef
@ -312,8 +312,16 @@ CvCapture* cvCreateFileCapture_VFW (const char* filename)
|
|||||||
class CvCaptureCAM_VFW : public CvCapture
|
class CvCaptureCAM_VFW : public CvCapture
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CvCaptureCAM_VFW() { init(); }
|
CvCaptureCAM_VFW()
|
||||||
virtual ~CvCaptureCAM_VFW() { close(); }
|
{
|
||||||
|
CoInitialize(NULL);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
virtual ~CvCaptureCAM_VFW()
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
CoUninitialize();
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool open( int index );
|
virtual bool open( int index );
|
||||||
virtual void close();
|
virtual void close();
|
||||||
@ -673,8 +681,16 @@ CvCapture* cvCreateCameraCapture_VFW( int index )
|
|||||||
class CvVideoWriter_VFW : public CvVideoWriter
|
class CvVideoWriter_VFW : public CvVideoWriter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CvVideoWriter_VFW() { init(); }
|
CvVideoWriter_VFW()
|
||||||
virtual ~CvVideoWriter_VFW() { close(); }
|
{
|
||||||
|
CoInitialize(NULL);
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
virtual ~CvVideoWriter_VFW()
|
||||||
|
{
|
||||||
|
close();
|
||||||
|
CoUninitialize();
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool open( const char* filename, int fourcc,
|
virtual bool open( const char* filename, int fourcc,
|
||||||
double fps, CvSize frameSize, bool isColor );
|
double fps, CvSize frameSize, bool isColor );
|
||||||
|
Loading…
Reference in New Issue
Block a user