Page 1 of 1

PATCH: v4l2 restore control settings (hue, brightness, etc)

Posted: Fri May 08, 2009 4:10 pm
by genanr
Here is a simple patch that will restore the video control settings when zm is restarted when using a v4l2 driver.

Code: Select all

*** zm/src/zm_local_camera.cpp  2009-04-10 09:49:56.000000000 -0500
--- zm-andy/src/zm_local_camera.cpp     2009-04-17 
10:55:16.000000000 -0500
*************** void LocalCamera::Initialise()
*** 489,494 ****
--- 489,499 ----
          {
              Fatal( "Failed to set video standard %d: %s", standard, strerror(errno) );
          }
+
+         Contrast(contrast);
+         Brightness(brightness);
+         Hue(hue);
+         Colour(colour);
      }
      else
  #endif // ZM_V4L2

Posted: Sun May 10, 2009 2:13 am
by henriquejf
nice ! do you want me to publish it to the wiki ?

http://www.zoneminder.com/wiki/index.php/Patches

or if you want to just login use the same forum account;

Posted: Wed May 13, 2009 10:44 am
by zoneminder
Thanks for this. I have applied it to the trunk and it will be available in the next release and from SVN from the next update.

Posted: Fri May 15, 2009 8:32 pm
by henriquejf
Patch has been published in the wiki under
http://www.zoneminder.com/wiki/index.php/1.24.1_Patches

Sorry for the delay !