Commit 9fb762cc authored by Alexander Smorkalov's avatar Alexander Smorkalov

VideoCapture for video files implemented.

Set and Get methods are not implemented;
Camera based video capture is broken due to modifications.
parent 22b0cfba
...@@ -363,6 +363,20 @@ CV_IMPL CvCapture * cvCreateFileCapture (const char * filename) ...@@ -363,6 +363,20 @@ CV_IMPL CvCapture * cvCreateFileCapture (const char * filename)
if (! result) if (! result)
result = cvCreateFileCapture_FFMPEG_proxy (filename); 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_XINE #ifdef HAVE_XINE
if (! result) if (! result)
result = cvCreateFileCapture_XINE (filename); result = cvCreateFileCapture_XINE (filename);
...@@ -415,7 +429,7 @@ CV_IMPL CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc, ...@@ -415,7 +429,7 @@ CV_IMPL CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc,
#ifdef HAVE_VFW #ifdef HAVE_VFW
if(!result) if(!result)
return cvCreateVideoWriter_VFW(filename, fourcc, fps, frameSize, isColor); return cvCreateVideoWriter_VFW(filename, fourcc, fps, frameSize, is_color);
#endif #endif
#ifdef HAVE_MSMF #ifdef HAVE_MSMF
......
...@@ -209,11 +209,7 @@ CvCapture* cvCreateFileCapture_FFMPEG_proxy(const char * filename) ...@@ -209,11 +209,7 @@ CvCapture* cvCreateFileCapture_FFMPEG_proxy(const char * filename)
if( result->open( filename )) if( result->open( filename ))
return result; return result;
delete result; delete result;
#ifdef HAVE_VFW
return cvCreateFileCapture_VFW(filename);
#else
return 0; return 0;
#endif
} }
class CvVideoWriter_FFMPEG_proxy : class CvVideoWriter_FFMPEG_proxy :
......
This diff is collapsed.
...@@ -119,6 +119,7 @@ CvVideoWriter* cvCreateVideoWriter_VFW( const char* filename, int fourcc, ...@@ -119,6 +119,7 @@ CvVideoWriter* cvCreateVideoWriter_VFW( const char* filename, int fourcc,
double fps, CvSize frameSize, int is_color ); double fps, CvSize frameSize, int is_color );
CvCapture* cvCreateCameraCapture_DShow( int index ); CvCapture* cvCreateCameraCapture_DShow( int index );
CvCapture* cvCreateCameraCapture_MSMF( int index ); CvCapture* cvCreateCameraCapture_MSMF( int index );
CvCapture* cvCreateFileCapture_MSMF (const char* filename);
CvVideoWriter* cvCreateVideoWriter_MSMF( const char* filename, int fourcc, CvVideoWriter* cvCreateVideoWriter_MSMF( const char* filename, int fourcc,
double fps, CvSize frameSize, int is_color ); double fps, CvSize frameSize, int is_color );
CvCapture* cvCreateCameraCapture_OpenNI( int index ); CvCapture* cvCreateCameraCapture_OpenNI( int index );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment