Use FFMPEG capture only if HAVE_FFMPEG flag is defined.

pull/3261/head
Artur Wieczorek 10 years ago
parent 073a7ff95a
commit 93d1ceae43
  1. 17
      modules/highgui/src/cap.cpp

@ -368,8 +368,10 @@ CV_IMPL CvCapture * cvCreateFileCapture (const char * filename)
{
CvCapture * result = 0;
#ifdef HAVE_FFMPEG
if (! result)
result = cvCreateFileCapture_FFMPEG_proxy (filename);
#endif
#ifdef HAVE_VFW
if (! result)
@ -426,8 +428,10 @@ 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)
@ -459,6 +463,19 @@ CV_IMPL CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc,
result = cvCreateVideoWriter_GStreamer(filename, fourcc, fps, frameSize, is_color);
#endif
#if !defined(HAVE_FFMPEG) && \
!defined(HAVE_VFW) && \
!defined(HAVE_MSMF) && \
!defined(HAVE_AVFOUNDATION) && \
!defined(HAVE_QUICKTIME) && \
!defined(HAVE_QTKIT) && \
!defined(HAVE_GSTREAMER)
// If none of the writers is used
// these statements suppress 'unused parameter' warnings.
(void)frameSize;
(void)is_color;
#endif
if(!result)
result = cvCreateVideoWriter_Images(filename);

Loading…
Cancel
Save