提交 740ae358 编写于 作者: K kalistratovag

Initial commit of avi mjpeg decoder

std::streams removed

debug code removed

whitespaces removed

stdint.h added and trailing whitespaces removed

trailing whitespaces removed

warnings on windows fix

warnings on windows fix pt 2

Refactoring performed: AviMjpegStream class introduced. CAP_PROP_FRAME_WIDTH and CAP_PROP_FRAME_HEIGHT properties support added.

Windows warnings & uninitialized variable fix

Windows warning fix

Win32 warning fix
上级 728bd0ba
......@@ -552,6 +552,20 @@ static Ptr<IVideoCapture> IVideoCapture_create(int index)
}
static Ptr<IVideoCapture> IVideoCapture_create(const String& filename)
{
Ptr<IVideoCapture> capture;
capture = createMotionJpegCapture(filename);
if (capture && capture->isOpened())
{
return capture;
}
// failed open a camera
return Ptr<IVideoCapture>();
}
static Ptr<IVideoWriter> IVideoWriter_create(const String& filename, int _fourcc, double fps, Size frameSize, bool isColor)
{
Ptr<IVideoWriter> iwriter;
......@@ -582,6 +596,10 @@ VideoCapture::~VideoCapture()
bool VideoCapture::open(const String& filename)
{
if (isOpened()) release();
icap = IVideoCapture_create(filename);
if (!icap.empty())
return true;
cap.reset(cvCreateFileCapture(filename.c_str()));
return isOpened();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册