Revision: 9020
          http://playerstage.svn.sourceforge.net/playerstage/?rev=9020&view=rev
Author:   jpgr87
Date:     2011-01-12 18:36:41 +0000 (Wed, 12 Jan 2011)

Log Message:
-----------
Converted to Player-3.0 driver model

Modified Paths:
--------------
    code/player/trunk/server/drivers/stereo/stoc.cc

Modified: code/player/trunk/server/drivers/stereo/stoc.cc
===================================================================
--- code/player/trunk/server/drivers/stereo/stoc.cc     2011-01-12 05:02:12 UTC 
(rev 9019)
+++ code/player/trunk/server/drivers/stereo/stoc.cc     2011-01-12 18:36:41 UTC 
(rev 9020)
@@ -193,15 +193,15 @@
 
 #define CUTOFF_DIST 5
 
-class STOC:public Driver
+class STOC : public ThreadedDriver
 {
   public:
     // constructor
     STOC (ConfigFile* cf, int section);
     ~STOC ();
 
-    int Setup ();
-    int Shutdown ();
+    virtual int MainSetup ();
+    virtual void MainQuit ();
 
     // MessageHandler
     virtual int ProcessMessage (QueuePointer &resp_queue,
@@ -261,7 +261,7 @@
 // Constructor.  Retrieve options from the configuration file and do any
 // pre-Setup() setup.
 STOC::STOC (ConfigFile* cf, int section)
-       : Driver (cf, section),
+       : ThreadedDriver (cf, section),
        exposure ("exposure", 0, 0),
        balance ("balance", 0, 0),
        gamma ("gamma", 0, 0),
@@ -332,7 +332,7 @@
 
////////////////////////////////////////////////////////////////////////////////
 // Set up the device.  Return 0 if things go well, and -1 otherwise.
 int
-  STOC::Setup ()
+  STOC::MainSetup ()
 {
   int res;
   
@@ -499,22 +499,20 @@
   // Start video streaming
   res = video->Start ();
     
-  StartThread ();
   return (0);
 }
 
 
 
////////////////////////////////////////////////////////////////////////////////
 // Shutdown the device
-int
-  STOC::Shutdown ()
+void
+  STOC::MainQuit ()
 {
-  StopThread ();
 
   int res = video->Stop ();   // Stop video streaming
   res = video->Close ();  // Close camera
   PLAYER_MSG0 (1, "> Closed camera connection.");
-  return (0);
+  return;
 }
 
 
////////////////////////////////////////////////////////////////////////////////


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

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to