diff options
| author | Jules <jules@asdf.us> | 2018-06-20 12:29:36 -0400 |
|---|---|---|
| committer | Jules <jules@asdf.us> | 2018-06-20 12:29:36 -0400 |
| commit | 89c3c2546af95122099e5e3e7cc0c40448066508 (patch) | |
| tree | 226bcc92ebbfab003339ffbd346a90421d9c6fe0 /app/client/modules/pix2pixhd/views/pix2pixhd.live.js | |
| parent | 95de035728c209a6d0acee9b14a86837e44d26e4 (diff) | |
| parent | 78abe1dc85c7b251cc871ffd4630a4a6c5eb2bd4 (diff) | |
oop
Diffstat (limited to 'app/client/modules/pix2pixhd/views/pix2pixhd.live.js')
| -rw-r--r-- | app/client/modules/pix2pixhd/views/pix2pixhd.live.js | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.live.js b/app/client/modules/pix2pixhd/views/pix2pixhd.live.js index 3f027a1..0bdcefe 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.live.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.live.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux' import { ParamGroup, Param, Player, - Slider, Select, Button, Loading + Slider, Select, TextInput, Button, Loading } from '../../../common/' import { startRecording, stopRecording, saveFrame, toggleFPS } from '../../../live/player' @@ -51,11 +51,13 @@ class Pix2PixHDLive extends Component { this.props.actions.live.seek(frame) } start(){ - // console.log(this.props) - const sequence = this.props.pix2pixhd.data.sequences[0].name - const checkpoint = this.props.pix2pixhd.data.checkpoints[0].name + console.log(this.props.opt) + const sequence = this.props.opt.sequence_name || this.props.pix2pixhd.data.sequences[0].name + const checkpoint = this.props.opt.checkpoint_name || this.props.pix2pixhd.data.checkpoints[0].name console.log('starting up!', sequence, checkpoint) - this.props.actions.tasks.live_task(sequence, checkpoint) + this.props.actions.tasks.live_task(sequence, checkpoint, { + folder_id: this.props.pix2pixhd.data.resultsFolder.id, + }) } interrupt(){ this.props.actions.queue.stop_task('gpu') @@ -121,21 +123,10 @@ class Pix2PixHDLive extends Component { /> <Slider live name='frame_delay' - min={0.05} max={2.0} type='float' + min={0.0} max={2.0} type='float' /> {this.renderRestartButton()} - <Button - title={ - this.props.opt.savingVideo - ? 'Saving video...' - : this.props.opt.recording - ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames/25) +')' - : 'Record video' - } - onClick={this.toggleRecording} - > - {this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'} - </Button> + {this.renderRecordButton()} <Button title={'Save frame'} onClick={saveFrame} @@ -143,12 +134,20 @@ class Pix2PixHDLive extends Component { Save </Button> <ParamGroup - title='Render on server' + title='Record video' name='store_b' onToggle={(value) => { // now storing frames on server... }} > + <TextInput + title='Video name' + name='final_tag' + value={this.props.opt.final_tag} + onSave={value => { + this.props.actions.live.set_param('final_tag', value) + }} + /> </ParamGroup> <p class='last_message'>{this.props.last_message}</p> @@ -197,7 +196,7 @@ class Pix2PixHDLive extends Component { > <Slider live name='sequence_frac' - min={0.0} max={0.5} type='float' + min={0.0} max={1.0} type='float' /> <Slider live name='process_frac' @@ -264,6 +263,7 @@ class Pix2PixHDLive extends Component { ) } renderRestartButton(){ + console.log(this.props.runner.gpu) if (this.props.runner.gpu.status === 'IDLE') { return ( <Button @@ -307,6 +307,23 @@ class Pix2PixHDLive extends Component { </div> ) } + renderRecordButton(){ + return null + // return ( + // <Button + // title={ + // this.props.opt.savingVideo + // ? 'Saving video...' + // : this.props.opt.recording + // ? 'Recording (' + timeInSeconds(this.props.opt.recordFrames/25) +')' + // : 'Record video' + // } + // onClick={this.toggleRecording} + // > + // {this.props.opt.savingVideo ? 'Saving' : this.props.opt.recording ? 'Recording' : 'Record'} + // </Button> + // ) + } } function timeInSeconds(n){ return n.toFixed(1) + ' s.' |
