Merge branch 'master' into rtsp_server

Cleanup Analysis a bit. We can't skip packets just because they are audio. Clean up the state machine transitions a bit to make them a little more readable.
Change logic of PrimeCapture, success MUST return 1.  0 means no error but also no success.
Debugging and braces improvements in local_camera.
This commit is contained in:
Isaac Connor
2020-12-17 10:16:54 -05:00
13 changed files with 190 additions and 174 deletions

View File

@@ -891,10 +891,12 @@ int Zone::Load(Monitor *monitor, Zone **&zones) {
if ( polygon.LoX() < 0 || polygon.HiX() >= (int)monitor->Width()
|| polygon.LoY() < 0 || polygon.HiY() >= (int)monitor->Height() ) {
Error("Zone %d/%s for monitor %s extends outside of image dimensions, (%d,%d), (%d,%d), ignoring",
Error("Zone %d/%s for monitor %s extends outside of image dimensions, (%d,%d), (%d,%d), fixing",
Id, Name, monitor->Name(), polygon.LoX(), polygon.LoY(), polygon.HiX(), polygon.HiY());
n_zones -= 1;
continue;
if ( polygon.LoX() < 0 ) polygon.LoX(0);
if ( polygon.HiX() >= (int)monitor->Width()) polygon.HiX((int)monitor->Width());
if ( polygon.LoY() < 0 ) polygon.LoY(0);
if ( polygon.HiY() >= (int)monitor->Height() ) polygon.HiY((int)monitor->Height());
}
if ( false && !strcmp( Units, "Percent" ) ) {