Closed olokos closed 1 year ago
Perhaps this +1 could also be removed? https://github.com/olokos/agent/commit/68f1de2dbf8629045983185d5b885b4b235be020#diff-ad807fb60a10245531d9853ad52927d87ea197e7bebd72d762085f168ad6b529R96
lets merge, still strange as would expect to trigger motion faster, and recording start older looks like this queue (https://github.com/kerberos-io/joy4/blob/master/av/pubsub/queue.go#L12-L21) is not working as expect. Merging again as tests showed this is working. Still not expected from my reasoning.
With this change, the prerecording time is actually working as expected, with prerecording delay, then motion then postrecording delay.
Since
motionCursor := queue.Latest()
was used, the prerecording delay was counted since the last frame received, instead of the first frame for this motion event.Changing it back to
motionCursor := queue.Oldest()
actually allowed to get video data before the motion event happened, not right after it happened.