ensure captures_per_frame >0

add missing lang entries for MultiBuffer and CapturesPerFrame
This commit is contained in:
Isaac Connor 2014-07-14 14:07:28 -04:00 committed by Jan M. Hochstein
parent 5cc74c3941
commit 2bf9080ca9
3 changed files with 7 additions and 1 deletions

View File

@ -1980,6 +1980,10 @@ int LocalCamera::Capture( Image &image )
int captures_per_frame = 1;
if ( channel_count > 1 )
captures_per_frame = v4l_captures_per_frame;
if ( captures_per_frame <= 0 ) {
captures_per_frame = 1;
Warning( "Invalid Captures Per Frame setting: %d", captures_per_frame );
}
// Do the capture, unless we are the second or subsequent camera on a channel, in which case just reuse the buffer
if ( channel_prime )

View File

@ -710,6 +710,8 @@ $SLANG = array(
'ViewEvent' => 'View Event',
'ViewPaged' => 'View Paged',
'View' => 'View',
'V4LCapturesPerFrame' => 'Captures Per Frame',
'V4LMultiBuffer' => 'Multi Buffering',
'Wake' => 'Wake',
'WarmupFrames' => 'Warmup Frames',
'Watch' => 'Watch',

View File

@ -740,7 +740,7 @@ switch ( $tab )
}
?>
<tr><td><?= $SLANG['V4LMultiBuffer'] ?></td><td><input type="checkbox" name="V4LMultiBuffer" value="1" <?php echo $newMonitor['V4LMultiBuffer'] ? 'checked="checked"' : '' ?>/></td></tr>
<tr><td><?= $SLANG['V4LCapturesPerFrame'] ?></td><td><input type="number" name="V4LCapturesPerFrame" value="<?= $newMonitor['V4LCapturesPerFrame'] ?>"/></td></tr>
<tr><td><?= $SLANG['V4LCapturesPerFrame'] ?></td><td><input type="number" name="V4LCapturesPerFrame" value="<?php echo $newMonitor['V4LCapturesPerFrame'] ?>"/></td></tr>
<?php
}
elseif ( $newMonitor['Type'] == "Remote" )