[Sumover-dev] [svn commit] r4215 - vic/branches/mpeg4/video
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Mon Jul 14 08:30:54 BST 2008
Author: douglask
Date: Mon Jul 14 08:30:51 2008
New Revision: 4215
Modified:
vic/branches/mpeg4/video/grabber-v4l2.cpp
Log:
V4L2 'large' capture only worked with 4:3 704x576 PAL input sources.
It now fallbacks to the nearest working resolution to 704x576 as returned by the V4L2 driver.
Modified: vic/branches/mpeg4/video/grabber-v4l2.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-v4l2.cpp (original)
+++ vic/branches/mpeg4/video/grabber-v4l2.cpp Mon Jul 14 08:30:51 2008
@@ -1073,8 +1073,10 @@
}
while ( !format_ok ) {
- width_ = CIF_WIDTH *2 / decimate_;
- height_ = CIF_HEIGHT *2 / decimate_;
+ if (decimate_ > 0) {
+ width_ = CIF_WIDTH *2 / decimate_;
+ height_ = CIF_HEIGHT *2 / decimate_;
+ }
debug_msg("V4L2: format");
switch (cformat_) {
@@ -1139,8 +1141,10 @@
decimate_ = 4;
break;
case 1:
- debug_msg("V4L2: trying resolution under ...\n");
- decimate_ = 2;
+ debug_msg("V4L2: falling back to resolution %dx%d\n", fmt.fmt.pix.width, fmt.fmt.pix.height);
+ decimate_ = 0;
+ width_ = fmt.fmt.pix.width;
+ height_ = fmt.fmt.pix.height;
break;
default:
debug_msg("V4L2: giving up ...\n");
More information about the Sumover-dev
mailing list