Those points said, I have been having a problem with event replay speed. A 3 minute event could replay in 18 seconds. Wonderful on those days I'm time crunched. Not so good for comprehension.
I had a look at the code for zms, and in particular, EventStream::runStream() in zm_event.cpp, I think the way time_to_event is being calculated may not be right. I'm not use I understand everything this piece of code is trying to achieve. But previously it seemed to calculate the time from the start of the event to the next display frame, and I think what it wanted was time from the previous display frame to the next. It seems to use this time to determine how long to wait before sending the next frame. Apologies to the authors if I've completely misunderstood the point.
In any event, the change below helps in my case. Event replay forward and backward is working at a more accurate speed. There is still a problem with the display rate being inconsistent, some frames are fast and others slow giving a jumpiness to the video, but at least the duration on playback approximates the duration of the real event.
I hope no-one else is having the same problem as me, but if you are and this helps, awesome.
glen
Code: Select all
--- zm_event.cpp.orig 2015-11-24 20:58:46.000000000 -0800
+++ zm_event.cpp 2015-11-25 10:15:40.000000000 -0800
@@ -1389,13 +1389,13 @@
double time_to_event = 0;
if ( replay_rate > 0 )
{
- time_to_event = event_data->frames[0].timestamp - curr_stream_time;
+ time_to_event = event_data->frames[curr_frame_id-1].timestamp - curr_stream_time;
if ( time_to_event > 0 )
in_event = false;
}
else if ( replay_rate < 0 )
{
- time_to_event = curr_stream_time - event_data->frames[event_data->frame_count-1].timestamp;
+ time_to_event = curr_stream_time - event_data->frames[curr_frame_id-1].timestamp;
if ( time_to_event > 0 )
in_event = false;
}