Always do event change detection whether we are paused or not. Because we might be single-stepping. Change progress to a double as that it what it should be.

pull/3076/head
Isaac Connor 2020-10-05 10:29:42 -04:00
parent d7429014b6
commit 044ce61ddb
2 changed files with 6 additions and 6 deletions

View File

@ -533,18 +533,18 @@ void EventStream::processCommand(const CmdMsg *msg) {
}
struct {
uint64_t event_id;
int progress;
double progress;
int rate;
int zoom;
bool paused;
} status_data;
status_data.event_id = event_data->event_id;
status_data.progress = (int)event_data->frames[curr_frame_id-1].offset;
status_data.progress = event_data->frames[curr_frame_id-1].offset;
status_data.rate = replay_rate;
status_data.zoom = zoom;
status_data.paused = paused;
Debug(2, "Event:%" PRIu64 ", Paused:%d, progress:%d Rate:%d, Zoom:%d",
Debug(2, "Event:%" PRIu64 ", Paused:%d, progress:%f Rate:%d, Zoom:%d",
status_data.event_id,
status_data.paused,
status_data.progress,

View File

@ -243,7 +243,8 @@ function getCmdResponse( respObj, respText ) {
}
streamStatus = respObj.status;
if ( streamStatus.progress >= Math.round(parseFloat(eventData.Length)) ) {
if ( streamStatus.progress > parseFloat(eventData.Length) ) {
console.log("Limiting progress to " + streamStatus.progress + ' >= ' + parseFloat(eventData.Length) );
streamStatus.progress = parseFloat(eventData.Length);
} //Limit progress to reality
@ -262,7 +263,6 @@ function getCmdResponse( respObj, respText ) {
if ( streamStatus.paused == true ) {
streamPause( );
} else {
console.log('streamStatus.rate: ' + streamStatus.rate);
$j('select[name="rate"]').val(streamStatus.rate*100);
Cookie.write('zmEventRate', streamStatus.rate*100, {duration: 10*365});
streamPlay( );
@ -286,7 +286,7 @@ function getCmdResponse( respObj, respText ) {
} // end if haev a new auth hash
streamCmdTimer = streamQuery.delay( streamTimeout ); //Timeout is refresh rate for progressBox and time display
}
} // end function getCmdResponse( respObj, respText )
var streamReq = new Request.JSON( {
url: monitorUrl,