1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge branch 2.4

This commit is contained in:
Andrey Kamaev
2012-12-10 23:51:14 +04:00
18 changed files with 732 additions and 643 deletions
+10 -16
View File
@@ -114,24 +114,18 @@ private:
icvWriteFrame_FFMPEG_p =
(CvWriteFrame_Plugin)GetProcAddress(icvFFOpenCV, "cvWriteFrame_FFMPEG");
#if 0
if( icvCreateFileCapture_FFMPEG_p != 0 &&
icvReleaseCapture_FFMPEG_p != 0 &&
icvGrabFrame_FFMPEG_p != 0 &&
icvRetrieveFrame_FFMPEG_p != 0 &&
icvSetCaptureProperty_FFMPEG_p != 0 &&
icvGetCaptureProperty_FFMPEG_p != 0 &&
icvCreateVideoWriter_FFMPEG_p != 0 &&
icvReleaseVideoWriter_FFMPEG_p != 0 &&
icvWriteFrame_FFMPEG_p != 0 )
if( icvCreateFileCapture_FFMPEG_p == NULL ||
icvReleaseCapture_FFMPEG_p == NULL ||
icvGrabFrame_FFMPEG_p == NULL ||
icvRetrieveFrame_FFMPEG_p == NULL ||
icvSetCaptureProperty_FFMPEG_p == NULL ||
icvGetCaptureProperty_FFMPEG_p == NULL ||
icvCreateVideoWriter_FFMPEG_p == NULL ||
icvReleaseVideoWriter_FFMPEG_p == NULL ||
icvWriteFrame_FFMPEG_p == NULL )
{
printf("Successfully initialized ffmpeg plugin!\n");
fprintf(stderr, "Failed to load FFMPEG plugin: module handle=%p\n", icvFFOpenCV);
}
else
{
printf("Failed to load FFMPEG plugin: module handle=%p\n", icvFFOpenCV);
}
#endif
}
#elif defined HAVE_FFMPEG
icvCreateFileCapture_FFMPEG_p = (CvCreateFileCapture_Plugin)cvCreateFileCapture_FFMPEG;
+9 -5
View File
@@ -229,12 +229,16 @@ bool JpegDecoder::readHeader()
if( m_f )
jpeg_stdio_src( &state->cinfo, m_f );
}
jpeg_read_header( &state->cinfo, TRUE );
m_width = state->cinfo.image_width;
m_height = state->cinfo.image_height;
m_type = state->cinfo.num_components > 1 ? CV_8UC3 : CV_8UC1;
result = true;
if (state->cinfo.src != 0)
{
jpeg_read_header( &state->cinfo, TRUE );
m_width = state->cinfo.image_width;
m_height = state->cinfo.image_height;
m_type = state->cinfo.num_components > 1 ? CV_8UC3 : CV_8UC1;
result = true;
}
}
if( !result )