Revision: 7121
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7121&view=rev
Author:   natepak
Date:     2008-10-29 21:44:33 +0000 (Wed, 29 Oct 2008)

Log Message:
-----------
Include example of saving frames

Modified Paths:
--------------
    code/gazebo/trunk/examples/libgazebo/camera/camera.cc

Modified: code/gazebo/trunk/examples/libgazebo/camera/camera.cc
===================================================================
--- code/gazebo/trunk/examples/libgazebo/camera/camera.cc       2008-10-29 
21:43:23 UTC (rev 7120)
+++ code/gazebo/trunk/examples/libgazebo/camera/camera.cc       2008-10-29 
21:44:33 UTC (rev 7121)
@@ -68,6 +68,19 @@
     return -1;
   }
 
+  // Save frames using gazebo's build in method
+  printf("Save frames on\n");
+  camIface->Lock(1);
+  camIface->data->saveFrames = true;
+  camIface->Unlock();
+  usleep(1000000);
+
+  printf("Save frames off\n");
+  camIface->Lock(1);
+  camIface->data->saveFrames = false;
+  camIface->Unlock();
+
+  // Manually save frames
   int count = 0;
   char filename[50];
   while (true)
@@ -76,10 +89,10 @@
     camIface->Lock(1);
     SaveFrame(filename, camIface->data);
     camIface->Unlock();
-
     usleep(100000);
     count++;
   }
+
   return 0;
 }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to