Page 1 of 1

Custom Overlay Text

Posted: Sun Aug 31, 2008 4:59 am
by phdonnelly
Hi,

I'm working on a set of patches to allow extra text beyond the timestamp to be overlaid on images, specifically for use in my carputer to record speed, heading, mpg, etc, but it could also be useful for temp readouts and the like.

It's very hacky right now w/ lots of hard-coded values, but it's at a point where it suits my needs and works well, with a very minimal patchset needed. I'm debating releasing it but I wanted to get some feedback first, hopefully from some of the devs.

It's basically just a few extra lines of code to read a string from a snippet of shared memory and insert that into the image at the same time it is timestamped. Right now there are no DB settings or schema changes, but to do this "right" I'd need to make some DB updates not just to store postition of the text and other preferences, but to properly store the data in the Frames table to ensure things like ZM_TIMESTAMP_ON_CAPTURE works as expected (right now it must be on as otherwise the current string will be overlayed instead of the string as it existed when the capture was taken)

I'm also debating whether it might be better to just expand the SharedData struct in zm_monitor.h to allow one or more custom strings to be overlaid, rather than having zoneminder reading yet another shared memory segment from a different program; this would also make it easier to perform per monitor overlays, as currently all monitors read the same data.