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

Forum for questions and support relating to the 1.24.x releases only.
Locked
genanr
Posts: 9
Joined: Tue Apr 08, 2008 9:49 pm

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

Post 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
User avatar
henriquejf
Posts: 77
Joined: Tue Feb 10, 2009 12:01 pm
Location: Brazil

Post 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;
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
User avatar
henriquejf
Posts: 77
Joined: Tue Feb 10, 2009 12:01 pm
Location: Brazil

Post 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 !
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
Locked