update Storage Video Writer options to only allow Passthrough for FFmpeg

This commit is contained in:
Isaac Connor 2018-06-14 13:36:32 -04:00 committed by Isaac Connor
parent 593209edd2
commit f2d00b6af5
1 changed files with 11 additions and 6 deletions

View File

@ -452,11 +452,6 @@ $savejpegopts = array(
'Frames + Analysis images (if available)' => 3,
);
$videowriteropts = array(
'Disabled' => 0,
'X264 Encode' => 1,
'H264 Camera Passthrough' => 2
);
xhtmlHeaders(__FILE__, translate('Monitor')." - ".validHtmlStr($monitor->Name()) );
?>
@ -922,7 +917,17 @@ if ( $monitor->Type() == 'Local' ) {
case 'storage' :
?>
<tr><td><?php echo translate('SaveJPEGs') ?></td><td><select name="newMonitor[SaveJPEGs]"><?php foreach ( $savejpegopts as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->SaveJPEGs() ) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
<tr><td><?php echo translate('VideoWriter') ?></td><td><select name="newMonitor[VideoWriter]"><?php foreach ( $videowriteropts as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->VideoWriter() ) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
<tr><td><?php echo translate('VideoWriter') ?></td><td>
<?php
$videowriteropts = array(
0 => 'Disabled',
1 => 'X264 Encode',
);
if ($monitor->Type() == 'FFMpeg' )
$videowriteropts[2]='H264 Camera Passthrough';
echo htmlselect( 'newMonitor[VideoWriter]', $videowriteropts, $monitor->VideoWriter() );
?>
</td></tr>
<tr><td><?php echo translate('OptionalEncoderParam') ?></td><td><textarea name="newMonitor[EncoderParameters]" rows="4" cols="36"><?php echo validHtmlStr($monitor->EncoderParameters()) ?></textarea></td></tr>
<tr><td><?php echo translate('RecordAudio') ?></td><td><input type="checkbox" name="newMonitor[RecordAudio]" value="1"<?php if ( $monitor->RecordAudio() ) { ?> checked="checked"<?php } ?>/></td></tr>
<?php