Media foundation video i/o fixes.
Bug in Video for Windows capture init fixed; Media Foundation based capture finalization fixed; Highgui tests for video i/o updated.
This commit is contained in:
@@ -199,15 +199,6 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
|
||||
|
||||
switch (domains[i])
|
||||
{
|
||||
#ifdef HAVE_MSMF
|
||||
case CV_CAP_MSMF:
|
||||
printf("Creating Media foundation capture\n");
|
||||
capture = cvCreateCameraCapture_MSMF (index);
|
||||
printf("Capture address %p\n", capture);
|
||||
if (capture)
|
||||
return capture;
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_DSHOW
|
||||
case CV_CAP_DSHOW:
|
||||
capture = cvCreateCameraCapture_DShow (index);
|
||||
@@ -215,7 +206,13 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
|
||||
return capture;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MSMF
|
||||
case CV_CAP_MSMF:
|
||||
capture = cvCreateCameraCapture_MSMF (index);
|
||||
if (capture)
|
||||
return capture;
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_TYZX
|
||||
case CV_CAP_STEREO:
|
||||
capture = cvCreateCameraCapture_TYZX (index);
|
||||
@@ -223,14 +220,12 @@ CV_IMPL CvCapture * cvCreateCameraCapture (int index)
|
||||
return capture;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case CV_CAP_VFW:
|
||||
#ifdef HAVE_VFW
|
||||
case CV_CAP_VFW:
|
||||
capture = cvCreateCameraCapture_VFW (index);
|
||||
if (capture)
|
||||
return capture;
|
||||
#endif
|
||||
|
||||
#if defined HAVE_LIBV4L || defined HAVE_CAMV4L || defined HAVE_CAMV4L2 || defined HAVE_VIDEOIO
|
||||
capture = cvCreateCameraCapture_V4L (index);
|
||||
if (capture)
|
||||
@@ -363,20 +358,16 @@ CV_IMPL CvCapture * cvCreateFileCapture (const char * filename)
|
||||
if (! result)
|
||||
result = cvCreateFileCapture_FFMPEG_proxy (filename);
|
||||
|
||||
#ifdef HAVE_MSMF
|
||||
if (! result)
|
||||
{
|
||||
printf("Creating Media foundation based reader\n");
|
||||
result = cvCreateFileCapture_MSMF (filename);
|
||||
printf("Construction result %p\n", result);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VFW
|
||||
if (! result)
|
||||
result = cvCreateFileCapture_VFW (filename);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MSMF
|
||||
if (! result)
|
||||
result = cvCreateFileCapture_MSMF (filename);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XINE
|
||||
if (! result)
|
||||
result = cvCreateFileCapture_XINE (filename);
|
||||
@@ -422,14 +413,12 @@ CV_IMPL CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc,
|
||||
if(!fourcc || !fps)
|
||||
result = cvCreateVideoWriter_Images(filename);
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
if(!result)
|
||||
result = cvCreateVideoWriter_FFMPEG_proxy (filename, fourcc, fps, frameSize, is_color);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VFW
|
||||
if(!result)
|
||||
return cvCreateVideoWriter_VFW(filename, fourcc, fps, frameSize, is_color);
|
||||
result = cvCreateVideoWriter_VFW(filename, fourcc, fps, frameSize, is_color);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MSMF
|
||||
|
||||
Reference in New Issue
Block a user