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.
This commit is contained in:
parent
6d1e5330e3
commit
7a7a3413d3
|
@ -524,18 +524,18 @@ void EventStream::processCommand(const CmdMsg *msg) {
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uint64_t event_id;
|
uint64_t event_id;
|
||||||
int progress;
|
double progress;
|
||||||
int rate;
|
int rate;
|
||||||
int zoom;
|
int zoom;
|
||||||
bool paused;
|
bool paused;
|
||||||
} status_data;
|
} status_data;
|
||||||
|
|
||||||
status_data.event_id = event_data->event_id;
|
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.rate = replay_rate;
|
||||||
status_data.zoom = zoom;
|
status_data.zoom = zoom;
|
||||||
status_data.paused = paused;
|
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.event_id,
|
||||||
status_data.paused,
|
status_data.paused,
|
||||||
status_data.progress,
|
status_data.progress,
|
||||||
|
@ -976,6 +976,7 @@ void EventStream::runStream() {
|
||||||
//if ( step != 0 )// Adding 0 is cheaper than an if 0
|
//if ( step != 0 )// Adding 0 is cheaper than an if 0
|
||||||
// curr_frame_id starts at 1 though, so we might skip the first frame?
|
// curr_frame_id starts at 1 though, so we might skip the first frame?
|
||||||
curr_frame_id += step;
|
curr_frame_id += step;
|
||||||
|
} // end if !paused
|
||||||
|
|
||||||
// Detects when we hit end of event and will load the next event or previous event
|
// Detects when we hit end of event and will load the next event or previous event
|
||||||
if ( checkEventLoaded() ) {
|
if ( checkEventLoaded() ) {
|
||||||
|
@ -996,9 +997,7 @@ void EventStream::runStream() {
|
||||||
Debug(1, "replay rate(%d) time_to_event(%f)=curr_stream_time(%f)-frame timestamp:%f",
|
Debug(1, "replay rate(%d) time_to_event(%f)=curr_stream_time(%f)-frame timestamp:%f",
|
||||||
replay_rate, time_to_event, curr_stream_time, event_data->frames[event_data->frame_count-1].timestamp);
|
replay_rate, time_to_event, curr_stream_time, event_data->frames[event_data->frame_count-1].timestamp);
|
||||||
} // end if forward or reverse
|
} // end if forward or reverse
|
||||||
|
|
||||||
} // end if checkEventLoaded
|
} // end if checkEventLoaded
|
||||||
} // end if !paused
|
|
||||||
} // end while ! zm_terminate
|
} // end while ! zm_terminate
|
||||||
#if HAVE_LIBAVCODEC
|
#if HAVE_LIBAVCODEC
|
||||||
if ( type == STREAM_MPEG )
|
if ( type == STREAM_MPEG )
|
||||||
|
|
Loading…
Reference in New Issue